World of XSLT craft: AKA World of Warcraft site WoWarmory.com
Several years ago, there were actually people who debated whether XSLT was useful or not.
Once they famous white paper on AJAX programming was written by the web developers who modernized Amazon.com with AJAX components and a bevy of web 2.0 features now commonly associated withe the social web.
The most vociferous opponents of XSLT that I encountered were those were software developers who did not know XSLT and did not want to learn it. These were folks who seemed to only know and use one programming language and it was C++ or Java.
Others, including a fellow Java programmer I worked with named Praveen, dived right in and wrote some scripts in it without the slightest delay or opposition.
Apparently, Blizzard utilized people like the latter when WoWarmory.com was developed.
The World of Warcraft Armory site is a free web site created by Blizzard for its fans & customers to view details about any player character in the game. The information is intricately detailed and lavishly presented.
The character level, race, guild, skill levels, equipped gear - and tons of other things - are all easiy examined using the web site.
What a lot of people do not know is that the pages on this web site are all defined as XML files - not HTML, XHTML, Flash, etc.
Sure, what is rendered in your web browser is HTML or XHTML but that is not how the developers authored the page.
Here is a list of some XSLT stylesheets on the WOW Armory web site:
Now, what is clever about this approach? Is it just fancy technophilia or does it serve a raal purpose?
The answer is this serves as a great solution to a number of problems.
If you think this was helpful, please post a comment.
Once they famous white paper on AJAX programming was written by the web developers who modernized Amazon.com with AJAX components and a bevy of web 2.0 features now commonly associated withe the social web.
The most vociferous opponents of XSLT that I encountered were those were software developers who did not know XSLT and did not want to learn it. These were folks who seemed to only know and use one programming language and it was C++ or Java.
Others, including a fellow Java programmer I worked with named Praveen, dived right in and wrote some scripts in it without the slightest delay or opposition.
Apparently, Blizzard utilized people like the latter when WoWarmory.com was developed.
The World of Warcraft Armory site is a free web site created by Blizzard for its fans & customers to view details about any player character in the game. The information is intricately detailed and lavishly presented.
The character level, race, guild, skill levels, equipped gear - and tons of other things - are all easiy examined using the web site.
What a lot of people do not know is that the pages on this web site are all defined as XML files - not HTML, XHTML, Flash, etc.
Sure, what is rendered in your web browser is HTML or XHTML but that is not how the developers authored the page.
Here is a list of some XSLT stylesheets on the WOW Armory web site:
- item-info.xsl
- Generates an XHTML 1.0 web page for an item like . Outermost elements of the page are contained in this tiny XSLT template, along with references to two Javascript files for implementing AJAX. Then, the details of the particular item are all rendered using XSLT stored in item-info-data.xsl XSLT file.
- item-info-data.xsl
- Lengthy yet simple XSLT script that generates virtually the entire page content for an item detail web page.
- item-info.xml
- Tiny, 12-line text file containing all the data describing an item in the World of Warcraft game. Just the data. Nothing at all pertaining to how the item is to be presented is in this file with the exception of the bare filename of the icon file, sans file type suffix: e.g. inv_gauntlets_19. This XML data file includes a processing instruction at the top:
That is what tells the browser to download and execute item-info.xml.
Now, what is clever about this approach? Is it just fancy technophilia or does it serve a raal purpose?
The answer is this serves as a great solution to a number of problems.
- The item-info.xml file, containing the detailed definition of the item, is tiny. It can probably be cached since nothing in it ever changes. In fact, it could probably be stored out on the file system - no need to dynamically generate it. The 2 XSLT files, item-info.xsl and item-info-data.xsl, can definitely be cached.
- The little data file is completely application independent, platform independent, and presentation independent. In other words, any web developer, designer, or programmer with modern skills or tools can create his own presentation of this data. Their only limitations are what their intellect allows them to do with the data and what their artistic ability allows them to do with its presentation. Professionals have these skills in spades. So all kinds of wonderful things are getting generated by third-party developers from this site.
- Demystified the web site a little for you. Hopefully, you can see now kind of how it works. If you had glanced at it before but did not know how to connect the dots of how that perplexingly tiny data file shown by View Source command in your browser gets turned into a beautiful web page - now you know!
- Explained the benefiits Blizzard is deriving from this solution both from economic (less network bandwidth, less server load, everything cached) and community empowerment (infinitely repurposeable data) standpoint.
- Demonstrated that XML and XSLT technology are indeed worthwhile from practical business standpoints as well as a developer/designer technical point of view.
If you think this was helpful, please post a comment.
Labels: ajax, web2.0, worldofwarcraft, xml, xslt