Today is a good day to code

iPhone JavaScript Based DOM Object Creation Better Than HTML

Posted: December 31st, 1969 | Author: | Filed under: Uncategorized | No Comments »

iPhone JavaScript Based DOM Object Creation Better Than HTML

Picture of IrvinI don't know if the title of this post even makes sense, but I'll attempt to explain. While working with the iPhone over edge, I noticed that a site that I built that creates all markup objects through JavaScript DOM scripting. Was faster than many traditional sites with complex layouts in HTML.

I attribute this to the fact that the EDGE network is so slow that sending less data, and making the iPhone work harder is actually faster than sending down the markup. In fact, it is probably better to allow JavaScript to create tables from a JSON data source, since it is more compact than XML. Than doing DIV replacements.

This method is great in that you get a true service oriented architecture, and can build the architypal MVC application. The only drawback is that it doesn't crawl well, meaning that you had better have a static site somewhere so that the search engines can find you.

I have been building apps like this for a while now, and I think it is easier in many ways than building a traditional site, and since JavaScript is compact, and supports iteration, the layout code is far smaller than it would have otherwise been.