View Full Version : Best practice is scaling Ext-JS javascript file

22 Sep 2009, 5:25 PM
Dear all,

As I continue working on my Ext-JS application, the javascript tends to grow bigger and bigger. Currently I'm writing all of the Ext-JS layout/application in one javascript file (http://github.com/scrum8/projexion/blob/master/public/javascripts/projexion/projexion.js). And currently I am only using one html file (http://github.com/scrum8/projexion/blob/master/app/views/layouts/main.html.erb) to include that javascript file.

Now from your experience, what is the best practice on separating my Ext-JS javascript in multiple javascript files? I'm thinking to move some components in the current javascript file to multiple files, but then my html file would include multiple javascript files. Would my application load slow since it would load lots of javascript files? Am I on the right track? Is this the way to develop Ext-JS application? Does anyone have a better approach for large scale Ext-JS application?

Please advise.

Kind Regards,

23 Sep 2009, 1:16 AM
my best practice is to splitt everthing in files for example in one projekt i have over 100 files with classes and plugins and so on.

i use eclipse and automatical concatenate and minify the files to one file with the rockstarapps plugin in the background. so i have only one file what i add to the html. ;-)