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 <harsh.de...@gmail.com> 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
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fmvp4g%2Fmvp4g=D=1=AFQjCNFZVdRFuONp-UOuqjqn34NLz-YTdg>
>  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 <subhra...@gmail.com>
>> 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 <harsh...@gmail.com> 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 
<https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fmvp4g%2Fmvp4g=D=1=AFQjCNFZVdRFuONp-UOuqjqn34NLz-YTdg>
 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 <subhra...@gmail.com 
> > 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 <harsh...@gmail.com > 
>> 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 <subhrajyo...@gmail.com>
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 <harsh.de...@gmail.com> 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 <harsh.de...@gmail.com> 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.


GWT MVP Frameworks

2017-10-13 Thread 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.


GWT MVP and UiBinder Question

2015-08-28 Thread Abel Oszwald
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.


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 oszwalda...@gmail.com 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/ http://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.


How to do validations in GWT MVP Pattern

2014-02-10 Thread Akhil Anil
I've developed a gwt application using MVP pattern ( View, Presenter). I 
need to add validation to my application but some stackoverflow links 
http://stackoverflow.com/questions/5655775/tutorial-on-setting-up-gwt-validation-framework-for-a-simple-appsays
 
that gwt mvp cannot have validations framework. I'm totally blown out.. i 
mean there has to be some way. Could someone please show me some tutorials 
or examples on how I can implement validations in a gwt applicaitons with 
mvp pattern. 

Thanks in advance...



-- 

Thanks and regards

May God Bless us!

*AkH!L.*

*http://akhilspassion.blogspot.com http://akhilspassion.blogspot.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/groups/opt_out.


Re: How to do validations in GWT MVP Pattern

2014-02-10 Thread Jens
GWT supports/emulates JSR 303 (Bean Validation) on the 
client: http://www.gwtproject.org/doc/latest/DevGuideValidation.html

-- J.

-- 
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/groups/opt_out.


Re: How to do validations in GWT MVP Pattern

2014-02-10 Thread RyanZA
Slightly off topic, but do you know if the hibernate-validation support 
will be upgraded to version hibernate validator 5? 

hibernate-validator-4.1.0.Final.jar requires on an old slf4j, and it plays 
a bit of havoc when including it in projects that require modern sl4j.


On Monday, February 10, 2014 11:17:04 AM UTC+2, Jens wrote:

 GWT supports/emulates JSR 303 (Bean Validation) on the client: 
 http://www.gwtproject.org/doc/latest/DevGuideValidation.html

 -- J.


-- 
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/groups/opt_out.


Re: How to do validations in GWT MVP Pattern

2014-02-10 Thread Ryan Chazen
Yeah I have it working like that already, but it's still unfortunate. Maybe
the best long term bet is to not use JSR 303 at all? It adds a bit more
boilerplate code though.



On Mon, Feb 10, 2014 at 3:51 PM, Jens jens.nehlme...@gmail.com wrote:

 Slightly off topic, but do you know if the hibernate-validation support
 will be upgraded to version hibernate validator 5?

 hibernate-validator-4.1.0.Final.jar requires on an old slf4j, and it
 plays a bit of havoc when including it in projects that require modern sl4j.


 I don't think anyone is working on it, see:
 https://code.google.com/p/google-web-toolkit/issues/detail?id=7661 .

 However you can solve your issue by creating separate projects for client
 and server side which is kind of a good practice anyways. That way server
 libs do not interference with client libs.

 -- J.

 --
 You received this message because you are subscribed to a topic in the
 Google Groups Google Web Toolkit group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/google-web-toolkit/Vl0AFw486Tw/unsubscribe
 .
 To unsubscribe from this group and all its topics, 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/groups/opt_out.


-- 
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/groups/opt_out.


Re: How to do validations in GWT MVP Pattern

2014-02-10 Thread Thomas Broyer


On Monday, February 10, 2014 3:03:32 PM UTC+1, RyanZA wrote:

 Yeah I have it working like that already, but it's still unfortunate. 
 Maybe the best long term bet is to not use JSR 303 at all? It adds a bit 
 more boilerplate code though.


No one maintains JSR 303 emulation; so if you're not ready to contribute to 
it, not using it might be safer (I'd prefer you use and contribute to it 
though :) ) 

-- 
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/groups/opt_out.


Using Smart GWT in GWT MVP framework with maven

2012-09-25 Thread karthikeyan p
Hi,

Currently there is a requirement in our project for drag and drop feature 
in the tree format. So we are planning to use smart GWT.
But when i include smart gwt dependencies in the pom.xml and start the 
project in jetty using mvn run.
The application is throwing error in GWT GIN injector,but i have not used 
any smart gwt wigedt in our project just i have added the dependencies in 
the pom.xml
i don't know why it is getting failed. if i remove the dependencies the 
application is loading properly.
Can anyone advise me that where iam missing something or any other example 
to use the smart gwt with the mvp + maven .

Thanks,
Karthik

-- 
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/-/3M1dQg8MncoJ.
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: Using Smart GWT in GWT MVP framework with maven

2012-09-25 Thread thiago borges martins
Please input the pom.xml of your project.

Em sexta-feira, 21 de setembro de 2012 02h56min54s UTC-3, karthikeyan p 
escreveu:

 Hi,

 Currently there is a requirement in our project for drag and drop feature 
 in the tree format. So we are planning to use smart GWT.
 But when i include smart gwt dependencies in the pom.xml and start the 
 project in jetty using mvn run.
 The application is throwing error in GWT GIN injector,but i have not used 
 any smart gwt wigedt in our project just i have added the dependencies in 
 the pom.xml
 i don't know why it is getting failed. if i remove the dependencies the 
 application is loading properly.
 Can anyone advise me that where iam missing something or any other example 
 to use the smart gwt with the mvp + maven .

 Thanks,
 Karthik


-- 
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/-/HItbdw2JOoIJ.
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-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 saurabh.bl...@gmail.com







 On 14 Sep, 14:21, stuckagain david.no...@gmail.com 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 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-14 Thread Aryan






On 14 Sep, 14:21, stuckagain david.no...@gmail.com 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.



GWT MVP Architecture

2012-09-13 Thread Aryan
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/-/VQpvCfRbzLoJ.
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 vehdra music


On Dec 3, 9:53 pm, Thomas Broyer t.bro...@gmail.com 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-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 t.br...@gmail.com 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.



GWT MVP Multiple Areas Doubt

2011-12-03 Thread vehdra music
In my app I have layout like gmail. A header, a left panel (with a
menu), a main content area (with a header and a content area).

Example:

---
|username logout|
--
|  aside  |  add, delete, other action|
| menu   | |
|| filter by a, b, c   |
|| |
|| maincontent (ie: celltable)   |
|| |
|| |
|| |
|| |
|| |
---

Aside Menu will be created after the user logins and remains during
the entire session.

The same for the header.

Now, my doubt is about the main content area (actions panel, filters
panel and main content panel).

What I did to get this layout working is:

1. I created two widgets, MainDisplayFilters and MainDisplayActions.
2. I created an AppLayout and injected those widgets.
3. In every one of my views, for example UsersListView, I inject
MainDisplayFilters and MainDisplayActions, clear the widgets, and add
to the widgets the buttons for the actions and the filters that I need
in the current activity.

I really DONT like this approach :) but I can't figure how can I do it
in a better way. Should I create an ActionsActivityMapper and a
FiltersActivityMapper, and diferent activities / views for this panels
for every place that the user goes? For example, if the user goes to
UserListPlace, load the UserListActionsActvity (with it owns view) and
the UserListFiltersActivity? It doesn't make many sense, I think.

I was reading about Thomas Broyer post 
http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni
but actions panels and filters panels are in someway connected to the
maincontent activity, that's why I believe that I don't need more than
one ActivityMapper.

I neither don't like the idea to have the actions panel + the filters
panel + content panel all in one view, beacause if in the future I
want to change something in the layout (for example add a pagination
control on the right of my actions panel), I would have to do it in
every view.

Wich one would be the best way to handle a layout like this?

-- 
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: A class diagram relating the core GWT MVP model

2011-10-25 Thread Hans-Joachim Belz
Hello Daniel,

thanks for sharing! Your very neat diagram inspired me to rework the
layout and clarify some things in my own depiction.

About your generator framework: Isn't that what Spring Roo is all
about? - I have to admit, I am no real fan of generator solutions.
Often they are only good for bootstrapping or they break, if you stray
from the default (read expected) path of the underlying framework.

Best regards,
Achim.



On 18 Okt., 17:38, Daniel Dietrich cafeb...@googlemail.com wrote:
 Hi Hans-Joachim,

 as Jens mentioned, you find my post here:http://goo.gl/a6db2
 Here is a direct link to the drawing:http://goo.gl/u7Ntq

 The activity  places vs. mvp question arises on and on.
 What gwt gives to us is a toolkit - but not a framework.
 There are lot of frameworks out there which give us a solution for making
 our apps testable or add browser history support.

 Currently I'm working on a generator which automagically generates all the
 technical boilerplate code on base of a simple description of the
 application to have this architecture out of the box. I see me as engineer
 who creates a factory for developers. Each developer should not concern
 about how to apply architectural design patterns. A developer should
 implement business logic, not technical boilerplate.

 I started an example generator for JPA + Request Factory 
 here:https://github.com/danieldietrich/xtext-javatools(running but work in
 progress)
 It needs this plugin to be 
 installed:https://github.com/danieldietrich/xtext-protectedregions
 See the README.textile files for more information...

 Next step is a generator for the ui stuff...

 Greetz

 Daniel

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



A class diagram relating the core GWT MVP model

2011-10-17 Thread Hans-Joachim Belz
Hi everybody!

I like the power of the GWT MVP model. But it is quite a challenge to
wrap your head around the complex class hierarchy orbiting the core
concepts of activities, views and places. After falling through some
unexpected trap doors (e.g. ResettableEventBus), I decided to create a
class diagram of the core classes of the framework along with the main
classes implemented by the framework user.

You can see a PDF rendition of the model here:
http://minutefforts.com/blog/wp-content/uploads/2011/10/gwt-mvp-classes.pdf

What do you think? Am I missing some important stuff? Anything wrong?

-- 
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: A class diagram relating the core GWT MVP model

2011-10-17 Thread Jens
ActivityManager uses (1..1) AcceptsOneWidget (interface). And 
AcceptsOneWidget should be implemented by MyDisplayAreaWidget (which is in 
most cases a SimplePanel or SimpleLayoutPanel). Then MyContainerWidget 
embeds 1..n AcceptsOneWidget / MyDisplayAreaWidget.

So MyContainerWidget is the root that contains 1..n AcceptsOneWidget 
implementations (= display areas) and each AcceptsOneWidget is assigned to 
its own ActivityManager (so you have more than one ActivityManager if you 
have more than one display area).


I think a while ago someone also posted a class diagram for activity/places. 
Maybe you can find it via search. But I am not quite sure if it has been 
posted in this group or in the Google Web Toolkit Contributors group.

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



Crossposted from GPE group (Tooling support to handle GWT MVP boilerplate)

2011-10-06 Thread abby
Posting this on this group to reach the GWT community as well.

I was wondering if there are any plans to add better tooling support
to generate the boilerplate interfaces/classes to build a use case
using MVP approach.
One pain point i have been hearing a lot in my discussion with
developers is the amount of boilerplate code needed to get something
going. I believe support from GPE to have a right click menu item
saying add use case, which generates a corresponding presenter
interface, implementation, a uibinder.xml file with corresponding java
class and interface will help ease some of the pain. Thoughts?

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



upload file with GWT (MVP pattern)

2011-08-15 Thread GWT and Web Services
i want to add upload file on my application, i implemented it like you
did, but it doesnt work, when i debug i found that items is null.

PS: i use MVP pattern , so is there another way to implement upload
file.

-- 
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: upload file with GWT (MVP pattern)

2011-08-15 Thread Thad
Did you call setName(String) on the FileUpload object? If you do not,
org.apache.commons.fileupload.servlet.ServletFileUpload won't list
your field in parseRequest(HttpServletRequest).

On Aug 15, 8:47 am, GWT and Web Services loubar.bil...@gmail.com
wrote:
 i want to add upload file on my application, i implemented it like you
 did, but it doesnt work, when i debug i found that items is null.

 PS: i use MVP pattern , so is there another way to implement upload
 file.

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



Can I/Should I test my *ServiceImpl class? (GAE+GWT+MVP)

2011-07-14 Thread Drew Spencer
Hey coders,

I wonder if anyone can help me. I'm still learning GAE+GWT and trying to get 
into unit testing as I go along. I have finally managed to get my head 
around MVP and have written some basic tests to test my presenters, using 
mock objects for the view and server-side service. All good.

My question is this: *How can I test whether my RPC calls are working? 
Should I even be trying to test them?*

For example, in my ServiceImpl class I have a function fillDatastore() that 
populates it with some dummy data - I would like to be able to run this on 
the datastore stub, using LocalServiceTestHelper, a bit like this test, but 
using my server side code instead of putting the actual insert code into the 
test itself: 
http://code.google.com/appengine/docs/java/tools/localunittesting.html#Writing_Datastore_and_Memcache_Tests

As far as I understand it - I can't use GWT.create() to make a real rpc 
service in a TestCase (have to mock it), and I can't create a datastore stub 
inside a GwtTest. If anyone can point me in the right direction, tell me 
where I'm confused I would appreciate it greatly.

Cheers,

Drew

-- 
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/-/ZSdzjFFXD3kJ.
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 t.bro...@gmail.com 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-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 - problem with nested views and presenters

2011-06-16 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 gardellajuanpa...@gmail.com
wrote:
 The problem is that we get two objects of the sub-widget class becouse
 this widgets aren't singletons.

 2011/6/15 ricu marko.c...@gmail.com







  Anybody? Maybe someone has the same architecture without GIN. What is
  your experience?

  On 13 lip, 21:16, ricu marko.c...@gmail.com 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 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 marko.c...@gmail.com

 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 gardellajuanpa...@gmail.com
 wrote:
  The problem is that we get two objects of the sub-widget class becouse
  this widgets aren't singletons.
 
  2011/6/15 ricu marko.c...@gmail.com
 
 
 
 
 
 
 
   Anybody? Maybe someone has the same architecture without GIN. What is
   your experience?
 
   On 13 lip, 21:16, ricu marko.c...@gmail.com 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 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 gardellajuanpa...@gmail.com
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 marko.c...@gmail.com







  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 gardellajuanpa...@gmail.com
  wrote:
   The problem is that we get two objects of the sub-widget class becouse
   this widgets aren't singletons.

   2011/6/15 ricu marko.c...@gmail.com

Anybody? Maybe someone has the same architecture without GIN. What is
your experience?

On 13 lip, 21:16, ricu marko.c...@gmail.com 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
If your widgets are reusable, if you create new instances there are not
problem. Why you want to share instances?

2011/6/16 ricu marko.c...@gmail.com

 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 gardellajuanpa...@gmail.com
 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 marko.c...@gmail.com
 
 
 
 
 
 
 
   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 gardellajuanpa...@gmail.com
   wrote:
The problem is that we get two objects of the sub-widget class
 becouse
this widgets aren't singletons.
 
2011/6/15 ricu marko.c...@gmail.com
 
 Anybody? Maybe someone has the same architecture without GIN. What
 is
 your experience?
 
 On 13 lip, 21:16, ricu marko.c...@gmail.com 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=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 gardellajuanpa...@gmail.com
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 marko.c...@gmail.com







  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 gardellajuanpa...@gmail.com
  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 marko.c...@gmail.com

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 gardellajuanpa...@gmail.com
wrote:
 The problem is that we get two objects of the sub-widget class
  becouse
 this widgets aren't singletons.

 2011/6/15 ricu marko.c...@gmail.com

  Anybody? Maybe someone has the same architecture without GIN. What
  is
  your experience?

  On 13 lip, 21:16, ricu marko.c...@gmail.com 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 

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 marko.c...@gmail.com wrote:
 Anybody? Maybe someone has the same architecture without GIN. What is
 your experience?

 On 13 lip, 21:16, ricu marko.c...@gmail.com 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.



GWT, MVP, GIN, code splitting?

2011-06-16 Thread 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.



Re: GWT, MVP, GIN, code splitting?

2011-06-16 Thread Juan Pablo Gardella
+1

2011/6/16 Ahmed ahmed.zar...@gmail.com

 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, 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 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
gardellajuanpa...@gmail.com wrote:
 +1

 2011/6/16 Ahmed ahmed.zar...@gmail.com

 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 - 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 marko.c...@gmail.com 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 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 marko.c...@gmail.com

 Anybody? Maybe someone has the same architecture without GIN. What is
 your experience?

 On 13 lip, 21:16, ricu marko.c...@gmail.com 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.



GWT MVP GIN - problem with nested views and presenters

2011-06-13 Thread ricu
Hi!

We are using GIN in 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 using GIN

GIN Binding 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 zixzi...@gmail.com 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 {

 EntityProxyIdFooEntityProxy firstEntityProxyId;
 EntityProxyIdBarEntityProxy barEntityProxyId;
 EntityProxyIdBazEntityProxy 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.



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

2011-04-19 Thread federico
One way to go could be to return an instance of CompositeActivity that take 
the CompositePlace and manage the subplaces internally

-- 
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- sow...@gmail.com 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-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 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 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 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 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.

/rant

On Apr 7, 11:36 pm, Jens jens.nehlme...@gmail.com 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 Brian Lough
Nicely done, David.  +1

On Thu, Apr 7, 2011 at 8:39 AM, David Chandler drfibona...@google.comwrote:

 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- sow...@gmail.com 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.



GWT MVP

2011-04-06 Thread Alex
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.



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

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://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 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 alex...@gmail.com 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 -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.



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

2011-04-05 Thread moni
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 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 mithun.go...@gmail.com 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 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 j...@mycee.com 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 mr.zau...@gmail.com 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-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 ash...@acrinta.com

 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 j...@mycee.com 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 mr.zau...@gmail.com
 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 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 mr.zau...@gmail.com 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 ash...@acrinta.com

 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 j...@mycee.com 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 mr.zau...@gmail.com
 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.



GWT + MVP + Spring + Hibernate

2011-04-02 Thread Zaur Guliyev
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.



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 mr.zau...@gmail.com 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.



GWT-MVP Design Issue

2011-03-11 Thread murali
Hello,

I am a newbie trying to create a page using MVP  with Best practices
(GWT-Dispatch, GWT-Presenter and GWT-Gin). I modified the HelloMVP
example and  trying to load some of the Panels and Widgets dynamically
based on the user action. Could you suggest or give a sample code
which achieve the required functionality and also what are the
disadvantage of creating Panel  Widgets dynamically?.

Thanks In Advance.

Murali

-- 
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-25 Thread Jeff Schwartz
Hi Thomas,

On Fri, Feb 25, 2011 at 8:49 AM, Thomas Broyer t.bro...@gmail.com 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 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
On Fri, Feb 25, 2011 at 10:14 AM, veenatic praveen.bit...@gmail.com 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 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 t.br...@gmail.com 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
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 t.bro...@gmail.com 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 t.br...@gmail.com 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
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
On Fri, Feb 25, 2011 at 12:30 PM, Thomas Broyer t.bro...@gmail.com 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


On Friday, February 25, 2011 6:39:40 PM UTC+1, Jeff wrote:



 On Fri, Feb 25, 2011 at 12:30 PM, Thomas Broyer t.br...@gmail.com 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
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 t.bro...@gmail.com 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 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
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 SingleRPCPayloadSomeTyoe 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 praveen.bit...@gmail.com 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 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 jefftschwa...@gmail.comwrote:

 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 SingleRPCPayloadSomeTyoe 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 praveen.bit...@gmail.comwrote:

 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 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 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 praveen.bit...@gmail.com 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-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-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 Jeff Schwartz
On Thu, Feb 24, 2011 at 6:19 PM, Thomas Broyer t.bro...@gmail.com 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-16 Thread Ernesto Reig
On 26 January 2011 14:53, Thomas Broyer t.bro...@gmail.com 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
(login-configauth-methodFORM/... 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 sessions

2011-02-16 Thread Ernesto Reig
On 16 February 2011 12:14, Ernesto Reig erniru...@gmail.com wrote:



 On 26 January 2011 14:53, Thomas Broyer t.bro...@gmail.com 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
(login-configauth-methodFORM/... 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.



GWT MVP vs GXT MVC

2011-02-08 Thread drew
Hello,
GWT as of now currently doesnt support Data Binding for views in MVP
by which we could directly attach Model Objects to Views. I started
with GWT but now looking forward to GXT since it allows data binding.

Kindly help me with on how MVP could be used for GXT? Since I really
like MVP approach which simplifies the testing and all, and also will
help me save lot of rework.

Also any thoughts on having view Objects GXT based ... add it to the
panel in the View which will also allow Data Binding.

Thanks in advance,
Drew

-- 
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 Context 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 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-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
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 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:

Configure class=org.mortbay.jetty.webapp.WebAppContext
  Set name=contextPath/test/Set
  Set name=warSystemProperty name=jetty.home
default=.//webapps/test/Set
   ...
  Get name=securityHandler
Set name=userRealm
  New class=org.mortbay.jetty.security.HashUserRealm
Set name=nameTest Realm/Set
Set name=configSystemProperty name=jetty.home
default=.//etc/realm.properties/Set
  /New
/Set
  /Get
/Configure

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

 Configure class=org.mortbay.jetty.webapp.WebAppContext
   Set name=contextPath/test/Set
   Set name=warSystemProperty name=jetty.home 
 default=.//webapps/test/Set


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)

   ...
   Get name=securityHandler
 Set name=userRealm
   New class=org.mortbay.jetty.security.HashUserRealm
 Set name=nameTest Realm/Set
 Set name=configSystemProperty name=jetty.home 
 default=.//etc/realm.properties/Set
   /New


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 login-config, 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 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
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.



  1   2   3   >