I am looking at various web frameworks for a new project (social networking + transactions between connected users). I am intrigued by Play (with scala) but need some help in understanding an issue.
In Play, support for CDN+minification is not available in the core but via a separate module greenscript. But using this module requires the system markup in the layout to be replaced with new greenscript based markup. This is different from Rails where you either do not have to add anything to the layouts or get away by appending act_as_* tags to use new plugins. Any idea on whether the long-term Play approach is to let plugins take over the markup for overrides? In that case if there are couple of modules that you want to operate on the same object, say a url, would it be possible in Play?
Any guidance about alternative way to accomplish this in Play would be helpful too.
Some modules in Play act by providing tags (similar in concept to jsp tags, not in implementation). Greenscript is one of them.
It simply requires you to use a specific tag and during execution time that tag will unfold into the minimization functionality.
If two modules act on the same object (let's say, an anchor href to follow your comment), the compatibility will depend on the implementation of these tags, not on Play. If one of them accepts other tags in its body, it would be possible to mix them, otherwise that won't be allowed.
About Greenscript, it provides a "no-config" mode in which it will automatically minimize all your css/js files without requiring any tag in your pages or any config whatsoever (it works like this by default). This won't affect your inline css/js, but that's easily solvable by moving inline code to its own js/css file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With