How to distingusih Business Layer and Data Access Layer requirements

P

pratham

Hi!
I'm making a database application and i heard from a friend that it is
more
proffecional and easy to do this with bussines objects. Can anyone tell
me
where i can find more info on bussines objects and how to implement
them
with c#? I would appreciate any help.

How can i decide that what things go into business layer and what
things go into data access layer .. can some one give me example based
on northwind or pubs or something like Customer, Orders, Products
example..

if some one have nice example to show this please mail it to
(e-mail address removed) .. please

some light on buisness entities, business components , business
processes , business objects , business logic layer.. oh god so many
terms..

Thanks in advance
Praveen
 
S

sloan

Check my blog entry(ies)

http://sholliday.spaces.live.com/ 6/5/2006
5/24/2006

the first one is for 2.0, the second one for 1.1


The example above uses the Northwind database, so it should be a good
platform to bounce off of.


If the site keep crashing your browser .. try a browser besides IE to
download the code.
I'm not sure why, but the latest IE patch, and the spaces.live.com sites
don't like each other.
 
J

John Timney \(MVP\)

Tiered applications are not language specific - they are driven by design.
A good place to start are wikipedia's pages on Multi-tiered architcture:

http://en.wikipedia.org/wiki/Multi-tier_architecture

and Microsoft's patterns and practices site:
http://msdn.microsoft.com/practices/gettingstarted/default.aspx

If you want a very simple explanation, your business tier handles the
manipulation of data passing between a presentation tier and your data tier
(usually a database of some form). In many systems the data tier does
nothing with the data other than accept manipulated data from the business
tier and stores/retrieves it. Splitting your code between gathering and
validating input (presentation tier), manipulating data (business tier) and
storing/retrieving data (data tier) allows you to easily change a layer
without affecting other layers and gives you objects that are potentially
easily re-used in other applications.

Hope that helps. Unfortunately its a topic you really need to read up on
and can't be easily explained in a sentence or two!
 
T

ThunderMusic

Splitting your code between gathering and validating input (presentation
tier), manipulating data (business tier) and storing/retrieving data (data
tier) allows you to easily change a layer without affecting other layers
and gives you objects that are potentially easily re-used in other
applications.
a good example of changing a layer is for the Data Layer... let's say today
you have an Access Database because it suits your needs... in 1 year or
two, if access is not good enough for you anymore for any reason, and you
change for SQL Server or even worse (because some sql statements are
completely different, not because I find it,s a bad software) Oracle. Then,
you just have to change the Data Layer and everything else will work as if
it were Access or any other data store type... even indexed files... ;)

If you have 2 data sources, I use 2 Data Access Layer (one for each data
source) and manipulate the data in the business layer... like compare some
data, associate/dissociate data, et al... Let's say you have a client with
it's name, address et al. in one DB and in another DB you have what the
client bought from you, when, where, et al. you can get the data from each
db in your Data Layers, then manipulate them in your business layer... at
least, that's what we did, but maybe it can be better in some case to handle
everything in data layer...

So it requires minimal changes to things that could possibly modify all the
application...
"Unfortunately its a topic you really need to read up on and can't be
easily explained in a sentence or two!"
I second...

I hope it helps clarifying things

ThunderMusic
 
C

Cor Ligthert [MVP]

Pratham,

You can follow all things what are written about busines and data tiers, for
me they are from the Unix time, while they were first (as I did) sometimes
used on mainframes.

Try the standard data process as Microsoft is now using. You can do that
with the Sample NorthWind database. Follow for that what is written on this
page. It can be done with any managed program language and gives beside the
code the same results.

http://www.vb-tips.com/dbpages.aspx?ID=1139f14a-c236-4ad7-8882-b1ed16424252

You will see that it uses in the created XSD the constrains from the
database.
(You can of course as well set that in the XSD yourself but that is much
more work and they might than not conflict)

Therefore in my idea use that what fits you the most and don't talk about in
fact not standard in Net used old Unix/Mainframe central processing
technique terms anymore.

However just *my* idea.

Cor
 

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

Top