ASP.NET 2.0 vs. XSLT

G

Guest

Right,

I need some some views on the pros and cons of using XSLT versus ASP.NET 2.0
for the Presentation layer of an app. My company are looking at creating
multiple sites and multi lingual support going forward...

I have looked at Chris Lovetts post
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnexxml/html/xml02192001.asp

Some of his views are still relevant.

My view on the ASP.NET side is:

Better productivity and ease of use from a developer perspective
Reuse and maintainability of controls
Excellent tooling support in VS.NET 2005
Use of master pages and themes/skins for style changes etc..
Speed to market of writing and using controls
Unit testing of UI components using NUnitASP (not UAT testing)

Views please...
 
S

Steve C. Orr [MVP, MCSD]

XSLT is a toy compared to the power of ASP.NET
If your needs are simple and you're sure they will stay that way then XSLT
may suffice. But if you're building industrial strength software then
ASP.NET is the way to go.
 
M

Marc Scheuner

I need some some views on the pros and cons of using XSLT versus ASP.NET 2.0
for the Presentation layer of an app.

Why "vs" ? You can combine the two - use ASP.NET for much of the
plumbing and the basic UI, and XSLT where appropriate to turn XML data
into presentable content.

Marc
 
S

Steve C. Orr [MVP, MCSD]

Ya, that's a good point Marc.
I just wrote an ASP.NET project that involved a touch of XSLT. They're not
necessarily mutually exclusive, but you will have to choose one as your
primary development platform. I suggest ASP.NET, but go ahead and use some
XSLT with it once it a while if you want. Certainly XSLT is better at some
kinds of things than ASP.NET - just not most things.
 
G

Guest

I have been having a think about this:

- Which is faster?
- With ASP.NET 2.0 you can do alot of performance tweaks such as fragment
caching etc. so whole page does not have to be posted back. Does XSLT offer
some kind of equivalent?
- U get stuff given to you for free e.g. validation, u get protection
against cross site scripting...
- If you were serving the xslt server side how does this scale up compared
to ASP.NET?
- How would you handle XSLT with a more interactive website not just one
serving up data, looking at MSDN and the article link in my 1st post MSDN
uses XSLT. How interactive is this and how often has it changed?
 
K

Kevin Spencer

This is like comparing a hammer to a screwdriver. Which is the better tool?
I suppose it depends on whether you're trying to drive a nail or a screw.

--
HTH,

Kevin Spencer
Microsoft MVP
Digital Carpenter

A man, a plan, a canal,
a palindrome that has gone to s**t.
 
J

Jon Paal

<%@ Page Language="VB" Debug="True"%>
<%@ Import Namespace="System.Xml"%>
<%@ Import Namespace="System.Xml.Xsl"%>
<html><head></head><body><form runat="server">
<b>XSL Transformation Example&nbsp;</b><br/>
<asp:Xml id="ourXSLTransform" runat="server"
DocumentSource="Bank3.xml" TransformSource="XSLT1.xsl"/>
</form></body></html>
 
S

Steve C. Orr [MVP, MCSD]

No, I don't think XSLT can do fragment caching.
It's really not very interactive. If you're going to be gathering much
input from users, ASP.NET is way better at that kind of thing.

One thing that XSLT is really good at (and really fast at) is transforming
an XML document into an attractive HTML layout.

--
I hope this helps,
Steve C. Orr
MCSD, MVP, CSM
http://SteveOrr.net
 
R

Ryan

I prefer loading the XML into a Dom Wrapper and dealing with it that
way.... XSL(T) isn't the most fun language to develop for; quite a pain
to deal with...
 
M

maxtoroq

First let me start by saying I love XSLT. When I worked with Classic
ASP I did all my formating with XSLT. ASP.NET is suposed to be the
solution for separating code and tags, but with Server Controls you end
up mixing them anyway. Parsing a Server Control is hard, while parsing
XML with XSLT is easy. I wish Server Controls and ASP Pages where more
like JSP Documents, where everything is wellformed and valid XML, and
you have control structure tags (if then, for each), variable setting
tags and more.

Currently, the following is my paradigm:
- Request occurs.
1.- Deserialize Business/Helper objects using XML configuration files.
2.- The objects do the work.
3.- Serialize the objects and transform them to XHTML with XSLT.
- Response occurs.

Any thoughts anyone?
pd. I still haven't tried XSLT 2.0 (using Saxon), but it is suposed to
be much more powerful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top