Struts + Velocity + GWT

T

Tarkin

Greetings all,
Just wondering if anybody has (successfully | effeciently)
used Strtus, Velocity, and the Google Web Toolkit all
in the same webapp.

I understand that GWT/AJAX techniques are client-side,
whereas Struts and Velocity are (mostly?) server-side.

I'm thinking of using Velocimacros or other velocity
techniques to inject JavaScript into the rendered pages,
but am unsure of exactly how to proceed.

I have seen AJAX techniques used with Struts ala
articles on the web, but most use JSP + tags for their
view, and leave me with the impression that, in the
autthors' opinion at least, that JSP + tags + AJAX
and Velocity are mutually exclusive.

Thoughts, comments, and opinions wanted.

Thanks,
Tarkin
 
H

Harry

Hi,

I didn't try to integrate struts + GWT, but I'm wondering. GWT itself
actually provides the MVC pattern already. Why do you still need to
integrate this two?

There are some implementations making use of AJAX techniques and
struts. I also did that. The AJAX framework I used is Dojo, and I
included this in standard JSP pages. Dojo is quite a pure client
framework, providing client side libraries and widgets. So I used
struts to do the MVC part, which links the logic and the JSP pages.

Just for comment sharing. Any argument is welcome.

Harry
 
T

Tarkin

Hi,

I didn't try to integrate struts + GWT, but I'm wondering. GWT itself
actually provides the MVC pattern already. Why do you still need to
integrate this two?

There are some implementations making use of AJAX techniques and
struts. I also did that. The AJAX framework I used is Dojo, and I
included this in standard JSP pages. Dojo is quite a pure client
framework, providing client side libraries and widgets. So I used
struts to do the MVC part, which links the logic and the JSP pages.

Just for comment sharing. Any argument is welcome.

Harry







GWT itself
actually provides the MVC pattern already. Why do you still need to
integrate this two?

I like creating Struts action classes, and I trust GWT to solve
browser compatibility problems. I'd like to have Struts on the
server side, leveraging existing knowledge vs learning
yet another server-side API. Although both can use POJOs
for things like database access, I like the rigid mappings that
Struts provides- IMHO it prevents url-tomfoolery with a
well-written struts-config.xml + servlet filter + session listener.
There are some implementations making use of AJAX techniques and
struts. I also did that. The AJAX framework I used is Dojo, and I
included this in standard JSP pages. Dojo is quite a pure client
framework, providing client side libraries and widgets. So I used
struts to do the MVC part, which links the logic and the JSP pages.

Again, this boils down to a personal preference: I dislike JSP's.
Things that look like syntactic spaghetti in JSP are trivial with
Struts
and Velocity StrutsTools. I feel like I get more bang-per-keystroke.
But, that's is my opinion. Also, is it just me, or does Dojo seem
slow?
GWT's demos seemed sleek, fast, and light. I hate to sound like
a zealot, but I was impressed by the GWT demos. Which is what
I'm after- sleek, lightweight, fast.

Thanks for the input,
Tarkin
 
H

Harry

Hi,

Yes, you're right. I'm also a supporter to Struts, but the fact is
that GWT itself can provide the advantages of Struts, being MVC,
controlling url (actually seems no visual change of url like Gmail),
no need JSP, etc. That's why I think using struts and GWT together is
quite dummy.

I used Dojo is due to some working environment issues. I need to find
a AJAX framework that may be used across different server-side
language, to be compatible not only on JAVA. It is still quite slow
for the time being. However, as soon as its stable version 0.9
released, I believe the performance will have a great improvement.

Regards,
Harry
 
T

Tarkin

Hi,

Yes, you're right. I'm also a supporter to Struts, but the fact is
thatGWTitself can provide the advantages of Struts, being MVC,
controlling url (actually seems no visual change of url like Gmail),
no need JSP, etc. That's why I think using struts andGWTtogether is
quite dummy.

I used Dojo is due to some working environment issues. I need to find
a AJAX framework that may be used across different server-side
language, to be compatible not only on JAVA. It is still quite slow
for the time being. However, as soon as its stable version 0.9
released, I believe the performance will have a great improvement.

Regards,
Harry






- Show quoted text -
thatGWTitself can provide the advantages of Struts

True, but what about user authentication and data encryption?
File upload? Session management? I need to dig deeper into
the relevant docs on GWT, Dojo, jwic, and others. ISTR there
being no explicit mention of how these issues are aproached.


Thanks and TTFN,
Tarkin
 
H

Harry

True, but what about user authentication and data encryption?
File upload? Session management? I need to dig deeper into
the relevant docs on GWT, Dojo, jwic, and others. ISTR there
being no explicit mention of how these issues are aproached.

I think most of your questions are still handled by traditional server
side technologies, those AJAX stuff just change the layout of your web
interface.

Harry
 
W

wmontoyav

In my case I would get some kind of integration with Struts and Dojo,
basically if you already works with tiles you can use asingronus
request to load the tiles and bind the strust buttons with Asyncronous
requests to struts actions.
About dojo widgets you can make a reference like styleclass att and
use some client validation functionality too. I wasn't ideal Ajax web
app but work prety fast than tradicional Struts Tiles app with some
code change.
 
S

sokol

True, but what about user authentication and data encryption?
File upload? Session management? I need to dig deeper into
the relevant docs on GWT, Dojo, jwic, and others. ISTR there
being no explicit mention of how these issues are aproached.

Thanks and TTFN,
Tarkin

In addition, Struts and descending from it technologies like Beehive
provide easy pageflow navigation from one JSP to another. Does GWT
provide this capability?
BTW, book "GWT in Action" doesn't hae a single reference to Struts and
JSP.

Vitaly
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top