|
-
Dec 4th, 2007, 03:16 PM
#1
Thread Starter
Lively Member
PRoper way to Use a data (Wizard or not)
Hello community,
I am creating a form in VB.Net and I realize that the way i used to do it in 2003 and what is now possible in 2005 vb are quite different.
SHould i still programaticaly make my datasets and other data objects as i did before in code or use the new feature in 2005 for quickly making a bound dataset on my form? and let them sit in the back ground now??
VB.Net uber-noob since04, Yeababy! 
-
Dec 4th, 2007, 05:40 PM
#2
Re: PRoper way to Use a data (Wizard or not)
There was no need to do it all in code even in 2003. You could still create typed DataSets and add instances in the designer even there. There was no Data Sources window in 2003 but there was still plenty of functionality that you obviously weren't using. If you weren't using that functionality in 2003 then obviously you don't have to use that and the extended functionality in 2005.
There is no should or shouldn't. It all comes down to the circumstances. I use typed DataSets and untyped DataSets, created in code and in the designer, depending on the circumstances.
I would recommend creating a Data Source, and thus a typed DataSet, in most situations, just as I would have for 2003. That said, how you use instances of that typed DataSet will vary. If you're not creating a proper n-tier app then there's no point creating a DataSet in code within the form. In that case you may as well add an instance to your form in the designer and get the benefit of design time data-binding.
If you are creating an n-tier app then you can still use a typed DataSet, but you'd create an instance in your BLL. The BLL would pass the individual tables to the DAL to be populated and saved. In the BLL you'd wrap the data from each DataRow in a business object and pass those on to your PL.
-
Dec 5th, 2007, 10:07 AM
#3
Thread Starter
Lively Member
Re: PRoper way to Use a data (Wizard or not)
I understand, I learned on VB 2003 creating all m objects programaticaly.
DIm mydatasets as dataset = new...yada yada...
I realized using information from startvbnet web site. how simple it was to simply add the datasets by draging them into your form..
I guess im just aprehensive that i will lose something in the translation form doing it programaticaly to letting 2005 take care of all of the stuff in the background.
VB.Net uber-noob since04, Yeababy! 
-
Dec 5th, 2007, 05:53 PM
#4
Re: PRoper way to Use a data (Wizard or not)
You don't lose anything, despite what some people may try to tell you. Justy like everything else, you use the tools the IDE provides to lessen your work load as long as they do what you want. As soon as you find you need more control you take over and do it yourself in code. There's no point doing everything in code though, when the IDE will end up doing exactly the same thing for you in considerably less time.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|