Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / June 2007

Tip: Looking for answers? Try searching our database.

Struts + Velocity + GWT

Thread view: 
Tarkin - 08 May 2007 16:17 GMT
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
Harry - 09 May 2007 05:02 GMT
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

> Greetings all,
>   Just wondering if anybody has (successfully | effeciently)
[quoted text clipped - 18 lines]
> Thanks,
>   Tarkin
Tarkin - 09 May 2007 10:17 GMT
> Hi,
>
[quoted text clipped - 34 lines]
> > Thanks,
> >   Tarkin

> 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
Harry - 10 May 2007 02:57 GMT
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

> > Hi,
>
[quoted text clipped - 64 lines]
> Thanks for the input,
>   Tarkin
Tarkin - 11 May 2007 19:52 GMT
> Hi,
>
[quoted text clipped - 83 lines]
>
> - 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
Harry - 14 May 2007 07:08 GMT
> > Hi,
>
[quoted text clipped - 89 lines]
> 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

> Thanks and TTFN,
>   Tarkin
wmontoyav@gmail.com - 23 May 2007 17:17 GMT
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.
sokol - 25 Jun 2007 14:16 GMT
> > Hi,
>
[quoted text clipped - 92 lines]
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.