Open NikoRoberts opened 11 years ago
Hello Niko,
Sorry for the delay of the answer. Your proposal seems good. I'm investigating on how to implement it. I've found few information. There is a RequireJS implementation for Rails but according to the RequireJS documentation, as of Dojo 1.8, modules aren't all compatible with RequireJS. I think I will release a gem such as amd-rails
on which dojo-rails
will depend to precompile assets on production ; I'm going to look at the RequireJS one to build the AMD implementation.
Have a nice day and thanks a lot for your involvement in this projet !
At the moment a big downside of the way the examples show how to include Dojo into a project is that they include the JS files one by one through the require[] method
Each individual JS file is loaded one by one causing a lot of HTTP overhead. This is incredibly slow when you are working on responsiveness and really brings Dojo down as an option when choosing frameworks.
I would like to see examples on how to include a set of requirements inside the compressed application.js for production and maybe even a dynamically loaded version just for the controller/view or something so it isn't loaded for every page when only a few pages actually require it.