Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider a runtime version of wro4j-tag #4

Open
alf239 opened this issue Apr 4, 2012 · 9 comments
Open

Consider a runtime version of wro4j-tag #4

alf239 opened this issue Apr 4, 2012 · 9 comments
Assignees

Comments

@alf239
Copy link
Owner

alf239 commented Apr 4, 2012

%subj%

@ghost ghost assigned olgamelnichuk Apr 4, 2012
@rraman
Copy link

rraman commented Apr 5, 2012

You have any idea on how to go about this? May be I could help here. Do you think there should be any changes need to be done at the wro4j-core & wro4j-extensions ?

@rraman
Copy link

rraman commented Apr 5, 2012

Couple of things are:
Reuse the wroConfiguration create by the WroFilter
Do away with wro4j-tag properties reusing the wro4j.properties

@rraman
Copy link

rraman commented Apr 9, 2012

I'm looking to get started on this. Any inputs from you will be much appreciated:

@alf239
Copy link
Owner Author

alf239 commented Apr 9, 2012

I don't think any changes to wro4j are necessary—but then I haven't looked close enough. The approach I would start with is the dumbest one:

  1. We need the same resource descriptors
  2. We need to cache wro4j-ed version in memory (or in a temp directory, it doesn't matter)
  3. We need to be able to wro4j a bundle on demand

So when we come to our tag, we need to get to some entity regarding the bundle and that entity will call wro4j for us in case we're not in the debug mode.

Thus, apparent tasks would be,

  1. Upgrade wro4j to 1.4.0 (I tried it, and failed—apparently, interfaces were changed for tag classes).
  2. Adjust resource handling to cater for templates
  3. Adjust resource handling to handle *.war
  4. Create that very entity, so that tag could find out an URI for the bundle
  5. Create a resource handler which would dispatch the compressed bundles

Have I forgotten anything?

@rraman
Copy link

rraman commented Apr 10, 2012

I think I made it work with wro4j 1.4.4 without any issues! Or am I missing something. Yes there were some method name changes but I could find alternatives and get that done. Will take a look again and get back to you.

My comments for your points:

  1. Do you mean WroConfiguration by saying 'same resource descriptors'?
  2. I think we can use the same CacheStrategy that is being employed by wro4j
  3. I might need some help here to get the bundle on demand

And for the apparent tasks you have mentioned:

  1. Will try to upgrade and get back to you for comments
  2. This can be done using the wro4j's WildCardExpander
  3. I don't understand what do mean by "adjust resource handling for .war files
  4. If my understanding is right, this will be nothing but the bundled resource itself
  5. The resource handler to dispatch the compressed bundles could be the WroFilter itself!

Let me know what you think. I'll give this all a shot and get back to you when I need help.

@julienw
Copy link

julienw commented Apr 21, 2012

Hi,

I had the same needs and created the issue alexo/wro4j#33 in wro4j.

@rraman
Copy link

rraman commented Jun 8, 2012

@julienw I saw your issue related to this in wro4j. Do you have any taglib implementation or fork of this that works both on the production & debug env? If yes, I would like to give it a spin.

@julienwOL
Copy link

I have one but unfortunately I don't have the right to contribute it for now.

I'm considering doing this again on my personal time, using wro4j-tag as a base, but, well.. time :)

@rraman
Copy link

rraman commented Jun 8, 2012

@julienwOL
I understand.

I have the same need and just couldn't find time to make this tag work. Well, let me know when you work on this, I'll be glad to test it out and I'll do the same when I get time to work on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants