473,544 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What is pros/cons of using XSLT?

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)?

Jul 21 '05 #1
5 7616
Hi, once i got over the XSLT "hump" (basically by forcing myself to stop
reading about XSLT and starting to actually apply it), i found it to be much
nicer than expected esp. with dynamic form elements. If UI flexibility is
important in your app, then XSLT could be helpful even though/because its
not as straightfwd coding (ive never tried doing a grid-like control thru
XSLT however).

I dont think XSLT can be compared to business components except in the sense
that a business component can emit some XML which is fed to XSLT which spits
out nice HTML. So they can work together very well, ie. you could use the
same business component's XML targeted to different devices, just apply
different XSLT. And vice versa where you could reuse XSLT across different
parts of your site.

But there is definitely a learning curve and it helps tremendously if theres
someone in your team who has previous experience. You could also take baby
steps and try doing one or two sections within pages using XSLT and see how
you like it. There's nothing that says youre forced to go 100% one way or
the other.

HTH,
Premier JiangZemin

"Fred" <Fr**@discussio ns.microsoft.co m> wrote in message
news:67******** *************** ***********@mic rosoft.com...
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)?

Jul 21 '05 #2
CMM
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)?

Jul 21 '05 #3
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)?

Jul 21 '05 #4
CMM
I don't know what "need to know form/grid elements during design-time" means.
You can render any HTML dynamically at runtime using ASP.NET. However, if you
want to use the Webform/Event Postback model (which mimics a classic desktop
programming paradigm) then you would use "design-time" controls... which
incidentally also produce standard HTML. :-) Additionally, I don't know of
any reason why these same "design-time" controls can't be solely instantiated
at runtime and still take advantage of their event postbacks. I believe that
ASP.NET Controls model allows for this very easily via both placeholder
controls and list/grid/repeater controls.

But if you just need to *display* information... who needs 'em? Just
generate the HTML yourself using a StringBuilder object and some smart code.

Basically it boils down to this:
1) Using XSLT to transform XML into HTML is no different than reading an XML
file using a real high-level language and generating the HTML in code. In
fact, the latter is tons more flexible.
2) ASP.NET produces HTML that can be consumed by ANY browser on ANY
platform. However, of course, ASP.NET on the server-side requires IIS.
3) I am NOT saying that XSLT is useless... in fact, it serves many great
purposes and you can still use XSLT in ASP.NET. In fact, ASP.NET provides
some really nice classes to do so. It's just that sometimes plain ol' code is
the easiest route to take.


"Fred" wrote:
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)?

Jul 21 '05 #5
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" <Fr**@discussio ns.microsoft.co m> wrote in message
news:20******** *************** ***********@mic rosoft.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)?
>

Jul 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
3246
by: David MacQuigg | last post by:
I'm concerned that with all the focus on obj$func binding, &closures, and other not-so-pretty details of Prothon, that we are missing what is really good - the simplification of classes. There are a number of aspects to this simplification, but for me the unification of methods and functions is the biggest benefit. All methods look like...
112
10241
by: Andy | last post by:
Hi All! We are doing new development for SQL Server 2000 and also moving from SQL 7.0 to SQL Server 2000. What are cons and pros for using IDENTITY property as PK in SQL SERVER 2000? Please, share your experience in using IDENTITY as PK .
44
4136
by: lester | last post by:
a pre-beginner's question: what is the pros and cons of .net, compared to ++ I am wondering what can I get if I continue to learn C# after I have learned C --> C++ --> C# ?? I think there must be many know the answer here. thanks
121
9931
by: typingcat | last post by:
First of all, I'm an Asian and I need to input Japanese, Korean and so on. I've tried many PHP IDEs today, but almost non of them supported Unicode (UTF-8) file. I've found that the only Unicode support IDEs are DreamWeaver 8 and Zend PHP Studio. DreamWeaver provides full support for Unicode. However, DreamWeaver is a web editor rather...
5
395
by: Fred | last post by:
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...
10
6292
by: Steve | last post by:
I need to build a very dynamic client and would be interested in knowing the pros and cons of using JSF and Ajax to accomplish this. Thanks. Steve
3
4217
by: Andrea | last post by:
Hello everyone, I'd like to know which are the main pros and cons of using XML implementation in business organizations. >From a technical perspective, I find XML powerful, but looks like it is being pushed more from technical people than from businessmen... So, some questions: 1. Pros and cons
5
13463
by: =?GB2312?B?17/HvyBaaHVvLCBRaWFuZw==?= | last post by:
Hi, I would like to have someone comments on what's the best practice defining error codes in C. Here's what I think: solution A: using enum pros: type safe. better for debug (some debugger will show the name not only the value) cons: enum can not be forward declared which makes all error codes
0
7452
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7643
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7798
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7738
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5956
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3436
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.