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

Support other view frameworks other than JSP #36

Open
jwest84 opened this issue Nov 11, 2015 · 5 comments
Open

Support other view frameworks other than JSP #36

jwest84 opened this issue Nov 11, 2015 · 5 comments

Comments

@jwest84
Copy link

jwest84 commented Nov 11, 2015

It would be nice if by bringing in Stripes, we didn't have to bring in all the JSP tags with it. Could we possibly have Stripes-framework and then separate Stripes JSP.

@vankeisb
Copy link
Member

Is it causing a problem ? Or the intent is to save a few Kbs in the stripes jar ?

@jwest84
Copy link
Author

jwest84 commented Jan 27, 2016

No problem. It's just an idea to make it possible for the open source community to build integrations with other front-end libraries.

@vankeisb
Copy link
Member

Ok. So you mean factor out the "core" tagblib functionality into reusable java code ?
I'm asking because Stripes is not tied to a view technology. You can use freemarker or anything else for that matter. It is pluggable. It's only the tags that are hard to reuse outside of jsp...

@jwest84
Copy link
Author

jwest84 commented Jan 27, 2016

Yeah, I have used Velocity with Stripes. My biggest issue is that it's hard to use some of the Stripes functionality because the logic is hardcoded into the JSP tags. So you are correct, bringing the taglib stuff into reusable Java is really what I am looking for.

@vankeisb
Copy link
Member

I could not agree more.

I've had the same problem with TTT (a Statically Typed Templating lib) when I integrated with Stripes.

I ended up writing a subset of a JSP engine in order to handle this. In the end, it's a bit scary, but it works. It imposes some design though...

Have a look at this if you're interested :
https://github.com/pojosontheweb/ttt/tree/master/stripes#tag-library

The idea is to use the try-resource pattern in order to have blocks that mimic the nesting of tags.

This allowed me to reuse Stripes tags directly. Otherwise, it's quite a lot of work to rewrite the whole thing to make it reusable. Was clearly not intended to.

It also has the benefit of allowing to reuse virtually any taglib, not only Stripes'...

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

2 participants