What is asset-pipeline plugin and resources plugin?
What are the differences between them?
What are the advantages and disadvantages?
Are this mandatory to work with different js and css framework?
Put simply the asset-pipeline plugin replaces the resources plugin and should be used to manage your assets (such as js and css).
The resources plugin existed prior to the asset-pipeline plugin. It was used to ease and standardize the use of assets within a Grails application. Later it was replaced by the asset-pipeline plugin.
The asset-pipeline plugin is a very capable, feature rich, and extensible plugin for management of your assets (mainly js, css). It also has several other complementary plugins which allow for pre-processing of assets (such as LESS).
While the use of the asset-pipeline plugin isn't required it is highly recommended and the default for later versions of Grails.
What is asset-pipeline plug-in and resources plug-in?
Both of this are grails plug-in which enables programmer to use web related resources or assets such as style sheets, js etc in an easy and efficient way .
This plug-in reduces developers overhead in dealing with dependency, order of loading and many other issues and also make efficient use of resources or assets by compressing or removing duplicates and decreasing the loading time
What are the differences between them?
There are many difference between them like how they load resources, how they keep resources, how they find duplicates, file system organization etc.
What are the advantages and disadvantages?
Advantages of asset-pipeline over standard grails resources plug-in:
File dependencies are in the top of your assets. (No Resources.groovy) Assets in plugins become level with your app. On the fly processing in Development mode (No more waiting for reloads) Coffeescript, LESS, and others become first class citizens ( debuggable ) Require entire folder trees with one line Better minification (UglifyJs) , and compiling before the WAR is built Faster application startup time Easy extensibility
Are this mandatory to work with different js and css framework?
No, you can directly use resources or assets, but it would be messy and inefficient.
Ref:
http://grails-plugins.github.io/grails-resources/guide/
https://github.com/efficiently/larasset/wiki/Asset-pipeline
https://github.com/bertramdev/grails-asset-pipeline/wiki/Why-asset-pipeline-over-grails-resources-plugin
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