locked
How to decide when to use Dynamic Data App? RRS feed

  • Question

  • User-1390135866 posted

    If I should or not use Dynamic Data in my applications?

    Whats the maximum size?

    Or should I just use it with prototype applications?

    Sunday, July 6, 2008 10:08 PM

All replies

  • User-330204900 posted

    If I should or not use Dynamic Data in my applications?

    Whats the maximum size?

    Or should I just use it with prototype applications?

    From what I've seen Dom,

    1. I would definately use it for prototyping apps (Data Access) and then I'd customize it to suit my needs
    2. I think it has the same limitations as any ASP.Net web forms application running on which ever data access layer you choose to run.
    Monday, July 7, 2008 4:00 AM
  • User-1390135866 posted

    If I should or not use Dynamic Data in my applications?

    Whats the maximum size?

    Or should I just use it with prototype applications?

    From what I've seen Dom,

    1. I would definately use it for prototyping apps (Data Access) and then I'd customize it to suit my needs
    2. I think it has the same limitations as any ASP.Net web forms application running on which ever data access layer you choose to run.

     

     Thanks partner.

     So, 1: You would use it not just for prototype apps, but for production apps too?
     

    Monday, July 7, 2008 8:35 AM
  • User-330204900 posted

    Yes I don't see why not, the FieldTemplates used buy the DynmaicControl & DynamicField are worth using in production alone for their ability to reduce the amount of code you have to write. Just follow through some of the demo's and you'll be converted yourself.

    See some video tutorials here

    Monday, July 7, 2008 8:52 AM
  • User-383448179 posted

    Dynamic Data is a good technology for doing Rapid Applicaton Development which can be used for prototying initially. It has powerful data annotations attrbutes and validation mechanism which makes it a good candidate for making production level applications.

    What is the maximum size that you are referring to?

    Monday, July 7, 2008 6:11 PM
  • User-1390135866 posted

     I'm just trying to find out if there is any risk I am not visualizing while implementing Dynamic Data in production apps.

     Thanks rustd.
     

    Wednesday, July 9, 2008 12:05 AM
  • User-1390135866 posted
    Hi sjnaughton.

    I trying to insert a business logic layer between the web app. and the datacontext class. Do you think it is possible? I just don't want to mix up my business logic with LINQ querys.

    Thanks for your help.
    Wednesday, July 9, 2008 12:45 AM
  • User660823006 posted

    You have a couple choices here:

    1) Because the DataContext (from Linq to SQL) is a partial class you can create a partial classs to extend it and add your business logic there

    2) You can also grab our futures release from http://www.codeplex.com/aspnet/Release/ProjectReleases.aspx?ReleaseId=14475 and use the DynamicObjectDataSource which allows you to write Dynamic Data pages using ObjectDataSource behavior which woudl call your business layer which can then use whatever underlying data technology of your choice for the data access layer.

    In the next version of Dynamic Data we are going to focus heavily on this type of pattern.

    Wednesday, July 9, 2008 2:11 AM
  • User-330204900 posted

    Hi an example of business logic would look like this:

    public partial class NorthwindDataContext : System.Data.Linq.DataContext
    {
    	partial void InsertCustomer(Customer instance)
    	{
    		var NWDC = new NorthwindDataContext();
    		if (NWDC.Customers.SingleOrDefault(c => c.CustomerID == instance.CustomerID) != null)
    		{
    			throw new ValidationException("Duplicate CustoemrID is not allowed");
    		}
    		else
    		{
    			// finally send this to the DB
    			this.ExecuteDynamicInsert(instance);
    		}
    	}
    }
    Here I have implemented the partial method InsertCustomer for the NorthwindDataContext so what I'm doing is checking that there is not already a customer with the same CustomerID.
    You could also look at Scot Guthries Linq to SQL series

    Part 6: Retrieving Data Using Stored Procedures
    Part 7: Updating our Database using Stored Procedures

    if you want to implement some of your business login in T-SQL sprocs.

    Hope this helps [:D]

    Wednesday, July 9, 2008 3:16 AM
  • User822431265 posted
    hello , Do not use these type of logics in your application code. you can use validation at time of propery assign to entity.
    Tuesday, December 2, 2008 1:08 AM