Subject: RE: [xsl] Help: Reasons to use XML/XSL ? From: Rod Humphris - FLPTN <rod.humphris@xxxxxxxxxxxxxx> Date: Wed, 19 May 2004 15:42:44 +0100 |
Hi Jarrell I started off doing what you are doing, only in the Microsoft environment (what is now classic asp). Reading through ADO datasets to make html. This is why I've moved to xml/xslt. Why xml: 1. It's very easy to cache, either in memory or on disk and I like caching as as far a I can see it's the easiest way to get speed. 2. It's easy to manipulate. You can add bits to it from other sources to give you a one complete set of data for whatever it is you are doing, or if necessary perform operations on it to change it if for some reason it's not in the form you want. 3. Working, as I do, in a place where the data comes in many forms from many different sources converting it all into xml distributes the complexity away from the point of building the interface. I have always found it very quick and easy to roll my own if the storage system doesn't do it for me. Why xslt: 1. Once you get used to it it's simpler and more powerful than the other way. Doing simple stuff like making html tables from data is really really quick and easy. 2. If you do have to do complex stuff then it's better for that too. Xslt gives you the ability to do totals, results of combinations, change the display under this or that circumstance, etc, much less laboriously than classic asp. 3. Speed of execution. I have found that when there is some real work to be done msxml4 will do it faster than the alternatives open to me, certainly faster than some complex script. 4. Reusability. Even if it's only copy/paste reusability, because the presentation code is so much better separated from the data it's really easy to build up a library of templates, xpath constructs, etc that you can reuse. And then for the cake: I like building web apps that (from the users point of view anyway) have only one url. Remembering that xslt is xml and itself easy to manipulate with xslt or dom code, it's perfectly possible, indeed practical, to have one asp/aspx page which has a resource of many interfaces (real(on disk) or virtual(created on the fly) (probably cached)) and many data sources which map together to form a whole application. Sort of an application that generates itself in response to the users input (according to rules of course). I know that sound complicated, and possibly mad, but it is fun and can give you a really slick and fast result. Cheers Rod -----Original Message----- From: Jarrell Dunson [mailto:Jarrell_Dunson@xxxxxxxxxxxxxxxxxx] Sent: 19 May 2004 14:16 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] Help: Reasons to use XML/XSL ? Hey, Thanks ahead of time to each of you for reading this. I'm an XSD, XML, XSLT Newbie....and am trying to learn the process. However, I really need some input - not from a programming perspective, but from a philosophy and usage perspective. For instance, I'm a current user and programmer of Perl...using SQL, CGI, and Perl DBI for pulling information from an Informix Relational Database. I'm able to pull data out of a database quite easily...via Perl DBI/SQL...and format it with Perl into quality HTML pages. ..and the process is rather efficient. For HTML, I can build the pages via wriing the code myself, or using Perl script, etc, I can also, at times, use a text editor (or text editor assistant / html formatter) to build basic html and modify it as needed. [Instead of coding a table by hand, for example, I'll use an editor assistant (such as Dreamweaver, or Notetab) to create all the code for a 3x4 table...and then modify and/or populate the HTML as needed]. So for this process, I'm going from database ...via Perl script...to HTML. In learning XSD, XML, XSLT, however, I just don't see the advantage of it? What more does XSD, XML, XSLT give me as a programmer? For me to do the same steps....to go from a database to web page, it seems to me that I have to take three [or four] more major steps...each involving a more complicated process. From my beginner perspective, I have to build a XSD...and then a matching XML - based upon the XSD (validating, etc.). For output, I have build the output leg, XSLT (transforming the XML, etc)....to get the same results. I just don't see the advantage. In my current programming, I'm using one scripting process DATABASE --> [1] Perl/DBI (using SQL) --> To HTML/Web Page In using XML, I need three (or four) processes: [1] Build XSD first. Then: DATABASE --> [2] Perl/DBI (using SQL) --> To XML. Then, [3] Build an XSLT --> [4] Transform the XML via XSLT --> HTML/Web page Isn't this far more complicated? Granted, I could see advantages if I were outputting my data in different ways...say, one of my outputs was for the Internet, another for a PDA, another for an RSS feed....etc. OR, I could possibly see advantages [per the claims I've heard from big corporations] if I were a great business enterprise...and all my data needed to be standard...and I needed to use my own mark-up language - though I'm not fully convinced of this. But for simple processes....from database to web, I just don't get it It seems far more complicated, and [other than buiiding my resume skills] raises the question if it's worth... So, for an uneducated newbie, can you help? I've learned XSD...and XML...and am working on the XSLT, but I haven't seen enough to "buy into it". What's the real benefit of learning and using XSD, XML, AND XSLT? - especially over a simple process like Perl/DBI....and why ? THANK YOU ahead of time, Jarrell Jarrell R. Dunson, III Asbury Theological Seminary Administrative Computing Coordinator Jarrell_Dunson@xxxxxxxxxxxxxxxxxx (859) 858-2379 (direct) (859) 858-2330 (fax) ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ _________________________________________________________________________ Any opinions expressed in this email are those of the individual and not necessarily the Company. Unless expressly stated to the contrary, this email is not intended to give rise to a new, or affect an existing, contractual or other legal relationship. This email and any files transmitted with it, including replies and forwarded copies which may contain alterations) subsequently transmitted from the Company, are confidential and solely for the use of the intended recipient. The unauthorised use, disclosure or copying of this email, or any other information contained or attached, is prohibited and could, in certain circumstances, be a criminal offence. If you have received this email in error please notify the sender as soon as possible. This footnote also confirms that this email message has been swept for the presence of computer viruses. www.focusdiy.co.uk _________________________________________________________________________ ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] editing HTML inside <![CD, Daniel Joshua | Thread | RE: [xsl] Help: Reasons to use XML, Amir Yiron |
RE: [xsl] editing HTML inside <![CD, Michael Kay | Date | RE: [xsl] Is it possible to get "&n, Michael Kay |
Month |