2009年1月3日星期六

[fw-mvc] Zend Dojo Form and network usage efficiency

Hi,

 

I‘m using Zend_Dojo_Form and I realized that there is an imperfection in the whole mechanism. It appears when a client has a long ping to server. When using Dojo, browser has to download many small “uncompressed” (trailing white-space, etc.) external JavaScript files which takes such a long time. For expamle, there are almost 40 JS files appended to a login page with 4 Dojo elements (textbox, pwtextbox, filtering select, submit button).

 

The idea is – the Dojo view helper has to know which files have to be appended to processed HTML output, so why don’t we put them all together (and maybe cache them) into one bigger external JavaScript file (which can be disengaged from trailing whitespace) and append only this one JavaScript file.  It would decrease the number of connections to the server which is as Google presented on its Dev Days in Prague the most important thing nowadays.

 

Am I right or there is a huge mistake in my theory? Has somebody started to work on something similar already?

 

Regards

Jiří

没有评论: