The Buzz Over Serializing User Interfaces

Well it looks like my posts over on GDN OTD, have got Erik thinking. Although we use (and a lot of us write) HTML, we seem to forget what it really is, a serialized User Interface. We tend to get locked into what we know, and forget to go back and re-learn how the things we use every day really work (and not just accept that they do work). By doing this, it will only make us better developers.

Onto Erik’s topic, serializing UIs. We already know that HTML does this, but it is limited to a few UI controls. You can reuse these controls to produce aggregate controls with technologies like Internet Explorer’s Element Behaviors, but you are still limited to a limited set of possibilities. You can build controls on the server, and then serialize them as HTML, a la ASP.Net Server Controls, but that only solves the server side coding issues. Well, if you know the client is IE 5.5+ you can kick Element Behaviors to the client, but in the end it is all just HTML. What if you wanted to create brand new controls that were nothing like the other controls (like maybe a Bar Graph, or a Bar Label). You need to get at the graphics level, and HTML doesn’t let you do that. You can use Flash, but then you are self contained box, and can’t interact with the other elements on the page. Now you decided that you need to get to the graphics level and you need to interact with the other elements on your page as an equal. You need another XML dialect to represent your control, so that it can be easily serialized on the server, and sent to the “browser”.

SVG to the rescue. SVG will let you get to the graphics level, but it is also XML. So you go off and build these new cool controls on the server, and then serialize them as SVG and send them off to the “browser”. But now you are back to the craziness that is ASP.NET Server Controls. What if you could send these controls as your XML dialect to the “browser” and let the client translate it to SVG? You’ve accomplished your goal of serializing the UI and the rehydrating it on the client. Now you are getting an idea some of what will be discussed during my presentation at the XMLDevCon in July.

But wait. What is this “browser” I keep talking about? Well it isn’t the current IE. Have you read any of the “leaked” info on Longhorn? Did you see the bit about the Desktop Composition Engine and the new vector graphics based UI? Sound familiar? Did you see the XAML references in the Longhorn “leaks”. Here’s a snippet:

The Longhorn compilers, for instance, will use XML script files to create user-interface functions with a few lines of XML code that before would have required hundreds, if not thousands, of lines of C# coding. And the Longhorn software developer kit, which is also due out this fall, will come with prebuilt XML Application Markup Language (XAML) schemas for many UI functions, said sources briefed on Longhorn.

Sound familiar? MS may not be using SVG, and more than likely has a better implementation than what I’m discussing, but I think we are on the same page.

DonXML

Applied XML Developers Conference 2003 West
applied topics for xml & web service zealots
july 10-11, 2003, greater portland, oregon

[Listening to: Can U Deliver - Armored Saint ]

3 Comments

  • Great insights here. What is old is new, yet again. This paradigm shift in UI development on the Windows platform is going to be phenomenal. I hate that I won't see your talk in Oregon this summer, but I look forward to seeing more from you and others on this topic in the near future.

  • See, while I wish this were true IMHO I have to 100% completely disagree.





    SVG has been out there for 4 years now. Almost as long as CSS has been. CSS, XML, XSLT, XSL-FO and SVG. Every single one of these were at about the same point of evolution back in 1999. Yet of these, 2 (maybe 3) are widely adopted.





    SVG? To have browsers that support it reach that critical 30% adoptance level will take years. By then RIA in whatever form (.NET WinForms and Macromedia MX quickly come to mind along with about 3 other possibilities) will likely achieve that critical mass by then.





    Maybe you see something I don't Don, but on this I just can't hold my breath.

  • You may have seen my article "Is SVG cool", if so you know I'm very pro-SVG. But the key to all of this is standardization and standards, and all the "big boys" agreeing to use them, just as they did with SOAP.





    This leaves vendors the ability to compete and to excel by providing "their" tools or implementation that's better than the other guy's tool; and as long as they all talk the same standardized language, everyone benefits.

Comments have been disabled for this content.