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