Re: Sling Web Resource Optimizers
Thanks for the suggestions Bertrand/Lucas. I like the idea of decoupling the cache from the compiler implementation. I've abstracted out the cache and compiler interface to make it plugable to other web resource types. Also beefed up the CoffeeScript unit tests. I've created a JIRA to track any additional community feedback: https://issues.apache.org/jira/browse/SLING-2805. - Bob On 3/26/2013 4:54 AM, Bertrand Delacretaz wrote: Hi Bob, On Tue, Mar 26, 2013 at 5:03 AM, Bob Paulin wrote: ...Sling supports numerous server side scripting languages for working with JCR but I'm curious if Sling might ever be intended to support front end scripting languages. Projects such as wro4j (http://alexo.github.com/wro4j) support these things but don't have the convenience of the JCR to store compiled resources I like the idea, and your CoffeeScript example demonstrates it very nicely. Having such tings in our /contrib source code folder would be great IMO, as long as each module has meaningful automated tests they should be easy to maintain. There's a set of common logic and requirements for this server-side compiling of client-side code, at least on the caching side, and that can probably be generalized. -Bertrand
Re: Sling Web Resource Optimizers
On Tue, Mar 26, 2013 at 6:46 AM, Lukas Eder wrote: > ...maybe, Sling could host > popular third-party contributions... Definitely - we already have /contrib for that. For me an important criterion for accepting such contributions is their sustainability. Code that's well tested and easy to understand helps, and we're certainly open to voting in authors of such code in as committers, even if we don't expect them to hack in the core too much initially. -Bertrand
Re: Sling Web Resource Optimizers
Hi Bob, On Tue, Mar 26, 2013 at 5:03 AM, Bob Paulin wrote: > ...Sling supports numerous server side scripting languages > for working with JCR but I'm curious if Sling might ever be intended to > support front end scripting languages. Projects such as wro4j > (http://alexo.github.com/wro4j) support these things but don't have the > convenience of the JCR to store compiled resources I like the idea, and your CoffeeScript example demonstrates it very nicely. Having such tings in our /contrib source code folder would be great IMO, as long as each module has meaningful automated tests they should be easy to maintain. There's a set of common logic and requirements for this server-side compiling of client-side code, at least on the caching side, and that can probably be generalized. -Bertrand
Re: Sling Web Resource Optimizers
I've had similar thoughts, recently. Specifically for the case of LESS, I was thinking that adding a "plugin" to Sling, which takes care of storing and compiling and caching results of LESS resources in the repository would be very useful. Of course, this wouldn't have to be maintained by Sling as a core module. But maybe, Sling could host popular third-party contributions. 2013/3/26 Bob Paulin : > > > CQ provides several features for consolidating and minifying CSS and > JavaScript. However a number of technologies such as CoffeeScript, > Handlebars, and LESS have emerged help developers in various ways with front > end development. Sling supports numerous server side scripting languages > for working with JCR but I'm curious if Sling might ever be intended to > support front end scripting languages. Projects such as wro4j > (http://alexo.github.com/wro4j) support these things but don't have the > convenience of the JCR to store compiled resources. > > I started playing around with CoffeeScript and it seems like these things > could be useful to bake in. If not in Sling in CQ. Thoughts? > > https://github.com/bobpaulin/sling-coffee > > - Bob Paulin > http://bobpaulin.com > @bobpaulin > >
Sling Web Resource Optimizers
CQ provides several features for consolidating and minifying CSS and JavaScript. However a number of technologies such as CoffeeScript, Handlebars, and LESS have emerged help developers in various ways with front end development. Sling supports numerous server side scripting languages for working with JCR but I'm curious if Sling might ever be intended to support front end scripting languages. Projects such as wro4j (http://alexo.github.com/wro4j) support these things but don't have the convenience of the JCR to store compiled resources. I started playing around with CoffeeScript and it seems like these things could be useful to bake in. If not in Sling in CQ. Thoughts? https://github.com/bobpaulin/sling-coffee - Bob Paulin http://bobpaulin.com @bobpaulin