- wro4j - Web Resource Optimizer for Java
- News
- Features
- Getting Started
- Introduction
- What are the benefits?
- Known Issues
- FAQ
wro4j - Web Resource Optimizer for Java
News
New release (1.1.1) is available!
This release contains few enhancements & bug fixes:
- Update GroupsProcessor - create addJs/CssPre/Post/*Processor method
- ContentStripperResourceProcessor is not used anymore (buggy, considers http:// a comment which is stripped)
- JawrCssMinifier is used instead of ContentStripperResourceProcessor, also added AndryCssCompressor algorithm (not used by default because Jawr is preferred).
- Fix ServletContextUriLocator issue when dispatching the request to runtime generated resources. This problem was found when trying to include a resource generated by ajax4jsf:
<group name="ajax4jsf"> <js>/faces/rfRes/org/ajax4jsf/framework.pack.js<js> </group>
Thanks to salgarm for reporting this issue!
- Logging updates. Now you are warned if you include an invalid resource.
New release (1.1.0) is available!
This release contains:
- Css variables support
- Caching headers & ETag support (for css, js & image resources used by wro4j). Now, it should be even faster & improve the YSlow mark.
- Clean up dependencies from pom.xml
- Improve unit test coverage & Code clean up
Matt Raible blog about wro4j
http://raibledesigns.com/rd/entry/javascript_and_css_concatenation
Features
- Free and open source
- Easy to setup (just 3 steps)
- Lightweight (the core depends only on servlet-api & commons-io)
- Minification and processing
- Resource merging
- Css url rewriting
- Css variables support (easy integration with css meta framewors future versions)
- Extensible (easy integration with YUICompressor or other similar tools)
- Caching support (easy custom caching strategy integration, default uses a simple HashMap for caching wro4j-extension)
- ...more to come... (support @import for css merging, maven plugin for build time merging, grails plugin, etc)
See the detailed list of features here: Features
Getting Started
Want to know how to start? Visit Getting started guide: GettingStarted Also, you may want to check the discussion group: http://groups.google.com/group/wro4j
Introduction
There are countless articles related to web performance. The most comprehensive one is performed by researchers from Yahoo. They have identified a number of best practices for making web pages fast. You can find the details here.
Also, they created a tool called YSlow: YSlow which analyzes web pages and tells you why they're slow based on the rules for high performance web sites. YSlow is a Firefox add-on integrated with the popular Firebug web development tool.
The aim of wro4j project is to help application developed on java platform to address a couple of those problems described by Yahoo research. More, exactly it is about "Minimize HTTP Requests" and "Gzip Components".
It is common knowledge that it is faster to serve one large file rather than two smaller ones, because of increased HTTP negotiation and the fact that most browsers only keep two connections open to the same host at any given time. The purpose of wro4j project is to reduce the number of requests needed to load a page and the amount of data to transfer to clients, achieving drastic improvement of loading times. The resources can be benefit also from minification and compression.
The main reason this project was born, is because the java community doesn't have too many options when it comes to choosing between this kind of frameworks. There are few similar projects: Jawr, JSO... but each of them has some kind of limitations or dependencies issues, no recent activity, etc... Also, I believe that competition is good and any framework brings something new you can learn from.
The image below, resume the main purpose of why you should use wro4j.
What are the benefits?
Here you will find a detailed analysis of the impact wro4j does on a typical web application
Known Issues
When trying to integrate wro4j in your project, you may have some troubles. Check out this page to know what could be wrong: KnownIssues
FAQ
Do you have any questions? You could find the answers already here: FAQ