Hiho

The initial problem only exists because of the introduction of a uber cmd pattern. Wish avoid it break up all those bits into logical groups. You alreAdy know there a always tradeoffs. In this case uber cmd pat means code splitting can't work perfectly because of reachability due to the command intf.

That's life...

On 04/06/2010, at 11:09 PM, David <david.no...@gmail.com> wrote:

Miroslav,

There are plenty of solutions to avoid a big switch statement. I'm
using a combination of inheritance and the visitor pattern to group
things.
By using annotations I can even build a repository of CommandHandlers
at startup time with 0 configuration.

The command intf and impl it is still something it's just done in java. Sure it's more concise but it's not nothing- yes I'm being pedantic.

So why not ? Every application has the right for their design choices,
no ? Or can you give the ultimate approach that we all should be using
?


Yes and discussed above sometimes things don't alwyas work out perfectly - that's life
David


On Fri, Jun 4, 2010 at 2:25 PM, Miroslav Pokorny
<miroslav.poko...@gmail.com> wrote:
Does it really make sense to give all serivices the same intf. Im sure because everything comes back to a big switch of some sort to dispatch the different types of command results. With different end points this problem
does not exist.

If you really must batch pick the ones that actually belong to each other,
as they are a logical unit and sharing an intf makes sense.

The command pattern is for operations that are related its not intended for each and every type of operation no matter how unrelated they are. GWT buys you great type safety something one loses with Javascript and this uber
command pattern throws all that out.

On Fri, Jun 4, 2010 at 7:13 PM, David <david.no...@gmail.com> wrote:

Less maintenance on the async, declarative transaction management,
undo, batching, less web.xml tweeking, ... there are many reasons why
we also use a command pattern.


On Thu, Jun 3, 2010 at 3:11 PM, Miroslav Pokorny
<miroslav.poko...@gmail.com> wrote:
Why use a uber command pattern for all services. This only leads to some
controller code to dispatch the command on the server which means
everything
gets funneled thru a single point with no real gain. Keep the services separate each w/ their own respective end points and service interfaces. That way the exact problem described below is also avoided as an added
benefit. Command pattern for browser apps is so struts and imho not
needed
for GWT RPC. After all what do you gain ?

On Sun, May 30, 2010 at 10:35 PM, Julio Faerman <jfaer...@gmail.com>
wrote:

Hi,

I am trying to split a GWT app that uses the command (action) pattern. The problem is that "GWT.create(ActionService.class)" causes every
subclass of the return and parameter types to be included in the
initial fragment.

For instance, my action interface is:

public interface ActionService extends RemoteService {
<T extends Response, V extends Request> T execute(V req) throws
ActionFailedException;
}

the problem is that "module1.SomeRequest" and "module2.OtherRequest"
gets included in the initial fragment.
Do you see a way around this?

Thanks,
Julio Faerman

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


--
mP

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


--
mP

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to