How to decide when to use Dynamic Data App?

Last post 12-02-2008 1:08 AM by sandeep@Sunarc. 9 replies.

Sort Posts:

  • How to decide when to use Dynamic Data App?

    07-06-2008, 10:08 PM
    • Member
      11 point Member
    • Dom Márcio
    • Member since 06-01-2006, 3:11 AM
    • Novo Hamburgo - RS - Brasil
    • Posts 28

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

    Whats the maximum size?

    Or should I just use it with prototype applications?

    Márcio C. Martins - MCSD .NET - MCTS WPF
    Visit: http://oguri.blogspot.com
  • Re: How to decide when to use Dynamic Data App?

    07-07-2008, 4:00 AM
    • Star
      12,272 point Star
    • sjnaughton
    • Member since 04-29-2008, 5:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,559
    • TrustedFriends-MVPs

    Dom Márcio:

    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.
    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
    Filed under:
  • Re: How to decide when to use Dynamic Data App?

    07-07-2008, 8:35 AM
    • Member
      11 point Member
    • Dom Márcio
    • Member since 06-01-2006, 3:11 AM
    • Novo Hamburgo - RS - Brasil
    • Posts 28

    sjnaughton:

    Dom Márcio:

    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?
     

    Márcio C. Martins - MCSD .NET - MCTS WPF
    Visit: http://oguri.blogspot.com
  • Re: How to decide when to use Dynamic Data App?

    07-07-2008, 8:52 AM
    • Star
      12,272 point Star
    • sjnaughton
    • Member since 04-29-2008, 5:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,559
    • TrustedFriends-MVPs

    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

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
    Filed under:
  • Re: How to decide when to use Dynamic Data App?

    07-07-2008, 6:11 PM
    • Member
      8 point Member
    • rustd
    • Member since 07-10-2007, 6:54 PM
    • Posts 4
    • AspNetTeam

    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?

  • Re: How to decide when to use Dynamic Data App?

    07-09-2008, 12:05 AM
    • Member
      11 point Member
    • Dom Márcio
    • Member since 06-01-2006, 3:11 AM
    • Novo Hamburgo - RS - Brasil
    • Posts 28

     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.
     

    Márcio C. Martins - MCSD .NET - MCTS WPF
    Visit: http://oguri.blogspot.com
  • Re: How to decide when to use Dynamic Data App?

    07-09-2008, 12:45 AM
    • Member
      11 point Member
    • Dom Márcio
    • Member since 06-01-2006, 3:11 AM
    • Novo Hamburgo - RS - Brasil
    • Posts 28
    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.
    Márcio C. Martins - MCSD .NET - MCTS WPF
    Visit: http://oguri.blogspot.com
  • Re: How to decide when to use Dynamic Data App?

    07-09-2008, 2:11 AM
    • Participant
      1,320 point Participant
    • scothu
    • Member since 12-10-2007, 6:54 AM
    • Redmond, WA
    • Posts 272
    • Moderator

    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.

    Scott Hunter
    PM, ASP.NET Team, Microsoft
  • Re: How to decide when to use Dynamic Data App?

    07-09-2008, 3:16 AM
    • Star
      12,272 point Star
    • sjnaughton
    • Member since 04-29-2008, 5:11 PM
    • Newton-le-Willows, Merseyside, UK
    • Posts 2,559
    • TrustedFriends-MVPs

    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 Big Smile

    Steve Big Smile

    Always seeking an elegant solution.
    [Oh! If olny I colud tpye!]
    c# Bits blog
    Oh, and don't forget to mark as answer any posts that help you Big Smile
  • Re: How to decide when to use Dynamic Data App?

    12-02-2008, 1:08 AM
    hello , Do not use these type of logics in your application code. you can use validation at time of propery assign to entity.
Page 1 of 1 (10 items)