DataSet designer or manual creation RRS feed

  • Question

  • What are the advantages and disadvantages of using DataSet designer vs. manual creation of datasets? Especially in the environment where structure database tables can change quite often.
    Tuesday, March 4, 2008 9:27 PM

All replies

  • Hello,


    Advantages :

    - quick developpement and few errors

    - with the Wizard, your choices are easier


    Disadvantages :

    - an enormous : when i began with Wizards in 2005, i lost my datasets in 90% of cases after having modified the structure of Sql Server 2005 tables and 3 times, i lost all my project

    - a subtle :  after all my problems, i have banished the use of the wizards. So i really learnt ADO.Net and i think that a good thing : i think i'm mastering a good part of ADO.Net and so i'm doing fewer errors current for beginners

    - a important : it's more easy to optimize the code when you code it than when you are using auto-generated code

    -  i began business programing in 1980 ( after 12 scientific programming years ). And a thing i've learnt : the importance of the code maintenance and i think that dataset , connection wizards ( and others except windows forms designer ) are more annoying when you have to very quickly modify a prog. You are stuck to a code that is not easy to understand


    I think that the designers would be useful for produicing a model of your future project in order to see if everything is according with the wishes of the furure users.

    But for a real development, it's longer to code everything but it's easier to modify latter ( sometimes 3 or 4 years with nobody to help because the team was scattered or away.

    I think that it's easier to judge a developper with a complete coding than with auto-generated code


    I know that many people will say i'm not living in the good era, but i have 25 coding years and maybe my experience would be useful


    Have a nice day



    Friday, March 14, 2008 12:45 PM
  • I think that if you're purely talking about DataSets, the DataSet designer is an essential tool.  Using strongly-typed DataSets has no significant disadvantage that I can think of, and its advantages are enormous:  it eliminates entire categories of error from your code.  All you have to do is read the code of the classes that the generator spits out to learn how much that code is doing for you.  And you definitely don't want to write that code yourself.


    The only case where I wouldn't use the designer is in cases where I'm generating the schema programmatically off of metainformation in a different form.  (Which I'm actually doing in a large project I'm working on right now.)  The principle is the same, though:  changing metainformation is easy; changing code is hard.


    Integration with a database is trickier, and more delicate, because there are now two sources of metainformation:  the database and the DataSet Designer, and it's extremely easy for them to get out of sync.  But even there:  if you look at the stored procedures that the tool generates for updates:  do you really want to write one of those yourself?  The code for handling concurrency exceptions is horrible, but it works, and it's consistent, and you don't have to write it yourself. 


    That said:  once you start writing your own SQL inside the DataSet Designer, you're in trouble.  Because once you start changing the database, you'll want to regenerate some TableAdapter SQL and leave some alone, and which is which?


    Tuesday, March 18, 2008 9:45 PM