Wednesday, September 11, 2013

HTML vs. XML...HTML still wins, right?

I'll admit that after watching the video on Professor Burton's blog, I didn't understand the significance of XML. What does it do that HTML doesn't? I didn't have time to do all of the research on my own, so I emailed someone who spent four years studying computers and now works as a software developer: my husband. I figured he could explain to me what I was missing. As it turns out, I wasn't missing a whole lot. My skepticism of the video was validated. through email. My husband has given me permission to publish his explanations on my blog, and I'm just going to quote him directly since he explains all this techie stuff a lot better than I can.

He wrote:
"The video glossed over some technical distinctions that may be misguiding:

XML and HTML: Content and Form
As the video said, XML is about content and data, not formatting. You can add formatting to XML, but it is mostly used for data transmission. The video was a little misleading about HTML: HTML handles both content and form. After all, form without content makes no sense: "italicize a blank page" makes no sense.

Modern HTML, called HTML5, is even more powerful in defining how data is presented. Many of today's powerful web and smartdevice apps such as Gmail use HTML5.

XML Does Not Replace HTML

 XML does not replace HTML; the two are complimentary. Because XML is data-centric, it does not allow for formatting text or displaying pictures. XML can link to a picture because a link is just data, but it does not contain the picture itself. HTML is what defines how browsers should display the information.

Here is a use-case where HTML and XML coexist: Imagine an app like Google Docs. It seems just like a program on your desktop and yet it is a webpage. This behavior is achieved by using HTML to format the data and buttons you see and to define what the buttons do when you click them. Then, when you click a button or type something, the browser makes a call to the server providing the website and requests more data. The data is returned as XML. The browser then formats the data according to the instructions contained in the HTML (and the CSS and Javascript).

In summary, XML and HTML are complimentary. XML is used when you need to pass content/data around with no regard to how that data will be displayed, HTML is used when you have content/data and formatting. I feel like the video overly magnified XML's role in Web 2.0 (a generic term for interactive, collaborative web applications like Blogger, YouTube, and Google+ - they allow you to interact with other people, rather than merely reading what the website presents.)"


About five minutes later, he added this thought:

"And when the video wanted to show the supremacy of XML, they clicked on a link and viewed the link's source, and voilĂ ! you have XML. The misleading part was that they clicked on an RSS link. RSS links are not web pages; they are links that allow you to pull data. You paste that link into an RSS reader, which then goes to the site the link points to and downloads the critical data of news articles: the headline, the summary, and the first few pages, and perhaps a link to the main picture. The RSS reader then chooses how to format the headline and body and how to display the picture.

My point is, when you click a link on the Internet, you are rarely clicking an XML link. XML is important for the under-the-hood behavior of a lot of websites and smartdevice apps, but I feel the video was a paean to XML."

So, in summary, while the video may have wonderfully showed the potential of new computer/web languages, it overinflated the uses of XML and did a disservice to HTML as well as other languages that go into creating easier access to data, fun social media sites, etc. Are we (my husband and I) wrong? Did we completely miss the point? I'm willing to discuss this XML vs. HTML debate more.

5 comments:

  1. I am the aforementioned husband. Kristen suggested I add my final addition thoughts here.

    I agree with the video about the transformational power of rich web apps. Hashtags, wikitext, and similar Web 2.0 techniques. The video was also very clever for its use of screen capture. And I agree with the video's implicit statement that separating form and content allows content to be consumed in many new, innovative, and disrupting ways.

    As a technical practitioner, I felt that the video was overdone in its praise for XML, in the way it implied that XML was superior to HTML and that XML is our prophet and deliverer into this new golden age. XML is one of many technologies that allow Web 2.0: HTML, CSS, Javascript, XML, SQL. You can expand that list by including the host of technologies and programming techniques that supply the webpages: dynamic web frameworks like Struts and Ruby on Rails that power apps like Twitter and Huffington Post, relational databases like MySQL that store and process billions of records in a matter of seconds. And don't forget the browser advances like improved Javascript engines and improved rendering engines that allow the display of such rich web pages.

    So on the narrow issue of XML's supremacy, I suggest that the video heaped excessive praise on XML at the expense of the host of additional technologies that make Web 2.0 possible.

    ReplyDelete
    Replies
    1. Technology disagreements aside, I agree with the video's message that technological advances are changing how we consume information, changing the breadth and reach of the information we can consume, changing how we interact with each other.

      For instance, I just opened a browser tab, went to a web site, and entered a single word. That one tab is now streaming scores of updates about a civil war 6,650 miles away written by people the world over. I can engage in a debate about the merits of action in that civil war. I can have my opinions challenged by a person on the ground in that country. My circle of acquaintances is vastly larger, and I can choose to embrace that circle or to turn inward to a more narrow echo chamber.

      My Twitter feed just contained an article challenging my assumptions about a major social issue. I wasn't expecting to have that assumption challenged, but there it was all the same.

      I get to redefine literature: Rather than reading an article or research piece cover-to-cover, I can click Wikipedia link after link, creating my own one-time-use "book". "The author wants me to think about how Moby Dick is classified, but I want to move on to Shakespearean literary device, and then I'll move on to Blackfriars priory."

      That's pretty cool, regardless of what technology is to thank.

      Delete
  2. I don't know a ton about programming languages and what the differences between XML and HTML are, but I can agree with you when you talk about the amazing things the web is offering us. I found the video to be interesting, but it didn't really capture my imagination the way that I think it was trying to. The world really is changing in amazing ways and we're more connected (and more disconnected, but that's a later discussion) than ever before. The web has made it possible for people to communicate regularly with people they haven't been able to see in years, get information as the events are happening and read books that until now were almost entirely unavailable! It truly is an amazing age.

    ReplyDelete
  3. I appreciate the perspective of someone who actually knows about programming. The video does use screen capture in an interesting way and could be viewed as an okay creative essay but does not really offer a lot of facts or evidence to support his broad statements about XML changing the world.

    ReplyDelete
  4. This post really hits at the heart of content control. This is an excellent example of trying to sort through all the available information to find the quality applicable to you. Personally, I tried to get a grasp around the video and ended up posting a comment that now, I'm assuming is way off-track. When Victoria said in class that sometimes information spreads so fast that you can't keep track of it, that's definitely a reality. Thanks for taking the time to better understand the technicalities of the Internet and sharing your findings with us!

    ReplyDelete