Pros & Cons for RequestFactory Vs GWT RPC mechanism

924 views
Skip to first unread message

sridevi macherla

unread,
Aug 24, 2011, 12:06:24 AM8/24/11
to google-we...@googlegroups.com
Hi,

I an new to GWT and exploring the interaction of UI and Server.  I would like to know Pros and Cons

1. RequestFactory

2. GWT RPC

Which one can scale in terms of performance and reusability perspective.

Thanks
Sridevi

Y2i

unread,
Aug 24, 2011, 12:46:23 AM8/24/11
to google-we...@googlegroups.com
They both seem to scale.  The main difference is when RPC is used the server works with POJOs that need to be translatable and that need to be mapped to database records by hand or by some tools.  Request Factory works with objects that do not need to be translatable: the may come directly from some persistence layer (JPA, JDO), so an extra mapping step is eliminated.  

Srinivasan Raghavan

unread,
Aug 24, 2011, 1:14:36 AM8/24/11
to google-we...@googlegroups.com
Hi

How to integrate gwt request factory with tomcat

Thanks
Srinivasan Raghavan

> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/EohJt_FDeT0J.
> To post to this group, send email to google-we...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-tool...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

Y2i

unread,
Aug 24, 2011, 12:53:03 PM8/24/11
to google-we...@googlegroups.com
There is almost no difference in configuration between GWT RPC and GWT Request Factory.  The only difference is web.xml needs to declare RequestFactoryServlet instead of RemoteServiceServlet. 

Brian Lough

unread,
Aug 26, 2011, 11:12:51 AM8/26/11
to google-we...@googlegroups.com
That's a little misleading in that RequestFactory useage requires a considerable amount of scaffolding code.

Brian Lough

unread,
Aug 26, 2011, 11:40:26 AM8/26/11
to google-we...@googlegroups.com
After digging into both, I'm moving towards GWTEventservice: http://code.google.com/p/gwteventservice/.

RequestFactory seems best fitted to CRUD operations on specific model entities and does offer much "under the covers" in supporting those operations.  Combined with UIBinder and Editors, it's pretty painless creating small-scale, simple apps.  For large-scale projects, IMHO, far too much scaffolding code just to move POJOs back and forth.  It was also a bit of a pain getting integrated with Spring and Guice, though I'm sure that pain will be alleviated as the releases progress.

http://code.google.com/p/spring4gwt/ -- this may be of interest if you're Spring-based.  May be of interest even if not. :-)

If you're dealing with one application, particularly a small one, I'd go with RequestFactory.  I have to deal with 6 rather large applications, with 5 different databases.  Even though I don't use any two at the same time (JTA), I'm finding neither Guice Persist nor RequestFactory really fits well and failover is still problematic.  As a result, I find it best to simply push POJO events back and forth between the UI and the Server.  SOC for me.

Magno Machado

unread,
Aug 26, 2011, 12:52:24 PM8/26/11
to google-we...@googlegroups.com
>It was also a bit of a pain getting integrated with Spring and Guice, though I'm sure that >pain will be alleviated as the releases progress.
I don't know about Spring, but integrating RF and Guice is not that hard and works very well

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.

To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Reply all
Reply to author
Forward
0 new messages