Re: What is pros/cons of using XSLT?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: JiangZemin (fourpillars_at_advance.com)
Date: 03/15/05


Date: Mon, 14 Mar 2005 23:44:18 -0500

Hi,
i wouldnt put "need to know form/grid elements at design time" under .NET
Form "Cons". You can work with dynamic controls from code-behind in .NET
Forms.

I agree with CMM's points that generating the HTML from .NET code is more
direct and will be easier to get up and running with quickly. But precisely
because XSLT is more indirect, there is some benefit to that too. It
really encourages you to think about presentation layer coding as a separate
exercise, which is a good thing IMO. So it can make it easier to adapt a
plug-and-play approach to targeting different device, and also if you want
to reuse the same bit of HTML in different parts of your site. But a lot
depends on how disciplined your developers are/need to be. Also, if i
recall correctly, its possible to update XSLT files directly on the server
without deploying a new build, which youd need to do if you generated the
HTML from code-behind.
I mention "if i recall correctly" because lately ive been doing all HTML
generation as CMM describes, and not using XSLT. The projects im working on
now wouldnt really benefit from XSLT, but if they did, id use it.

Thats why i suggest trying it out in a small area of your project, cause
theres no way to know if XSLT will help in this or future projects unless
you actually use it. The key, at least for me, was to stop reading
technical articles and tutorials about it.

PS. Im not sure that XSLT will help you target Win32 devices at all.

HTH,
Premier JiangZemin, MCSD.NET

"Fred" <Fred@discussions.microsoft.com> wrote in message
news:2026FAD7-7826-418E-8C18-B8DBDEF652B3@microsoft.com...
> Are these valid assumptions?
>
> XSLT
> Pros
> - Flexibility on platforms
> - Flexibility on dynamic form elements
>
> Cons
> - Learning curve
>
> .NET Forms
> Pros
> - Ease of development
>
> Cons
> - Microsoft-specific implementation
> - Need to know form/grid elements during design-time
>
> How about if you want to target different UI i.e. browser, mobile device,
> Win32, etc?
> Thanks.
>
>
> "CMM" wrote:
>
>> I dunno. XSLT seems redundant to me... at least in relation to ASP.NET
>> and
>> presenting xml as html. I often find that creating actual code (C# or VB)
>> to
>> read the xml file and generate the html is a lot more productive and
>> robust.
>> Also much easier to read. However, xslt is nice when translating between
>> different schemas... but, for html translation there's no beating writing
>> actual code to render the xml.
>>
>> "Fred" wrote:
>>
>> > Not much expertise on XSLT and trying to understand it's uses when
>> > creating
>> > apps in VS.NET?
>> >
>> > If I wanted flexibility on the UI (View aspect of M.V.C.):
>> > - How does it compare with creating business components that can be
>> > consumed
>> > by WebForms, WinForms, mobile devices, etc? Is it even fair to compare
>> > the
>> > such technologies?
>> > - How about for cases when you need to display dynamic elements on the
>> > form/grid (as compared to knowing data elements during design time)?
>> >



Relevant Pages

  • Strange Exception using XSLT from NetBeans
    ... I have a strange problem in transforming an XML file in an HTML file ... the XSLT stylesheets and setting where to write the output HTML. ... I utilize NetBeans as editor and the strange fact is the if I set all ...
    (comp.lang.java.programmer)
  • Strange Exception using XSLT from NetBeans
    ... I have a strange problem in transforming an XML file in an HTML file ... the XSLT stylesheets and setting where to write the output HTML. ... I utilize NetBeans as editor and the strange fact is the if I set all ...
    (comp.lang.java.help)
  • Re: Displaying XML document in ASP.NET page using XSL Transform
    ... that's all your XSLT will ever do irrespective of the XSLT ... You need to either generate HTML (the preferred method of output for XSLT ... for some reason ASP.NET just sends all the XML data as one string on ... Hello, My Name is Joe. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Newbie, HTML calling XSLT
    ... > other flavour of XML) because XSLT 1.0 only processes XML. ... > HTML is written in SGML, not XML, and that won't work with XSLT. ... HTML because you need scripting, ...
    (comp.text.xml)
  • Re: Help to extract data from a web page
    ... XSLT is set up to process XML, ... Your HTML document will not go through an XML parser. ... Author -- Again assuming that it's reliably going to be the third tr, this is more of a pain because you're going to have to do string manipulation to extract the author's name. ...
    (comp.text.xml)