Sunday, December 9, 2007

Data transmission and rendering techniques implemented over a client-server system

I was writing some Javascript the other day that accepted a JSON structure assembled on the server and generated HTML client-side.

The whole process seemed like deja vu and I remembered that I had come up with such a technique back in 1999 while working for Webvan.  I called it "client-side ASP" and what it did, exactly, was to accept just the data formatted for use by Javascript as:

var data=[
  {"id":1234567,"d":"Purple Ketchup","p":2.89, "q":4,"i":"1234567sm.jpg"},
  {"id":1234527,"d":"Pink Ketchup","p":2.29, "q":2,"i":"1234527sm.jpg"}
  ];

etc.  That format is now commonly called JSON, I think.  I am not sure what the exact timeline is/was when that term was coined but that is the exact format I used back in 1999 to transmit compressed data over the internet to client-side Javascript that then parsed (or rather eval'ed) the data and then used the data to generate the repetitive HTML required to display it. 

Recall that Webvan was like Amazon or even eBay in that it had many products that would be displayed under a particular category of food, so the HTML (in those days TABLEs) was of a known structure.  Using this technique (of just transmitted the data rather than the HTML and then generating the HTML on the client) reduced the average data required to display a page from, say 50KB to .5KB - or a hundredfold compression.  That's pretty significant, in my book.

If you are going to implement this technique, obviously, do not use multiple document.write's as that is generally considered "bad manners."  Rather, generate one bigString containing all of the HTML you like and then do one foo.innerHTML=bigString at the end.

This is basic stuff, IMHO, but I rarely, if ever see this technique used on the internet.

Here is a link to my patent:

Data-transmission-and-rendering-techniques-implemented-over-a-client-server-system


It's funny how patents go.  None of those other guys listed had anything at all to do with this technique.  they just happened to be in the same building, I guess.

Shannon Norrell


Never miss a thing. Make Yahoo your homepage.