You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Dirk Frederickx <di...@gmail.com> on 2010/02/07 23:09:19 UTC
wro4j
Currently jspwiki 'builds' its javascript and css files from ant. Building
here simply means compression by means of the YUI compressors. The sources
are large concatenations of chunks of javascript and css.
This article (
http://raibledesigns.com/rd/entry/javascript_and_css_concatenation) showed
me some light-weight, alternative approach for building the js/css
on-the-fly, with some additional features as bonus.
It will allow to break the js into logical chunks, and improve source
management. The same can be applied to the css file.
See project home page at http://code.google.com/p/wro4j/
WDYT ?
dirk
Re: wro4j
Posted by Dirk Frederickx <di...@gmail.com>.
On Tue, Feb 16, 2010 at 5:01 PM, Andrew Jaquith
<an...@gmail.com>wrote:
> Dirk --
>
> Taking a quick peek at both WRO4J and JAWR, I like WRO4J more. It
> appears to require just one servlet filter, which isn't great but
> isn't too bad either. JAWR requires much more configuration.
>
> Yep, WR04J looks preferable.
I also has great css features, which may allow for better skin handling.
> In contrast, it seems WRO4J would support a key goal: breaking the
> JavaScript files into chunks. For example, the AJAX "quicksearch" is
> used only by SearchBox.jsp. That JS code should probably go into
> either a classpath dir or a parallel tree hierarchy that mirrors the
> Java package structure. WRO4J doesn't have JAWR's the ability to
> inject the JS and CSS code directly into the JSP via JSP tags, but
> that is ok.
>
> I do agree that breaking up the js in smaller pieces (and probably also the
css)
is a key advantage.
But the example you give is maybe not the most relevant.
The SearchBox.jsp will be included in all pages rendered by jspwiki,
since it is part of the header frame of each page.
The only negative aspect I see, is the (small) runtime overhead WR04J may
introduce
when rendering pages for the first time. (composing and compression becomes
runtime)
But I assume that should be an acceptable cost.
dirk
Re: wro4j
Posted by Andrew Jaquith <an...@gmail.com>.
Dirk --
Taking a quick peek at both WRO4J and JAWR, I like WRO4J more. It
appears to require just one servlet filter, which isn't great but
isn't too bad either. JAWR requires much more configuration.
In contrast, it seems WRO4J would support a key goal: breaking the
JavaScript files into chunks. For example, the AJAX "quicksearch" is
used only by SearchBox.jsp. That JS code should probably go into
either a classpath dir or a parallel tree hierarchy that mirrors the
Java package structure. WRO4J doesn't have JAWR's the ability to
inject the JS and CSS code directly into the JSP via JSP tags, but
that is ok.
PS. I've got some enhanced Stripes JS code done that makes the
"quicksearch" feature work again, using the ActionBean URLs. It also
respects ACLS. I'll check that in soon.
Andrew
On Sun, Feb 7, 2010 at 5:09 PM, Dirk Frederickx
<di...@gmail.com> wrote:
> Currently jspwiki 'builds' its javascript and css files from ant. Building
> here simply means compression by means of the YUI compressors. The sources
> are large concatenations of chunks of javascript and css.
>
> This article (
> http://raibledesigns.com/rd/entry/javascript_and_css_concatenation) showed
> me some light-weight, alternative approach for building the js/css
> on-the-fly, with some additional features as bonus.
>
> It will allow to break the js into logical chunks, and improve source
> management. The same can be applied to the css file.
>
> See project home page at http://code.google.com/p/wro4j/
>
>
> WDYT ?
>
> dirk
>