Author |
Topic |
00kevin
Yak Posting Veteran
78 Posts |
Posted - 2006-10-04 : 11:17:21
|
The developers at my company are considering a very unorthodox approach to web design and I was wondering what everyone here thought of it.They want to move the business logic layer and the presentation layer into sql server. This means that most of the html the code for the application will be generated from sql server. Forms, Controls, Tables, Headers, etc will be generated using a merge template system developed in sql server. All the templates will be stored in another database and managed through a simple interface developed in vb.net. Rather then use .net controls they are going to write sql functions to produce the html for combo boxes, input boxes, paging, etc.They argue that it will be faster and much more simple to modify, backup, and deploy because every thing will be in one place and they can access it all remotely. Basically the only thing asp.net will be used for is to connect to the database and get the page requested. Has anyone else tried this and failed? I need some reason to argue against this! I've tried to say that it will be much slower, but they proved me wrong by showing some speed tests. Using the example they had, sql produces dynamic web pages much faster. The reason for this is that there are no thick .net controls for it to manage. All it does is merge the data from its own server into the html template. They also said that they can port the the website to different webservers (php, classic asp, etc) with out much work at all. In other words, they don't want their system to be affected by new versions of .net anymore. They complain that some of their other applications are working in a hybrid state and it is a pain to manage. They don't have the time to port everything over to a new version of .net all the time.I think that the memory usage is going to go through the roof because sql server will be doing nothing but replacing/ merging text data. They argue that if that happens they can just put the business logic and the presentation layer on another sql server box. anyway, maybe you guys can help me save this situation from a WTF! |
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2006-10-04 : 11:35:09
|
1) Post this on the DailyWTF.com2) quote: I need some reason to argue against this!
They have their hammer (SQL SERVER) and see everything as a nail. Do they understand that development languages exist for the express purpose of creating web pages? That .NET is an extremely powerful tool, and can do a LOT more than SQL will be able to? Who cares if the web page was returned by SQL in .009 seconds instead of .02 seconds. You cannot match the richness of the controls you get in .NET with something cobbled togeather in plain html. How are they going to handle AJAX? I would suggest a nice Google search for more.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-04 : 11:39:08
|
i don't even know how to properly respond to this one... it seems just way to bizzare.so you're going to generate .net code, compile it and display it from sql server? dear lord.in the end that'll be just ordinary html.no caching, no nothing. tell them to show you some stress tests.how are you going to handle security?there are so many howto's that i can't even imagine...maybe you should give them this to read:http://weblogs.sqlteam.com/mladenp/archive/2006/09/27/13068.aspxGo with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
00kevin
Yak Posting Veteran
78 Posts |
Posted - 2006-10-04 : 11:47:49
|
there I just posted this on thedailywtf. I feel better now.As for ajax, they will only use what they need from vs.net. |
 |
|
00kevin
Yak Posting Veteran
78 Posts |
Posted - 2006-10-04 : 11:56:29
|
@spirit1 all they want is ordinary html/javascript. That is all the web designers know anyway (graphic guys). They can export the templates or make them available to any web designer and have him work on the design. They said they want to keep things simple for all their applications. They said stress testing won't be a problem. Because most pages shouldn't be that large for sql server to parse. as for security they think it will be more secure. It will connect to the database using the webserver (just like every application) and it will be more secure beause the business logic will be stored in sql server.oh well. I might as well just go back to using notepad :( |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-04 : 12:01:09
|
can you tell us what kind of app this will be?We'd get a better idea how to prevent them from screwing it up. Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
00kevin
Yak Posting Veteran
78 Posts |
Posted - 2006-10-04 : 12:11:55
|
This is going to be used for several applications both external and internal apps. So this is like an enterprise solution to all their problems. :) They want to be able to turn out websites quickly.The first application module is a new billing system. :( funny that they should start with the most crtical of systems for the business. I'm not sure what they are gonig to use for the invoice printer. They might have to actually develop something in .net for that. All I know is that email template system is allready created and it uses CDONTS via sql server to merge and send emails. anyway.. My resume is ready.. :) |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-04 : 12:18:42
|
billing system, cdonts... sheesh... i'm very sorry.I'll be thinking of you when i drink my first beer tonight. Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
X002548
Not Just a Number
15586 Posts |
Posted - 2006-10-04 : 12:43:42
|
I don't understand....I have ALL OF MY Business logic in the backendSecond, I've messed around with presentation layer stuff being passed to the front end...As far as I see, the less the front end has to do, the better I FeelThe only additional work SQL ever has to do is the path to the dataNow I know Jeff is going to disagree, but fomatting in the sproc shouldn't cause any performance issue. And if you are concerned about that, I would institute sproc logginghttp://weblogs.sqlteam.com/brettk/archive/2006/09/21/12391.aspxThat way you can exactly know the length of a transactionBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam |
 |
|
eyechart
Master Smack Fu Yak Hacker
3575 Posts |
Posted - 2006-10-04 : 13:26:33
|
quote: Originally posted by 00kevinAll I know is that email template system is allready created and it uses CDONTS via sql server to merge and send emails.
FYI - CDONTS was depracated, it has been replaced by CDOSYS in win2k3. CDONTS isn't even supported in win2k3 as far as I know.-ec |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-10-04 : 13:33:56
|
quote: Originally posted by 00kevin The developers at my company are considering a very unorthodox approach to web design and I was wondering what everyone here thought of it.They want to move the business logic layer and the presentation layer into sql server. This means that most of the html the code for the application will be generated from sql server. Forms, Controls, Tables, Headers, etc will be generated using a merge template system developed in sql server. All the templates will be stored in another database and managed through a simple interface developed in vb.net. Rather then use .net controls they are going to write sql functions to produce the html for combo boxes, input boxes, paging, etc.They argue that it will be faster and much more simple to modify, backup, and deploy because every thing will be in one place and they can access it all remotely. Basically the only thing asp.net will be used for is to connect to the database and get the page requested. Has anyone else tried this and failed? I need some reason to argue against this! I've tried to say that it will be much slower, but they proved me wrong by showing some speed tests. Using the example they had, sql produces dynamic web pages much faster. The reason for this is that there are no thick .net controls for it to manage. All it does is merge the data from its own server into the html template. They also said that they can port the the website to different webservers (php, classic asp, etc) with out much work at all. In other words, they don't want their system to be affected by new versions of .net anymore. They complain that some of their other applications are working in a hybrid state and it is a pain to manage. They don't have the time to port everything over to a new version of .net all the time.I think that the memory usage is going to go through the roof because sql server will be doing nothing but replacing/ merging text data. They argue that if that happens they can just put the business logic and the presentation layer on another sql server box. anyway, maybe you guys can help me save this situation from a WTF!
I tried writing about 30 different responses to this and each time I deleted it an started over ....without knowing the specifics, sounds like a horrible idea. Who knows what the exact game plan is, or what the specific needs are, or how it will be implemented -- you never know, I suppose, it could make sense in some cases. But overall, it sounds like a very bad idea and the system generated will end up being a huge monster of a mess to maintain.- Jeff |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-10-04 : 13:36:37
|
quote: Originally posted by X002548 I don't understand....I have ALL OF MY Business logic in the backendSecond, I've messed around with presentation layer stuff being passed to the front end...As far as I see, the less the front end has to do, the better I FeelThe only additional work SQL ever has to do is the path to the dataNow I know Jeff is going to disagree, but fomatting in the sproc shouldn't cause any performance issue. And if you are concerned about that, I would institute sproc logginghttp://weblogs.sqlteam.com/brettk/archive/2006/09/21/12391.aspxThat way you can exactly know the length of a transactionBrett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam
No offense Brett, I truly mean this with the utmost respect for you, but that a very common, misguided viewpoint of a DBA who doesn't know much about programming .....The more presentation you force into your database layer, the more complicated you make things for yourself and the more the developers have to work around what you are doing to present it the way they need. Classic example is the DBA doing all this great work to return a date in the specific "mm/dd/yyyy" format for the developer, and then the developer has to immediately convert it BACK to a datetime datatype from VARCHAR to actually use it for anything.- Jeff |
 |
|
X002548
Not Just a Number
15586 Posts |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-04 : 13:45:38
|
quote: Originally posted by eyechart
quote: Originally posted by 00kevinAll I know is that email template system is allready created and it uses CDONTS via sql server to merge and send emails.
FYI - CDONTS was depracated, it has been replaced by CDOSYS in win2k3. CDONTS isn't even supported in win2k3 as far as I know.-ec
Plus Microsoft itself is recommending the use of webdav for any exchange access (not exchange 12 though) from .netGo with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2006-10-04 : 13:47:35
|
i think you first HAVE TO define what you consider business logic in the first place.XML support will prove usefull if you ask me.I just love how it simplifies the EAV db model. not that you should have it Go with the flow & have fun! Else fight the flow blog thingie: http://weblogs.sqlteam.com/mladenp |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-10-04 : 15:09:23
|
quote: Originally posted by X002548 OK, I'll byteSo then what's your take on XML Support?Brett8-)Hint: Want your questions answered fast? Follow the direction in this linkhttp://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspxAdd yourself!http://www.frappr.com/sqlteam
XML support in SQL Server? Why not? It's a data format like CSV. XML has nothing to do with presentation, business logic or application code -- it's just data in a particular text-file format that is verbose but well-defined, validatable and very flexible.- Jeff |
 |
|
byrmol
Shed Building SQL Farmer
1591 Posts |
Posted - 2006-10-04 : 15:53:39
|
[code]XML support will prove usefull if you ask me.I just love how it simplifies the EAV db model.[/code]Example please...DavidMProduction is just another testing cycle |
 |
|
rockmoose
SQL Natt Alfen
3279 Posts |
Posted - 2006-10-04 : 16:24:08
|
I have to give credit for such a wild idea.It might work for crude and standarized ui generation.Anything beyond that, it will fail in the sheer complexity of the task.I would not be too concerned (depending on how manic your co-workers are), the endeavour will soon be abandoned.I don't think this crazy idea is a WTF yet,it depends on how much pain is suffered in the birth process of this new ui-generation tool.And how much pain is inflicted on future caretakers of the monster.How far will they go!?--------------------------------------------------------------xml, a data format?I thought it was some sort of text markup lingorockmoose |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-10-04 : 16:46:07
|
I have done 2-1/2 pieces of this (data and business logic, and some presentation logic, in the database) and I have to say I won't ever put presentation logic in the DB again. As Jeff indicated, it's a huge mess to manage, and as rockmoose said, it's only good for crude/basic/standard GUI stuff. It appeals to people in the short term because if it's designed ABSOLUTELY FLAWLESSLY PERFECT, you can make simple database updates to affect presentation changes that would take hours to do with normal programming techniques. And when I say ABSOLUTELY FLAWLESSLY PERFECT, I mean that I tried about 12 entirely different architectures prior to this one, and worked out every single change management issue in those 12 prototypes. It was NOT my first or second attempt at designing the app. Plus I happened to have a small problem domain that wouldn't interact or blow up with other applications (no ad-hoc reports, etc.) and even smaller change management requirements.For something like a billing system, it will DIE. At least they're ambitious for trying. And the second they have to rebrand or multi-brand the site, it will bite them really hard.BTW, the idea that they write it once in the database and deploy it for .Net, PHP, ASP and such is total bullshit, that DOESN'T WORK. If a new version of .Net comes out, hey, guess what? The old version STILL WORKS, they don't need to rewrite anything. It all boils down to plain HTML at some point. In order for this to even come close to being true they'd have to set up the entire app as a single web page making AJAX calls to all the web services needed. Not a bad approach really, but it has nothing to do with PHP/ASP/ASP.Net and nothing to do with the database. |
 |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2006-10-04 : 18:17:29
|
Damn, should have included this earlier:http://thedailywtf.com/forums/thread/82361.aspx |
 |
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2006-10-04 : 19:33:52
|
I hate how we always get these crazy "my [coworker/boss] wants to [insert really bad idea here] ... what do you guys think?" posts, yet we never get a chance to actually talk with the people who supposedly want to actually implement these ideas. Please encourage your co-workers who want to do this to join this thread (or start a new one) and explain their reasoning themselves! I would love to hear from them directly ...(Though it does make you wonder ... is this like when someone tells a pyschiatrist or a priest about the problems "a friend" is having? ... hmmmm .... )- Jeff |
 |
|
Next Page
|