> ...you'll
> get far more benefit from ensuring your code is concise, then budling
> it into as few source files as reasonable (say one or two) and using
> the same script files throughout your site so the browser can use
> cached stuff where possible...zip your source files and let
> the browser deal with downloading them efficiently.

+1 to all of that

<soapbox>

In terms of concise script files, make sure your source code is clear
and well-commented -- and then use a minifier[1]/packer[2]/etc. to
strip all of that stuff out for distribution and pack things in a
small space.  NEVER sacrifice source clarity for released brevity.

</soapbox>

[1] http://www.crockford.com/javascript/jsmin.html
[2] http://dean.edwards.name/packer/ - But use JDD's modified
version[3] if you use the $super feature of Prototype; otherwise
Packer will obfuscate it.
[3] http://code.google.com/p/protosafe/downloads/list - Seems to be
locked for some reason, I'll drop JDD a note about it.

-- T.J. ;-)

On Nov 7, 3:14 am, RobG <[EMAIL PROTECTED]> wrote:
> On Nov 7, 12:52 am, "Alex Mcauley" <[EMAIL PROTECTED]>
> wrote:
>
> > i want it to be transparent hence the syncronous request
>
> Blocking the UI is hardly transparent.
>
> The "lazy loading" of scripts is a flawed strategy - it seems a good
> idea but if you think about the issues, you should realise that you'll
> get far more benefit from ensuring your code is concise, then budling
> it into as few source files as reasonable (say one or two) and using
> the same script files throughout your site so the browser can use
> cached stuff where possible.  Use server-side technologies to bundle
> required scripts together, that's an order of magnitude more efficient
> than client-side with AJAX.
>
> Loading files as required means waiting for the request, downloading
> the file, waiting for it to initialise, then calling stuff in it.  Way
> too complex and very prone to errors - zip your source files and let
> the browser deal with downloading them efficiently.
>
> --
> Rob
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to