intrader wrote:
These may be two other solutions:
1. Generate a template based solution that is rendered directly via a
stored procedure. This may prove to overload the db engine.
2. Generate XML from database, render this XML to client along with XSL to
convert it to XHTML.
I would definitely pick that #1 dead least, well after even databinding.
So many things are wrong with this I don't even know where to start.
You get code for formatting data in the SQL query, as well as other code
that ought to be in the presentation layer i.e. all the extra markup it
generates (and arguably presentation code should live in the
presentation layer - not in a data persistence layer), which makes your
application harder to maintain (mixing layers does that - whether it
s business logic or presentation code in sprocs, bypassing layers, etc),
needs some extra queries for those pages that other apps won't use (more
burden, less efficient, and I can tell you the DBA won't be happy),
harder to maintain (simple presentation layer/page changes will often
need the sprocs to be updated), puts tons more unecessary load on the DB
server (making everything slow in the process), which alone is a reason
not to do it as DB servers are usually licensed per CPU (tens of
thousands of $$ per CPU) whereas an extra server (or extra resources)
for processing your ASP.Net pages will most likely be far cheaper. I
could go on about this for 3 straight weeks! If anything it reminds me
of this
http://thedailywtf.com/forums/40438/ShowPost.aspx
#2 is somewhat better, but it's still (IMHO) quite lacking/inferior to
his initial options.