RE: n-layer approach
- From: Adlai Maschiach <AdlaiMaschiach@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 5 Mar 2007 00:15:05 -0800
Hi
There are many reasons why you should use nTier
Applcations , But not all of them relate to "Enterprise Application"
and "Server Load" but to simple down to earth bug solving
and seperation of resources for code reuse.
lets go with these two examples:
1. example one is like the question why use Stored Procedured
or why even use Sql2005-Express and not access. and the answer is simple :
a) so I can devide my work so one person whould work and help me in the
design of the database without beeing dependent of him , b) if theres a bug
with the SP , we know that it's a SP problem with small or no effort.
2. Code reuse , you say you write many web sites , I guess that most of them
have "tblArticle" and "tblForum" and on and on, or in short , just like the
"BeerHouse" example has many usefull modules that you can be reuse . the same
is in your applications , meny modules you write so many times . and you know
by heart , wouldn't it be simpler to reuse the security component or the
forum component..... and many more .
.... are these two good enough examples of non enterprise related samples
which can drive you to re-think about all of this ?
-------------------------------------------
אם תשובה זו עזרה לך, אנא הצבע "כן"
If my answer helped you please press "Yes" bellow
Adlai Maschiach
http://blogs.microsoft.co.il/blogs/adlaim/
"Dotnet" wrote:
I want to so the "right thing". But first, I have a confession to make..
I've built a few ASP.NET sites now (Version 2.0), and they all work fine.
However, I have (and here's the confession) used the SqlDataSource in each
one of them.
I've read a number of blogs and articles that tell me this is just, well,
sinful. I have to adopt an n-layer/tier approach which makes use of a Data
Access Layer and a Business Logic Layer. I've researched this, and to me it
seems like a whole load of extra work for nothing.
The kind of sites I build are generally online magazines and web sites for
small to medium sized companies. I am not interested in getting involved in
"enterprise" applications, and I work on my own, so I don't have to worry
about cubicled specialists needing to work on bits of the web site in
isolation. Also, these sites will never change database, nor require a
windows form front-end. If any of them get 20,000 page impressions a month,
the owner will be well pleased. (Actually, one of them gets 1,000,000 a
year).
One of the sites was a migration from classic ASP, and resulted in a 90%
reduction in the number of lines of code. To me, this seems like a 90%
reduction in the likelihood of bugs, but then, I admit to missing the point.
If I were the cynical type, I might find myself thinking that the scorn
poured on the SqlDataSource in certain quarters is a result of fear. Using
it, I can build a site in a quarter of the time that it took me to build
something similar using classic ASP, and it's, ermmm... pretty simple to do.
I can see that it's simplicity will allow a whole load of people to build
sites commercially, who may not have found it so easy with scripting or
ASP.NET 1.x, which means the web development market will become more
competitive.
However, I don't consider myself cynical, and therefore must be missing
something important. Can anyone tell me what it is? Why should I be
adopting an n-layer approach?
Thanks
Mike
- Follow-Ups:
- Re: n-layer approach
- From: cowznofsky
- Re: n-layer approach
- From: Dotnet
- Re: n-layer approach
- References:
- n-layer approach
- From: Dotnet
- n-layer approach
- Prev by Date: Re: vbc compiler error code 1
- Next by Date: Re: ASP.NET "XSL processor stack has overflowed."
- Previous by thread: n-layer approach
- Next by thread: Re: n-layer approach
- Index(es):
Relevant Pages
|