I'll try to explain why web2py integrates some features and why others are left alone....
There is muuuuch going on web development since more or less html5 was presented. A lot of libraries, frameworks, js development, etc gained much more attention also because html5 coincided with mobile devices spreading, node.js that turned javascript in a full featured programming language (i.e. not just for "do nice things on UI in the html page"), etc etc. Unfortunately, this means that the "dark side" of html development - that was really going to be reduced at that time (most of it was due to browsers inconsistencies, like IE) - actually enlarged because of some limitations imposed by all those "new things" (portable devices, small cpu power, minimalist css themes, media queries, different templates, conditional resource loading, etc etc etc). Just to make an example: 2 or 3 years ago if you asked for replies on a question like "should I use a single javascript file or 15 different small ones?" the reply would be "90% of the cases, use a single one". That is because older browser fetched one resource at a time, serially. Lots of minification,precompressing,precompiling optimizers were released to the public. Ask that question now: you'll receive very different answers.... e.g. let's assume you were developing a website that expected a lot of traffic from iPad... until ios 4.0, the maximum cached size of an asset was ~25 kb. On the other hand, almost every browser now fetch the resource asynchronously, i.e. it's far speedier to use 15 small files than a single one. There are resource loaders (require.js, yepnope.js, head.js, lab.js, etc etc etc) that can speed up things on all platforms in terms of resource loading. You can see how a single right "development mode" is not feasible(was going to a few years ago, but not anymore). However, leaving out precompilers, web2py lets you a great deal of flexibility with response.files, response.static_version, response.minify_css and response.minify_js. Precompilers are a different beast: they are needed for leveraging other languages "DSL" to something that ends up being a css or a js file. Most of them give you the possibility to do that conversion right in the user's browser (coffeescript and less to say the most "famous"), and that's the way to go for development. However, the scaffolding app doesn't include any of those because users facing web2py are generally new in the html world and those frameworks add a layer of complexity that it's not needed in the majority of the cases. Given that precompilers are meant to be used just before going to production, a runtime option included by default in web2py it's not really smart (performance-wise). Why on hell would someone wants web2py checking at every request if files have been precompiled or not ? That's an operation meant to be done one-time-only ^_^ Summary: If needed, I'd see much more sense in a contrib module, or a script, ready to be launched as web2py.py -S yourapp -R scripts/compilemymodules.py to expose precompilers functionality. On Sunday, December 16, 2012 9:08:46 PM UTC+1, Arnon Marcus wrote: > > 10x Massimo - That's good to know. > > But this actually has very little to do with what I suggested... :) > > It's good to know that we can have this control over our static-files > browser-reloading. > > But these libraries don't do (just) that... > They are for compiling / transpiling/ processing CoffeScript into > JavaScript and SASS/SCSS/LESS files into CSS files. > > On Sunday, December 16, 2012 6:40:34 AM UTC-8, Massimo Di Pierro wrote: >> >> Static asset management is already integrated in web2py and it is much >> easier to use than those libraries. ;-) >> Thanks to Niphlod for that: >> >> >> http://web2py.com/books/default/chapter/29/04?search=static+asset#Static-asset-management >> >> On Sunday, 16 December 2012 08:04:55 UTC-6, Arnon Marcus wrote: >>> >>> And/Or this one: >>> >>> http://42coffeecups.com/ >>> >>> On Sunday, December 16, 2012 1:57:19 PM UTC+2, Arnon Marcus wrote: >>>> >>>> Any thoughts on this? >>>> >>>> http://elsdoerfer.name/docs/webassets/index.html >>>> >>>> Has anybody tried integrating it in web2py? >>>> Should it be included in it's future releases? >>>> How should one approach using it in development/production with web2py? >>>> How could files be auto-compiled-on-save by this, via web2py's server >>>> while developing? >>>> >>> --

