Re: n-layer approach
- From: "Dotnet" <someone@xxxxxxxxxxxxx>
- Date: Mon, 5 Mar 2007 09:09:07 -0000
Not enough reason for me to re-think yet. I use SPs exclusively, because I
don't like seeing all the SQL in my pages, and I work on my own. I shall
investigate the Beerhouse sample, but reuse surely means forcing the next
development to adopt/inherit the objects and properties of the previous one?
What if they are not compatible? Do I just keep adding methods and
properties to an object so that I can cover all eventualities? Or do I add
extra levels in by using a base object and then create my own that inherits
from it each time?
I don't use any code generation tools, and a significant part of any
development for me is creating all the stored procedures. n-layer won't help
me there, will it? All it does is give me a whole load of objects to code
too? I still don't get the point.
Are there server-load issues in relation to the SqlDataSource?
"Adlai Maschiach" <AdlaiMaschiach@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:A922BA72-33D9-4DCA-BBC3-254C9E7ABC2A@xxxxxxxxxxxxxxxx
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
.
- References:
- n-layer approach
- From: Dotnet
- RE: n-layer approach
- From: Adlai Maschiach
- n-layer approach
- Prev by Date: 3-tier development
- Next by Date: Re: ASP.net code to start running a win form issue?
- Previous by thread: RE: n-layer approach
- Next by thread: Re: n-layer approach
- Index(es):
Relevant Pages
|