Architecture Criticism: SQL Server FOR XML in XSLT for Rich HTML Interface

Can I get constructive feedback on the next architecture?

simplified architecture:

Return XML from your SQL Server (using FOR XML) and feed it straight into an XSL transformation to create a rich HTML website.

What are the pros and cons of such a system compared to the traditional three-tier ASP.NET architecture?

0


source to share


4 answers


We did something similar. And it works for very simple pages. But as soon as you want to include some client side javascript and the like, you are doomed.

The generated output is hidden in XSLT stylesheets and is very difficult to read, maintain, and correct.



Testing can be done, but also with much more effort than before.

The MVC pattern and similar approach are much better suited for such a scenario.

+3


source


Two cons.



  • Data processing with C # or VB.net becomes more difficult because you don't have classes with properties (code intellisense), but xml-documents.

  • There are built-in asp.net controls for validating data input (both client-side and server-side). You cannot use them if you are using XSLT to create your HTML page.

+1


source


I did something similar in a project. I believe the architecture is very clean and scalable, but I would only advise you to use it if you have a lot of XSLT experience at home.

We have several XSLT templates and a generic C # class that performs transformation using XSLT parameters. We get very good performance, but it can be difficult for new developers to maintain the application.

+1


source


One of the professionals:

  • You can create XSLT templates that generate HTML for the browser or XAML for WPF / Silverlight.
+1


source







All Articles