[wp-hackers] Re: Packing JavaScript

Alex Günsche ag.ml2007 at zirona.com
Wed Sep 19 18:35:10 GMT 2007


On Wed, 2007-09-19 at 12:27 -0500, Andy Skelton wrote:
> Timely:
> 
> http://www.joelonsoftware.com/items/2007/09/18.html

Hm, I've read the article, but there's not too much new in it. That guy
seems to receive quite recognition with a PR of 7. ;-) However, he seems
not to have heard of Prototype, Mootools, jQuery etc. -- because these
are the frameworks he's talking about. It's a couple of them and not
one, and that's good. One emphasizes XHR/AJAX, one is for effects,
another one is designed to be slim and fast, others have their purposes.

One important thing to quote from the article, though:
"History, though, is repeating itself. Bandwidth is getting cheaper.
People are figuring out how to precompile JavaScript."

Well, this is exactly our discussion. Bandwidth does get more and
cheaper, but not everywhere and for everyone. By the way, I hate people
who rely on Moore's Law -- because it always forces people to spend
money on new devices, throw away the old ones (producing tons of toxic
waste) and ignoring those who are happy with their running systems.

The question is not how fast today's amount of data will be acceptable,
but it is more complex: What are the efforts? What's the benefit? Will
the benefit be long-term? The author is right with his example regarding
rewriting Assembler code (though I think that in the 80s and 90s no one
would write end user apps in Assembler anymore).

However, we're talking about "compiling" JavaScipt here: (a) it's easy
to automate, (b) tools  to perform this task exist, (c) there's a
long-term benefit, because the total amount of JS code in WP also grows
steadily (remember the figures posted previously). The actual work would
be to prepare the base application, as outlined in my previous mail. I
think if we discuss whether or not (and how) to optimize the JS handling
of WordPress, this should be kept in mind.


Kind regards,
Alex

-- 
Alex Günsche, Zirona OpenSource-Consulting
Blogs: http://www.zirona.com/ | http://www.regularimpressions.net
PubKey for this address: http://www.zirona.com/misc/ag.ml2007.asc



More information about the wp-hackers mailing list