creating Data Access Layer, how?

J

Jeff

..NET 2.0

I wonder how a Data Access Layer should be created using best practice!

So if you have a link to an article about this subject then please post it
here

I've heard Microsoft has a special pattern for this, but I have forgotten
it's name, I think the name is something like Data Object Block?? I'm not
sure about that.

Any suggestions?
 
G

Guest

Hello,

Ideally you could use the Enterprise Library and datareaders for high
performance.

But if you application is going to hold less than 200 users, and you don't
have quite much time develop boiler plate code, you can base your datalayer
in typed datasets (VS 2005 has a wizard to automate the creation of this
datasets and dataadapters):

http://www.theserverside.net/discussions/thread.tss?thread_id=37108
http://www.15seconds.com/issue/030401.htm

Good luck
Braulio



/// ------------------------------
/// Braulio Díez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 
G

Guest

Braulio,

Do you use the datareaders to populate business objects? If you go with this
approach, how do you handle things like sorting/filter that comes with a
dataset or don't you worry about that?

I'm just curious. I"m on the fence about datasets vs business objects and
this is one of the things that I wonder how others deal with this issue.

Thanks, Dave.
 
G

Guest

Hello,

I have used both, DataSet and DataReaders.

About DataSet they are quite easy to use but not a good approach if your
site has to support a lot of traffic, or if you have a cheap hosting (well
here things depends more on things like the cache that you are going to
apply)

About DataReader and custom business objects, you need to make more
boilerplate code, use custom datasources and custom paging. It's quite
optimal because you just take from the SQL Query jsut the records that you
need for paging, but you have to implement all the queries and code to
perform sorting and paging. Take a look at this links:

http://aspnet.4guysfromrolla.com/articles/040407-1.aspx
http://aspnet.4guysfromrolla.com/articles/032206-1.aspx

If you need more help just give me a shout.

HTH
Braulio

/// ------------------------------
/// Braulio Díez
///
/// http://www.tipsdotnet.com
/// ------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top