Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-10 Thread StefanR
Is there anywhere a concrete code sample for this pattern? I'm considering to use Dep. Injection too. Here's another example for a classic DAO pattern combined with Spring: http://cleancodematters.wordpress.com/2011/06/04/tutorial-gwt-request-factory-part-i/ -- You received this

Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-08 Thread Thomas Broyer
ServiceLocator is the only mean you can use instance methods in your service, instead of static methods. It's up to you to choose. I believe both will continue to be supported (I can't see any reason it wouldn't be) -- You received this message because you are subscribed to the Google Groups

Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-08 Thread Alexander Orlov
On Jul 8, 10:42 am, Thomas Broyer t.bro...@gmail.com wrote: ServiceLocator is the only mean you can use instance methods in your service, instead of static methods. It's up to you to choose. I believe both I'm rather interested in what's the more elegant way to manage persistence via RF. -Alex

Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-08 Thread Thomas Broyer
All things 'static' are generally seen as not elegant in Java, so using a ServiceLocator would make more elegant. YMMV. Also, elegant doesn't necessarily match with pragmatic, so there might be additional costs to making things elegant. If you ask me, I'd go with instance methods and a

Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-08 Thread Alexander Orlov
On Jul 8, 11:51 am, Thomas Broyer t.bro...@gmail.com wrote: If you ask me, I'd go with instance methods and a ServiceLocator (and dependency injection), Is there anywhere a concrete code sample for this pattern? I'm considering to use Dep. Injection too. Thx again for the info! -Alex -- You

Re: RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-08 Thread Thomas Broyer
See http://wanderingcanadian.posterous.com/guiced-up-gwt-requestfactory and https://github.com/mgenov/injecting-request-factory -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit

RequestFactory: Usage of the EntityService / EntityLocator / ServiceLocator pattern

2011-07-07 Thread Alexander Orlov
I've just implemented this pattern parallel to my basic RequestFactory implementation on top of JPA. It seems that the ServiceLocator brings a little bit more structure into the code... But is the usage of the ServiceLocator pattern encouraged or recommended, considering the future evolvement of