473,386 Members | 1,841 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Componentizing a database application

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
2 1499
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: noah | last post by:
Does PHP have a feature to associate Cookie sessions with a persistent database connection that will allow a single transaction across multiple HTTP requests? Here is how I imagine my process: I...
8
by: BMM | last post by:
Hi. I have a dumb question. Is a database an application? And, in the context of a data-driven web-enabled application, is the database still an application? I have a project lead who says it is....
18
by: mountain man | last post by:
Greetings to all database professionals and laymen, Let us make a bold assumption that we have developed a software tool for the SQL Server environment which simply acts as an interface between...
4
by: Jason_Schaitel | last post by:
I have an application that segregates data into two different databases. Database A has stored procs that perform joins between tables in database A and database B. I am thinking that I have...
18
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure...
6
by: Marvin Libson | last post by:
Hi All: I am running DB2 UDB V7.2 with FP11. Platform is Windows 2000. I have created a java UDF and trigger. When I update my database I get the following error: SQL1224N A database...
2
by: hplloyd | last post by:
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...
0
by: mel_apiso | last post by:
Hi, after uncatalog one database, and catalog again with other name, if I try to connect with this database, everything is ok, but list applications only show me the connection with the...
1
by: abhijitbkulkarni | last post by:
Hello, I am designing a .NET database application that uses 3 tier architecture. Starting initially, this application will be desktop application but I will convert it into a website later but...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.