|
-
Jul 20th, 2007, 06:17 PM
#1
Thread Starter
Hyperactive Member
[2005] Database, IDE vs Me...
Hi
I have always use databases in my applications by manualy querying the DB and populating lists and combo box's, is this manual databinding?
Also I have never used the IDE to add a datasource, I watched a video tutorial once and thaught doing it manualy appeared to be easier and more dynamic, So naturally I turned a blind eye to the DataSource stuff in a project and to databinding and datasets etc (I hate wizards), i pretty much always just use datareaders. I realize that if I do things manualy I need to keep an eye on the DB for changes (if multiuser system)... What are the other cons of doing things my way or the more conventional "Add a datasource" way. It doesnt seem to me to have many benifits, but I obviously dont know much so I need some advice as I dont want to form a bad habbit and waste time and effort when the "Other" way is easier or better suited...
-
Jul 20th, 2007, 06:51 PM
#2
Re: [2005] Database, IDE vs Me...
When it comes to VB.NET 2005, the stigma that used to be placed on the "automated" way and using the wizards for data access kinda disappeared. With the advent of type-specific datasets, much of the problems with data binding were taken care of.
Personaly I still prefer to do it the old-fashioned way, primarily because for me it's faster to make changes and get things updated. As for which is better suited... it's like asking which is better to swat a fly with: a hammer or a baseball bat. Both will accomplish the same thing to varying degrees... it's about the right tool for the right job and what you are most comfortable with. I don't mind dealing with the guts of data, so that's the way I do it.
Others are more comfortable having that stuff hidden from them. It's a preference thing.
-tg
-
Jul 20th, 2007, 07:05 PM
#3
Re: [2005] Database, IDE vs Me...
I've worked on my own ever since I started in .NET so most of my stuff has been relatively small scale. I recently created my first 3-tier application. In my DAL I had the IDE generate a typed DataSet with TableAdapters. It saves a lot of time both in the initial setup and later, due to the fact that you get Intellisense everywhere.
In the BLL I had each of my business objects wrap a typed DataRow from that DataSet. I then declared typed-collection classes for each of my business objects, so when I loaded the data from my DAL I wrapped each row in a business object, added that to a collection then passed the collection on to the PL. There the collection was bound via a BindingSource to one or more controls.
All the members of the business objects that dealt with the rows or tables from the DataSet were declared Friend, so the PL never saw them. I highly recommend using Data Sources and data-binding. They are big time-savers, and isn't that what we use an IDE for? Obviously if you're used to, and happy with, the "old" way then by all means stick with it, but you should NOT do so just because you think there's something inherently wrong with the "new" way.
Last edited by jmcilhinney; Jul 20th, 2007 at 08:31 PM.
-
Jul 20th, 2007, 07:38 PM
#4
Thread Starter
Hyperactive Member
Re: [2005] Database, IDE vs Me...
Thanks guys.
The awnser is clear "Try it and find out"...
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
|