|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
XML As A Useful Tech?
This thread is being spawned by a topic that came up in one of Rycamor's recent threads coulped with the fact that I just spent the last 30 minutes or so learning XSL... and I think this statement can sum up everything I learned about it:
Quote:
Needless to say, I feel like I just wasted 30 precious minutes of my life. Now, don't get me wrong - it was an entertaining exercise and it's a nice toy to play with, but it doesn't appear (to me at least) to have any practical purpose what-so-ever that isn't already applied with HTML templating systems and databases. The fundamental unit of storage is an XML document, and, basically, you need to take that XML document and turn it into HTML by programming a stylesheet template for it. Hmmm... it's called php/perl and a database, stupid. Where do these technologies come from, and how do they gain credibility when they get way out of their field? The only practical application I can see for XML, really, is people who need to send large amounts of information to many disparate locations to be formatted in different ways. For example: news. I can see a news agency sending field reports in XML so that they can be formatted for webpages, print, TV, pda, radio, wap/wml, etc. with minimal hassle. And even then, it's not that XML and it's 82 million related technologies are special or particularly good solutions, it's just that they already exist so it's convenient to use them. I don't see any purpose to actually write an xml document/schema/stylesheet/next-fad-thing outside of special situations like that. It's obviously not well suited to data storage, only data transmission.... I was reading up on it because I was thinking of using it at work for a system I'm preparing.... but... it would be faster, cleaner, and cheaper to just use my own format for the program's data storage... and it's not data that needs to be transferred outside the system soooo..... Alright, maybe I'm wrong, though? Maybe I just don't see the light, but if that's the case, someone please inform me! I'm far from the only person who doesn't see a largescale use for this... |
|
#2
|
||||
|
||||
|
Article from one of the creators of the XML 1.0 standard on why XML is too hard for programmers:
http://www.tbray.org/ongoing/When/2.../03/16/XML-Prog Quote from the man himself: "During the process of setting up ongoing, for the first time in a year or more I wrote a bunch of code to process arbitrary incoming XML, and I found it irritating, time-consuming, and error-prone." |
|
#3
|
|||
|
|||
|
Re: XML As A Useful Tech?
Quote:
You pretty much summed up the purpose of xml, if you ask me. It isn't meant to (though it can) be used as a substitute for databases. What xml is good at is creating portable data that can be sent to any platform and software configuration and interpreted as needed. XML is good at (text) data storage, but it's the xml parser that creates the real functionality, and it definitely isn't meant to act as a database for random access. It's essentially about serialization: it's all about the data, a portable data storage format. |
|
#4
|
||||
|
||||
|
This is all very interesting to me - especially Scorp's post (which I assume he found on /.
), because the 4th design goal of XML according to the W3C Recommendation for XML 1.0 is that "It shall be easy to write programs which process XML documents."I've tried to do this myself, and I agree that it is a serious pain. The trouble, I suppose, goes back to the "Programmers didn't write it, but they tried to write it for programmers" deal. Tags are, simply put, NOT good ways to organize information from a computer's standpoint. This: <foo>foo?</foo> is just a series of meaningless characters to a computer. While the < and > make it visually simple to scan the information for humans, the comptuer doesn't know that < means "start a tag" and > means "end a tag". The computer thinks it's just two seperate, completely unrelated characters. Even for data transfer then, I don't think it's anywhere near the best solution. Maybe XML is a middle ground, though? After all, no doubt that reading an XML document is much easier than reading a character (tab) delimited dataset or some other program-specific method in most cases, so perhaps it's just a middle ground between the technical solution and the "commoner" solution to moving data? Maybe, but it's still inefficient and cumbersome to use. I suppose I still see XML as just another buzzword meant to sell things to clueless managers.... y'know.. sort of like .NET ![]() |
|
#5
|
||||
|
||||
|
Last time I tried using XSLT two things happened, IE did it fine, and NS went...er...wibble, and didn't do any formatting. Is that still the same?
Couldn't see the benefit of XSLT as it seemed like doing stuff that I could do using something easier and better, such as the PHP XML parsing. XML on the other hand, I know everyone says that it's useless... but I've found uses for it. One of the uses was data collection in a remote place, the laptop had IIS and PHP running, this stored data as an XML file... then the XML file could be uploaded when the person returned to base. It seemed silly to extract the XML and populate a database on upload, so the data remained as a series of XML files... worked wonders though. |
|
#6
|
|||
|
|||
|
Ok, I do agree that XSLT is practically useless. In theory, it is really useful, just like css is to html, but support for it is almost non-existent (in xml browsers), as far as I know, the only way to display XSLTs (easily and cheaply) are to dump the containing XML document into Explorer. Though, it could be very useful if you're using Explorer in your applications...think a single xslt template to render hundreds of xml documents.
Really though, the power of xslt is complete separation of data from formatting. I've recently moved to using xhtml and css for all my webpages. At first I hated how xhtml doesn't allow any formatting in the source, but I've grown to love it. XHTML documents become raw data, and all formatting and display properties are defined in the style-sheet. That's what xslt is supposed to do to, since xml always has been only about the data (of course, you can also use it to pick out data from an xml document). But, I gave up on xslt quite some time ago, since it can rarely be used. XML though, I think is a good concept, it seems every use I've come up for it has boiled down to portability. |
|
#7
|
|||
|
|||
|
I gave up trying to figure out proper XML when I read a tutorial somewhere which basically said - on it's own, XML can do nothing useful...
I can understand the logic of labelling data so it can be transmitted to another application and formatted independently, but I don't really need someone to sit down and write a standard to tell me to use tags. Looks like Devshed have some sort of basic XML offering under their syndication link (left of Devshed main menu). Which is where I got the idea to feed out branded versions of some of our sites but without a direct connection to the database just using an XML stream. Trev |
|
#8
|
|||
|
|||
|
i think I may have found a use for xml....
me/ our dev team here have created quite a neat dynamic menu system which reads menu contents from an xml file, so you've got complete separation between the menu engine, menu contents and menu style (NOT using XSLT btw) i know it's only one of many ways of separating data from style and implementation but it works neatly, the parser is fairly easy to work with and the data is easy to update when necessary. yep, nothing that can't be done in (say) php but it works well in a controlled environment. i'm not saying xml is wonderful but i thought i might add one positive note here... as with all technologies, it's finding the right tool for the job, and one you're happy working with. i'm sure a lot of you guys wouldn't touch xml for a system like that! i think another issue is trying to keep up with absolutely every new technology - unlike quite a few people here i don't have a brain the size of a house, so after a while things start to leak out... peace to you all in troubled times ![]() |
|
#9
|
||||
|
||||
|
I think it can be useful in situations like yours and Binky's where you have a very small amount of data to store and it doesn't make sense to pull out all the stops on a powerful database to use it. Sandblasting soup crackers and all that stuff...
But frankly, if you're trying to do anything that's going to require even remotely large documents, the time wasted trying to figure out programming logic to handle the data tree is simply not worth it. It's kind of neat though to see that people are applying it to something. I was struggling thinking of a way to apply it to ANYTHING, so you've helped me make progress in understanding the point of XML (I still think XSLT is a total waste of time.. fun to play with, I have to admit.. but generally useless). |
![]() |
| Viewing: Dev Shed Forums > Other > Dev Shed Lounge > XML As A Useful Tech? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|