You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Grant Smith <wo...@gmail.com> on 2007/05/18 23:09:58 UTC

Re: Leveraging the header/resource usage of A4J in MyFaces Tomahawk?

Andrew,

I'm following up to this on the Dev list, as it really belongs there. I
agree with you
regarding the ExtentionFilter issue, and I have seen criticism to the
Tomahawk
approach in the past. There is an ongoing discussion on the Dev list
considering the
direction Tomahawk (or "Tomahawk2"), so please feel free to comment.

On 5/18/07, Andrew Robinson <an...@gmail.com> wrote:
>
> After a while of using Ajax4Jsf, I am really liking how they handle
> component rendering resources (JavaScript and CSS files mainly). Their
> method seems to be cleaner and (I think) have better performance than
> Tomahawk.
>
> The major difference that I see:
>
> - Tomahawk uses the extension filter which buffers the entire response
> and then sticks in the CSS and JS references into the HEAD element
> - A4J scans the renderers of the components in the component tree and
> finds out which resources are needed by the component and adds them to
> the Page
>
> Obviously the A4J library is enhanced for Ajax and has functionality
> to add script tags and CSS files to the page during AJAX requests.
> I've had issues with the Tomahawk approach with Ajax in the past (not
> with A4J's help) as components that were rendered on non-initial page
> renderings were left without their javascript.
>
> I am not trying to step on anyone's toes, but wanted to see what
> others felt about the different approaches and perhaps move the
> Tomahawk code to using more of an A4J approach. I would love to be
> able to remove the extensions filter all together (perhaps moving the
> file upload code out of the extensions filter and putting it into its
> own filter?). Maybe even having both teams work together to maybe
> publish the A4J resource handling code into a separate project/jar
> from the A4J so that other JSF projects can leverage the functionality
> without having to use A4J?
>
> I am not completely versed in the mechanics of both approaches, so
> please excuse any bad oversights on my part.
>



-- 
Grant Smith