Re: service implementation for GWT best practice

2010-03-04 Thread Ignat Alexeyenko
Hi.

I've created a registry of AcitonHandlers.

List handlers = getActionHandlers();

public interface ActionHandler {
 public boolean supports(Action action);
 public  T execute(Action action);
}

For each command correspondent action handler will be found and executed.
You can find the example here
http://sourceforge.net/projects/simpleworklog/develop

Please note, project is in pre-alpha stage now, but can be compiled and
launched.

--
Kind regards,
Ignat Alexeyenko.

On Mon, Feb 8, 2010 at 9:53 PM, bhomass  wrote:

> On Ray Ryan's presentation, there is no sample code for implementation
> of the ContactsService.
>
> The code structure would look something like
>
> public class ContactsServiceImpl implements RTSService {
>
>@Override
>public  T execute(Action action) {
>// TODO Auto-generated method stub
>return null;
>}
>
> }
>
> I am wondering how do you use one execute to implement server side
> functions for all the possible actions? do you use a factory method to
> identify the action class and send the request off to different
> utility classes to process?
>
> --
> 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-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



service implementation for GWT best practice

2010-02-08 Thread bhomass
On Ray Ryan's presentation, there is no sample code for implementation
of the ContactsService.

The code structure would look something like

public class ContactsServiceImpl implements RTSService {

@Override
public  T execute(Action action) {
// TODO Auto-generated method stub
return null;
}

}

I am wondering how do you use one execute to implement server side
functions for all the possible actions? do you use a factory method to
identify the action class and send the request off to different
utility classes to process?

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.