D
Dotnet
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
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