This is really great advice. For a large scale app, you're going to
want to have some sort of build process that optimizes your javascript
and concatenates files, so you'll be able to structure your project
logically and then output a highly compressed single file for
production.
You can also put everything in separate files and use a PHP script to
automatically concatenate them upon request. Normally this would be a
bad idea because it could be slow, but if you instruct the container
to cache the output of the PHP script, then your server won't even
take a hit for most of the loads of your application.
~Arne
On Jun 17, 6:31 am, Navaneeth Krishnan <
navaneeth.cont...@gmail.com>
wrote:
> A few tips:
> For (1), You could split your javascript into separate modules in your development environment. During your
> build process you can concat the relevant js files and run it through a javascript/css compressor likethe YUI Compressor. The compressor strips off code comments and also does a bunch of optimizations to
> give a single js file that you can use for your deployment.
> You can also consider generating separate js files for your profile view and canvas view, because typically
> the profile view will require much less javascript. This will ensure that you load up faster on the user profile.
> (2) will depend largely on your application itself. Usecached makeRequestif you expect duplicates and,