posted on Thursday, August 07, 2003 8:33 PM by UnknownReference

VML - A lost graphical markup language

This is on VML - Vector markup language, the one markup language which has lost all its trace in the technological race with time. The vector markup language is an extension of XML schema used to describe and format vectors which aids web designers to render quick and fast graphics with minimal loading time. The draft specification for VML submitted to W3C can be found here.

Initially VML was envisioned and designed to help web developers address problems and issues in handling graphics files which can cumbersome when it is heavy to render. Since VML is in xml format, the rendering part lies with the client and the overhead on the server is minimal. It might be argued that the same thing happens with SVG too and so what's different between VML and SVG ? Well VML was designed before SVG specification was released but due to the support that SVG earned, i guess it was decided by Microsoft to support SVG from then on and they included VML in their internal application for rendering graphics.

There are several disadvantages while handling binary graphic files. Here are some of them.

  1. Their large file size causes them to download slowly, especially over slow links.
  2. They're difficult to maintain and change.
  3. They're external to the rest of the HTML document, making them difficult to distribute.

Microsoft still supports VML because one of the viewers for VML is the internet explorer version > 5.0 which can render graphics pretty smoothly from the vml format. Creating graphics like rectangle, triangle and other polygons are child's play using VML. It may seem pretty stale if you have already worked with SVG before because the functionalities of the predecessor have been replicated in SVG along with some major improvements and flexibility.

It's worth noting that SVG is intended to replace VML. It can be seen that Word 2000, Powerpoint and Word drawing yield VML.  Will that be changed to SVG is a question that still needs an answer. If you have noticed, the graphics like rectangle, circles that you create using word, are in essence VML behind the scenes and when saved in html, the source gives the proof that the base for word is in VML. No wonder, office 2003 now supports XML transformation because it was present previously too but now the schema is standardised and made known to everyone to eliminate ambiguity and for creating better programming models. Nothing cool that way in the new version, it seems ;)

There is also one tweak that can be done in word to make VML the only saved format. All you have do is to make a simple change in your options. In Word, for example, go to Tools | Options, select the General tab, and click the Web Options button. The Pictures tab lets you check the "Rely on VML for displaying graphics in browsers" option.

The advantage of VML was that since Word had inherent support for it, we can generally copy and paste a vml diagram from a web page and then paste it into a word document :) That is usability if you ask me . The problem with SVG is that Adobe who supports the viewing plugin, has it's custom mechanisms to deal with it and since it is not compatible with inherent windows applications, the usage of it is very limited to the web alone.

Personally, a very frustrating thing for me was that, i was so carried away by the amount of stuff that VML could do and so started writing a library just like the one that exists for SVG written by DonXml for SVG (Sharp vector Graphics) right now. But by the end of it, VML support was totally nil other than what microsoft did and also the documentation was scarce for anyone to do some decent code in a short span of time. Even though the library was an abstraction, a basic knowledge of the VML tags and placing them in the right order was required. I loved the sharp vector graphics in its ability to convert GDI+ graphics to it corresponding SVG representation. Eventhough it might not have been very hard to do the same for VML, the very thought of it takes me to a kind of bliss. I really appreciate such an effort by DonXML and his team.

There are lots of sites which have rich content displayed still using VML. The only disadvantage with it is that VML is only supported by microsoft and i hope they will continue to do so even in the near future, and so apart from IE very few VML viewers are currently available in the market. The scarcity lead to lesser developer help and eventually the technology has kind of died away from most of the developers minds. But there are still few sites which heavily depend on VML and show and prove that this markup has had its best times.

These are some of my favorite VML sites.

GenomeViewer

VML Graphics

Toxicorp

VML Animations

I hope that this has been a good learning for those who have spent some time on this. Well take some time to have a look at the links i have mentioned and you will realise that VML has been a very propulsive force, for those graphically motivated people wanting to share what they can do, in the internet. And as usual the story ends as 'The newer generation takes over the older one; SVG takes over or rather replaces VML due to its better support and standardisation in the industry'.

Comments

# re: VML - A lost graphical markup language @ Friday, November 30, 2007 3:08 PM

The best site that I have seen making the best use of VML is www.zcubes.com

You could take the vml manupilation to its extreme with little knowledge of programing.

webtechie72