Guit doesn't use any of those patterns. In guit mvp is like uiBinder (only
two files, one ui.xml and one java).

*Login.ui.xml (this is what you already know):*

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent";>

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"

xmlns:g="urn:import:com.google.gwt.user.client.ui">

<ui:style>

</ui:style>

<g:HTMLPanel>

Username <g:TextBox ui:field="username"></g:TextBox> <br/>

Password <g:TextBox ui:field="password"></g:TextBox> <br/>

<g:Button ui:field="login">Login</g:Button>

</g:HTMLPanel>

</ui:UiBinder>

*Login.java (this is a presenter on guit):*

@GwtPresenter

@AutoFocus("username") // Set the focus to username textbox when the view
gets attached

public class Login extends LoginPresenter {


        // In @ViewField you can also use your own interfaces and guit will
emulate them (i.e if you create HasVisible you don't need to extend the
widget, if the widget have the methods of the interface, it just works)


 @ViewField

HasText username;


 @ViewField

HasText password;


        // For event binding guit uses this convention, you can also do it
like this @ViewHandler(event=ClickEvent.class, fields="login") and use any
method name. This convention gets validated with an apt plugin.

@ViewHandler

void login$click() {

 tryLogin();

}


 @ViewHandler

@KeyCode({ KeyCodes.KEY_ENTER })

void login$username$password$keyPress() {

 tryLogin();

}


 private void tryLogin() {

 String u = username.getText();

 String p = password.getText();


 // Do the login logic

}

}


Hope the example is clear


Regards

On Tue, Mar 1, 2011 at 3:06 PM, Kayode Odeyemi <drey...@gmail.com> wrote:

> hello, thanks for sharing this. I am having some challenge with its
> implementation though(using the Ray Ryan's method). How do I use the
> go() method to serve multiple views if its local type is of
> HasWidgets?
>
> On 3/1/11, Erik Bens <bense...@googlemail.com> wrote:
> > Hi,
> >
> > perfect overview - thanks! I already worked with this architecture and
> > have to say it is very easy to handle after some tests. Additionally
> > use GIN for binding Views and Presenters will makes it easier too.
> > One question: Is this architecture also possible with the new
> > activity / places approach? Does someone has a diagram / sample for
> > it?
> >
> > Erik
> >
> > On Mar 1, 6:43 pm, Brian Reilly <brian.irei...@gmail.com> wrote:
> >> Very good article! Thank you for contributing it!
> >>
> >> I would be interested to hear from creators/users of the MVP
> >> frameworks out there (gwt-mvp, gwt-platform, gwt-presenter, mvp4g,
> >> etc.) about which approach is used in each of the frameworks or if the
> >> frameworks are approach-agnostic.
> >>
> >> -Brian
> >>
> >> On Tue, Mar 1, 2011 at 10:38 AM, Geoffrey Wiseman
> >>
> >> <geoffrey.wise...@gmail.com> wrote:
> >> > If you're using Model-View-Presenter with GWT (or you're thinking
> >> > about it), there are a number of different patterns you can use to co-
> >> > ordinate between your view and the corresponding presenter. Ray Ryan's
> >> > "Best Practices for Architecting your GWT App" at I/O 2009 showed off
> >> > one pattern, Daniel Danilatos refined that for his "GWT Testing Best
> >> > Practices" presentation during I/O 2010, and a third pattern was used
> >> > in the "Large-Scale Application Development and MVP" article in the
> >> > GWT wiki.  Using these and my own experiences with these patterns,
> >> > I've taken a small example, demonstrated how to apply each of these
> >> > patterns to that example, and written up some of the advantages and
> >> > disadvantages.
> >>
> >> >http://blog.codiform.com/2011/03/view-presenter-interaction-patterns-.
> ..
> >>
> >> > These patterns are by and large available already in the sources
> >> > above, but by bringing them together and talking about some of the
> >> > pros and cos, I hope to save some people some of the sorts of
> >> > experimentation that many of us will have already gone through to
> >> > decide which one of these patterns works best for us.
> >>
> >> > --
> >> > 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-toolkit@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> > google-web-toolkit+unsubscr...@googlegroups.com.
> >> > For more options, visit this group
> >> > athttp://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-toolkit@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.
> >
> >
>
>
> --
> Odeyemi 'Kayode O.
>
> B.Sc(Hons) Econs, Application Developer & Systems Engineer (Sun Certified
> Professional),
> Oracle Certified Associate, Solaris Systems Administrator, Drupal Developer
>
> Website: http://sinati.com <http://www.sinati.com>
> Socialize with me: http://profile.to/charyorde,
> http://twitter.com/charyorde,
>
> http://www.google.com/profiles/dreyemi
> Skype:drecute
>
> --
> 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-toolkit@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.
>
>


-- 
Guit: Elegant, beautiful, modular and *production ready* gwt applications.

http://code.google.com/p/guit/

-- 
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-toolkit@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.

Reply via email to