Re: GWT MVP Frameworks

2019-05-22 Thread Frank Hossfeld
I forget to mention:

Another intresting MVP framework is 

* Nalu: https://github.com/NaluKit/nalu 

and 

* Domino-mvp: https://github.com/DominoKit/domino-mvp

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/46d6b458-196c-4785-9ba3-b955aa7b1e42%40googlegroups.com.


Re: GWT MVP Frameworks

2019-05-22 Thread Frank Hossfeld
I forget to mention:

Another intresting MVP framework is Nalu: https://github.com/NaluKit/nalu 

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-web-toolkit/63d2bf9c-44cd-4e7f-97ef-c43d9238569b%40googlegroups.com.


Re: GWT MVP Frameworks

2018-01-03 Thread Frank Hossfeld
I am one of the contributors of mvp4g. Yeah, that's right, mvp4g uses GIN. 
That's something I don't like, but trying to remove GIN is a breaking 
change. So we decided, as we startet with mvp4g2, to keep the numbers of 
dependencies small. mvp4g2 only uses Elemental 2 (Place management). It 
does not a have a dependecy to GWT! We replace the generators with APT. So, 
I would say, once it is ready to go, it should work with j2cl. 

Am Freitag, 13. Oktober 2017 16:00:57 UTC+2 schrieb hy:
>
> Is anyone using any GWT MVP based framework?
>
> We have been using GWTP, however the development on it seems to be stalled 
> and it still depends on GIN, which is also not under active development.
>
> GWTP is extremely powerful, however a lack of investment in it recently 
> has been concerning for us and we would like to be sure that our app is 
> future compatible.
>
> So, is there any other framework anyone is using out there that works like 
> GWTP and would take minimum transition (from GIN to Dagger, etc.); and has 
> a future compatibility (annotation processing, raw HTML, etc.).
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP Frameworks

2017-10-13 Thread Subhrajyoti Moitra
https://github.com/Axellience/vue-gwt

Vue+Gwt

On Fri, Oct 13, 2017 at 9:09 PM, hy  wrote:

> Errai Framework is awesome, and we are using parts of it (like jaxrs);
> however its too much focussed on javaee specific development (which is
> great btw but too heavy for general and ever-evolving use-cases and has a
> steep learning curve viz. custom CDI/IOC).
> mvp4g
> 
>  again
> uses GIN.
>
> Also, IMO JS frameworks like vue, react or polymer are very good for
> creating isolated custom components and rendering HTML.
> However for MVP/data-flow/binding/architecture they might not be the
> ideal solution (other than if you are going to fully commit to them for
> future use and as we all know there is a new js framework every month
> deprecating the old one).
>
> Vanilla js (which in this case cross-compiled by the awesome GWT
> compiler), is the path we would want to take.
> Still open to other suggestions.
>
>
> On Friday, October 13, 2017 at 10:28:16 AM UTC-4, DavidN wrote:
>>
>> I'm also depending on GWTP for my projects. It would be nice if it
>> somehow got migrated to Dagger, but I guess the company behind it stopped
>> doing GWT work.
>>
>> I'm considering moving to a mix of GWT with Vue.js in combination with
>> Vue-routing.
>>
>>
>> On Fri, Oct 13, 2017 at 4:14 PM Subhrajyoti Moitra 
>> wrote:
>>
>>> U can try http://erraiframework.org/ or https://github.com/mvp4g/mvp4g
>>> as alternatives.
>>>
>>> On Fri, Oct 13, 2017 at 7:30 PM, hy  wrote:
>>>
 Is anyone using any GWT MVP based framework?

 We have been using GWTP, however the development on it seems to be
 stalled and it still depends on GIN, which is also not under active
 development.

 GWTP is extremely powerful, however a lack of investment in it recently
 has been concerning for us and we would like to be sure that our app is
 future compatible.

 So, is there any other framework anyone is using out there that works
 like GWTP and would take minimum transition (from GIN to Dagger, etc.); and
 has a future compatibility (annotation processing, raw HTML, etc.).

 --
 You received this message because you are subscribed to the Google
 Groups "GWT Users" group.
 To unsubscribe from this group and stop receiving emails from it, send
 an email to google-web-toolkit+unsubscr...@googlegroups.com.
 To post to this group, send email to google-we...@googlegroups.com.
 Visit this group at https://groups.google.com/group/google-web-toolkit.
 For more options, visit https://groups.google.com/d/optout.

>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "GWT Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com.
>>> To post to this group, send email to google-we...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP Frameworks

2017-10-13 Thread hy
Errai Framework is awesome, and we are using parts of it (like jaxrs); 
however its too much focussed on javaee specific development (which is 
great btw but too heavy for general and ever-evolving use-cases and has a 
steep learning curve viz. custom CDI/IOC).
mvp4g 

 again 
uses GIN.

Also, IMO JS frameworks like vue, react or polymer are very good for 
creating isolated custom components and rendering HTML.
However for MVP/data-flow/binding/architecture they might not be the ideal 
solution (other than if you are going to fully commit to them for future 
use and as we all know there is a new js framework every month deprecating 
the old one).

Vanilla js (which in this case cross-compiled by the awesome GWT compiler), 
is the path we would want to take.
Still open to other suggestions.


On Friday, October 13, 2017 at 10:28:16 AM UTC-4, DavidN wrote:
>
> I'm also depending on GWTP for my projects. It would be nice if it somehow 
> got migrated to Dagger, but I guess the company behind it stopped doing GWT 
> work.
>
> I'm considering moving to a mix of GWT with Vue.js in combination with 
> Vue-routing.
>
>
> On Fri, Oct 13, 2017 at 4:14 PM Subhrajyoti Moitra  > wrote:
>
>> U can try http://erraiframework.org/ or https://github.com/mvp4g/mvp4g 
>> as alternatives.
>>
>> On Fri, Oct 13, 2017 at 7:30 PM, hy > 
>> wrote:
>>
>>> Is anyone using any GWT MVP based framework?
>>>
>>> We have been using GWTP, however the development on it seems to be 
>>> stalled and it still depends on GIN, which is also not under active 
>>> development.
>>>
>>> GWTP is extremely powerful, however a lack of investment in it recently 
>>> has been concerning for us and we would like to be sure that our app is 
>>> future compatible.
>>>
>>> So, is there any other framework anyone is using out there that works 
>>> like GWTP and would take minimum transition (from GIN to Dagger, etc.); and 
>>> has a future compatibility (annotation processing, raw HTML, etc.).
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "GWT Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to google-web-toolkit+unsubscr...@googlegroups.com 
>>> .
>>> To post to this group, send email to google-we...@googlegroups.com 
>>> .
>>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to google-web-toolkit+unsubscr...@googlegroups.com .
>> To post to this group, send email to google-we...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP Frameworks

2017-10-13 Thread David
I'm also depending on GWTP for my projects. It would be nice if it somehow
got migrated to Dagger, but I guess the company behind it stopped doing GWT
work.

I'm considering moving to a mix of GWT with Vue.js in combination with
Vue-routing.


On Fri, Oct 13, 2017 at 4:14 PM Subhrajyoti Moitra 
wrote:

> U can try http://erraiframework.org/ or https://github.com/mvp4g/mvp4g as
> alternatives.
>
> On Fri, Oct 13, 2017 at 7:30 PM, hy  wrote:
>
>> Is anyone using any GWT MVP based framework?
>>
>> We have been using GWTP, however the development on it seems to be
>> stalled and it still depends on GIN, which is also not under active
>> development.
>>
>> GWTP is extremely powerful, however a lack of investment in it recently
>> has been concerning for us and we would like to be sure that our app is
>> future compatible.
>>
>> So, is there any other framework anyone is using out there that works
>> like GWTP and would take minimum transition (from GIN to Dagger, etc.); and
>> has a future compatibility (annotation processing, raw HTML, etc.).
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "GWT Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to google-web-toolkit+unsubscr...@googlegroups.com.
>> To post to this group, send email to google-web-toolkit@googlegroups.com.
>> Visit this group at https://groups.google.com/group/google-web-toolkit.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP Frameworks

2017-10-13 Thread Subhrajyoti Moitra
U can try http://erraiframework.org/ or https://github.com/mvp4g/mvp4g as
alternatives.

On Fri, Oct 13, 2017 at 7:30 PM, hy  wrote:

> Is anyone using any GWT MVP based framework?
>
> We have been using GWTP, however the development on it seems to be stalled
> and it still depends on GIN, which is also not under active development.
>
> GWTP is extremely powerful, however a lack of investment in it recently
> has been concerning for us and we would like to be sure that our app is
> future compatible.
>
> So, is there any other framework anyone is using out there that works like
> GWTP and would take minimum transition (from GIN to Dagger, etc.); and has
> a future compatibility (annotation processing, raw HTML, etc.).
>
> --
> You received this message because you are subscribed to the Google Groups
> "GWT Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at https://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP and UiBinder Question

2015-08-28 Thread Alain Ekambi
This is how we do it.
Easy to understand. Easy to maintain

https://www.youtube.com/watch?v=kilmaSRq49g


On 28 August 2015 at 12:43, Abel Oszwald  wrote:

> Hello,
>
> I read the documentation of MVP and i have a question about UiBinder
> ClickListener.
> Is it make sense if i define the ClickListener in the UiBinder java file
> like in the docs,
> which in turn call the presenter.OnItemClicked() or i define the
> Clicklistener in Presenter
> where all the logic is and from the UiBinder java, i just define methods
> which return only
> the button for example, and in the Presenter i call those methods and
> define the ClickListener
> for that button? So in the UiBinder java file i only have @UiField and a
> couple
> methods which returns those UiFIelds.
>
> Thank you!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-web-toolkit+unsubscr...@googlegroups.com.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> Visit this group at http://groups.google.com/group/google-web-toolkit.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/ 

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit+unsubscr...@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT MVP Architecture

2012-09-18 Thread Adolfo Panizo Touzon
I don't know if i am missing something, but, why yo don't create a
clientFactory in order to get the View?

In that way you only create the view once and you avoid the problem of
having multiple handlers attached.

2012/9/14 Aryan 

>
>
>
>
>
>
> On 14 Sep, 14:21, stuckagain  wrote:
> > Why does the view need to be a singleton ?
>
> I guess why I am having view as singleton is having better performance
> as I see views are expensive to create.
> Not creating em everytime saves operation deep down like
> "Document.create -> appendChild. and so the DOM manipulation
> that saves time.
>
> >
> > Anyway, when you are done with the presenter, then you need to tell it
> so.
> > In that case it can unregister any installed handlers.
> >
> > David
> >
> >
> >
> > On Thursday, September 13, 2012 8:09:30 PM UTC+2, Aryan wrote:
> > > Hi all,
> >
> > > lets look at the code:
> >
> > > public class MyView implements IMyView {
> >
> > > Button click;
> > > .
> > > public HasClickHandlers getClick(){
> > >   return click;
> > >  }
> >
> > > }
> >
> > > public class MyPresenter {
> >
> > >public interface IMyView {
> > >   public HasClickHandlers getClick();
> > > }
> >
> > > private IMyView view;
> >
> > > public MyPresenter(IMyView view){
> > >   this.view = view;
> > >   bind();
> > > }
> >
> > > private void bind(){
> > >view.addClickHandler(new ClickHandler(){
> > > public void onClick(ClickEvent e){
> > > Window.alert("heeo");
> >
> > > }
> > > }//binds end
> >
> > >  }// class ends
> >
> > > //(We are not using Activities or any MVP framework)
> >
> > > ok tats it. Now in applicaton the view is singleton. but the presenter
> are
> > > not, so they are made as and when needed like :
> >
> > > MyPresenter p = new MyPresenter(view); //view is singleton throughout
> the
> > > application; assume getting it by some factory
> >
> > > Now suppose after a while if I have created *10 MyPresenter *instance
> > > that will add *10 clickHandler *to button "c*lick" . So one click event
> > > will be handled 10 times by 10 different handlers.*
> > > **
> > > I can see here it as happening when click the button I get 10 times
> alert
> > > window.
> >
> > > So where I misunderstood the MVP architecture, what I am missing.
> > > please help
> > > **
> > > Thanks in advance.- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> 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.
>
>


-- 
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

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



Re: GWT MVP Architecture

2012-09-14 Thread Aryan






On 14 Sep, 14:21, stuckagain  wrote:
> Why does the view need to be a singleton ?

I guess why I am having view as singleton is having better performance
as I see views are expensive to create.
Not creating em everytime saves operation deep down like
"Document.create -> appendChild. and so the DOM manipulation
that saves time.

>
> Anyway, when you are done with the presenter, then you need to tell it so.
> In that case it can unregister any installed handlers.
>
> David
>
>
>
> On Thursday, September 13, 2012 8:09:30 PM UTC+2, Aryan wrote:
> > Hi all,
>
> > lets look at the code:
>
> > public class MyView implements IMyView {
>
> >     Button click;
> > .
> >     public HasClickHandlers getClick(){
> >               return click;
> >      }
>
> > }
>
> > public class MyPresenter {
>
> >    public interface IMyView {
> >           public HasClickHandlers getClick();
> >     }
>
> >     private IMyView view;
>
> >     public MyPresenter(IMyView view){
> >       this.view = view;
> >       bind();
> >     }
>
> >     private void bind(){
> >        view.addClickHandler(new ClickHandler(){
> >             public void onClick(ClickEvent e){
> >                 Window.alert("heeo");
>
> >             }
> >     }//binds end
>
> >  }// class ends
>
> > //(We are not using Activities or any MVP framework)
>
> > ok tats it. Now in applicaton the view is singleton. but the presenter are
> > not, so they are made as and when needed like :
>
> > MyPresenter p = new MyPresenter(view); //view is singleton throughout the
> > application; assume getting it by some factory
>
> > Now suppose after a while if I have created *10 MyPresenter *instance
> > that will add *10 clickHandler *to button "c*lick" . So one click event
> > will be handled 10 times by 10 different handlers.*
> > **
> > I can see here it as happening when click the button I get 10 times alert
> > window.
>
> > So where I misunderstood the MVP architecture, what I am missing.
> > please help
> > **
> > Thanks in advance.- Hide quoted text -
>
> - Show quoted text -

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



Re: GWT MVP Architecture

2012-09-14 Thread stuckagain
Why does the view need to be a singleton ?
 
Anyway, when you are done with the presenter, then you need to tell it so.
In that case it can unregister any installed handlers.
 
David

On Thursday, September 13, 2012 8:09:30 PM UTC+2, Aryan wrote:

> Hi all,
>  
> lets look at the code:
>  
> public class MyView implements IMyView {
>  
> Button click;
> .
> public HasClickHandlers getClick(){
>   return click;
>  }
>  
> }
>  
>  
> public class MyPresenter {
>  
>public interface IMyView {
>   public HasClickHandlers getClick();
> }
>  
> private IMyView view; 
>  
> public MyPresenter(IMyView view){
>   this.view = view;
>   bind();
> }
>  
> private void bind(){
>view.addClickHandler(new ClickHandler(){
> public void onClick(ClickEvent e){
> Window.alert("heeo");
>  
> }
> }//binds end
>  
>  }// class ends
>  
> //(We are not using Activities or any MVP framework)
>  
> ok tats it. Now in applicaton the view is singleton. but the presenter are 
> not, so they are made as and when needed like :
>  
> MyPresenter p = new MyPresenter(view); //view is singleton throughout the 
> application; assume getting it by some factory 
>  
> Now suppose after a while if I have created *10 MyPresenter *instance 
> that will add *10 clickHandler *to button "c*lick" . So one click event 
> will be handled 10 times by 10 different handlers.*
> ** 
> I can see here it as happening when click the button I get 10 times alert 
> window. 
>  
> So where I misunderstood the MVP architecture, what I am missing. 
> please help
> ** 
> Thanks in advance.
>  
>  
>  
>

-- 
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/-/kqPCgpq2N1IJ.
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.



Re: GWT MVP Architecture

2012-09-13 Thread Jens
As your view is singleton you have to tell the presenter that it should 
detach itself from the view, e.g. by introducing a public 
Presenter.unbind() method. You then have to call that unbind() method 
before you throw away your presenter instance. Your presenter needs to 
remember the HandlerRegistration instances so unbind() can use them to 
remove the handlers from the view.

Alternative: Let the view know its presenter and let it delegate to the 
presenter once an event has occurred. If the view does not know any 
presenter, nothing will happen. That way you can swap presenters or remove 
the presenter by calling view.setPresenter(null). 

public MyView extends Composite implements View {
  
  Presenter presenter = ...;
  Button createNoteButton = ...;

  public void setPresenter(Presenter p) {
 presenter = p;
  }

   @UiHandler("createNoteButton") //if you use UiBinder. Otherwise you have 
to register the ClickHandler yourself in the view.
   void onClick(ClickEvent event) {
 if(presenter != null) { presenter.onCreateNote() };
   }

}

-- J.

-- 
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/-/zUz9ytH1c6YJ.
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.



Re: GWT MVP & Multiple Areas Doubt

2011-12-04 Thread Thomas Broyer


On Sunday, December 4, 2011 8:31:48 PM UTC+1, vehdra music wrote:
>
> On Dec 3, 9:53 pm, Thomas Broyer  wrote:
> > If your 3 parts are tightly linked (you have different actions and
> > different filters for each different "main content"), given that they're
> > displayed next to each other, then you only need one activity.
> >
> > I'd however try to code them as three distinct "components" (widgets)
> > linked only through events (true events with event-handlers using
> > addHandler, or simply using callbacks).
>
> So, for example I will have to create with (or without) UIBinder a
> widget for every actions menu or filters menu that I need (dispite of
> reusing anyone when I could). For example UsersListActions widget and
> UsersListsFilter widget.
>

Hard (impossible?) to answer without knowing more about your specific 
needs, but do the Simplest Thing That Could Possibly Work™

On more doubt. Wich one would be the way to communicate between this
> widgets (actions and filters panels) and the current presenter (in my
> case, the current activity)?
>
Your widgets are part of the view, and your presenter is, well, the 
presenter for the view (you can segregate the widgets behind "sub 
interfaces").
 

>  That should make it easier maintain
> > the whole thing (otherwise your "main content with actions and filters"
> > could grow and become unmaintainable) but more importantly, if you think
> > you could visually separate them later, that would make it easier (in 
> that
> > event, route the events through the event bus and "you're done"). It 
> would
> > make it possible/easier to reuse one part in different views (e.g. if
> > most/all lists have the same set of actions).
> >
> > I'm afraid there's no "one size fits all" approach; it (in part) depends
> > how you imagine your app will evolve. The whole idea of activities are to
> > decouple things, it doesn't make sense for things that are tightly 
> coupled
> > (unless they're separated visually into non-adjacent areas). The idea is
> > that, for instance, a "main menu", a "list of things" and "details about
> > one thing" could all appear on the screen at the same time on a desktop,
> > but appear as "sequential screens" on a smart phone (and using MVP within
> > an activity, you can in addition decouple the view –wide on a desktop,
> > narrower on a smartphone– from the behavior)
> >
> > To me, however, your current design is clearly not the best (or i
> > misunderstood it): why use MainDisplayFilters and MainDisplayActions as
> > singletons that you clear/populate each time instead of simply using
> > distinct instances in each view?
>
> I did it in this way because I don't know how can I tell to my
> presenter from some widget to perform some action (ie: delete some
> users) or how to communicate to the vie.
>
> For example, on the start method of UserListActivity I make a rpc to
> load the users and populate my UsersListViewImpl. IE: How can I tell
> to my UsersListsActions widget that there are n users? Or how can I
> know from my UsersListsActions widget how many rows are selected in my
> UsersListViewImpl? How can I tell from my UsersListsActions to my
> UserListPresenter to delete some users?
>
What I understood is that you're using singletons and when you need them, 
you tell them "forget everything, and know this is what you should 
know/do". I'm just saying that instead of singletons and "forget 
everything", you should create instances that the activity/view *owns* and 
are initialized once and for all.

-- 
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/-/pNLumTohzFwJ.
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.



Re: GWT MVP & Multiple Areas Doubt

2011-12-04 Thread vehdra music


On Dec 3, 9:53 pm, Thomas Broyer  wrote:
> If your 3 parts are tightly linked (you have different actions and
> different filters for each different "main content"), given that they're
> displayed next to each other, then you only need one activity.
>
> I'd however try to code them as three distinct "components" (widgets)
> linked only through events (true events with event-handlers using
> addHandler, or simply using callbacks).

So, for example I will have to create with (or without) UIBinder a
widget for every actions menu or filters menu that I need (dispite of
reusing anyone when I could). For example UsersListActions widget and
UsersListsFilter widget.

On more doubt. Wich one would be the way to communicate between this
widgets (actions and filters panels) and the current presenter (in my
case, the current activity)?

 That should make it easier maintain
> the whole thing (otherwise your "main content with actions and filters"
> could grow and become unmaintainable) but more importantly, if you think
> you could visually separate them later, that would make it easier (in that
> event, route the events through the event bus and "you're done"). It would
> make it possible/easier to reuse one part in different views (e.g. if
> most/all lists have the same set of actions).
>
> I'm afraid there's no "one size fits all" approach; it (in part) depends
> how you imagine your app will evolve. The whole idea of activities are to
> decouple things, it doesn't make sense for things that are tightly coupled
> (unless they're separated visually into non-adjacent areas). The idea is
> that, for instance, a "main menu", a "list of things" and "details about
> one thing" could all appear on the screen at the same time on a desktop,
> but appear as "sequential screens" on a smart phone (and using MVP within
> an activity, you can in addition decouple the view –wide on a desktop,
> narrower on a smartphone– from the behavior)
>
> To me, however, your current design is clearly not the best (or i
> misunderstood it): why use MainDisplayFilters and MainDisplayActions as
> singletons that you clear/populate each time instead of simply using
> distinct instances in each view?

I did it in this way because I don't know how can I tell to my
presenter from some widget to perform some action (ie: delete some
users) or how to communicate to the vie.

For example, on the start method of UserListActivity I make a rpc to
load the users and populate my UsersListViewImpl. IE: How can I tell
to my UsersListsActions widget that there are n users? Or how can I
know from my UsersListsActions widget how many rows are selected in my
UsersListViewImpl? How can I tell from my UsersListsActions to my
UserListPresenter to delete some users?

Please sorry if I am asking some dumb question because my low level of
knowlegde :)

I was reading and reading GWT & MVP but I am just a little dizzy.

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



Re: GWT MVP & Multiple Areas Doubt

2011-12-03 Thread Thomas Broyer
If your 3 parts are tightly linked (you have different actions and 
different filters for each different "main content"), given that they're 
displayed next to each other, then you only need one activity.

I'd however try to code them as three distinct "components" (widgets) 
linked only through events (true events with event-handlers using 
addHandler, or simply using callbacks). That should make it easier maintain 
the whole thing (otherwise your "main content with actions and filters" 
could grow and become unmaintainable) but more importantly, if you think 
you could visually separate them later, that would make it easier (in that 
event, route the events through the event bus and "you're done"). It would 
make it possible/easier to reuse one part in different views (e.g. if 
most/all lists have the same set of actions).

I'm afraid there's no "one size fits all" approach; it (in part) depends 
how you imagine your app will evolve. The whole idea of activities are to 
decouple things, it doesn't make sense for things that are tightly coupled 
(unless they're separated visually into non-adjacent areas). The idea is 
that, for instance, a "main menu", a "list of things" and "details about 
one thing" could all appear on the screen at the same time on a desktop, 
but appear as "sequential screens" on a smart phone (and using MVP within 
an activity, you can in addition decouple the view –wide on a desktop, 
narrower on a smartphone– from the behavior)

To me, however, your current design is clearly not the best (or i 
misunderstood it): why use MainDisplayFilters and MainDisplayActions as 
singletons that you clear/populate each time instead of simply using 
distinct instances in each view?

-- 
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/-/bqGmcv_OB8EJ.
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.



Re: GWT, MVP, GIN, code splitting?

2011-06-17 Thread Thomas Broyer
I don't know how they diverge, but GWT-Platform is originally a fork of GWT 
Presenter, and supports code splitting out of the box with just a few 
annotations here and there: http://code.google.com/p/gwt-platform/
Hint: search for "gwt-presenter" on the project's home page.
I never used either so i'm afraid I won't be of any help.

-- 
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/-/400vTsoqO6YJ.
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.



Re: GWT, MVP, GIN, code splitting?

2011-06-17 Thread Ahmed
First of all thank you for your reply:)
In fact  I'm a beginner and I just discovered GWT and i dont
understand many pattern like the activity pattern but in regard to mvp
im using the GWT-Presenter
Framework.
brief the  binding is done  in this way

  bindPresenter (
  Presenter.class,
  Presenter.Display.class,
  View.class);

what should i do to optimize my code?
my binding code should it be something like this?
bind (Presenter.class). in (Singleton.class);
bind (Presenter.Display.class). toProvider (asyncProvider);

then have you an example of asynchronous provider and what do you
think about GWT Presenter is it was the right solution? or i have to
change to another framework? if you were me what would you have
chosen?

On 16 juin, 17:14, Thomas Broyer  wrote:
> GIN's AsyncProvider might help.
>
> If you're using Activities, you can also put GWT.runAsync in your Activity's
> start() method. See
> alsohttp://code.google.com/p/google-web-toolkit/issues/detail?id=5129
>
> Also, if you "embraced asynchrony", adding GWT.runAsync around
> already-asynchronous operations shouldn't be an issue.

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



Re: GWT, MVP, GIN, code splitting?

2011-06-16 Thread Raphael André Bauer
Check out this issue (includes source code):
http://code.google.com/p/google-web-toolkit/issues/detail?id=5129

If you followed the best practises you can easily hide your activities
behind proxies that do the code splitting automatically.


Best,


Raphael


On Thu, Jun 16, 2011 at 6:10 PM, Juan Pablo Gardella
 wrote:
> +1
>
> 2011/6/16 Ahmed 
>>
>> How to minimize the amount of code downloaded initially by GWT app
>> user's browser? Well, just wrap potentially big operations in a
>> GWT.runAsync() call. However, since our application is using GWT best
>> practices (dependency injection, MVP pattern), it’s not as
>> straightforward as GWT doc describes. Could you please give me an idea
>> on how to use code splitting in conjunction with GIN?
>>
>> --
>> 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.
>>
>
> --
> 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.
>

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



Re: GWT, MVP, GIN, code splitting?

2011-06-16 Thread Thomas Broyer
GIN's AsyncProvider might help.

If you're using Activities, you can also put GWT.runAsync in your Activity's 
start() method. See 
also http://code.google.com/p/google-web-toolkit/issues/detail?id=5129

Also, if you "embraced asynchrony", adding GWT.runAsync around 
already-asynchronous operations shouldn't be an issue.

-- 
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/-/Qn41Ny1buFwJ.
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.



Re: GWT, MVP, GIN, code splitting?

2011-06-16 Thread Juan Pablo Gardella
+1

2011/6/16 Ahmed 

> How to minimize the amount of code downloaded initially by GWT app
> user's browser? Well, just wrap potentially big operations in a
> GWT.runAsync() call. However, since our application is using GWT best
> practices (dependency injection, MVP pattern), it’s not as
> straightforward as GWT doc describes. Could you please give me an idea
> on how to use code splitting in conjunction with GIN?
>
> --
> 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.
>
>

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-16 Thread Aidan O'Kelly
Maybe,

@Inject
class MainWidget(SubWidget subwidget)
.
.
@Inject
class SubWidget(SubWidgetPresenter presenter)

You can then inject eventBus into presenter and communicate with the
MainWidget/Rest of the app.


On Wed, Jun 15, 2011 at 12:58 PM, ricu  wrote:
> Anybody? Maybe someone has the same architecture without GIN. What is
> your experience?
>
> On 13 lip, 21:16, ricu  wrote:
>> Hi!
>>
>> We are usingGINin our application which is constructed in MVP style.
>> We tried to follow some best practices described in GWT pages and here
>> in GWT group so we design the application in the following manner:
>> 1) We have multiple main screens(pages) that have activities attached
>> to them. They are build in MVP  style where presenters are also
>> activities.
>> 2) Every main screen is a collection of some sub-widgets which can
>> also be created from some other sub-sub-widgets, so you can say that
>> we are nesting views and their presenters.
>> 3) The main views are singletons. Our sub-widgets are not singletons
>> because we are reusing them.
>> 4) All of our presenters aren't singletons.
>> 5) They are created usingGIN
>>
>> GINBinding example:
>> bind(SubWidgetView.class).to(SubWidget.class);
>> bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>>
>> Injecting sub-widget into main widget through constructor example:
>> @Inject
>> public MainWidget(SubWidget widget1)
>>
>> Injecting sub-widget's interface into presenter through constructor
>> example:
>> @Inject
>> public SubWidgetPresenter(SubWidgetView widget1)
>>
>> The problem is that we get two objects of the sub-widget class, one
>> for injecting the into main widget and the other one for while
>> injecting into it's presenter. The first one is  shown on the screen
>> but the other one is bind to the presenter. When presenter changes its
>> view, it changes the view that was not bin to the main widget and we
>> can't see anything.
>>
>> So our solution would be to create one sub-widget per main-widget but
>> we don't know how to do it and if we do, we don't know how to inject
>> that object of the sub-widget into the recreating presenter.
>>
>> Marko
>
> --
> 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.
>
>

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-16 Thread ricu
I don't want share instances through modules that is why i didn't make
those view parts as singletons in the first place. But the view that
is injected in the parent view and the view injected into it's
presenter MUST be the same instance. But can you see what the problem
is? If I don't share instances through modules (view's are not
singletons) then I get two instances for the parent view and the
presenter even though it must be the same instance.

On 16 lip, 13:25, Juan Pablo Gardella 
wrote:
> If your widgets are reusable, if you create new instances there are not
> problem. Why you want to share instances?
>
> 2011/6/16 ricu 
>
>
>
>
>
>
>
> > Yes, but I have new instances because they are not singletons :). So
> > to solve this issue I must make them singletons? If I do that then I
> > can't reuse them across the application. Or can I?
>
> > On 16 lip, 12:50, Juan Pablo Gardella 
> > wrote:
> > > No, I don't say that. I say your problem about multiple instance is
> > becouse
> > > in each @Inject you have a new instance.
>
> > > 2011/6/16 ricu 
>
> > > > Are you trying to say that I make those views as singletons? The
> > > > problem is that I would like to reuse one widget on multiple places.
> > > > If I go with singletons I must create classes for every widget I use
> > > > (they will extend some class that has mutual functionality)?
>
> > > > On 16 lip, 02:27, Juan Pablo Gardella 
> > > > wrote:
> > > > > "The problem is that we get two objects of the sub-widget class"
> > becouse
> > > > > this widgets aren't singletons.
>
> > > > > 2011/6/15 ricu 
>
> > > > > > Anybody? Maybe someone has the same architecture without GIN. What
> > is
> > > > > > your experience?
>
> > > > > > On 13 lip, 21:16, ricu  wrote:
> > > > > > > Hi!
>
> > > > > > > We are usingGINin our application which is constructed in MVP
> > style.
> > > > > > > We tried to follow some best practices described in GWT pages and
> > > > here
> > > > > > > in GWT group so we design the application in the following
> > manner:
> > > > > > > 1) We have multiple main screens(pages) that have activities
> > attached
> > > > > > > to them. They are build in MVP  style where presenters are also
> > > > > > > activities.
> > > > > > > 2) Every main screen is a collection of some sub-widgets which
> > can
> > > > > > > also be created from some other sub-sub-widgets, so you can say
> > that
> > > > > > > we are nesting views and their presenters.
> > > > > > > 3) The main views are singletons. Our sub-widgets are not
> > singletons
> > > > > > > because we are reusing them.
> > > > > > > 4) All of our presenters aren't singletons.
> > > > > > > 5) They are created usingGIN
>
> > > > > > > GINBinding example:
> > > > > > > bind(SubWidgetView.class).to(SubWidget.class);
>
> > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> > > > > > > Injecting sub-widget into main widget through constructor
> > example:
> > > > > > > @Inject
> > > > > > > public MainWidget(SubWidget widget1)
>
> > > > > > > Injecting sub-widget's interface into presenter through
> > constructor
> > > > > > > example:
> > > > > > > @Inject
> > > > > > > public SubWidgetPresenter(SubWidgetView widget1)
>
> > > > > > > The problem is that we get two objects of the sub-widget class,
> > one
> > > > > > > for injecting the into main widget and the other one for while
> > > > > > > injecting into it's presenter. The first one is  shown on the
> > screen
> > > > > > > but the other one is bind to the presenter. When presenter
> > changes
> > > > its
> > > > > > > view, it changes the view that was not bin to the main widget and
> > we
> > > > > > > can't see anything.
>
> > > > > > > So our solution would be to create one sub-widget per main-widget
> > but
> > > > > > > we don't know how to do it and if we do, we don't know how to
> > inject
> > > > > > > that object of the sub-widget into the recreating presenter.
>
> > > > > > > Marko
>
> > > > > > --
> > > > > > 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.
>
> > > > --
> > > > 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.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.

Re: GWT MVP GIN - problem with nested views and presenters

2011-06-16 Thread Juan Pablo Gardella
If your widgets are reusable, if you create new instances there are not
problem. Why you want to share instances?

2011/6/16 ricu 

> Yes, but I have new instances because they are not singletons :). So
> to solve this issue I must make them singletons? If I do that then I
> can't reuse them across the application. Or can I?
>
> On 16 lip, 12:50, Juan Pablo Gardella 
> wrote:
> > No, I don't say that. I say your problem about multiple instance is
> becouse
> > in each @Inject you have a new instance.
> >
> > 2011/6/16 ricu 
> >
> >
> >
> >
> >
> >
> >
> > > Are you trying to say that I make those views as singletons? The
> > > problem is that I would like to reuse one widget on multiple places.
> > > If I go with singletons I must create classes for every widget I use
> > > (they will extend some class that has mutual functionality)?
> >
> > > On 16 lip, 02:27, Juan Pablo Gardella 
> > > wrote:
> > > > "The problem is that we get two objects of the sub-widget class"
> becouse
> > > > this widgets aren't singletons.
> >
> > > > 2011/6/15 ricu 
> >
> > > > > Anybody? Maybe someone has the same architecture without GIN. What
> is
> > > > > your experience?
> >
> > > > > On 13 lip, 21:16, ricu  wrote:
> > > > > > Hi!
> >
> > > > > > We are usingGINin our application which is constructed in MVP
> style.
> > > > > > We tried to follow some best practices described in GWT pages and
> > > here
> > > > > > in GWT group so we design the application in the following
> manner:
> > > > > > 1) We have multiple main screens(pages) that have activities
> attached
> > > > > > to them. They are build in MVP  style where presenters are also
> > > > > > activities.
> > > > > > 2) Every main screen is a collection of some sub-widgets which
> can
> > > > > > also be created from some other sub-sub-widgets, so you can say
> that
> > > > > > we are nesting views and their presenters.
> > > > > > 3) The main views are singletons. Our sub-widgets are not
> singletons
> > > > > > because we are reusing them.
> > > > > > 4) All of our presenters aren't singletons.
> > > > > > 5) They are created usingGIN
> >
> > > > > > GINBinding example:
> > > > > > bind(SubWidgetView.class).to(SubWidget.class);
> > > > > >
> bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
> >
> > > > > > Injecting sub-widget into main widget through constructor
> example:
> > > > > > @Inject
> > > > > > public MainWidget(SubWidget widget1)
> >
> > > > > > Injecting sub-widget's interface into presenter through
> constructor
> > > > > > example:
> > > > > > @Inject
> > > > > > public SubWidgetPresenter(SubWidgetView widget1)
> >
> > > > > > The problem is that we get two objects of the sub-widget class,
> one
> > > > > > for injecting the into main widget and the other one for while
> > > > > > injecting into it's presenter. The first one is  shown on the
> screen
> > > > > > but the other one is bind to the presenter. When presenter
> changes
> > > its
> > > > > > view, it changes the view that was not bin to the main widget and
> we
> > > > > > can't see anything.
> >
> > > > > > So our solution would be to create one sub-widget per main-widget
> but
> > > > > > we don't know how to do it and if we do, we don't know how to
> inject
> > > > > > that object of the sub-widget into the recreating presenter.
> >
> > > > > > Marko
> >
> > > > > --
> > > > > 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.
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

-- 
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=

Re: GWT MVP GIN - problem with nested views and presenters

2011-06-16 Thread ricu
Yes, but I have new instances because they are not singletons :). So
to solve this issue I must make them singletons? If I do that then I
can't reuse them across the application. Or can I?

On 16 lip, 12:50, Juan Pablo Gardella 
wrote:
> No, I don't say that. I say your problem about multiple instance is becouse
> in each @Inject you have a new instance.
>
> 2011/6/16 ricu 
>
>
>
>
>
>
>
> > Are you trying to say that I make those views as singletons? The
> > problem is that I would like to reuse one widget on multiple places.
> > If I go with singletons I must create classes for every widget I use
> > (they will extend some class that has mutual functionality)?
>
> > On 16 lip, 02:27, Juan Pablo Gardella 
> > wrote:
> > > "The problem is that we get two objects of the sub-widget class" becouse
> > > this widgets aren't singletons.
>
> > > 2011/6/15 ricu 
>
> > > > Anybody? Maybe someone has the same architecture without GIN. What is
> > > > your experience?
>
> > > > On 13 lip, 21:16, ricu  wrote:
> > > > > Hi!
>
> > > > > We are usingGINin our application which is constructed in MVP style.
> > > > > We tried to follow some best practices described in GWT pages and
> > here
> > > > > in GWT group so we design the application in the following manner:
> > > > > 1) We have multiple main screens(pages) that have activities attached
> > > > > to them. They are build in MVP  style where presenters are also
> > > > > activities.
> > > > > 2) Every main screen is a collection of some sub-widgets which can
> > > > > also be created from some other sub-sub-widgets, so you can say that
> > > > > we are nesting views and their presenters.
> > > > > 3) The main views are singletons. Our sub-widgets are not singletons
> > > > > because we are reusing them.
> > > > > 4) All of our presenters aren't singletons.
> > > > > 5) They are created usingGIN
>
> > > > > GINBinding example:
> > > > > bind(SubWidgetView.class).to(SubWidget.class);
> > > > > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> > > > > Injecting sub-widget into main widget through constructor example:
> > > > > @Inject
> > > > > public MainWidget(SubWidget widget1)
>
> > > > > Injecting sub-widget's interface into presenter through constructor
> > > > > example:
> > > > > @Inject
> > > > > public SubWidgetPresenter(SubWidgetView widget1)
>
> > > > > The problem is that we get two objects of the sub-widget class, one
> > > > > for injecting the into main widget and the other one for while
> > > > > injecting into it's presenter. The first one is  shown on the screen
> > > > > but the other one is bind to the presenter. When presenter changes
> > its
> > > > > view, it changes the view that was not bin to the main widget and we
> > > > > can't see anything.
>
> > > > > So our solution would be to create one sub-widget per main-widget but
> > > > > we don't know how to do it and if we do, we don't know how to inject
> > > > > that object of the sub-widget into the recreating presenter.
>
> > > > > Marko
>
> > > > --
> > > > 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.
>
> > --
> > 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.

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-16 Thread Juan Pablo Gardella
No, I don't say that. I say your problem about multiple instance is becouse
in each @Inject you have a new instance.

2011/6/16 ricu 

> Are you trying to say that I make those views as singletons? The
> problem is that I would like to reuse one widget on multiple places.
> If I go with singletons I must create classes for every widget I use
> (they will extend some class that has mutual functionality)?
>
> On 16 lip, 02:27, Juan Pablo Gardella 
> wrote:
> > "The problem is that we get two objects of the sub-widget class" becouse
> > this widgets aren't singletons.
> >
> > 2011/6/15 ricu 
> >
> >
> >
> >
> >
> >
> >
> > > Anybody? Maybe someone has the same architecture without GIN. What is
> > > your experience?
> >
> > > On 13 lip, 21:16, ricu  wrote:
> > > > Hi!
> >
> > > > We are usingGINin our application which is constructed in MVP style.
> > > > We tried to follow some best practices described in GWT pages and
> here
> > > > in GWT group so we design the application in the following manner:
> > > > 1) We have multiple main screens(pages) that have activities attached
> > > > to them. They are build in MVP  style where presenters are also
> > > > activities.
> > > > 2) Every main screen is a collection of some sub-widgets which can
> > > > also be created from some other sub-sub-widgets, so you can say that
> > > > we are nesting views and their presenters.
> > > > 3) The main views are singletons. Our sub-widgets are not singletons
> > > > because we are reusing them.
> > > > 4) All of our presenters aren't singletons.
> > > > 5) They are created usingGIN
> >
> > > > GINBinding example:
> > > > bind(SubWidgetView.class).to(SubWidget.class);
> > > > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
> >
> > > > Injecting sub-widget into main widget through constructor example:
> > > > @Inject
> > > > public MainWidget(SubWidget widget1)
> >
> > > > Injecting sub-widget's interface into presenter through constructor
> > > > example:
> > > > @Inject
> > > > public SubWidgetPresenter(SubWidgetView widget1)
> >
> > > > The problem is that we get two objects of the sub-widget class, one
> > > > for injecting the into main widget and the other one for while
> > > > injecting into it's presenter. The first one is  shown on the screen
> > > > but the other one is bind to the presenter. When presenter changes
> its
> > > > view, it changes the view that was not bin to the main widget and we
> > > > can't see anything.
> >
> > > > So our solution would be to create one sub-widget per main-widget but
> > > > we don't know how to do it and if we do, we don't know how to inject
> > > > that object of the sub-widget into the recreating presenter.
> >
> > > > Marko
> >
> > > --
> > > 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.
>
> --
> 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.
>
>

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-15 Thread ricu
Are you trying to say that I make those views as singletons? The
problem is that I would like to reuse one widget on multiple places.
If I go with singletons I must create classes for every widget I use
(they will extend some class that has mutual functionality)?

On 16 lip, 02:27, Juan Pablo Gardella 
wrote:
> "The problem is that we get two objects of the sub-widget class" becouse
> this widgets aren't singletons.
>
> 2011/6/15 ricu 
>
>
>
>
>
>
>
> > Anybody? Maybe someone has the same architecture without GIN. What is
> > your experience?
>
> > On 13 lip, 21:16, ricu  wrote:
> > > Hi!
>
> > > We are usingGINin our application which is constructed in MVP style.
> > > We tried to follow some best practices described in GWT pages and here
> > > in GWT group so we design the application in the following manner:
> > > 1) We have multiple main screens(pages) that have activities attached
> > > to them. They are build in MVP  style where presenters are also
> > > activities.
> > > 2) Every main screen is a collection of some sub-widgets which can
> > > also be created from some other sub-sub-widgets, so you can say that
> > > we are nesting views and their presenters.
> > > 3) The main views are singletons. Our sub-widgets are not singletons
> > > because we are reusing them.
> > > 4) All of our presenters aren't singletons.
> > > 5) They are created usingGIN
>
> > > GINBinding example:
> > > bind(SubWidgetView.class).to(SubWidget.class);
> > > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> > > Injecting sub-widget into main widget through constructor example:
> > > @Inject
> > > public MainWidget(SubWidget widget1)
>
> > > Injecting sub-widget's interface into presenter through constructor
> > > example:
> > > @Inject
> > > public SubWidgetPresenter(SubWidgetView widget1)
>
> > > The problem is that we get two objects of the sub-widget class, one
> > > for injecting the into main widget and the other one for while
> > > injecting into it's presenter. The first one is  shown on the screen
> > > but the other one is bind to the presenter. When presenter changes its
> > > view, it changes the view that was not bin to the main widget and we
> > > can't see anything.
>
> > > So our solution would be to create one sub-widget per main-widget but
> > > we don't know how to do it and if we do, we don't know how to inject
> > > that object of the sub-widget into the recreating presenter.
>
> > > Marko
>
> > --
> > 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.

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-15 Thread Juan Pablo Gardella
"The problem is that we get two objects of the sub-widget class" becouse
this widgets aren't singletons.

2011/6/15 ricu 

> Anybody? Maybe someone has the same architecture without GIN. What is
> your experience?
>
> On 13 lip, 21:16, ricu  wrote:
> > Hi!
> >
> > We are usingGINin our application which is constructed in MVP style.
> > We tried to follow some best practices described in GWT pages and here
> > in GWT group so we design the application in the following manner:
> > 1) We have multiple main screens(pages) that have activities attached
> > to them. They are build in MVP  style where presenters are also
> > activities.
> > 2) Every main screen is a collection of some sub-widgets which can
> > also be created from some other sub-sub-widgets, so you can say that
> > we are nesting views and their presenters.
> > 3) The main views are singletons. Our sub-widgets are not singletons
> > because we are reusing them.
> > 4) All of our presenters aren't singletons.
> > 5) They are created usingGIN
> >
> > GINBinding example:
> > bind(SubWidgetView.class).to(SubWidget.class);
> > bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
> >
> > Injecting sub-widget into main widget through constructor example:
> > @Inject
> > public MainWidget(SubWidget widget1)
> >
> > Injecting sub-widget's interface into presenter through constructor
> > example:
> > @Inject
> > public SubWidgetPresenter(SubWidgetView widget1)
> >
> > The problem is that we get two objects of the sub-widget class, one
> > for injecting the into main widget and the other one for while
> > injecting into it's presenter. The first one is  shown on the screen
> > but the other one is bind to the presenter. When presenter changes its
> > view, it changes the view that was not bin to the main widget and we
> > can't see anything.
> >
> > So our solution would be to create one sub-widget per main-widget but
> > we don't know how to do it and if we do, we don't know how to inject
> > that object of the sub-widget into the recreating presenter.
> >
> > Marko
>
> --
> 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.
>
>

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



Re: GWT MVP GIN - problem with nested views and presenters

2011-06-15 Thread ricu
Anybody? Maybe someone has the same architecture without GIN. What is
your experience?

On 13 lip, 21:16, ricu  wrote:
> Hi!
>
> We are usingGINin our application which is constructed in MVP style.
> We tried to follow some best practices described in GWT pages and here
> in GWT group so we design the application in the following manner:
> 1) We have multiple main screens(pages) that have activities attached
> to them. They are build in MVP  style where presenters are also
> activities.
> 2) Every main screen is a collection of some sub-widgets which can
> also be created from some other sub-sub-widgets, so you can say that
> we are nesting views and their presenters.
> 3) The main views are singletons. Our sub-widgets are not singletons
> because we are reusing them.
> 4) All of our presenters aren't singletons.
> 5) They are created usingGIN
>
> GINBinding example:
> bind(SubWidgetView.class).to(SubWidget.class);
> bind(MainWidgetView.class).to(MainWidget.class).in(Singleton.class);
>
> Injecting sub-widget into main widget through constructor example:
> @Inject
> public MainWidget(SubWidget widget1)
>
> Injecting sub-widget's interface into presenter through constructor
> example:
> @Inject
> public SubWidgetPresenter(SubWidgetView widget1)
>
> The problem is that we get two objects of the sub-widget class, one
> for injecting the into main widget and the other one for while
> injecting into it's presenter. The first one is  shown on the screen
> but the other one is bind to the presenter. When presenter changes its
> view, it changes the view that was not bin to the main widget and we
> can't see anything.
>
> So our solution would be to create one sub-widget per main-widget but
> we don't know how to do it and if we do, we don't know how to inject
> that object of the sub-widget into the recreating presenter.
>
> Marko

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



Re: GWT MVP how to map a Composite Place to its corresponding Activities

2011-04-20 Thread David Chandler
Hi zixzigma,

Use a separate ActivityManager and ActivityMapper for each panel. Each
ActivityMapper can return a different Activity mapped to the CompositePlace.
Have a look at slide 47 here:

http://www.slideshare.net/turbomanage/whats-new-in-gwt-22

HTH,
/dmc


On Tue, Nov 30, 2010 at 12:08 AM, zixzigma  wrote:

> Hello Everyone,
>
> Roo scaffolding creates ProxyPlace and ProxyListPlace.
> ProxyPlace is good if we need to deal with one EntityProxy at a time.
>
> in a more complex situation, where view might be consisted of multiple
> panels,  many EntitiyProxies might be needed to populate those panels,
> and to make history/bookmark working those EntityProxies must be added
> to to the history token.
>
> MyCompositePlace extends Place {
>
> EntityProxyId firstEntityProxyId;
> EntityProxyId barEntityProxyId;
> EntityProxyId bazEntityProxyId;
>
> //Tokenizer
> }
>
> and this composite place is used like this:
> placeController.go(new MyCompositePlace( id1, id2, id3));
>
> and we have to implement the Tokenizer, spliting the history token,
> and processing etc 
>
> in ActivityMapper, there is a getActivity method
>
> Activity getActivity(Place place)
>
> in the case of CompositePlace, how can we decompose the Composite
> Place into its places, and map them to corresponding activities ?
>
> getActivity returns only one activity, but in the case of composite
> place, we need to return for example 3 activities.
>
> in short, how can we map a Composite Place to its corresponding
> Activities ?
>
> please help !
>
> --
> 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.
>
>


-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



Re: GWT & MVP

2011-04-07 Thread Brian Lough
Nicely done, David.  +1

On Thu, Apr 7, 2011 at 8:39 AM, David Chandler wrote:

> Thanks for the vote of confidence, but let me suggest that some of the
> confusion around MVP results from overloading the term (I bear some of the
> blame here, sorry).
>
> Three key ideas of MVP proper are
> 1. Views are interfaces (so they can be tested without GWTTestCase, among
> other reasons)
> 2. Presenters are POJOs that contain no Widgets
> 3. Views and presenters refer to each other only via interfaces (and in the
> original style of MVP, a presenter may call methods on the view interface,
> but not the other way around)
>
> Ray Ryan's famous I/O talk in 09 also mentioned place/history management
> and the Command pattern, which are very useful ideas but not part of MVP
> proper. Various 3rd party MVP frameworks offered all these capabilities
> together as "MVP" and the GWT docs refer to Activities and Places as the MVP
> framework, but they're really not MVP proper, which has no doubt led to some
> confusion. GWT's Activities and Places offer place/history management, but
> require no View or Presenter classes so you are free to create your own or
> use one of the 3rd party frameworks for these. I'm sure the community will
> have further recommendations :-)
>
> HTH,
> /dmc
>
> On Thu, Apr 7, 2011 at 12:48 AM, -sowdri-  wrote:
>
>> Better to use MVP with activities and places as suggested by official GWT
>> team.
>>
>> Thanks,
>>
>> --
>> 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.
>>
>
>
>
> --
> David Chandler
> Developer Programs Engineer, Google Web Toolkit
> w: http://code.google.com/
> b: http://googlewebtoolkit.blogspot.com/
> t: @googledevtools
>
> --
> 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.
>

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



Re: GWT & MVP

2011-04-07 Thread credmond
Personally, I'm fairly new to GWT, and yes, the docs are pretty
confusing, unhelpful, and inconsistent, and I'm not new to web
frameworks. I wish I had taken down all the problems, contradictions,
and lack of clarity that I noticed. Very strange for "Google".

Regarding MVP, I steer clear of Activities and Places because I think
for more complicated UIs and nested views, etc., things become too
messy and even impossible. They're too new and there isn't a single
decent example that implements them. The updated Expenses sample app
which uses Activities and Places -- and is shipped with GWT -- uses
them but totally incorrectly in terms of MVP (tonnes of UI code in
presenters, etc., if I recall).

There's nothing wrong with do-it-your-own-way MVP as described in the
two links at the top of: 
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html
...

Trying to tie MVP with history and event management, etc, and
everything else, is confusing for the beginner. The docs are not doing
GWT any justice and if it hadn't got "Google" in the name I would have
thought more than twice about adopting it.

I'm not unhappy with my choice though, but I still feel the docs need
a complete re-work. Slightly off topic, sorry.



On Apr 7, 11:36 pm, Jens  wrote:
> On Thursday, April 7, 2011 5:39:35 PM UTC+2, David Chandler (Google) wrote:
>
> Ray Ryan's famous I/O talk in 09 also mentioned place/history management and
>
> > the Command pattern, which are very useful ideas but not part of MVP proper.
> > Various 3rd party MVP frameworks offered all these capabilities together as
> > "MVP" and the GWT docs refer to Activities and Places as the MVP framework,
> > but they're really not MVP proper, which has no doubt led to some
> > confusion.
>
> Thats why I would change the GWT docs as soon as time allows. Someone new to
> MVP and activity/places will definitely get the wrong idea of both and gets
> confused. There are many topics/posts like this one in this group.
>
> @Alex: As David points out, the MVP pattern has nothing in common with GWT's
> Place/History management framework (often referred to as GWT MVP). If you
> use GWT places/activities your app will gain bookmarkable urls that
> represent a place/application state and whenever such a url is visited a
> corresponding activity will be started. This activity is then responsible
> for attaching some UI/widgets to an area of your webpage. If this UI is
> complex and has user interaction elements then you could implement this UI
> with the MVP pattern to separate the UI from the logic that will be
> performed when the user interacts with this UI. And once you decide to use
> the MVP pattern then its in most cases easier to let the activity be the
> presenter. But its also possible to implement a separate presenter and let
> the activity hold a reference to it.
>
> J.

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



Re: GWT & MVP

2011-04-07 Thread Jens
On Thursday, April 7, 2011 5:39:35 PM UTC+2, David Chandler (Google) wrote:

Ray Ryan's famous I/O talk in 09 also mentioned place/history management and 
> the Command pattern, which are very useful ideas but not part of MVP proper. 
> Various 3rd party MVP frameworks offered all these capabilities together as 
> "MVP" and the GWT docs refer to Activities and Places as the MVP framework, 
> but they're really not MVP proper, which has no doubt led to some 
> confusion. 
>

Thats why I would change the GWT docs as soon as time allows. Someone new to 
MVP and activity/places will definitely get the wrong idea of both and gets 
confused. There are many topics/posts like this one in this group.

@Alex: As David points out, the MVP pattern has nothing in common with GWT's 
Place/History management framework (often referred to as GWT MVP). If you 
use GWT places/activities your app will gain bookmarkable urls that 
represent a place/application state and whenever such a url is visited a 
corresponding activity will be started. This activity is then responsible 
for attaching some UI/widgets to an area of your webpage. If this UI is 
complex and has user interaction elements then you could implement this UI 
with the MVP pattern to separate the UI from the logic that will be 
performed when the user interacts with this UI. And once you decide to use 
the MVP pattern then its in most cases easier to let the activity be the 
presenter. But its also possible to implement a separate presenter and let 
the activity hold a reference to it.

J.

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



Re: GWT & MVP

2011-04-07 Thread Barry Ard
I found this mvp discussion to be the most value to me:

http://jectbd.com/?p=1397

Barry

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



Re: GWT & MVP

2011-04-07 Thread Y2i
I'm also happy with GWT MVP as described here:
http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html

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



Re: GWT & MVP

2011-04-07 Thread Jeff Larsen
I don't think you can go wrong with using either gwt-platform or 
mvp4g.  They're both really solid mvp frameworks.

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



Re: GWT & MVP

2011-04-07 Thread David Chandler
Thanks for the vote of confidence, but let me suggest that some of the
confusion around MVP results from overloading the term (I bear some of the
blame here, sorry).

Three key ideas of MVP proper are
1. Views are interfaces (so they can be tested without GWTTestCase, among
other reasons)
2. Presenters are POJOs that contain no Widgets
3. Views and presenters refer to each other only via interfaces (and in the
original style of MVP, a presenter may call methods on the view interface,
but not the other way around)

Ray Ryan's famous I/O talk in 09 also mentioned place/history management and
the Command pattern, which are very useful ideas but not part of MVP proper.
Various 3rd party MVP frameworks offered all these capabilities together as
"MVP" and the GWT docs refer to Activities and Places as the MVP framework,
but they're really not MVP proper, which has no doubt led to some
confusion. GWT's Activities and Places offer place/history management, but
require no View or Presenter classes so you are free to create your own or
use one of the 3rd party frameworks for these. I'm sure the community will
have further recommendations :-)

HTH,
/dmc

On Thu, Apr 7, 2011 at 12:48 AM, -sowdri-  wrote:

> Better to use MVP with activities and places as suggested by official GWT
> team.
>
> Thanks,
>
> --
> 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.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



Re: GWT & MVP

2011-04-06 Thread -sowdri-
Better to use MVP with activities and places as suggested by official GWT 
team. 

Thanks,

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



Re: GWT & MVP

2011-04-06 Thread Brian Lough
No offense to the other posters, but I wouldn't go anywhere near "platform"
or "mvp4g" right off.  Just confuses the issue.  Having recently been where
you're at, I'd go here first: http://martinfowler.com/eaaDev/uiArchs.html.
 That should shed more light on why MVP is of interest period.  "Humble
View" is definitely an item to read.  I had to implement "The Humble Dialog
Box" with gwt-presenter and all unit/integration tests before I groked just
the _why_ of why I'd want to pursue MVP.  As of this post, I have checked
out gwt-platform, mvp4g, Guice 2.0 and Guice 3.0 MVP -- still haven't
decided the direction I'm headed.

IMHO, Schilly was right in that the code muddles the theoretical discussions
or visa-versa.  MVP is a concept.  The frameworks are based upon that, but
they possess different implementations based upon the concept.

Good luck!

On Tue, Apr 5, 2011 at 3:04 PM, Alex  wrote:

> I've been looking into GWT and MVP recently and to be honest I'm very
> confused. My project involves around 40 different pages / individual
> views, or whatever the correct terminology is. I've been reading
> tutorials that follow Model-View-Presenter and others that use
> Activities and Places.
>
> Which one should I be using?
>
> Many thanks,
> Alex
>
> --
> 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.
>
>

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



Re: GWT & MVP

2011-04-06 Thread Harald Schilly
On Wednesday, April 6, 2011 12:04:47 AM UTC+2, Alex wrote:
>
> Which one should I be using? 
>

You are maybe confused, because some terms are more theoretical (or 
abstract) and others are used in the Code. Also, there is not only one way 
to do MVP in GWT. You can check out mvp4g if it fits more your mental 
model. 

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


http://mvp4g.blogspot.com/2011/04/mvp-pattern-associated-with-event-bus.html

H

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



Re: GWT & MVP

2011-04-06 Thread Konstantin Zolotarev
I think first you should read about gwt platform (
http://code.google.com/p/gwt-platform/) and  google-gin (
http://code.google.com/p/google-gin/) 

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



Re: GWT MVP pattern - change different parts of page on an event

2011-04-05 Thread Ashton Thomas
Not sure if I'm stating things you already know, but maybe an
alternative or cleaner way is to implement MVP using Places and
Activities

Each section could have an Activity Manager that changes the Presenter/
Activity based on the Place (May not change everyone section each
time)

Or you could have a presenter for some sections that implement custom
EventHandlers and replace the displayed widget depending on custom
events

Not sure what your exact use is, but having a presenter for each
section (as a starting point) may prove messy in the long run.




On Apr 5, 2:29 pm, moni  wrote:
> I am creating a GWT application using MVP pattern. I have an index
> page which uses DockLayoutPanel. I have view and presenter for each
> section of dockLayoutPanel (ex: NorthView and NorthPresenter). I have
> four buttons in the center panel (NorthBtn, EastBtn, WestBtn,
> SouthBtn). onClick of any one of the buttons the UI should change in
> respective section of dockLayoutPanel.
>
> Entry Point Class:
>
> @Override
> public void onModuleLoad() {
>     RPCServiceAsync rpcService = GWT.create(RPCService.class);
>     HandlerManager eventBus = new HandlerManager(null);
>     AppController appViewer = new AppController(rpcService, eventBus);
>
>     appViewer.go(RootLayoutPanel.get());
>
> }
>
> AppController class has the logic for History management and event
> handling logic. (From Google article - To handle logic that is not
> specific to any presenter and instead resides at the application
> layer, we'll introduce the AppController component.)
>
> For example, onClick of a EastBtn in center panel I add a new history
> token, "east", and onValueChange() method is called. The respective
> presenter and view is created, say EastView and EastPresenter:
>
> 1. How can I update the existing EastPanel with the newly created
> panel (as I dont have handle to the old Panel)?
> 2. If the user has bookmarked the page after the button click and re-
> visits the page with bookmarked link, the flow would reach
> onValueChange method and create EastView and EastPanel. But, how can
> the rest of the page be re-created and EastPanel be updated?

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



Re: GWT + MVP + Spring + Hibernate

2011-04-03 Thread Jan Mostert
ROO is "just" a console that generates a scaffold for you containing
Spring-MVC code with a JPA (Hibernate) and then you can slap any UI on top
of it, like GWT using the "gwt setup command"

This page will take you through it step by step:
http://www.springsource.org/roo/start

Once you've done the tutorial, you'll have a scaffold in place on top of
which you can work or which you can modify to your liking.

--
Jan Vladimir Mostert
BEngSci

MyCee Technologies


On Sun, Apr 3, 2011 at 6:00 PM, Zaur Guliyev  wrote:

> Isn't there a step-by-step tutorial at least on GWT + Spring Roo ?!  ...
> I've searched on Google but can'T find any resource..even only Spring Roo
> will suit...Do you have any suggestion? And one more question, do I have to
> start with Spring MVC first? Or are Spring Roo and Spring MVC different
> subjects ... and that would be better to start directly with Roo maybe?
>
>
>
>
> 2011/4/3 Ashton Thomas 
>
>> this repo has gwt mvp spring but uses mybatis so no Hibernate:
>> https://github.com/ashtonthomas/beans
>>
>>
>> On Apr 3, 1:27 am, Jan Mostert  wrote:
>> > Spring Roo will integrate all that stuff for you.
>> >
>> > --
>> > Jan Vladimir Mostert
>> > BEngSci
>> >
>> > MyCee Technologies
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Sat, Apr 2, 2011 at 11:14 AM, Zaur Guliyev 
>> wrote:
>> > > Hello,
>> >
>> > > I'm newbie in GWT and as well as to Spring, Hibernate and MVP
>> > > framework. Is there any tutorial or project example on which I can
>> > > learn all this GWT integration stuff with above mentioned frameworks?
>> >
>> > > Any help is appretiated...
>> >
>> > > --
>> > > 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.
>>
>> --
>> 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.
>>
>>
>
>
> --
> *Zaur Guliyev
> Ankara University
> Computer Engineering**
> Cell: +905072645995*
>
>  --
> 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.
>

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



Re: GWT + MVP + Spring + Hibernate

2011-04-03 Thread Zaur Guliyev
Isn't there a step-by-step tutorial at least on GWT + Spring Roo ?!  ...
I've searched on Google but can'T find any resource..even only Spring Roo
will suit...Do you have any suggestion? And one more question, do I have to
start with Spring MVC first? Or are Spring Roo and Spring MVC different
subjects ... and that would be better to start directly with Roo maybe?



2011/4/3 Ashton Thomas 

> this repo has gwt mvp spring but uses mybatis so no Hibernate:
> https://github.com/ashtonthomas/beans
>
>
> On Apr 3, 1:27 am, Jan Mostert  wrote:
> > Spring Roo will integrate all that stuff for you.
> >
> > --
> > Jan Vladimir Mostert
> > BEngSci
> >
> > MyCee Technologies
> >
> >
> >
> >
> >
> >
> >
> > On Sat, Apr 2, 2011 at 11:14 AM, Zaur Guliyev 
> wrote:
> > > Hello,
> >
> > > I'm newbie in GWT and as well as to Spring, Hibernate and MVP
> > > framework. Is there any tutorial or project example on which I can
> > > learn all this GWT integration stuff with above mentioned frameworks?
> >
> > > Any help is appretiated...
> >
> > > --
> > > 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.
>
> --
> 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.
>
>


-- 
*Zaur Guliyev
Ankara University
Computer Engineering**
Cell: +905072645995*

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



Re: GWT + MVP + Spring + Hibernate

2011-04-03 Thread Ashton Thomas
this repo has gwt mvp spring but uses mybatis so no Hibernate:
https://github.com/ashtonthomas/beans


On Apr 3, 1:27 am, Jan Mostert  wrote:
> Spring Roo will integrate all that stuff for you.
>
> --
> Jan Vladimir Mostert
> BEngSci
>
> MyCee Technologies
>
>
>
>
>
>
>
> On Sat, Apr 2, 2011 at 11:14 AM, Zaur Guliyev  wrote:
> > Hello,
>
> > I'm newbie in GWT and as well as to Spring, Hibernate and MVP
> > framework. Is there any tutorial or project example on which I can
> > learn all this GWT integration stuff with above mentioned frameworks?
>
> > Any help is appretiated...
>
> > --
> > 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.

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



Re: GWT + MVP + Spring + Hibernate

2011-04-02 Thread Jan Mostert
Spring Roo will integrate all that stuff for you.

--
Jan Vladimir Mostert
BEngSci

MyCee Technologies


On Sat, Apr 2, 2011 at 11:14 AM, Zaur Guliyev  wrote:

> Hello,
>
> I'm newbie in GWT and as well as to Spring, Hibernate and MVP
> framework. Is there any tutorial or project example on which I can
> learn all this GWT integration stuff with above mentioned frameworks?
>
> Any help is appretiated...
>
> --
> 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.
>
>

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



Re: gwt mvp sessions

2011-02-25 Thread David Chandler
You could use the Command pattern as with GWT-RPC using a ValueProxy as the
command object, but I'm not sure what you'd gain by it as you'd lose all the
RF functionality related to entities. As it currently stands, you would need
to modify the RF transport protocol, perhaps with a ServiceLayerDecorator.
Are you convinced that the token needs to be part of the payload vs. request
header? It's much easier to modify the header by extending
DefaultRequestTransport as Thomas has pointed out elsewhere.

/dmc

On Fri, Feb 25, 2011 at 7:34 PM, veenatic  wrote:

> Thanks Jeff,
> With RPC, this way is understood. Similarily, I have some idea with
> RequestFactory also like
>
> requestFactory.serviceRequest().getAllEntities(clientSid);
>
> and on the server side, in getAllEntities(String clientSid) i can verify
> the same way you did.
>
> But this way is forcing me to put an extra parameter in all my business
> methods. I am sure there are other ways. Any Ideas?
> Obviously, the above approach is not that ugly.
>
> --
> 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.
>



-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
w: http://code.google.com/
b: http://googlewebtoolkit.blogspot.com/
t: @googledevtools

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



Re: gwt mvp sessions

2011-02-25 Thread veenatic
Thanks Jeff,
With RPC, this way is understood. Similarily, I have some idea with 
RequestFactory also like

requestFactory.serviceRequest().getAllEntities(clientSid);

and on the server side, in getAllEntities(String clientSid) i can verify the 
same way you did.

But this way is forcing me to put an extra parameter in all my business 
methods. I am sure there are other ways. Any Ideas?
Obviously, the above approach is not that ugly.

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
btw my bad I meant to say overridden OnFailure method... sorry about that

On Fri, Feb 25, 2011 at 7:15 PM, Jeff Schwartz wrote:

> With RPC I define all my RPC synchronous methods taking  a string parameter
> whose value will be assigned from the cooke storing the sid. On the server,
> the handler will compare this string value to the value returned from the
> Session.getId() method. If they aren't the same I throw a custom exception
> which is caught on the client in the overloaded OnFailure method of the RPC
> call.
>
> Here's the typical code for a server-side handler:
>
> @Override
> public SingleRPCPayload someMethod(String clientSid, ...)
> throws MyCapabilityDisabledException {
> HttpSession session = getThreadLocalRequest().getSession(true);
> String sid = session.getId();
> if (clientSid.equals(sid)) {
> .
> .
> .
> return payload;
> } else {
> throw new MyInvalidSessionException();
>
> }
> }
>
>
> On Fri, Feb 25, 2011 at 7:01 PM, veenatic wrote:
>
>> I think the discussion has become very interesting and I understood a lot
>> about attacks and attackers but I still ponder over the question that if we
>> have to put the auth token on the payload of the RequestFactory, how to do
>> that?
>> And after this how to read the token from the payload to verify it?
>>
>> --
>> 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.
>>
>
>
>
> --
> *Jeff Schwartz*
> http://jefftschwartz.appspot.com/
> http://www.linkedin.com/in/jefftschwartz
> follow me on twitter: @jefftschwartz
>
>


-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
With RPC I define all my RPC synchronous methods taking  a string parameter
whose value will be assigned from the cooke storing the sid. On the server,
the handler will compare this string value to the value returned from the
Session.getId() method. If they aren't the same I throw a custom exception
which is caught on the client in the overloaded OnFailure method of the RPC
call.

Here's the typical code for a server-side handler:

@Override
public SingleRPCPayload someMethod(String clientSid, ...)
throws MyCapabilityDisabledException {
HttpSession session = getThreadLocalRequest().getSession(true);
String sid = session.getId();
if (clientSid.equals(sid)) {
.
.
.
return payload;
} else {
throw new MyInvalidSessionException();
}
}


On Fri, Feb 25, 2011 at 7:01 PM, veenatic  wrote:

> I think the discussion has become very interesting and I understood a lot
> about attacks and attackers but I still ponder over the question that if we
> have to put the auth token on the payload of the RequestFactory, how to do
> that?
> And after this how to read the token from the payload to verify it?
>
> --
> 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.
>



-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread veenatic
I think the discussion has become very interesting and I understood a lot 
about attacks and attackers but I still ponder over the question that if we 
have to put the auth token on the payload of the RequestFactory, how to do 
that?
And after this how to read the token from the payload to verify it?

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
I am not dismissing your scenarios outright as I never said that the method
was foolproof and I also said that only SSL will give you something close to
that.

Also lets not forget that if the user manages to be lured to an attackers
site via a link in an email for instance and then doesn't notice that they
are then redirected to another site then they have bigger problems than
having their session hijacked lol.

However, there are ways to mitigate even the cross-subdomain attack that you
use as an example...


On Fri, Feb 25, 2011 at 2:20 PM, Thomas Broyer  wrote:

> This is where you fail to understand me: you make the assumption that the
> "authentication process" takes place, while I'm talking about bypassing it
> with a session-fixation attack.


I understood perfectly, Thomas. To reiterate, the attacker will have had to
authenticate in order to acquire a valid sid which he then stores and waits
in prey for the user to respond to his email with a link to his site. When
the user takes the bait and visits the attacker's site the attacker
redirects the user to another site including the sid as a query parameter.

One possible scenario (easily mitigated through the use of your own domain
> name):
> *Attacker*: authenticates to victim.example.com, grabs the cookies in use,
> store them at attacker.example.com (note: same domain, different
> subdomains, much like appspot.com hosted apps)
>

At this point the request hits the server and the session id is set the
query parameter, the same one as the attackers. This attack can be mitigated
by changing the session ID when users logs in and to additionally require
the user to authenticate on every important request. A pain in the rear for
the user of course but it will largely work. The fact that it does work is
due to the reluctance to require users to log in for every important
request.

Sure enough, even if you used SSL it would require that every request uses
it in order to be close to 100% protected from this kind of attack. The only
sites I know that do that are some banks. I believe Citibank does for
instance. Interestingly I believe Facebook announced that they will be
rolling this out to all their members. It will be interesting to see how it
affects the performance of their site.

Perhaps requiring every one to use SSL for every request is the right
approach. Maybe we should all be going in that direction but service
providers might be loathe to provide this service as it adds additional
demands on their servers that they might not be able to handle and the users
might complain because of the increased latency.

Perhaps using HttpOnly headers would also mitigate this kind of attack. I
don't think App Engine supports it though but I wish it did.

The bottom line is this, it really comes down to a multi-faceted approach to
security. One big wall isn't going to cut it and the more obstacles put up
the less chances are that some malcontent will be successful.

-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread Thomas Broyer


On Friday, February 25, 2011 6:39:40 PM UTC+1, Jeff wrote:
>
>
>
> On Fri, Feb 25, 2011 at 12:30 PM, Thomas Broyer  wrote:
>
>> You contradict yourself (compare the HttpSession's ID with the auth token 
>> –the HttpSession is maintained by a cookie, whose value generally is the 
>> session's ID– vs. do not send the auth token in a cookie), but that's not 
>> the problem.
>
>
> Actually I am not contradicting myself, Thomas. You just failed to 
> understand!
>

And the other way around! ;-)

The problem is: how are you initializing the auth token on the client side, 
>> and how you associate it with the user on the server-side? The client and 
>> server have to share some knowledge at some point, and if you have use "form 
>> based" authentication on another web page (i.e. your app's host page is 
>> protected and cannot be accessed without being authenticated), then the only 
>> way (not accurate, but that's how 99.999% of auth is done, because the 
>> alternative comes with a UX penalty) to "transfer" the authentication from 
>> the login page to the app's page is to use either a cookie or pass a unique 
>> token in the URL, both of which can be hijacked.
>>
>
> If the user is authenticated the authentication process should then send 
> down the HttpSession id as part of the payload back to the client. The 
> client then stores the session id it receives as part of the payload from 
> the server as a local cookie.
>

This is where you fail to understand me: you make the assumption that the 
"authentication process" takes place, while I'm talking about bypassing it 
with a session-fixation attack.

One possible scenario (easily mitigated through the use of your own domain 
name):
*Attacker*: authenticates to victim.example.com, grabs the cookies in use, 
store them at attacker.example.com (note: same domain, different subdomains, 
much like appspot.com hosted apps)
*Victim*: goes to attacker.example.com, which sets the cookies with 
Domain=.example.com and redirects it to victim.example.com
The victim's browser sends the cookies to victim.example.com (because of 
Domain=.example.com, they apply, even though they've been set by 
attacker.example.com)
The victim is then authenticated to victim.example.com with the *same 
session* as the attacker.
The session id is sent down to the client as part of the payload, but it's 
too late.

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
On Fri, Feb 25, 2011 at 12:30 PM, Thomas Broyer  wrote:

> You contradict yourself (compare the HttpSession's ID with the auth token
> –the HttpSession is maintained by a cookie, whose value generally is the
> session's ID– vs. do not send the auth token in a cookie), but that's not
> the problem.


Actually I am not contradicting myself, Thomas. You just failed to
understand!

>
> The problem is: how are you initializing the auth token on the client side,
> and how you associate it with the user on the server-side? The client and
> server have to share some knowledge at some point, and if you have use "form
> based" authentication on another web page (i.e. your app's host page is
> protected and cannot be accessed without being authenticated), then the only
> way (not accurate, but that's how 99.999% of auth is done, because the
> alternative comes with a UX penalty) to "transfer" the authentication from
> the login page to the app's page is to use either a cookie or pass a unique
> token in the URL, both of which can be hijacked.
>

If the user is authenticated the authentication process should then send
down the HttpSession id as part of the payload back to the client. The
client then stores the session id it receives as part of the payload from
the server as a local cookie. Encryption can even be applied on the server
for extra security as it's value has no real meaning to the client, only
that it needs to include it in each payload to the server.

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



-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread Thomas Broyer
You contradict yourself (compare the HttpSession's ID with the auth token 
–the HttpSession is maintained by a cookie, whose value generally is the 
session's ID– vs. do not send the auth token in a cookie), but that's not 
the problem.

The problem is: how are you initializing the auth token on the client side, 
and how you associate it with the user on the server-side? The client and 
server have to share some knowledge at some point, and if you have use "form 
based" authentication on another web page (i.e. your app's host page is 
protected and cannot be accessed without being authenticated), then the only 
way (not accurate, but that's how 99.999% of auth is done, because the 
alternative comes with a UX penalty) to "transfer" the authentication from 
the login page to the app's page is to use either a cookie or pass a unique 
token in the URL, both of which can be hijacked.

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
You are talking about using request cookies so of course the scenario you
describe might be possible. Everyone knows they are vulnerable and hence
their ease of hijacking. The right way to do it is not using request cookies
at all on the server because they cannot be trusted - the auth token must be
delivered to the server as part of the payload and it must never be read
from a request cookie.

On Fri, Feb 25, 2011 at 11:38 AM, Thomas Broyer  wrote:

>
>
> On Friday, February 25, 2011 3:21:18 PM UTC+1, Jeff wrote:
>
>> Hi Thomas,
>>
>>
>> On Fri, Feb 25, 2011 at 8:49 AM, Thomas Broyer  wrote:
>>
>>> Of course! I didn't mean to imply that you shouldn't secure your app, but
>>> honestly if someone succeeds in hijacking your session, then he could
>>> possibly do it before loading the host page, so that your GWT app will run
>>> with the hijacked session, and the "auth token in the request payload" won't
>>> be of any help.
>>
>>
>> First off, the hacker couldn't have access to the local cookie on the
>> user's machine unless the user has been infected with a virus. If the user's
>> computer has been infected with a virus that can some how target local
>> cookies then this user has a lot more to worry about than someone hijacking
>> their session. So let's rule that scenario out.
>>
>
> I can setup an web page at attacker.appspot.com that sets a cookie with
> Domain=.appspot.com, and it'll target every appspot.com app out there. If
> victim.appspot.com uses its own authentication mechanism and its own
> cookies, I can then easily set a cookie to a user's browser visiting
> attacker.appspot.com and redirect it to victim.appspot.com, and he would
> then be automatically authenticated with my own session (session fixation
> attack).
>
>
>> Secondly, if the hacker could somehow manage to hijack your session -
>> meaning they've some how coerced the request to use a different value for
>> the session id) and do it before loading the host page it wouldn't make a
>> difference if every Servlet method that is called does the following:
>> 1) checks each payload for an auth token (a value equal to the sid stored
>> as a cookie on the client) and
>> 2) compares the auth token's value to the HttpSession's session id value.
>> If they aren't the same then throw a custom exception and catch it on the
>> client and authenticate the user (either form-based auth or some other
>> method such as Google Account, OpenId, et. al)
>>
>
> But if the auth token is initialized from the cookie (or somehow attached
> to the authenticated user) and the attacker managed to set the cookie value
> on behalf of the webapp (or at least do a session fixation attack), then
> those two checks won't detect it.
>
> --
> 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.
>



-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread Thomas Broyer


On Friday, February 25, 2011 3:21:18 PM UTC+1, Jeff wrote:
>
> Hi Thomas,
>
> On Fri, Feb 25, 2011 at 8:49 AM, Thomas Broyer  wrote:
>
>> Of course! I didn't mean to imply that you shouldn't secure your app, but 
>> honestly if someone succeeds in hijacking your session, then he could 
>> possibly do it before loading the host page, so that your GWT app will run 
>> with the hijacked session, and the "auth token in the request payload" won't 
>> be of any help. 
>
>
> First off, the hacker couldn't have access to the local cookie on the 
> user's machine unless the user has been infected with a virus. If the user's 
> computer has been infected with a virus that can some how target local 
> cookies then this user has a lot more to worry about than someone hijacking 
> their session. So let's rule that scenario out.
>

I can setup an web page at attacker.appspot.com that sets a cookie with 
Domain=.appspot.com, and it'll target every appspot.com app out there. If 
victim.appspot.com uses its own authentication mechanism and its own 
cookies, I can then easily set a cookie to a user's browser visiting 
attacker.appspot.com and redirect it to victim.appspot.com, and he would 
then be automatically authenticated with my own session (session fixation 
attack).
 

> Secondly, if the hacker could somehow manage to hijack your session - 
> meaning they've some how coerced the request to use a different value for 
> the session id) and do it before loading the host page it wouldn't make a 
> difference if every Servlet method that is called does the following:
> 1) checks each payload for an auth token (a value equal to the sid stored 
> as a cookie on the client) and
> 2) compares the auth token's value to the HttpSession's session id value. 
> If they aren't the same then throw a custom exception and catch it on the 
> client and authenticate the user (either form-based auth or some other 
> method such as Google Account, OpenId, et. al)
>

But if the auth token is initialized from the cookie (or somehow attached to 
the authenticated user) and the attacker managed to set the cookie value on 
behalf of the webapp (or at least do a session fixation attack), then those 
two checks won't detect it.

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
On Fri, Feb 25, 2011 at 10:14 AM, veenatic  wrote:

> Does this mean that "auth token" in the request payload is not of much use?
> Also, I want to understand when i have the token set in the requestfactory
> payload, how to retrieve from the payload when a service call is made by
> requestfactory since i will have to validate the token for every service
> request.
>
>
> On Friday, February 25, 2011 3:49:32 PM UTC+2, Thomas Broyer wrote:
>>
>> Of course! I didn't mean to imply that you shouldn't secure your app, but
>> honestly if someone succeeds in hijacking your session, then he could
>> possibly do it before loading the host page, so that your GWT app will run
>> with the hijacked session, and the "auth token in the request payload" won't
>> be of any help.
>
>
To the contrary - it means that every request to the server should include
it and that ever request should validate it against the HttpSession's
session id value and respond accordingly.

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



-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread veenatic
Does this mean that "auth token" in the request payload is not of much use?
Also, I want to understand when i have the token set in the requestfactory 
payload, how to retrieve from the payload when a service call is made by 
requestfactory since i will have to validate the token for every service 
request.

On Friday, February 25, 2011 3:49:32 PM UTC+2, Thomas Broyer wrote:
>
> Of course! I didn't mean to imply that you shouldn't secure your app, but 
> honestly if someone succeeds in hijacking your session, then he could 
> possibly do it before loading the host page, so that your GWT app will run 
> with the hijacked session, and the "auth token in the request payload" won't 
> be of any help.

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



Re: gwt mvp sessions

2011-02-25 Thread Jeff Schwartz
Hi Thomas,

On Fri, Feb 25, 2011 at 8:49 AM, Thomas Broyer  wrote:

> Of course! I didn't mean to imply that you shouldn't secure your app, but
> honestly if someone succeeds in hijacking your session, then he could
> possibly do it before loading the host page, so that your GWT app will run
> with the hijacked session, and the "auth token in the request payload" won't
> be of any help.


First off, the hacker couldn't have access to the local cookie on the user's
machine unless the user has been infected with a virus. If the user's
computer has been infected with a virus that can some how target local
cookies then this user has a lot more to worry about than someone hijacking
their session. So let's rule that scenario out.

Secondly, if the hacker could somehow manage to hijack your session -
meaning they've some how coerced the request to use a different value for
the session id) and do it before loading the host page it wouldn't make a
difference if every Servlet method that is called does the following:
1) checks each payload for an auth token (a value equal to the sid stored as
a cookie on the client) and
2) compares the auth token's value to the HttpSession's session id value. If
they aren't the same then throw a custom exception and catch it on the
client and authenticate the user (either form-based auth or some other
method such as Google Account, OpenId, et. al)

Not only does the above protect against session hijacking but it also solves
the "how do I know if the session is timed out" question. So you solve two
use cases in one implementation which isn't bad.

You can even use filters to do this eliminating the need for every Servlet
method to implement this logic.

It's a simple, viable solution to an attack that is quite prevalent these
days. It's implementation on both the client and server are trivial yet (I
would venture to guess) is regrettably ignored by many if not most
developers (to which I am not limiting to GWT developers).

Of course, having a secure transport protocol (ie SSL) is the ultimate
solution but not every site or every page on a site requires SSL yet every
page that communicates with the server on every site requires a proactive
defense against these kinds of attacks.


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



-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-25 Thread Thomas Broyer
Of course! I didn't mean to imply that you shouldn't secure your app, but 
honestly if someone succeeds in hijacking your session, then he could 
possibly do it before loading the host page, so that your GWT app will run 
with the hijacked session, and the "auth token in the request payload" won't 
be of any help.

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



Re: gwt mvp sessions

2011-02-24 Thread Jeff Schwartz
On Thu, Feb 24, 2011 at 6:19 PM, Thomas Broyer  wrote:

> In such a scenario, you'll generally have a "session" maintained by the
> server through a cookie, which will be enough (yes, cookies are not that
> secure, but still deemed secure enough that everyone from Google to
> Facebook, Twitter, Microsoft, Yahoo!, etc. use them).
>

I respectfully disagree, Thomas, and think your advice on this is ill
served. In addition I believe that there are those at all the companies that
you mentioned who would take issue with your opinion. Values from cookies
that are explicitly maintained on the client and which are transported to
the server as part of an RPC's  payload can be trusted but values which come
directly from HTTPRequest's cookies aren't trustworthy. That's a fact. Leave
one little hole open and some malcontent with a half a brain is going to
take advantage of it and hijack your session. It's such an easy prevention
to implement that one would have to be foolish to not take advantage of it.

-- 
*Jeff Schwartz*
http://jefftschwartz.appspot.com/
http://www.linkedin.com/in/jefftschwartz
follow me on twitter: @jefftschwartz

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



Re: gwt mvp sessions

2011-02-24 Thread Thomas Broyer
In such a scenario, you'll generally have a "session" maintained by the 
server through a cookie, which will be enough (yes, cookies are not that 
secure, but still deemed secure enough that everyone from Google to 
Facebook, Twitter, Microsoft, Yahoo!, etc. use them). The RequestTransport 
will then be useful to detect when the session/cookie have expired.

Now, if your "host page" (the page that "hosts" the GWT app) can now an 
authentication token, then you can output it in the page (using a JSP for 
instance) and use a Dictionary to retrieve it from your GWT code.
See http://code.google.com/webtoolkit/articles/dynamic_host_page.html

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



Re: gwt mvp sessions

2011-02-24 Thread veenatic

>
> If you want to pass an "authentication token" on each request, then the 
> RequestTransport is the way to go on the client-side.
>
> Have a look 
> http://code.google.com/p/google-web-toolkit/source/browse/tags/2.1.1/samples/expenses/src/main/java/com/google/gwt/sample/gaerequest/
>  which 
> is used in the Expenses sample.


Hi Thomas,
Thanks for all your valuable insight to the subject.
I am looking for some more explanation on the above. If I understood 
correctly, we can implement separate page for login and a separate page 
where the gwt app resides. Once the user is authenticated from login page, 
we have the "security token", but how to communicate the token obtained from 
the login page to the gwt app so that we can put the token in the 
RequestTransport and initialize the RequestFactory.

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



Re: gwt mvp sessions

2011-02-16 Thread Ernesto Reig
On 16 February 2011 12:14, Ernesto Reig  wrote:

>
>
> On 26 January 2011 14:53, Thomas Broyer  wrote:
>
>> You mean how I *did* implement it? ;-)
>>
>> Using the same pattern as the Expenses sample:
>>
>>1. out HTML host page (the one calling the *.nocache.js) is protected
>>with a simple servlet FORM authentication
>>(FORM in the web.xml); nothing special
>>here.
>>2. the server returns a known error response for unauthenticated
>>requests (i.e. a 401 status code, I didn't include a WWW-Authenticate 
>> header
>>which is in violation of HTTP, but it just works so...), this is done in a
>>servlet Filter, where I simply check for request.getUserPrincipal() != 
>> null.
>>This has really nothing specific to RequestFactory, and we use it with 
>> other
>>XMLHttpRequest-driven requests too.
>>
>> I don´t know why this is wrong, but the checking of
> request.getUserPrincipal() != null seems to be valid only the first time a
> request is made. The following requests (made by the requestFactory),
> getUserPrincipal() returns null. Here´s my code in my AuthFilter class:
>
> public void doFilter(ServletRequest servletRequest, ServletResponse
> servletResponse, FilterChain filterChain) throws IOException,
> ServletException {
>   HttpServletRequest request = (HttpServletRequest) servletRequest;
>   HttpServletResponse response = (HttpServletResponse) servletResponse;
>
>   if(request.getUserPrincipal() == null) {
> response.setHeader("WWW-Authenticate", "FORM realm=\"userRealm\"");
> response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
> return;
> }
>
> What am I doing wrong?
>

Sorry, it was my fault. I have it solved :)

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



Re: gwt mvp sessions

2011-02-16 Thread Ernesto Reig
On 26 January 2011 14:53, Thomas Broyer  wrote:

> You mean how I *did* implement it? ;-)
>
> Using the same pattern as the Expenses sample:
>
>1. out HTML host page (the one calling the *.nocache.js) is protected
>with a simple servlet FORM authentication
>(FORM in the web.xml); nothing special
>here.
>2. the server returns a known error response for unauthenticated
>requests (i.e. a 401 status code, I didn't include a WWW-Authenticate 
> header
>which is in violation of HTTP, but it just works so...), this is done in a
>servlet Filter, where I simply check for request.getUserPrincipal() != 
> null.
>This has really nothing specific to RequestFactory, and we use it with 
> other
>XMLHttpRequest-driven requests too.
>
> I don´t know why this is wrong, but the checking of
request.getUserPrincipal() != null seems to be valid only the first time a
request is made. The following requests (made by the requestFactory),
getUserPrincipal() returns null. Here´s my code in my AuthFilter class:

public void doFilter(ServletRequest servletRequest, ServletResponse
servletResponse, FilterChain filterChain) throws IOException,
ServletException {
  HttpServletRequest request = (HttpServletRequest) servletRequest;
  HttpServletResponse response = (HttpServletResponse) servletResponse;

  if(request.getUserPrincipal() == null) {
response.setHeader("WWW-Authenticate", "FORM realm=\"userRealm\"");
response.sendError(HttpServletResponse.SC_UNAUTHORIZED);
return;
}

What am I doing wrong?

>
>1. the client handles the known error response in a custom
>RequestTransport (in our case, for the time being, we simply Window.alert()
>the user, prompting him to refresh the page to re-authenticate)
>
>
> (BTW, thank you for the "expert" qualifier ;-) )
>
> --
> 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.
>

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



Re: GWT MVP vs GXT MVC

2011-02-08 Thread Jeff Larsen
GWT does support databinding. Check out editors.

http://code.google.com/webtoolkit/doc/latest/DevGuideUiEditors.html

And for doing MVP with regards to GXT, you can inject your presenter back 
into your view and then have various events call methods on the presenter. 

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



Re: gwt mvp sessions

2011-01-28 Thread Ernesto Reig
Thank you very much for your responses Thomas and Y2i.

Maybe, this can help to other people who are (like me) changing from Tomcat
to Jetty. Refering to the web.xml and jetty-web.xml:

 - I did know that jetty.home was pointing to my working directory
(C:\workspace\my_app\src\main\webapp in my case), but my problem was that I
couldn´t understand that Jetty was going to look for the users in a
properties file inside my_app. I was trying to draw an analogy between the
tomcat-way and the Jetty-way. I though "if the authentication is against the
server (jetty), why do I have to provide the users to Jetty?" And the answer
to this question is that this properties file is used to authenticate users
ONLY for THIS web application.
For Tomcat users: it´s like configuring a realm inside a  element (
http://tomcat.apache.org/tomcat-7.0-doc/realm-howto.html#Configuring_a_Realm
).

I presume that in a real context, you can have the properties file inside
your_app, or establish the jetty.home system property and point to the
properties file inside jetty.home/etc/realm.properties and authenticate as a
user shared in all web apps.

Thank you very much again.

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



Re: gwt mvp sessions

2011-01-27 Thread Y2i
thank you very much for the link.  So I've been using a wrong version all 
along...

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



Re: gwt mvp sessions

2011-01-27 Thread Thomas Broyer
Oops, sorry: 6.1.11 (but you'd have clicked the link to get the 
authoritative answer, right? ;-) )

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



Re: gwt mvp sessions

2011-01-27 Thread Thomas Broyer
Jetty classes are packaged within gwt-dev.jar, that one comdes from 
somewhere else (Eclipse WTP ?)
The version used by GWT is 6.1.1: 
http://code.google.com/p/google-web-toolkit/source/browse/tags/2.1.1/dev/build.xml#62

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



Re: gwt mvp sessions

2011-01-27 Thread Y2i
Based on the below I assumed it's 6.1.23, this is what I'm using.

find . -name "*jetty*"
./org.eclipse.equinox.http.jetty_2.0.0.v20100503.jar
./org.mortbay.jetty.serveradaptor_1.0.4
./org.mortbay.jetty.serveradaptor_1.0.4/icons/jetty_tiny.gif
./org.mortbay.jetty.serveradaptor_1.0.4/servers/jetty.serverdef
*./org.mortbay.jetty.server_6.1.23.v201004211559.jar*
*./org.mortbay.jetty.util_6.1.23.v201004211559.jar*

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



Re: gwt mvp sessions

2011-01-27 Thread Thomas Broyer


On Thursday, January 27, 2011 7:49:01 PM UTC+1, ernesto.reig wrote:
>
> Ok. Now I´m configuring the application to authenticata against the 
> embedded Jetty server wich comes with GWT. Please, correct me if I´m wrong:
>  - I have to create a jetty-web.xml in WEB-INF of my gwt application with 
> the following text:
>
> 
>   /test
>default="."/>/webapps/test


You don't have to set these: you're already in the webapp (I don't think the 
contextPath will be used given the way the webapp is deployed)

   ...
>   
> 
>   
> Test Realm
>  default="."/>/etc/realm.properties
>   


The "jetty.home" points to your working directory (according to my comment 
in http://code.google.com/p/google-web-toolkit/issues/detail?id=4462), which 
generally will be your "war" folder.

(compared to the sample jetty-web in my comment on the issue, you would just 
need to replace the "authenticator" with the , or you could 
use the same thing as I used to use)

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



Re: gwt mvp sessions

2011-01-27 Thread Ernesto Reig
Ok. Now I´m configuring the application to authenticata against the embedded
Jetty server wich comes with GWT. Please, correct me if I´m wrong:
 - I have to create a jetty-web.xml in WEB-INF of my gwt application with
the following text:


  /test
  /webapps/test
   ...
  

  
Test Realm
/etc/realm.properties
  

  


And it gives me the following exception:
java.io.FileNotFoundException:
C:\workspace\myapp\src\main\webapp\etc\realm.properties (The system cannot
find the path specified)
Of course it does not find the file realm.properties. First, I have no
jetty.home system variable set, and second, what would it be the value of
this system variable??
The thing is, if I want to use HashUserRealm for my webapp authentication,
Jetty looks for a properties file to find the users and their credentials,
but where the hell is that file? Jetty is embedded...

Maybe I´m wrong in something. Please help.

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



Re: gwt mvp sessions

2011-01-27 Thread Ernesto Reig
Thank you very much for your response. At the moment I´m studying jetty and
I get to a very simple question:
*¿What is or how can I know, the current Jetty version of the current GWT
version?* Now I´m using 2.1.1
This is a very simple question that I cannot understand why in the world
there´s no answer in the GWT official documentation...

Thank you in advance.

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



Re: gwt mvp sessions

2011-01-27 Thread Y2i
I also started from using Tomcat, but the debugging issue forced me to 
switch to Jetty.  It took time to learn Jetty's specifics but it was worth 
it.

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



Re: gwt mvp sessions

2011-01-27 Thread Ernesto Reig
Hello again.
It seems that I get stuck in every step... The thing is that I don´t know
how to use Tomcat for the Development Mode instead of the embedded Jetty.
I´ve been reading lots and lots of docs (including
http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#How_do_I_use_my_own_server_in_development_mode_instead_of_GWT%27s)
but I still haven´t found a way to do it. In my opinion it isn´t well
explained at al, it´s very unclear...
I have arrived to this because, as you said, protecting the host page with a
"servlet FORM authentication" forces me to use Tomcat.
So I need to check that the servlet authentication I am implementing is
right. Therefore, I have to deploy my webapp in Tomcat, BUT I don´t want to
end up re-deploying the application in Tomcat every time I make a little
change in the code.

Any help on this, please?

Than you very much.

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



Re: gwt mvp sessions

2011-01-26 Thread Ernesto Reig
Thank you very much for your response Thomas. I´ve reading and reading about
the servlet authentication and I was going to ask you some more things about
this approach, but I can´t sort my ideas now hehe. I´ll carry on this
tomorrow :)

Thank you again.

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



Re: gwt mvp sessions

2011-01-26 Thread Thomas Broyer
You mean how I *did* implement it? ;-)

Using the same pattern as the Expenses sample:

   1. out HTML host page (the one calling the *.nocache.js) is protected 
   with a simple servlet FORM authentication 
   (FORM in the web.xml); nothing special 
   here.
   2. the server returns a known error response for unauthenticated requests 
   (i.e. a 401 status code, I didn't include a WWW-Authenticate header which is 
   in violation of HTTP, but it just works so...), this is done in a servlet 
   Filter, where I simply check for request.getUserPrincipal() != null. This 
   has really nothing specific to RequestFactory, and we use it with other 
   XMLHttpRequest-driven requests too.
   3. the client handles the known error response in a custom 
   RequestTransport (in our case, for the time being, we simply Window.alert() 
   the user, prompting him to refresh the page to re-authenticate)


(BTW, thank you for the "expert" qualifier ;-) )

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



Re: gwt mvp sessions

2011-01-26 Thread Ernesto Reig
Thomas, just to know an expert opinion. How would you implement the custom
authentication? I mean, not using GAE.

Thank you in advance.

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



Re: gwt mvp sessions

2011-01-24 Thread Ernesto Reig
Someone to deny or confirm my two previous comments on this post?

Thank you.

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-24 Thread Nikini Ayodaya
http://adf.ly/LPTq
http://adf.ly/LPTq
http://adf.ly/LPTq

On Mon, Jan 24, 2011 at 2:46 PM, Thomas Broyer  wrote:

> That's what the Expenses sample does IIRC, so I wouldn't say it's bad
> design. It's just that you now have to manage state in your activity, which
> makes it a bit less easy to maintain (notice that I've not used "more
> difficult"!)
>
> --
> 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.
>

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-24 Thread Thomas Broyer
That's what the Expenses sample does IIRC, so I wouldn't say it's bad 
design. It's just that you now have to manage state in your activity, which 
makes it a bit less easy to maintain (notice that I've not used "more 
difficult"!)

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-23 Thread zixzigma
Thank you for your suggestions.

I am going to experiment with them and implement them.

I have two related questions.

What do you think of the approach below:

- using GIN Providers to give us the Activities for Top/Left regions,
and binding these activities  in Singleton.
do you think there is something wrong with this ?

- is it a bad idea to make an Activity singleton ?
and changing its internal state - (for example Id of the entityproxy
to display) - via setter methods
(given we have an ActivityFactory that can set few fields on an
Activity,
 before returning the Activity with new state to the ActivityMapper)
for example: within ActvitiyFactory, doing something like this:
employeeDetailsActivity.setCurrentEmployeeId(employeePlace.getId())
return employeeDetailsActivity;

maybe it might be unnecessary in this case, but in a broader sense,
is it a bad design decision/code smell to make a class (activity in
this case) Singleton,
and changing its internal state, via setter methods ?

Thank You

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-23 Thread Thomas Broyer
I can see (at least) 2 solutions:
 1. transform any EmployeeDetailPlace(, ) to an 
EmployeeDetailPlace(null,null) (or any other fixed value) in a 
FilteredActivityMapper, so a CachingActivityMapper can play its role. You 
could also introduce a new Place type instead. Your ActivityMapper-s for the 
"other" (non-Center) regions, and their CachingActivityMapper, will then 
never see an EmployeeDetailPlace with an action and employee ID that's not 
the fixed values set by the FilteredActivityMapper.

 2. implement your own "caching" using the kind of "equality" you need 
(instead of the .equals() used in CachingActivityMapper)

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-23 Thread zixzigma
yes,

[1] (there are also places S,R,T where Top/Left/Right are not visible.
therefore I need to make them display regions, as they are not going
to remain fixed throughout the application.)

and apart from them not being visible, there would be other activities
in those display regions.

in one place a Navigation menu on the Left display region,
in one place, a TreeList of items backed by data on the left display
region,
in one place nothing at all on the left display region.

Thank You

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-23 Thread zixzigma
yes,

[1] (there are also places S,R,T where Top/Left/Right are not visible.
therefore I need to make them display regions, as they are not going
to remain fixed throughout the application.)

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



Re: GWT MVP Re-Using Activities where Caching and Filtered ActvityMapper don't work ?

2011-01-23 Thread Y2i
A dumb question: do Navigation Menu and Toolbar ever change?  May be you 
just need a single activity mapper?

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



Re: gwt mvp sessions

2011-01-21 Thread Ernesto Reig
I forgot to say this in my previous message:
I don´t think that including the Expenses app in the distribution of GWT is
a good idea. I ONLY SAY THIS BECAUSE OF THE AUTHENTICATION APPROACH USED. I
mean, it seems to be a custom app for a private organization/company. But as
said in my previous comment, you cannot use custom authentication. And I
don´t think a company would like to have its expenses and reports available
to the world (using google accounts or openID).
The only way it is justified would be if the authentication used in GAE in
the Expenses app was using the accounts from a Google Apps domain for the
users of a given company. Which I think it should be explained or commented
in the application.

I would appreciate any comment about this.
Thank you again.

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



Re: gwt mvp sessions

2011-01-21 Thread Ernesto Reig
Thank u for your help and comments Y2i (and the others).
To sum up, I will say that Google App Engine is a great thing to use with
your apps, but it´s designed for apps where everybody having an openID
account can log in, I mean, you cannot have your custom authentication.
- You cannot have your app using GAE for private purposes with your private
users (unless your users have a Google Apps account, which is too expensive
(50$/user)).
- You cannot restrict the access to everybody, allowing only a set of users
(your clients, employees, etc) with a username and password that you
provide.
This is a very common feature for web applications which is not considered
in GAE. I would like  to have my private web app (with my private users)
hosted in GAE, and pay for that as the numbers of new users I register
grows.
Well, I´ll post my final solution for the authentication (maybe a common
one), but it´s a pity I cannot use GAE :(

Thank you.

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



Re: gwt mvp sessions

2011-01-21 Thread Y2i
It sounds, based on the full control requirement, that you cannot deploy on 
GAE.

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



Re: gwt mvp sessions

2011-01-21 Thread Ernesto Reig
Following my previous post...
what I need is to provide my users with username and password, and to have
full control of the users that login in my application. I don´t want that
everybody who has a google account or an openID identifier can do login. So,
the question again:
 - Is this possible using GAE Authentication?

Thank you very much.

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



Re: gwt mvp sessions

2011-01-21 Thread Ernesto Reig
Ok. If I haven´t misunderstood (reading at
http://code.google.com/appengine/docs/java/users/overview.html#Authentication_Options),
you have three options to authenticate users with App Engine:
 - A Google Account
 - An account from an (my) Google Apps domain.
 - An OpenID identifier

BUT, if I wanted to use my custom authentication I couldn´t do it any of
these three ways, could I? I mean, I don´t want to have my users forced to
create a Google Account or an OpenID account. I just need to give my users a
username and password (via paper) in order to allow them to login in the
system. This is because most of the users will be people with
zero-internet-knowldge and they will receive the username and password,
which they will write in the login screen.
 - Is this possible using GAE Authentication?
 - Do I have missed anything?

Thank you very much.

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



Re: gwt mvp sessions

2011-01-19 Thread Y2i
Take a look here
http://code.google.com/appengine/docs/java/config/webxml.html#Security_and_Authentication

And then here (the first link will also point you here)
http://code.google.com/appengine/docs/java/users/

Also read the overview 
http://code.google.com/appengine/docs/java/users/overview.html

The overview explains how users are authenticated.  Once a user is 
authenticated, UserService will know about the user.

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



Re: gwt mvp sessions

2011-01-19 Thread Ernesto Reig
Keeping on trying to fully understand GAE Authentication, with the Expenses
example approach, I find these lines of code:

UserService userService = UserServiceFactory.getUserService();
...
if (!userService.isUserLoggedIn()) {
  ...
}

And now I get stuck into this.
 - What is that UserService? Ok, it´s the interface
com.google.appengine.api.users.UserService.
 - But how does it work? How can it check if a user is logged in? where the
hell does it get the users from?

Thank you in advance.

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



Re: gwt mvp sessions

2011-01-19 Thread Y2i
Sorry if I was not clear, I didn't say it's the best to use GAE, it all 
depends on your requirements.  GAE is a web server where you deploy your 
application.  If you chose to deploy on GAE then it's better to use 
authentication offered by GAE.

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



Re: gwt mvp sessions

2011-01-19 Thread Ernesto Reig
Ok. I´ve been having a look to GAE Authentication. And there are things I
don´t understand well...
If you look at this page (
http://code.google.com/p/gwt-gae-book/wiki/Authentication), which seems to
be quite reliable, it clearly says "Although it's possible to develop App
Engine applications with custom authentication (e.g. using your own
username/password lookup, or by connecting to custom 3rd party web
services), we'll focus on OpenID".
Well, the thing is that* I do need custom authentication*. I need to
generate my own usernames and their corresponding passwords to log in. I
don´t know how to do it with GAE, but as above mentioned, it said "*it's
possible to develop App Engine applications with custom authentication*".
So the question is:
 - How do I implement custom authentication using GAE?
 - Can I use the approach used by the Expenses sample? If so, what do I have
to change/customize?
 - Using App Engine, can I use my own MySQL tables (for users and other
data)?

I know I´m a bit confused.
Thank you for your help.

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



Re: gwt mvp sessions

2011-01-19 Thread Ernesto Reig
Thank you Y2i. The thing is that I don´t use GAE. I´ve never used GAE
actually. But, as I said in my first comment, I want to implement the
authentication/authorization the best way (the most
recommended/professional) to do it.
If you think, from your experience, that the best way is using GAE, I will.

Thank you very much again.

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



Re: gwt mvp sessions

2011-01-18 Thread Y2i


On Tuesday, January 18, 2011 9:05:23 AM UTC-8, ernesto.reig wrote:
>
> It does not make sense to have 2 RequestFactory(s) in a single web app. I´d 
> have 2 (or more) RequestContext, and I´d get them having these methods in my 
> AppRequestFactory interface (one of them dealing with the user management):
>
 
It does if you use declarative security combined with form-based 
authentication as described Servlet specification.   
requires  URL that un-authenticated users can access to 
perform authentication.

As I said earlier, there are many ways to implement 
authentication/authorization.  If you use GAE it's better to stick with what 
it offers.

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



Re: gwt mvp sessions

2011-01-18 Thread Ernesto Reig
Thank you Thomas. I´ll have a look (and try to understand) the approach
you´ve recommended (used in the Expenses sample).
What a coincidende today I´ve been reading a blog
http://tbroyer.posterous.com/ Maybe you know it ;) Congratulations for your
great posts.

Thank you very much.

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



Re: gwt mvp sessions

2011-01-18 Thread Thomas Broyer
If you want to pass an "authentication token" on each request, then the 
RequestTransport is the way to go on the client-side.

Have a look 
http://code.google.com/p/google-web-toolkit/source/browse/tags/2.1.1/samples/expenses/src/main/java/com/google/gwt/sample/gaerequest/
 which 
is used in the Expenses sample.

However, if you want to do your login() call using RequestFactory, then 
you'd of course get rid of the servlet filter and then either add checks in 
each service method requiring authentication (not productive, but easy to 
comprehend) or somehow "filter" the invocations using a 
ServiceLayerDecorator (kind of AOP-like) that report() any unauthorized 
call. You'd probably couple that with a 
com.google.gwt.requestfactory.server.ExceptionHandler and generic error 
management in your Receiver subclasses (in onFailure).

I'm talking from experience: I'd highly recommend doing sign-in outside the 
app and use the approach used by the Expenses sample (though I acknowledge 
there are use-cases for "in app" authentication that people think are worth 
the trouble)

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



  1   2   >