
How Edmunds Got in The Fast Lane - ez77
http://technology.edmunds.com/blog/2010/11/how-edmunds-got-in-the-fast-lane.html
======
chime
Reading this article and the recent DeviantArt post about page-load
optimization (especially with respect to JS) makes me think there is a need
for a standardized, scalable solution for page-assembling & loading. Something
that would take into account things like ad networks, external JS, user-
accounts, lots of small JS files used throughout the site, lots of small
images, and backend services like memcached. Maybe the solution is not a
standalone application or a new framework but rather a front-end JS library
with a few backend modules in different languages (PHP, Python, Ruby, Perl).

Small sites spit out HTML from a couple of files/classes, large sites (e.g.
your auto-insurance company) assemble a single HTML page using hundreds to
even thousands of different files. Most large sites write their own HTML
concatenator but as there is no standard or best-practice method, each one is
organically grown and gets more and more complex over time. Now imagine being
tasked with improving the pageload of a single webpage that calls 43 different
backend services (mysql, vsam, ldap, memcache, soap etc.) across 600 different
.php or .java files - you won't even know where to begin. MVC doesn't help
much when you have 30 controllers calling 40 views and 20 models. The problem
is there is no HTML pipeline.

Writing code to make a cube spin in 3D is easy using OpenGL. Making 100 cubes
do the same isn't much more difficult either. This is because the graphics
cards have a pipeline that you can fill using OpenGL commands in the right
order. There is no right order for spitting out HTML, CSS, or JS and so
everyone makes their own. Large sites already use some object-orientated say
to echo "[div]blah[/div]" instead of hand-coding it. They just do it using
their home-built solution. If there existed a standardized pipeline that
different libraries, modules, and even web-servers could use, the
optimizations described in the article would be nearly automatic.

~~~
makmanalp
This is a side effect of the fact that the combination of HTML, CSS and JS as
we know it is a giant hack. Or rather, they all developed mostly independently
and then sort of kludged together.

HTML5, CSS3 and JS all together with common libraries like jQuery or Dojo or
YUI is now pretty much resembling a GUI toolkit, and that's probably what it
should have been from the start. Too bad we had to reinvent all that all over
again the hard way.

------
ez77
For those interested, I got this browsing the Google Code Blog:
[http://googlecode.blogspot.com/2010/11/edmunds-partners-
with...](http://googlecode.blogspot.com/2010/11/edmunds-partners-with-google-
to-make.html)

