By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,639 Members | 1,988 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,639 IT Pros & Developers. It's quick & easy.

Componentizing a database application

P: n/a
I am fairly new to VB.NET programming but have built many database applications in Access SQL Server etc.

I need to find a good book or other reference material that will help me take my OO programing skills to the next level.

I can build forms and bind data to them from SQL server, but somehow this seems not to be the best way to use an OO programming language.

I guess the professional way of doing it is to have classes for each of the tables in the database and have methods that ADD UPDATE and DELETE records for the table plus additional methods that load the object from the database etc. The propoerties for the class would correspond to the fields in the database.

So for example you might have a CUSTOMER table and a CUSTOMER class that handles everything to do with manipulating customers. Manipulations include adding, updating deleting, validating, retreiving from the database. Then i guess you would have a CUSTOMERS collection class that is a collection of customers so that for example you could load the collection into a datatable and present them in a grid.

Then one level deeper is that you may have an INVOICE class that has a CUSTOMER object as one of its properties. etc etc etc

It seems to me that this approach although difficult to get right will result in a much more flexible end result.

I have loads of books on VB.NET and ASP.NET and the only one that I have found that even touches on this subject is "Beginning ASP.NET Databases with VB.NET by Wrox Press" Chapter 10 Componentization.

Does anyone know of any books, etc that can help me understand how to do this componentization properly ( i need lots of example etc )? Also, are there any tools out there that will examine a SQL server database and generate all the data classes and methods for you?

Thanks for your help
Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi Hpployd,

Why so afraid about your OO programming skills, when you use a dotNet
language you cannot pass that, so why not see the resource kit of VB and see
how it is done and as welk the godotnet link I show beneath.

Another good place is regulary read the newsgroup.

microsoft.public.dotnet.languages.vb

and/or become a contributor.

VB.net Resource kit
http://msdn.microsoft.com/vbasic/vbrkit/default.aspx

And if you have problems installing the resource kit
http://msdn.microsoft.com/vbasic/vbr...q/#installvdir

Another resource for learning is the Quick Starts
http://samples.gotdotnet.com/quickstart/

I hope this helps?

Cor
Jul 21 '05 #2

P: n/a
Hello,

I know what you mean. Most folks don't really make an attempt to actually
"understand" what OO programming gives them. Those folks are destined to
stay in the world of structured programming with simple components.

The question you ask goes beyond just the database concept that you are
dealing with... it goes to the heart of how to use Objects to solve
problems.

One good place to start is the microsoft patterns and practices literature.
For the specific questions below, see this link:
http://www.microsoft.com/resources/p...e/default.mspx

To really begin to understand the ideas behind OO, however, you need to go
beyond creating a set of objects that represent database tables.
I strongly recommend the following book: "Design Patterns Explained, a New
Perspective on Object Oriented Design" by Shalloway and Trott.

The book is very easy to read, and it will improve your understanding of
components and objects by 150% at least.

If you'd like a quick intro to design patterns, you can find a PPT of a
presentation on this topic at:
www.ipma-wa.com/forum/2004/design_patterns.ppt

Hope this helps
--- Nick
"hplloyd" <hp*****@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
I am fairly new to VB.NET programming but have built many database applications in Access SQL Server etc.
I need to find a good book or other reference material that will help me take my OO programing skills to the next level.
I can build forms and bind data to them from SQL server, but somehow this seems not to be the best way to use an OO programming language.
I guess the professional way of doing it is to have classes for each of the tables in the database and have methods that ADD UPDATE and DELETE
records for the table plus additional methods that load the object from the
database etc. The propoerties for the class would correspond to the fields
in the database.
So for example you might have a CUSTOMER table and a CUSTOMER class that handles everything to do with manipulating customers. Manipulations include
adding, updating deleting, validating, retreiving from the database. Then i
guess you would have a CUSTOMERS collection class that is a collection of
customers so that for example you could load the collection into a datatable
and present them in a grid.
Then one level deeper is that you may have an INVOICE class that has a CUSTOMER object as one of its properties. etc etc etc
It seems to me that this approach although difficult to get right will result in a much more flexible end result.
I have loads of books on VB.NET and ASP.NET and the only one that I have found that even touches on this subject is "Beginning ASP.NET Databases with
VB.NET by Wrox Press" Chapter 10 Componentization.
Does anyone know of any books, etc that can help me understand how to do this componentization properly ( i need lots of example etc )? Also, are
there any tools out there that will examine a SQL server database and
generate all the data classes and methods for you?
Thanks for your help

Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.