Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DataTier - What do you do?

Status
Not open for further replies.

stnkyminky

Programmer
Oct 15, 2001
476
US
I'm debating on whether or not to write a data tier for general use in my applications. Right now I'm just coding all the SqlClient code in mods and/or forms. I understand the dis/advantages but I'm curious to actually see what other ppl are doing?


So unless I wasn't clear. Do you use a datatier? If so would you take the time to write one again?

Scott
Programmer Analyst
<{{><
 
I don't. Although I would think it would be an excellent idea for circumstances where many apps require access to the same database. I'm really sure how much time you would save making a general data tier to connect to any datasource.
 
OOP is a way of organizing a program into logical components (classes). The data tier falls into this.

There are two different &quot;types&quot; (for lack of a better word) of data tiers.

The first one :

Using SQL Server and Stored Procedures for all your data logic.

The Second one :

Creating a Class that encapsulates all of your database logic.

Why would you want to do this? That is simple. When things are broken down into logical components they are easier to. Understand, Modify and Reuse.

If all the data logic is in one place it is easier for you or another programmer to read and understand.

If you write your data tier correctly you will be able to use it in other projects.

Why would you want to do this on a small project?

In small projects it might seem like a waste of time to deal with having to create a data tier.

I can think of a couple of reasons to use a data tier on small projects

1.) How many times have your small projects all of a sudden become big projects and your program was not scalable because you had data code scattered all over the place.

2.) Practice - It is much easier to understand and create a data tier on a small project so when you are faced with a large one you are not overwhelmed.


Well thats my 2 cents ( that was probably more like a nickle )



DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top