Making GWT application crawlable by a search engine.

2010-03-12 Thread PhilBeaudoin
I want to use the #! token to make my GWT application crawlable, as
described here:
http://code.google.com/web/ajaxcrawling/

The GWT showcase app available online uses this, for example:
http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton
Will serve the following static webpage to the googlebot:
http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragment_=CwRadioButton

I want my GWT app to do something similar. In short, I'd like to serve
a different flavor of the page whenever the `_escaped_fragment_`
parameter is found in the URL.

What should I modify in order for the server to serve something else
(a static page, or a page dynamically generated through a headless
browser like HTML Unit)? I'm guessing it could be the `web.xml` file,
but I'm not sure.

Note: I thought of checking the source of the Showcase app provided
with the GWT SDK, but unfortunately this version doesn't seem to
support serving static files on `_escaped_fragment_` and it doesn't
use the #! token...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Making GWT application crawlable by a search engine.

2010-03-12 Thread PhilBeaudoin
Thanks Chris. I'll continue the discussion over there, if needed.

On Mar 12, 7:36 am, Chris Lercher  wrote:
> Hi,
>
> please see my answer to your question on 
> stackoverflow.com:http://stackoverflow.com/questions/2430244/making-gwt-application-cra...
>
> Chris
>
> On Mar 12, 10:13 am, PhilBeaudoin  wrote:
>
>
>
> > I want to use the #! token to make my GWT application crawlable, as
> > described here:http://code.google.com/web/ajaxcrawling/
>
> > The GWT showcase app available online uses this, for 
> > example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton
> > Will serve the following static webpage to the 
> > googlebot:http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragmen...
>
> > I want my GWT app to do something similar. In short, I'd like to serve
> > a different flavor of the page whenever the `_escaped_fragment_`
> > parameter is found in the URL.
>
> > What should I modify in order for the server to serve something else
> > (a static page, or a page dynamically generated through a headless
> > browser like HTML Unit)? I'm guessing it could be the `web.xml` file,
> > but I'm not sure.
>
> > Note: I thought of checking the source of the Showcase app provided
> > with the GWT SDK, but unfortunately this version doesn't seem to
> > support serving static files on `_escaped_fragment_` and it doesn't
> > use the #! token...

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Making GWT application crawlable by a search engine.

2010-03-12 Thread PhilBeaudoin
It seems that the CrawlableHyperlink will not make it into GWT, to
quote Kathrin from that code review:

"after a lengthy discussion with Joel, we decided to get rid of the
CrawlableHyperlink widget.  The issue is that it doesn't add enough
useful functionality, because the app writer still needs to handle
the
"!" when actually "navigating" the app to a history state.  For this
reason, we will recommend that people do this process manually, which
is
the same amount of work."

Still, the Showcase sample in that branch might be exactly what I
needed. I'll take a look and post back as to whether or not it solved
my problem. Thanks a lot!

On Mar 12, 6:27 am, Thomas Broyer  wrote:
> On Mar 12, 10:13 am, PhilBeaudoin  wrote:
>
> > I want to use the #! token to make my GWT application crawlable, as
> > described here:http://code.google.com/web/ajaxcrawling/
>
> > The GWT showcase app available online uses this, for 
> > example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton
> > Will serve the following static webpage to the 
> > googlebot:http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragmen...
>
> > I want my GWT app to do something similar. In short, I'd like to serve
> > a different flavor of the page whenever the `_escaped_fragment_`
> > parameter is found in the URL.
>
> > What should I modify in order for the server to serve something else
> > (a static page, or a page dynamically generated through a headless
> > browser like HTML Unit)? I'm guessing it could be the `web.xml` file,
> > but I'm not sure.
>
> > Note: I thought of checking the source of the Showcase app provided
> > with the GWT SDK, but unfortunately this version doesn't seem to
> > support serving static files on `_escaped_fragment_` and it doesn't
> > use the #! token...
>
> There's work underway to make it "just work": you'd use a
> CrawlableHyperlink instead of Hyperlink, and on the server-side it'd
> use HtmlUnit as a "browser simulator" to "run your GWT app" just as if
> a "true" browser would have loaded it and serialize the resulting DOM
> into 
> HTML.http://code.google.com/p/google-web-toolkit/source/browse/branches/cr...
>
> It hasn't been updated for a while, though there's a pending review to
> add the CrawlableHyperlink widget and update the Showcase sample to
> use 
> it:http://groups.google.com/group/google-web-toolkit-contributors/t/88d4...
>
> For the server-side part, I think you'd have to either serve your HTML
> host page from a servlet or JSP so you can change the output depending
> on the presence and value of the _escaped_fragment_ query-string
> parameter, or maybe using a  in your web.xml

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Making GWT application crawlable by a search engine.

2010-03-12 Thread PhilBeaudoin
It almost work... The only problem left is that the development mode
will serve the default html file right away if it is present, so the
filters defined in web.xml will not be called. This happens even with
the showcase application that you linked.

Is there any way to force the web.xml to go through the filters, even
if the requested .html file is there?


On Mar 12, 6:27 am, Thomas Broyer  wrote:
> On Mar 12, 10:13 am, PhilBeaudoin  wrote:
>
>
>
>
>
> > I want to use the #! token to make my GWT application crawlable, as
> > described here:http://code.google.com/web/ajaxcrawling/
>
> > The GWT showcase app available online uses this, for 
> > example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton
> > Will serve the following static webpage to the 
> > googlebot:http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragmen...
>
> > I want my GWT app to do something similar. In short, I'd like to serve
> > a different flavor of the page whenever the `_escaped_fragment_`
> > parameter is found in the URL.
>
> > What should I modify in order for the server to serve something else
> > (a static page, or a page dynamically generated through a headless
> > browser like HTML Unit)? I'm guessing it could be the `web.xml` file,
> > but I'm not sure.
>
> > Note: I thought of checking the source of the Showcase app provided
> > with the GWT SDK, but unfortunately this version doesn't seem to
> > support serving static files on `_escaped_fragment_` and it doesn't
> > use the #! token...
>
> There's work underway to make it "just work": you'd use a
> CrawlableHyperlink instead of Hyperlink, and on the server-side it'd
> use HtmlUnit as a "browser simulator" to "run your GWT app" just as if
> a "true" browser would have loaded it and serialize the resulting DOM
> into 
> HTML.http://code.google.com/p/google-web-toolkit/source/browse/branches/cr...
>
> It hasn't been updated for a while, though there's a pending review to
> add the CrawlableHyperlink widget and update the Showcase sample to
> use 
> it:http://groups.google.com/group/google-web-toolkit-contributors/t/88d4...
>
> For the server-side part, I think you'd have to either serve your HTML
> host page from a servlet or JSP so you can change the output depending
> on the presence and value of the _escaped_fragment_ query-string
> parameter, or maybe using a  in your web.xml

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Making GWT application crawlable by a search engine.

2010-03-12 Thread PhilBeaudoin
Great! Everything seems to work! (Although there seems to be some bugs
in that updated Showcase samples. Should I report them somehow?)

My only problem now... I can't run HTML Unit on App Engine, which is
where I host my app. :(

Fortunately, they seem to be working on it:
https://sourceforge.net/tracker/index.php?func=detail&aid=2962074&group_id=47038&atid=448269#

Thanks all for your help!

On Mar 12, 12:07 pm, PhilBeaudoin  wrote:
> It almost work... The only problem left is that the development mode
> will serve the default html file right away if it is present, so the
> filters defined in web.xml will not be called. This happens even with
> the showcase application that you linked.
>
> Is there any way to force the web.xml to go through the filters, even
> if the requested .html file is there?
>
> On Mar 12, 6:27 am, Thomas Broyer  wrote:
>
>
>
> > On Mar 12, 10:13 am, PhilBeaudoin  wrote:
>
> > > I want to use the #! token to make my GWT application crawlable, as
> > > described here:http://code.google.com/web/ajaxcrawling/
>
> > > The GWT showcase app available online uses this, for 
> > > example:http://gwt.google.com/samples/Showcase/Showcase.html#!CwRadioButton
> > > Will serve the following static webpage to the 
> > > googlebot:http://gwt.google.com/samples/Showcase/Showcase.html?_escaped_fragmen...
>
> > > I want my GWT app to do something similar. In short, I'd like to serve
> > > a different flavor of the page whenever the `_escaped_fragment_`
> > > parameter is found in the URL.
>
> > > What should I modify in order for the server to serve something else
> > > (a static page, or a page dynamically generated through a headless
> > > browser like HTML Unit)? I'm guessing it could be the `web.xml` file,
> > > but I'm not sure.
>
> > > Note: I thought of checking the source of the Showcase app provided
> > > with the GWT SDK, but unfortunately this version doesn't seem to
> > > support serving static files on `_escaped_fragment_` and it doesn't
> > > use the #! token...
>
> > There's work underway to make it "just work": you'd use a
> > CrawlableHyperlink instead of Hyperlink, and on the server-side it'd
> > use HtmlUnit as a "browser simulator" to "run your GWT app" just as if
> > a "true" browser would have loaded it and serialize the resulting DOM
> > into 
> > HTML.http://code.google.com/p/google-web-toolkit/source/browse/branches/cr...
>
> > It hasn't been updated for a while, though there's a pending review to
> > add the CrawlableHyperlink widget and update the Showcase sample to
> > use 
> > it:http://groups.google.com/group/google-web-toolkit-contributors/t/88d4...
>
> > For the server-side part, I think you'd have to either serve your HTML
> > host page from a servlet or JSP so you can change the output depending
> > on the presence and value of the _escaped_fragment_ query-string
> > parameter, or maybe using a  in your web.xml

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Internet Explorer 7 reloads on fragment change?

2010-03-18 Thread PhilBeaudoin
I get a strange problem with Internet Explorer 7: some of my Hyperlink
causes the page to unexpectedly reload. The strange thing is that I
have two hyperlinks to the same history token on the same page, one of
them causes the page to reload and the other one does not. The only
difference I can see between these is that the one that causes the
reload is deeply nested in divs and the other is close to the top.
Otherwise, the DOM nodes are almost identical.

Is this a known issue with IE 7? (All other browsers do fine,
including IE8.) Is there a workaround?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP related question

2010-03-18 Thread PhilBeaudoin
The View and Presenter participants in the MVP pattern are expected to
live on the client only. The Model objects are typically shared
between the client and the server.

If you look at your Project.gwt.xml file you will see:




This means all classes in package client and shared are compiled to
javascript.

Cheers,

Philippe

On Mar 18, 9:25 am, Dhiren Bhatia  wrote:
> I'm curious about the container the 'Presenter' runs in. If I have an
> application that uses the MVP pattern on the UI side and makes RPC
> calls to a servlet (running in Tomcat), where does the presenter run?
> Does it get compiled to Javascript and run in the browser or is it
> running in Tomcat?
>
> Is there a document that explains exactly which pieces get compiled
> into Javascript? Apologies if this has been asked already.
>
> Thanks,
> Dhiren

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: asynchronous RPC means convoluted return values(?)

2010-03-18 Thread PhilBeaudoin
Why not create all the structure client-side -- with "slots" in which
you can insert sequences of content if needed. Then the asynchronous
calls puts the content in the required "slot" as soon as they return.
This way they can return in any order.

On Mar 17, 11:46 am, adisharoon  wrote:
> I've been searching around for a while now for help getting used to
> the asynchronous nature of GWT.  The problem I'm having is not the non-
> blocking nature of asynchronous RPC.  The problem I'm having is that,
> because different async callbacks can't depend on each other being
> complete, you have to return very complex data structures from the
> server sometimes.
>
> For instance, I want to create a complicated FlexTable of
> DisclosurePanels, each containing a FlexTable (etc.).  This visual
> structure holds a lot of data.  Normally, in javascript, I would start
> at the top level of data and create the top level of the visual
> structure, and then work my way down.  Each one of these steps would
> involve a different server call (asynchronous, but functionally
> blocking), and absolutely no user initiated events are required other
> than to visit the page in the first place.  (I'm using GWT mainly for
> the look & feel)
>
> It's certainly possible to have my service implementation return a
> HashMap of HashMaps of TreeSets of ArrayLists (etc.) to make it work,
> but it is very unwieldy to work with.  And, of course, I can't just
> return multiple values.  Am I just whining, or is there a better way
> to do this?  It doesn't help that I'm also new to Java (I'm coming
> from using Python for my server side code).   Should I nest my RPC
> calls?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Internet Explorer 7 reloads on fragment change?

2010-03-18 Thread PhilBeaudoin
If you want to see this yourself, go to http://filouguestbook.appspot.com/#!main
sign-in with a google account and click on the Settings link the the
top bar. Switch between the General and Accounts pages, the app will
reload. From the Accounts page, click on Settings in the top bar, this
will switch tab but not reload!

On Mar 18, 9:44 am, PhilBeaudoin  wrote:
> I get a strange problem with Internet Explorer 7: some of my Hyperlink
> causes the page to unexpectedly reload. The strange thing is that I
> have two hyperlinks to the same history token on the same page, one of
> them causes the page to reload and the other one does not. The only
> difference I can see between these is that the one that causes the
> reload is deeply nested in divs and the other is close to the top.
> Otherwise, the DOM nodes are almost identical.
>
> Is this a known issue with IE 7? (All other browsers do fine,
> including IE8.) Is there a workaround?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Several CSS resource questions

2010-03-19 Thread PhilBeaudoin
I have the exact same problem with opacity. When I add the IE-
specific:
  filter: alpha(opacity=20);
The CSS resource to fails to compile. The IE8 version:

seems to work fine.

I haven't looked for a workaround, yet, but all I can think of will
look like an ugly patch...

I've found the bug in the issue tracker at:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4688&q=CssResource

Please star it if you've had this problem too.

On Mar 17, 1:01 pm, nogridbag  wrote:
> I figured out the answer to question 2.  I just had to add @NotStrict
> annotation.  Questions 1 and 3 still perplex me.
>
> On Mar 17, 3:45 pm, nogridbag  wrote:
>
>
>
> > 1) @external not working as expected
>
> > The GWT doc states that if you mark a style as @external it won't be
> > obfuscated and it doesn't need an associated method in the CssResource
> > interface.
>
> > So for instance:
> > @external legacySelectorA, legacySelectorB;
> > .obfuscated .legacySelectorA {  }
>
> > When I do this, the style: ".obfuscated .legacySelectorA" will simply
> > be ignored and will not show up in the generated CSS.  All other
> > styles that do not use an @external style appear fine in the CSS.
>
> > There's no errors generated.
>
> > I thought maybe I could only have one @external annotation in the CSS
> > file so I moved all the external styles into one big annotation at the
> > top of the file:
>
> > @external abc, def, ghi, blah, blahblah, blahblahblah
>
> > Putting them in one @external annotation at the top of the file
> > generates errors so I'm assuming this should not be done.
>
> > 2) How do I simply bundle a simple CSS file without obfuscating it?
>
> > I thought I could simply create a CssResouce (without subclassing),
> > and specify an annotation so that it's just treated as a static
> > resource.
>
> > Both the link (html) and stylesheet tag (in module descriptor) are
> > deprecated according to the documentation.  I would like slowly
> > transition CSS files to the new CssResource method without adding 50
> > million @external annotations everywhere.  The styles are referenced
> > all throughout our project as strings like addStyleName("my-style")
> > and I don't want to break this functionality at the moment.
>
> > 3) How can I have an "=" sign in a style?
>
> > @if user.agent ie6 ie8 {
> >         .my-style img { filter: alpha(opacity=20); } */} @elif user.agent 
> > gecko gecko1_8 {
>
> >         .my-style img { -moz-opacity: 0.2; }
>
> > }
>
> > The "=" sign in the IE specific string generates an error.
>
> > --
>
> > Finally, this isn't a question.  It's more of a general comment.  So
> > far the experience using the CssResource has been pretty painful.
> > Much of our CSS involves customizing the GXT library's stylesheet.
>
> > So if you have a style like this:
> > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-right
> > span.x-tab-strip-text
> > ...it quickly turns into annotation hell especially since I often have
> > the same external styles referenced in two spots.  Here, we're
> > slightly customizing the GXT tab panel adding three styles.
>
> > @external .x-tab-strip-top, .x-tab-left
> > .my-tab-panel-header .x-tab-strip-top .x-tab-left {
> >         .. one CSS style
>
> > }
>
> > @external .x-tab-strip-top, .x-tab-strip-inner
> > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-inner {
> >         .. one more CSS style
>
> > }
>
> > �...@external .x-tab-strip-top, .x-tab-strip-active, .x-tab-strip-inner
> > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-strip-
> > inner {
> >         .. one more CSS style
>
> > }
>
> > I wind up having more @external annotations all over the document than
> > I do actual CSS code.
>
> > 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Several CSS resource questions

2010-03-19 Thread PhilBeaudoin
Just noticed that the issue has a workaround:

filter: literal("alpha(opacity=50)");

On Mar 19, 2:14 pm, PhilBeaudoin  wrote:
> I have the exact same problem withopacity. When I add the IE-
> specific:
>   filter: alpha(opacity=20);
> The CSS resource to fails to compile. The IE8 version:
>
> seems to work fine.
>
> I haven't looked for a workaround, yet, but all I can think of will
> look like an ugly patch...
>
> I've found the bug in the issue tracker 
> at:http://code.google.com/p/google-web-toolkit/issues/detail?id=4688&q=C...
>
> Please star it if you've had this problem too.
>
> On Mar 17, 1:01 pm, nogridbag  wrote:
>
>
>
> > I figured out the answer to question 2.  I just had to add @NotStrict
> > annotation.  Questions 1 and 3 still perplex me.
>
> > On Mar 17, 3:45 pm, nogridbag  wrote:
>
> > > 1) @external not working as expected
>
> > > The GWT doc states that if you mark a style as @external it won't be
> > > obfuscated and it doesn't need an associated method in the CssResource
> > > interface.
>
> > > So for instance:
> > > @external legacySelectorA, legacySelectorB;
> > > .obfuscated .legacySelectorA {  }
>
> > > When I do this, the style: ".obfuscated .legacySelectorA" will simply
> > > be ignored and will not show up in the generated CSS.  All other
> > > styles that do not use an @external style appear fine in the CSS.
>
> > > There's no errors generated.
>
> > > I thought maybe I could only have one @external annotation in the CSS
> > > file so I moved all the external styles into one big annotation at the
> > > top of the file:
>
> > > @external abc, def, ghi, blah, blahblah, blahblahblah
>
> > > Putting them in one @external annotation at the top of the file
> > > generates errors so I'm assuming this should not be done.
>
> > > 2) How do I simply bundle a simple CSS file without obfuscating it?
>
> > > I thought I could simply create a CssResouce (without subclassing),
> > > and specify an annotation so that it's just treated as a static
> > > resource.
>
> > > Both the link (html) and stylesheet tag (in module descriptor) are
> > > deprecated according to the documentation.  I would like slowly
> > > transition CSS files to the new CssResource method without adding 50
> > > million @external annotations everywhere.  The styles are referenced
> > > all throughout our project as strings like addStyleName("my-style")
> > > and I don't want to break this functionality at the moment.
>
> > > 3) How can I have an "=" sign in a style?
>
> > > @if user.agent ie6 ie8 {
> > >         .my-style img { filter: alpha(opacity=20); } */} @elif user.agent 
> > > gecko gecko1_8 {
>
> > >         .my-style img { -moz-opacity: 0.2; }
>
> > > }
>
> > > The "=" sign in the IE specific string generates an error.
>
> > > --
>
> > > Finally, this isn't a question.  It's more of a general comment.  So
> > > far the experience using the CssResource has been pretty painful.
> > > Much of our CSS involves customizing the GXT library's stylesheet.
>
> > > So if you have a style like this:
> > > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-right
> > > span.x-tab-strip-text
> > > ...it quickly turns into annotation hell especially since I often have
> > > the same external styles referenced in two spots.  Here, we're
> > > slightly customizing the GXT tab panel adding three styles.
>
> > > @external .x-tab-strip-top, .x-tab-left
> > > .my-tab-panel-header .x-tab-strip-top .x-tab-left {
> > >         .. one CSS style
>
> > > }
>
> > > @external .x-tab-strip-top, .x-tab-strip-inner
> > > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-inner {
> > >         .. one more CSS style
>
> > > }
>
> > > �...@external .x-tab-strip-top, .x-tab-strip-active, .x-tab-strip-inner
> > > .my-tab-panel-header .x-tab-strip-top .x-tab-strip-active .x-tab-strip-
> > > inner {
> > >         .. one more CSS style
>
> > > }
>
> > > I wind up having more @external annotations all over the document than
> > > I do actual CSS code.
>
> > > 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Two generator questions

2010-03-20 Thread PhilBeaudoin
I'm trying to write my first GWT generator... I've gotten pretty far,
but I have the following questions:
1) Is there any way to see the generated class for debugging purposes?
For example, can I force GWT to produce the .java file for my
generated class (it did it once when I had an error, but I can't force
it to produce it every time.) Any other hints as to how to debug a
generated class?
2) I'd like to use GIN to inject objects in the constructor of the
generated class. I'm not quite sure if this works or how to make it
work. Any hints would be great!

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



Re: Two generator questions

2010-03-20 Thread PhilBeaudoin
Thanks Gal, it really helped!

I'm not quite sure I know how to "include a folder in my lookup
entries". Is this something I can do in Eclipse debugger?

The idea of using the injector directly didn't quite work, because I
need my generated class to be instanciated .asEagerSingleton(). If I
try calling GWT.create( MyGingector ) within the generated class I get
infinite recursion. If I instead try to assign the MyGingector
instance to some static variable, it doesn't work either because the
variable isn't initialized yet.

However, I've decided to rework my generated class to use method
injection instead of constructor injection and it seems to work very
well!

Cheers,

Philippe


On Mar 20, 7:31 pm, Gal Dolber  wrote:
> Ok,
>
> To view the generated class compile with "-gen /somepathonyourdisk", another
> tip to debug a generated class: include in your lookup entries the folder
> where the generated classes are and you will be able to step through the
> generated code.
>
> And to use gin into your generated class I didn't found a great solution,
> because you can inject an interface that is generated but gin just make a
> GWT.create(theinterface.class); and it wont inject into the generated class.
>
> This is what I did:
> Add an set-configuration-property into your module (define it first) and
> specify on it the location of your injector, then use directly the injector
> into your generated code. Like this:
>
>  value="com.some.gin.MyGinInjector" />
>
> Regards
>
> 2010/3/20 PhilBeaudoin 
>
>
>
> > I'm trying to write my first GWT generator... I've gotten pretty far,
> > but I have the following questions:
> > 1) Is there any way to see the generated class for debugging purposes?
> > For example, can I force GWT to produce the .java file for my
> > generated class (it did it once when I had an error, but I can't force
> > it to produce it every time.) Any other hints as to how to debug a
> > generated class?
> > 2) I'd like to use GIN to inject objects in the constructor of the
> > generated class. I'm not quite sure if this works or how to make it
> > work. Any hints would be great!
>
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP related question

2010-03-20 Thread PhilBeaudoin
In all the examples that I've seen this is in the client package, but
now that I think of it, it would make sense to have it in the shared
package. Maybe a GWT expert can answer us?

On Mar 20, 10:16 pm, Dhiren Bhatia  wrote:
> I narrowed it down to the interface that is the  'client side stub' of
> the servlet that receives the RPC calls. It makes sense because the
> servlet implements this interface. Is it best practice to move this
> interface to the shared package then?
>
> Thanks!
> Dhiren
>
> On Mar 19, 12:10 am, Alexander  wrote:
>
>
>
> > Are you really sure there are no shared classes in client?
>
> > On 18 March 2010 23:29, Dhiren Bhatia  wrote:
>
> > > gwt-servlet.jar is deployed.
>
> > > My question is about the client classes from my application. Do they
> > > need to be pushed to the servlet container? The app does not work
> > > without them but I don't see why they're needed on the server side.
>
> > > On Mar 18, 10:10 am, Fabio Kaminski  wrote:
> > > > You should deploy only gwt-servlet.jar in your Servlet container..
> > > > as you will need ate least to extends GWT's RemoteServiceServlet
> > > > wich will do all the rpc magic serialization and proper servlet 
> > > > treatment
> > > > for your service...
>
> > > > So normaly you use gwt-dev and gwt-user to build and compile..  and
> > > > gwt-servlet for service response..
>
> > > > Regards.
>
> > > > Fabio Kaminski
>
> > > > On Thu, Mar 18, 2010 at 1:53 PM, Dhiren Bhatia 
> > > wrote:
> > > > > So, this should mean that the client package does not need to get
> > > > > deployed to my Tomcat server, correct? I tried deleting the client
> > > > > package from the server side just to see what would happen and the app
> > > > > doesn't work which is why I'm confused.
>
> > > > > Thanks.
>
> > > > > On Mar 18, 9:48 am, PhilBeaudoin  wrote:
> > > > > > The View and Presenter participants in the MVP pattern are expected
> > > to
> > > > > > live on the client only. The Model objects are typically shared
> > > > > > between the client and the server.
>
> > > > > > If you look at your Project.gwt.xml file you will see:
> > > > > >         
> > > > > >         
> > > > > >         
>
> > > > > > This means all classes in package client and shared are compiled to
> > > > > > javascript.
>
> > > > > > Cheers,
>
> > > > > >     Philippe
>
> > > > > > On Mar 18, 9:25 am, Dhiren Bhatia  wrote:
>
> > > > > > > I'm curious about the container the 'Presenter' runs in. If I have
> > > an
> > > > > > > application that uses the MVP pattern on the UI side and makes RPC
> > > > > > > calls to a servlet (running in Tomcat), where does the presenter
> > > run?
> > > > > > > Does it get compiled to Javascript and run in the browser or is it
> > > > > > > running in Tomcat?
>
> > > > > > > Is there a document that explains exactly which pieces get 
> > > > > > > compiled
> > > > > > > into Javascript? Apologies if this has been asked already.
>
> > > > > > > Thanks,
> > > > > > > Dhiren
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > Groups
> > > > > "Google Web Toolkit" group.
> > > > > To post to this group, send email to
> > > google-web-tool...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > google-web-toolkit+unsubscr...@googlegroups.com > > > >  cr...@googlegroups.com> > > cr...@googlegroups.com>
> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > You received this message because you are subscribed to the Google Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > Regards,
> > Alexander

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Two generator questions

2010-03-21 Thread PhilBeaudoin
Yeah, well... Method injection didn't work either, the method just
never got called (as expected...)

I finally was able to make it work using the technique you proposed by
initializing the generated classes after the injector is created.

Just to give a bit more details to anybody else interested in this...

Here is how you define a configuration property in your
project.gwt.xml:
  
  

Here is how you access this property in your generator:
  String ginjectorClassName =
ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues().get(0);

Now if you want an injector in the source code you generate you do:
  writer.println( ginjectorClassName + " injector = GWT.create(" +
ginjectorClassName + ".class);"  );


Thanks again Gal. This is a neat trick!

   Philippe


On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
> Thanks Gal, it really helped!
>
> I'm not quite sure I know how to "include a folder in my lookup
> entries". Is this something I can do in Eclipse debugger?
>
> The idea of using the injector directly didn't quite work, because I
> need my generated class to be instanciated .asEagerSingleton(). If I
> try calling GWT.create( MyGingector ) within the generated class I get
> infinite recursion. If I instead try to assign the MyGingector
> instance to some static variable, it doesn't work either because the
> variable isn't initialized yet.
>
> However, I've decided to rework my generated class to use method
> injection instead of constructor injection and it seems to work very
> well!
>
> Cheers,
>
>     Philippe
>
> On Mar 20, 7:31 pm, Gal Dolber  wrote:
>
>
>
> > Ok,
>
> > To view the generated class compile with "-gen /somepathonyourdisk", another
> > tip to debug a generated class: include in your lookup entries the folder
> > where the generated classes are and you will be able to step through the
> > generated code.
>
> > And to use gin into your generated class I didn't found a great solution,
> > because you can inject an interface that is generated but gin just make a
> > GWT.create(theinterface.class); and it wont inject into the generated class.
>
> > This is what I did:
> > Add an set-configuration-property into your module (define it first) and
> > specify on it the location of your injector, then use directly the injector
> > into your generated code. Like this:
>
> >  > value="com.some.gin.MyGinInjector" />
>
> > Regards
>
> > 2010/3/20 PhilBeaudoin 
>
> > > I'm trying to write my first GWT generator... I've gotten pretty far,
> > > but I have the following questions:
> > > 1) Is there any way to see the generated class for debugging purposes?
> > > For example, can I force GWT to produce the .java file for my
> > > generated class (it did it once when I had an error, but I can't force
> > > it to produce it every time.) Any other hints as to how to debug a
> > > generated class?
> > > 2) I'd like to use GIN to inject objects in the constructor of the
> > > generated class. I'm not quite sure if this works or how to make it
> > > work. Any hints would be great!
>
> > > 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-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Two generator questions

2010-03-21 Thread PhilBeaudoin
One last update:
I don't think its a good idea to GWT.create() the ginjector multiple
times. I got rid of this by creating it once in a static field in my
entry point class, and then accessing that field within my generated
class. This brings me to another question:

To find the name of the entry point class, I had to create a
configuration property. Is there a way, within a generator, to access
the entry point class defined in the module:



On Mar 21, 1:01 am, PhilBeaudoin  wrote:
> Yeah, well... Method injection didn't work either, the method just
> never got called (as expected...)
>
> I finally was able to make it work using the technique you proposed by
> initializing the generated classes after the injector is created.
>
> Just to give a bit more details to anybody else interested in this...
>
> Here is how you define a configuration property in your
> project.gwt.xml:
>        valued="false" />
>        value="com.project.client.gin.MyGinjector" />
>
> Here is how you access this property in your generator:
>       String ginjectorClassName =
> ctx.getPropertyOracle().getConfigurationProperty("gin.injector").getValues( 
> ).get(0);
>
> Now if you want an injector in the source code you generate you do:
>       writer.println( ginjectorClassName + " injector = GWT.create(" +
> ginjectorClassName + ".class);"  );
>
> Thanks again Gal. This is a neat trick!
>
>    Philippe
>
> On Mar 20, 8:34 pm, PhilBeaudoin  wrote:
>
>
>
> > Thanks Gal, it really helped!
>
> > I'm not quite sure I know how to "include a folder in my lookup
> > entries". Is this something I can do in Eclipse debugger?
>
> > The idea of using the injector directly didn't quite work, because I
> > need my generated class to be instanciated .asEagerSingleton(). If I
> > try calling GWT.create( MyGingector ) within the generated class I get
> > infinite recursion. If I instead try to assign the MyGingector
> > instance to some static variable, it doesn't work either because the
> > variable isn't initialized yet.
>
> > However, I've decided to rework my generated class to use method
> > injection instead of constructor injection and it seems to work very
> > well!
>
> > Cheers,
>
> >     Philippe
>
> > On Mar 20, 7:31 pm, Gal Dolber  wrote:
>
> > > Ok,
>
> > > To view the generated class compile with "-gen /somepathonyourdisk", 
> > > another
> > > tip to debug a generated class: include in your lookup entries the folder
> > > where the generated classes are and you will be able to step through the
> > > generated code.
>
> > > And to use gin into your generated class I didn't found a great solution,
> > > because you can inject an interface that is generated but gin just make a
> > > GWT.create(theinterface.class); and it wont inject into the generated 
> > > class.
>
> > > This is what I did:
> > > Add an set-configuration-property into your module (define it first) and
> > > specify on it the location of your injector, then use directly the 
> > > injector
> > > into your generated code. Like this:
>
> > >  > > value="com.some.gin.MyGinInjector" />
>
> > > Regards
>
> > > 2010/3/20 PhilBeaudoin 
>
> > > > I'm trying to write my first GWT generator... I've gotten pretty far,
> > > > but I have the following questions:
> > > > 1) Is there any way to see the generated class for debugging purposes?
> > > > For example, can I force GWT to produce the .java file for my
> > > > generated class (it did it once when I had an error, but I can't force
> > > > it to produce it every time.) Any other hints as to how to debug a
> > > > generated class?
> > > > 2) I'd like to use GIN to inject objects in the constructor of the
> > > > generated class. I'm not quite sure if this works or how to make it
> > > > work. Any hints would be great!
>
> > > > 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-tool...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Internet Explorer 7 reloads on fragment change?

2010-03-26 Thread PhilBeaudoin
Thanks Thomas,

This seems to be exactly the problem I'm having. Although I have
absolutely no clue why the Hyperlinks are not "attached". The
Hyperlink is inside a Composide that I build using UiBinder. I take
care to call initWidget() This Hyperlink is then added to my tab panel
composite. Maybe this panel isn't attached to the DOM at that point,
but I don't think this should cause a problem? Any idea of what might
be going wrong?

Also, a quick question: How did you figure out that the hyperlinks
didn't sink the events? Which debugging tool are you using?

On Mar 26, 6:52 am, Thomas Broyer  wrote:
> On Mar 18, 8:27 pm, PhilBeaudoin  wrote:
>
> > If you want to see this yourself, go 
> > tohttp://filouguestbook.appspot.com/#!main
> > sign-in with a google account and click on the Settings link the the
> > top bar. Switch between the General and Accounts pages, the app will
> > reload. From the Accounts page, click on Settings in the top bar, this
> > will switch tab but not reload!
>
> I don't know how you added your Hyperlinks to your page, but they're
> not "attached" (their getElement() is added to the DOM, but events are
> not sunk).
> This means your Hyperlinks are actually just Anchors and you're
> hitting this 
> bug:http://code.google.com/p/google-web-toolkit/issues/detail?id=2152

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Internet Explorer 7 reloads on fragment change?

2010-03-26 Thread PhilBeaudoin
Bingo! Thanks to your help I figured it out. The container of the
Hyperlink composite was an HTMLPanel. I couldn't use
HTMLPanel.add(Widget, String) because I had no "id"ed div in which to
add the widget. So I did the insert at the element level :
 
tabPanel.getElement().insertBefore( newTab.asWidget().getElement(),
addBeforeElement );
I never realized that this bypassed some essential GWT code...

I solved the problem by making tabPanel a FlowPanel inside the
HTMLPanel and inserting the tab widgets inside that flow panel via
add(Widget, int) :
tabPanel.insert(newTab.asWidget(), beforeIndex);

This seems to work fine.

Re: Debugging tricks

Thanks a lot! I've been using Chrome Web Developer tools quite a bit,
but I didn't know enough about GWT's internal to look for __listener
or __eventBits. I'll watch out for these in the future.

Cheers,

Philippe

On Mar 26, 10:07 am, Thomas Broyer  wrote:
> On Mar 26, 5:42 pm, PhilBeaudoin  wrote:
>
> > Thanks Thomas,
>
> > This seems to be exactly the problem I'm having. Although I have
> > absolutely no clue why the Hyperlinks are not "attached". The
> > Hyperlink is inside a Composide that I build using UiBinder. I take
> > care to call initWidget() This Hyperlink is then added to my tab panel
> > composite. Maybe this panel isn't attached to the DOM at that point,
> > but I don't think this should cause a problem? Any idea of what might
> > be going wrong?
>
> How are you adding the Hyperlink to your Composite? (I mean, could you
> show the code? the one from inside the Composite, that takes an
> Hyperlink as input and "adds it" so it's visible to the user)
>
> > Also, a quick question: How did you figure out that the hyperlinks
> > didn't sink the events? Which debugging tool are you using?
>
> I was using Chrome, because I had an idea of what the problem might be
> (as I was aware of the linked bug), but I could have used Internet
> Explorer.
> Chrome's Web Developer tools have this wonderful thing that they're
> able to tell you whether a given object has event listeners (and of
> course, which ones), and in this case there wasn't any.
> I then looked for a __listener and/or __eventBits expando property,
> because that's how GWT "binds event handlers" (done in widget's
> onAttach) and there wasn't, confirming onAttach() wasn't called on the
> widget. This is a symptom of adding the "widget" by just adding its
> getElement() to the DOM, instead of adding it to a container widget
> (some Panel).

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-dispatch, gwt-presenter, mvp4g

2010-04-06 Thread PhilBeaudoin
I'll take this opportunity to shamelessly plug my own take on the MVP
architecture:
http://code.google.com/p/gwt-platform/

I started using gwt-presenter, but I ran into a number of problems
with code-splitting, lazy-loading and weakly-coupled nested
presenters. So I created GWTP, a fork of gwt-presenter with a slightly
different architecture. It still results in simple Presenter-View
classes, but introduces a nice annotation-based mechanism to build
proxy classes -- the key behind lazy-loading and code-splitting.

I'd love to get feedback on this, if you ever have some time to look
at the project.

On Mar 22, 9:50 am, Nathan Wells  wrote:
> Here's a copy of the current version on my blog:
>
> http://nathanwells.net/blog/?p=235
>
> On Mar 22, 9:17 am, Simon  wrote:
>
>
>
> > I'd love to read what you have done. Unfortunately, I do not have
> > Google Wave yet as it is not released and I cannot follow your link...
>
> > I guess I'm not the only person in this case ! :)
>
> > Do you have a link publicly available ?
>
> > On 22 mar, 16:10, Nathan Wells  wrote:
>
> > > I've just started designing something new for client-server
> > > communications:
>
> > >https://wave.google.com/wave/#restored:search:group%253Agoogle-web-to...
>
> > > I'd love to get feedback on the ideas I put down there.
>
> > > On Mar 21, 11:24 am, Jamie Gennis  wrote:
>
> > > > I'll take this opportunity to insert a shameless plug for
> > > > gwt-remote-action as an
> > > > alternative to gwt-dispatch.  The idea behind gwt-remote-action is that 
> > > > it
> > > > enables use of the command pattern using the same RPC interface as
> > > > traditional GWT RPC.  This means you don't have to build your app from 
> > > > the
> > > > ground up with the command pattern in mind, but rather you can just use
> > > > normal GWT RPC and then augment it later when you need caching,
> > > > transactions, undo, or any other command pattern goodness.
>
> > > > You can also check out
> > > > gwt-remote-action-extension
> > > > for
> > > > a library than enables the use of Gilead with gwt-remote-action as well 
> > > > as a
> > > > demo app.
>
> > > > Best,
> > > > Jamie
>
> > > > On Sun, Mar 21, 2010 at 8:35 AM, zggame  wrote:
> > > > > I second that idea.  I start to really understand thegwt-presenterby
> > > > > reading its code.  It is actually not that complicated and teach me
> > > > > some really nice lessons.  And you also see a few short-coming of it.
> > > > > It is open-source under BSD.  So you can do whatever to fit it for
> > > > > your purpose.
>
> > > > > On Feb 28, 5:58 pm, Geraldo Lopes  wrote:
> > > > > > Initiatives like gwt-dispatch andgwt-presenterare welcome.
> > > > > > Reading others code is a very good way to improve our skills.
> > > > > > Even if one don't adopt the library it can be very helpful.
>
> > > > > > Keep small (but useful) libraries river flow :)
>
> > > > > > Regards,
>
> > > > > > Geraldo
>
> > > > > > On 28 fev, 15:40, Ed  wrote:
>
> > > > > > > Be careful using many third party lib's which are more like hobby-
> > > > > > > projects and will not be updated when gwt will come out with a new
> > > > > > > version such that you can't make the switch to the new gwt 
> > > > > > > version
> > > > > > > I try to do everything myself and learn from others... I already 
> > > > > > > had a
> > > > > > > few times that I was using other frameworks and couldn't make the 
> > > > > > > gwt
> > > > > > > update when I wanted, but had to wait till all frameworks made the
> > > > > > > switch... or didn't made the switch at all. :(
>
> > > > > > > GWT is awesome, short learning curve for simple things, and makes 
> > > > > > > it
> > > > > > > very easy to create nice things which people then want to share 
> > > > > > > with
> > > > > > > others... So they drop it in a google code project and never look 
> > > > > > > back
> > > > > > > to it anymore
>
> > > > > > > Of course there are also very good lib's like smartgwt and gxt
> > > > > > > (before: mygwt)... The latter one cost a bit, but there for future
> > > > > > > proof and has a very nice MVC implementation with dispatcher
> > > > > > > integration that is well suited for more complex app's and is very
> > > > > > > lean and mean...
>
> > > > > > > Goodluck,
> > > > > > > Ed
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google 
> > > > > Groups
> > > > > "Google Web Toolkit" group.
> > > > > To post to this group, send email to 
> > > > > google-web-tool...@googlegroups.com.
> > > > > To unsubscribe from this group, send email to
> > > > > google-web-toolkit+unsubscr...@googlegroups.com > > > >  cr...@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 
"G

createForClass fail in javascript compiled version

2010-04-12 Thread PhilBeaudoin
Hi,

I'm using the new google-gin AsyncProvider to implement code splitting
in my GWT application. It works well in most situations, but I ran
into a strange issue recently which might hint at a problem in GWT
itself.

My app works well in development mode: I call
myAsyncProvider.get(myCallback) and the code makes it to the
onSuccess() method of my AsyncCallback eventually.

When I compile my app to javascript, however, the code makes it all
the way to myAsyncProvider.get() and beyond, but then neither my
onSuccess() nor my onFailure() is executed. I also get the following
javascript error (compiled with -style DETAILED):
Uncaught ReferenceError:
java_lang_Class_createForClass__Ljava_lang_String_2Ljava_lang_String_2Ljava
_lang_String_2Ljava_lang_Class_2Ljava_lang_Class_2 is not defined

I've pasted the entire generated javascript here:
  http://pastebin.com/iQ44u3bY
The error is on line 322.

I also posted the java files generated by google-gin and GWT there:
AsyncLoader1*.java: http://pastebin.com/b1tfWD9m
AsyncLoader2*.java: http://pastebin.com/7Jh5Rqvv
MyGinjectorImpl.java: http://pastebin.com/cyamcuKg

For info: It's AsyncProvider that fails. The
AsyncProvider works fine. Also, if I remove the
AsyncProvider then the
AsyncProvider works.

According to Peter Schmitt, "it almost looks as if some piece of code
is calling the GWT function createForClass[1] but can't find it. Maybe
an issue with GWT's code splitting?"

[1] 
http://www.google.com/codesearch/p?hl=en#MTQ26449crI/com/google/gwt/emul/java/lang/Class.java&q=createForClass&sa=N&cd=2&ct=rc


For reference, the original thread on the google-gin board:
http://groups.google.com/group/google-gin/browse_thread/thread/995db1ebccbc3104

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Looking for a good MVP framework

2010-05-13 Thread PhilBeaudoin
Thanks for all the kind words on GWTP.

Claude is right in saying that it looks like a hobby project,
essentially because it started as such! However, I would say it is
well on the way to maturity and, given the current level of
involvement of some of the members, I believe it will eventually turn
into a serious community-backed and community-maintained project. In
fact, I really wish anybody who's interested in building and
maintaining a robust MVP framework will consider joining the GWTP
developers.

Another plus for GWTP is that I am currently using it on two projects.
PuzzleBazar, that has been mentioned here, and another large
commercial webapp that decided to go with GWTP as their core
component. I'm acting as a consultant on this latest project, and I
believe it will guarantee that core GWTP development is "well funded"
for a while. I know that a number of other very serious projects are
using it, so there is definitely an incentive to keep the project.

Looking forward to seeing you use -- and maybe contribute to -- GWTP.

Cheers,

   Philippe

On May 13, 2:49 pm, Mike  wrote:
> > > > Greetings folks,
>
> > > > In order to avoid « reinventing the wheel », I'm looking for a good MVP 
> > > > (model-view-presenter) framework to use with GWT.
>
> I was in the same position as you about 2+ weeks ago -- but I've
> settled on GWT-Platform myself.
>
> I was using Objectify for datastore abstraction layer, and the guys
> that wrote GWT-Platform also use that library as well.
>
> I downloaded every sample and every jar for all the candidates you
> mentioned -- and none of them really worked "out of the box" -- except
> for GWT-Platform.
>
> And, if you're looking for a good set of examples, they've written
> PuzzleBazar -- and you can download that and see how they've used the
> framework to do various things.  I think that they've done a good job.
>
> Also, the messages produced by the GWT compiler are *very* informative
> as to what its complaining about (far and away the best of the ones I
> saw).
>
> The only ones you mentioned that I didn't look at closely were gwt-
> remote-action and handlebars (though I did have a quick look at
> handlebars).
>
> Cheers
> Mike
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP, gwt-presenter + UIBinder + Gin

2010-05-17 Thread PhilBeaudoin
I think the key is not to write your views into UiBinder but rather to
use one UiBinder file for each of your views. Then you make your
presenters embed one another in the desired fashion. That's what I
understand from:
http://code.google.com/webtoolkit/articles/mvp-architecture-2.html

Many examples of the gwt-platform project use UiBinder within an MVP
architecture, you might be interested to check them out:
http://code.google.com/p/gwt-platform

Cheers,

   Philippe

On May 16, 2:45 pm, Chris  wrote:
> Hi All
>
> I'd like to use UIBinder to layout my page which is made of several
> Views. I'm kind of confused as to how to do this...
>
> For example, I'd like to inject my views straight into the UIBinder
> context, so I extend the xml declaration to be:
>
>          xmlns:g='urn:import:com.google.gwt.user.client.ui'
> xmlns:step="urn:import:com.tyndalehouse.step.web.client.view">
>
> That gives me access to the View, and I can then use something like:
> 
>   
>         
>   
>   
> 
>
> where VersionSelectorView is one of my views. At the moment, I'm using
> Gin to inject the Presenter via the constructor, and setting it as a
> field, that is provided:
>
> @UiField (provided = true)
> VersionSelectorView versionSelector;
> ...
>
> @Inject
> public StepView(final VersionSelectorPresenter versionSelector) {
> this.versionSelector = versionSelector;
>
> }
>
> Now that's all very well... but what if the view above has many many
> composites that I want to use in the UIBinder declarative XML? Also it
> doesn't feel to be like it's best practice to inject the Presenter
> into the View. Surely, it shouldn't know about it all... And I should
> either be injecting is as VersionSelectorPresenter.Display or
> VersionSelectorView.
>
> However using gwt-dispatch, when I inject it like that, the View is
> provided, but it's not bound to any presenter...
>
> So basically, I'd like to know what the best practice is/would be?
> Should I be injecting all the providers into the main Presenter (in my
> case StepPresenter), and somehow setting them all onto the view? that
> makes a lot of setters, but at least I get rid of the presenters from
> the Views
>
> I read somewhere something about injecting providers for lazy
> initialisation. Sounds good, but I'm guessing I've still got lots of
> them to inject...
>
> Perhaps, that's not how I'm supposed to use UIBinder, but then I still
> seem to have a similar issue with the way to get lots of views
> injected into one Parent View.
>
> Any ideas anyone?
> Cheers
> Chris
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP + Places

2010-05-18 Thread PhilBeaudoin
If you're interested in hierarchical places and breadcrumbs (thanks to
Brendan Doherty), the feature is coming soon to GWTP, keep an eye on
this issue:
http://code.google.com/p/gwt-platform/issues/detail?id=88

Cheers,

   Philippe

On Apr 28, 6:49 am, Thomas Broyer  wrote:
> On Apr 28, 2:33 pm, Julio Faerman  wrote:
>
> > Hi,
>
> > I am trying to implement the "Places" abstraction over the history
> > service in my GWTMVPapp. I am finding it very hard to get it working
> > with "hierarchical" places ( token=/order/123/item/1 ), because i
> > would not like to redraw the entire screen ( container.clear() ) when
> > the place is changed to somewhere near ( token=/order/123/item/2 ),
> > unless that is required.
>
> In our "places" implementation, we have a HistoryMapper that maps
> between Place objects and their String representation (used as history
> tokens). Place objects generally implement or extend a base interface/
> class to allow "grouping" based on "instanceof". For instance, the
> ContactsListPlace and ContactDetailsPlace both extend the abstract
> ContactRelatedPlace. That way, the top-level controller/presenter
> works on "instanceof ContactRelatedPlace" to eventually switch to,
> say, the "Contacts" tab in a TabPanel; the presenter managing the
> "Contacts" tab then can work on the "instanceof ContactsListPlace" and
> "instanceof ContactDetailsPlace" to switch between the list and
> details widgets; and in case of "instanceof ContactDetailsPlace", the
> ContactDetailsPresenter is also updated so the current contact is
> eventually replaced with the one from the place (ContactDetailsPlace
> has a getContactId() accessor)
>
> Our previous implementation (before Ray came with the "Places" concept
> last year; and before we started usingMVP: everything was a
> Composite) worked on strings: split the token on the first "/" and
> work on the first part, then give the second part down to the
> appropriate widget, rince and repeat.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP Framework in GWT 2.1 M1 ?

2010-05-22 Thread PhilBeaudoin
>From what I understand GWT's MVP classes are designed with SpringRoo's
automatic code generation in mind. As such, they might be a little
confusing for those of us who learned MVP's from Ray Ryan's talk and
Google's mvp-architecture documents.

A gwt-platform user has given SpringRoo + GWT's MVP classes a try and
reported on it in the GWTP group (http://groups.google.com/group/gwt-
platform/browse_thread/thread/862cab91ccb28d40). He says that this
results in a lot of artifacts which are harder to understand than an
app built on GWTP.

On May 20, 12:29 pm, Jorel  wrote:
> I started using another mvp framework for GWT called mvp4g.
> So far I am quite happy with it. YMMV.
> It is hosted here:http://code.google.com/p/mvp4g/
>
> On May 20, 1:03 pm, metrixon  wrote:
>
> > I think, the whole MVP with GWT thing is actually inspired by the talk
> > given by Ray Ryan on last year's Google IO 
> > (seehttp://www.youtube.com/watch?v=PDuhR18-EdM).
> > Currently, there are implementations available that do provide an MVP
> > infrastructure and implement other patterns as well:
> > -http://code.google.com/p/gwt-presenter/
> > -http://code.google.com/p/gwt-dispatch/
> > -http://code.google.com/p/gwt-platform/
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Large scale application development and MVP -- Developing composite screens with a menu and main view

2010-06-07 Thread PhilBeaudoin
There are many ways to do this. I've found that sometimes it is useful
to use the event bus to reveal a hierarchy a presenters, each
presenter responsible for maintaining the view of a specific "slot":
left menu, main content, footer, etc.

Sometimes, a view is itself comprised of complex widgets that are
responsible of presenting a specific part of the model. In this case I
use composition and inject the subpresenters (which I call
PresenterWidget) in their main presenters.

Although I understand that you want to do this in plain GWT, I
encourage you to take a look at GWT-platform (http://code.google.com/p/
gwt-platform/) where both of the above approaches are implemented.
There are many examples. You'll probably want to take a look at nested
samples in http://code.google.com/p/gwt-platform/source/browse?repo=samples

Cheers,

Philippe

On Jun 5, 6:32 pm, Kevin  wrote:
> I am new to GWT, and I took a look through the "Large scale
> application development and MVP" tutorial, and I was wondering how to
> deal with a UI that contains distinct parts that are composited
> together. For example:
>
> * Application contains a menu on the left, a main view in the middle
> which can show several different screens, and a view on the bottom of
> the screen
>
> How should this be done? How should one wire the presenters together?
> Should this logic be in the app controller? The app controller already
> takes care of the transitions from one view to the next, so perhaps it
> can also take care of how the views should be composited? The issue I
> have with this is that this seems to be a presentation-specific
> detail, but there doesn't seem to be a clean way to put this logic
> elsewhere.
>
> Does anyone have any examples or something that describes how to
> approach this? I would prefer something that sticks to plain GWT, as I
> am learning GWT at the same time and "black-magic" APIs that hide the
> details from you will only confuse me :)
>
> 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP + UiBinder, thoughts?

2010-03-05 Thread PhilBeaudoin
Just a quick thought... If you wanted to make the Presenter-View
relationship bidirectional without having to inject it manually,
couldn't you have GIN inject a Provider
into the view? Then you just bind MyPresenter.DisplayHandlers to
MyPresenter.

On Feb 21, 11:33 am, ross  wrote:
> Hey all,
>
> I have been wrestling with this design pattern the past week or so on
> my application architecture.  I am eagerly awaiting to hear Google's
> stance onUiBinder+MVPpatterns but maybe we'll have to wait for I/O
> to find that out :)
>
> In the meantime I really appreciated this thread and I've gone with
> something very much along the lines of what Bryce mentioned with
> having the 'Execute' interface in the Presenter.  Having the 'Execute'
> interface defined in the View seemed too circular for me (and also the
> javac) :)
>
> Here's my code:
>
> -
> Presenter
> -
>
> public class MyPresenter implements Presenter {
>
>   public interface DisplayHandlers {
>     void onBackLabelClicked();
>   }
>
>   public interface Display {
>     void setDisplayHandlers(DisplayHandlers handlers);
>     Widget asWidget();
>   }
>
>  public MyPresenter(..., HandlerManager eventBus,
>       Display display) {
>     this.eventBus = eventBus;
>     this.display = display;
>   }
>
>   @Override
>   public Widget bind() {
>     display.setDisplayHandlers(new DisplayHandlers() {
>
>       @Override
>       public void onBackLabelClicked() {
>         // fire an event on the bus or whatever else you may fancy
>       }
>
>     });
>
>     return display.asWidget();
>   }
>
> }
>
> -
> View
> -
>
> public class ErrorView extends Composite implements
> ErrorPresenter.Display {
>
> @UiField
>   Label backLabel;
>
>   ErrorPresenter.DisplayHandlers handlers;
>
> }
>
> -
>
> hope this helps someone (only relevant code is shown)
>
> On Jan 29, 3:37 pm, bryce cottam  wrote:
>
>
>
> > Yes, I am using this pattern and liking it quite a bit right now.  I
> > feel it cleans up a lot of boiler-plate code.
> > Here is a sample application that demonstrates some of the design
> > patterns I'm using (including the Command Pattern for RPC calls):
>
> >http://www.resmarksystems.com/code/GwtSample.zip
>
> > It's pretty basic, and some things could be improved (like the use of
> > GIN/Guice and some more reflection based RPC dispatching on the
> > server), but I didn't go to great lengths to include that because the
> > main thing I wanted to demonstrate in this code was the use of the MVC
> > tweaks brought up in this thread.
>
> > I want to emphasize that it was thrown together for a friend in order
> > to demonstrate concepts and not as a tutorial walk through, it
> > includes stuff like rpc based login (which I don't suggest using).
> > Anyhow, I hope it helps demonstrate how I'm dispatching events.
>
> > as far as your usingUiBinder+MVPwithout any issues: I wouldn't say
> > your "missing" anything per se', it's just that I wanted something
> > cleaner than what I was seeing around the forums.  I don't like
> > returning HasText/HasClickHandler type interfaces from my view to my
> > presenter 'cause I think my display can be smarter than that without
> > embedding any business logic in it. I like making calls like
> > display.getName() rather than display.getNameBox().getText().  When I
> > do things that way, it makes it really easy to swap out my display
> > instances with simple beans and I don't have to much with any testing
> > frameworks like easymock or anything.  I've found it to be helpful.
>
> > cheers,
> > -bryce
>
> > On Fri, Jan 29, 2010 at 3:42 AM, Matt Read  wrote:
> > > Hi, could you possible re-cap on what problem this approach solves? I'm
> > > usingUIBinderwithmvp-presenter without inverting the dependencies in this
> > > way without any problems so I'm wondering what I'm missing.
> > > Thanks,
> > > Matt.
>
> > > 2010/1/29 István Szoboszlai 
>
> > >> Hello Bryce,
>
> > >> Are you using the approach you were describing in any project now with
> > >> success? If so it would be very appreciated if you could write some
> > >> sentences about your experiences.
> > >> I thing I like what you proposed, and I also think it is not a big
> > >> drawback that you have to inject the presenters 'execute' interface int 
> > >> he
> > >> view by hand.
>
> > >> So I think I will give a chance to this approach.
>
> > >> I'll write if I have any conclusion (good, or bad).
>
> > >> Best - Istvan
>
> > >> On Wed, Dec 30, 2009 at 1:55 AM, bryce cottam  wrote:
>
> > >>> very similar, but I think I either wanted to keep the Execute
> > >>> interface on the Presenter (since the View is already dependent on a
> > >>> nested interface from the Presenter) or having it on a top level
> > >>> package.  Come to think of it I think I tried to defi

Re: MVP with EventBus question

2010-06-24 Thread PhilBeaudoin
In gwt-platform (http://code.google.com/p/gwt-platform/) we use gin to
inject the EventBus to whoever needs it. The framework is designed
such that only the presenters communicate on it.

In your example, the gwt-platform way would be to create a
PresenterWidget for WidgetA and another for WidgetB. This way they act
like widgets, but have a nice testable Presenter layer that can be
used to decouple interactions via the EventBus. If your custom
presenter for WidgetA has too many of these "addClickHandler" methods,
you can break things down further, getting an entire hierarchy of
PresenterWidget.

Hope it helps,

   Philippe

On Jun 23, 5:13 pm, Paul Schwarz  wrote:
> I looked into that, and (unless I'm wrong), I think that
> @UiField(provided=true) will cause the UiBinder to look in the .ui.xml
> file for argument to satisfy Foo. In my case I am trying to "inject"
> an EventBus into the widget, not a visual element.
>
> On Jun 24, 2:18 am, Filipe Sousa  wrote:> I believe you can 
> use @UiField(provided=true):
>
> > @UiField(provided=true)  Foo foo
>
> > @Inject
> > UserDashboard(Foo foo) {
> >   this.foo = foo
>
> > }
>
> > On Jun 23, 10:03 pm, Paul Schwarz  wrote:
>
> > > To answer my own question:
>
> > > 1. Gin can be used to inject the EventBus into the View as well as the
> > > Presenter, so now our View has a reference to the EventBus
>
> > > 2. In order to give the EventBus to the Widgets "owned" by the View
> > > those Widgets will require a constructor argument which will be the
> > > EventBus instance. UiBinder will fail if it doesn't find a default
> > > constructor, except that they have provided some nice work arounds.
> > > The appropriate workaround in this case is to provide a widget
> > > factory. Notice the use of @UiFactory in the example below:
>
> > > public class UserDashboard extends Composite {
> > >   interface MyUiBinder extends UiBinder;
> > >   private static final MyUiBinder uiBinder =
> > > GWT.create(MyUiBinder.class);
>
> > >   private final String[] teamNames;
>
> > >   public UserDashboard(String... teamNames) {
> > >     this.teamNames = teamNames;
> > >     initWidget(uiBinder.createAndBindUi(this));
> > >   }
>
> > >   /** Used by MyUiBinder to instantiate CricketScores */
> > >   @UiFactory CricketScores makeCricketScores() { // method name is
> > > insignificant
> > >     return new CricketScores(teamNames);
> > >   }
>
> > > }
>
> > > On Jun 23, 11:04 pm, Paul Schwarz  wrote:
>
> > > > Working with the MVP pattern, or more like the VP pattern at this
> > > > point, I have:
> > > > MainPagePresenter
> > > > MainPageView
> > > > WidgetA
> > > > WidgetB
>
> > > > ... so imagine that WidgetA and WidgetB will be attached to
> > > > MainPageView.
>
> > > > Using Gin I have an EventBus injected into the MainPagePresenter. I
> > > > can then add click handlers that place an event on the EventBus from
> > > > within my MainPagePresenter. This might look like:
>
> > > > getMainPageView().getSendButton().addClickHandler(new ClickHandler(){
> > > >   public void onClick(ClickEvent event) {
> > > >     eventBus.fireEvent(new SendEvent());
> > > >   }
>
> > > > }
>
> > > > But now let's say that WidgetA and WidgetB actually have quite a few
> > > > user interactions, you'll end up with a lot of methods that look like
> > > > the one above sitting in your Presenter class.
> > > > 1. Is this correct?
> > > > Or
> > > > 2. should the Presenter hand the reference to the EventBus through to
> > > > its View, who may even hand it through to the Widgets so that they can
> > > > talk directly to the EventBus?
>
> > > > If the second option is the better option from an architecture/
> > > > separation of concerns point of view, then what is the best way to
> > > > hand the reference over to the View in such a way that keeps the
> > > > coupling between Presenter and View as loose as possible?
>
> > > > Note, currently my Presenter defines a View interface which my View
> > > > implements, so the coupling is loose but based upon this interface.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP with EventBus question

2010-06-26 Thread PhilBeaudoin
I answer to this earlier, but it somehow got gobbled by Google Groups.
If you see it around, let me know. ;)

Re: Complex widgets and PresenterWidgets

You're exactly right. PresenterWidgets are GWTP's way of doing a
complex widget with a nice testable class. Your PresenterWidget has
all the widget's logic and gets injected with the EventBus (and the
dispatcher if needed, or other services). The view is the complex
widget itself.

Re: Presenters vs PresenterWidget

Presenters are singletons. They are totally decoupled from one another
and communicate only via the Event bus. They can be organized
hierarchically, but the hierarchical structure is very loose: parent's
don't know their children in advance, and child don't know their
parent. The hierarchy gets sets up entirely via the EventBus. The
lowest-level Presenters of this hierarchy (so-called leaf Presenters)
need to be attached to a Place. They are (lazily) instanciated
whenever their history token is invoked, and at that point they set-up
the hierarchy.

PresenterWidget, on the other hand, are not singletons. Also, they are
meant to be injected in their parent Presenter (a bit like you would
expect complex widgets to contain one another). They are never
attached to a place: they get setup when their containing presenter is
set-up. Their parent presenter can communicate with them through
method invocation if desired, it does not have to use the event bus.
Really, PresenterWidget can be thought of as "widget with a testable
layer".

A typical complex page in a GWTP app might look something like:

PresenterA (splits the page in a header and a main area )
|
+-- HeaderPresenter
|
+-- MainContentPresenter
 |
 +--> ClientListPresenterWidget
  |
  +--> CliendDetailPopupPresenterWidget

Where:
 "--" denotes an indirect relationship (via the event bus)
 "-->" denotes an owned relationship (typically injected with GIN)

There are some examples of the sort on the gwt-platform website, you
may want to check them out.

Cheers,

   Philippe






On Jun 26, 4:08 am, Paul Schwarz  wrote:
> Ok, I didn't implement it this way, but would prefer to.
>
> At the moment I have 3 mother-sized presenters + views. These have
> EventBus injected into them by gwt-platform. Then the widgets that are
> "owned" by this view are then constructed manually. I think I can
> still test them atomically but I'm not sure... the concepts are still
> a little hazy, learning UiBinder, Mocking and GWTP at the same time
> causes some head spin.
>
> My question now is when is it appropriate to make a new Presenter? and
> how does a PresenterWidget compare? I'm confused because in GWTP a
> presenter has a Place, so it seems like Presenters are "virtual" pages
> in an ajax app. But now you're saying to make Presenters for all my
> widgets individually... or is this where PresenterWidget comes in?
>
> At the moment things are scruffy because my presenter gets an EventBus
> injected, but then has to bubble it up through @UiFactory constructors
> into the owned Widgets.
>
> On Jun 24, 5:35 pm, PhilBeaudoin  wrote:
>
>
>
> > In gwt-platform (http://code.google.com/p/gwt-platform/) we use gin to
> > inject the EventBus to whoever needs it. The framework is designed
> > such that only the presenters communicate on it.
>
> > In your example, the gwt-platform way would be to create a
> > PresenterWidget for WidgetA and another for WidgetB. This way they act
> > like widgets, but have a nice testable Presenter layer that can be
> > used to decouple interactions via the EventBus. If your custom
> > presenter for WidgetA has too many of these "addClickHandler" methods,
> > you can break things down further, getting an entire hierarchy of
> > PresenterWidget.
>
> > Hope it helps,
>
> >    Philippe
>
> > On Jun 23, 5:13 pm, Paul Schwarz  wrote:
>
> > > I looked into that, and (unless I'm wrong), I think that
> > > @UiField(provided=true) will cause the UiBinder to look in the .ui.xml
> > > file for argument to satisfy Foo. In my case I am trying to "inject"
> > > an EventBus into the widget, not a visual element.
>
> > > On Jun 24, 2:18 am, Filipe Sousa  wrote:> I believe you 
> > > can use @UiField(provided=true):
>
> > > > @UiField(provided=true)  Foo foo
>
> > > > @Inject
> > > > UserDashboard(Foo foo) {
> > > >   this.foo = foo
>
> > > > }
>
> > > > On Jun 23, 10:03 pm, Paul Schwarz  wrote:
>
> > > > > To answer my own question:
>
> > > > > 1. Gin can be used to inject the EventBus into the View as well as the
>

Re: how to use GIN ?

2010-06-28 Thread PhilBeaudoin
Thomas gives very good advice, although I personally never use the
@ImplementedBy annotation (not entirely sure why...).

To complement his answer, if you're interested in saving the
"addClickHandler" call you may want to take a look at UiBinder the
@UiHandler annotation.

On Jun 27, 3:41 pm, Thomas Broyer  wrote:
> On 27 juin, 19:39, yves  wrote:
>
>
>
>
>
> > Olivier,
>
> > Thanks for the link.
>
> > If I try to summarize my problem : Which are the conventions that are
> > implicitly used by GIN to bind classes ?
>
> > I've already seen gwt-presenter, but it didn't helped me to understand
> > how to transform my code to such code  :
>
> > public class AppModule extends AbstractGinModule {
>
> >         @Override
> >         protected void configure() {
>
> >                 bind(EventBus.class).to(DefaultEventBus.class);
>
> > bind(MainPresenter.Display.class).to(MainWidget.class);
>
> > bind(MenuPresenter.Display.class).to(MenuWidget.class);
>
> > bind(IssueEditPresenter.Display.class).to(IssueEditWidget.class);
>
> > bind(IssueDisplayPresenter.Display.class).to(IssueDisplayWidget.class);
>
> If you control all of those classes, and they only exist as an
> interface+implementation class for testing purpose, then I'd rather
> annotate the interfaces with @ImplementedBy, e.g.
>   �...@implementedby(MainWidget.class)
>    public interface Display { ... }
> That way, GIN will automatically use MainWidget as if you wrote the
> bind().to(); and in case you want to inject some other implementation
> (e.g. in some complex tests), you can use bind().to() without risking
> a "duplicate binding".
>
>
>
>
>
> > Is there any doc explaining what is behind the scene with all these
> > "bind().to()" calls ?
>
> > In my example, if I write something like
>
> > bind(SearchPresenter.Display.class).to(someWidget.class);
>
> > is it equivalent to
>
> >                 display = d;
> >                 display.getSearchButton().addClickHandler(new
> > ClickHandler() {
>
> >                         @Override
> >                         public void onClick(ClickEvent event) {
> >                                 doSearch(event);
> >                         }
>
> >                 });
>
> > and how to tell GIN that I need to call doSearch() ?
>
> No! GIN is only about dependency injection, i.e. it saves you the
> "new", and nothing else.
> With the above bind().to() and an @Inject annotation on the
> bind(Display) method, then when GIN is asked to instantiate a
> SearchPresenter (i.e. when you do not write the "new" yourself) it'll
> automatically instantiate a SomeWidget and call bind() with it as an
> argument (and when instantiating the SomeWidget, it'll automatically
> instantiate the required dependencies and inject them to @Inject-
> annotated constructor, fields and methods).
>
> Maybe you should look for Guice tutorials to better understand what
> dependency injection is, and how to configure it with Guice.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to simplify your GwtEvent classes and have fun doing it!

2010-06-28 Thread PhilBeaudoin
Another simple trick I use when I need multiple events that have the
same payload and handler methods, is to not declare the TYPE as a
static member of the event. Instead I declare it elsewhere (anywhere
really) and pass it to the event's constructor. Really simple, but can
dramatically cut down on boilerplate.

On Jun 27, 9:05 am, Thomas Broyer  wrote:
> A few comments
>
> On 27 juin, 13:53, Paul Schwarz  wrote:
>
> > When using the EventBus, for each event type in your system you will
> > create a Class (a GwtEvent) and an Interface (the corresponding
> > EventHandler).
>
> > It is a bit of a nuisance maintaining two java files for each event.
>
> Not necessarily 2 files. As you show below, it's becoming common usage
> to declare the handler as an inner/nested interface of the event
> class.
>
> > So I propose to simplify it by having one abstract event class and
> > then ONLY ONE class for each event, instead of two. Note that your
> > actual usage of your new style event class stays the same, so there is
> > no refactoring required there.
>
> That's not totally accurate, see below.
>
> > ___
> > 1.
> > In your com.company.project.shared package create this file:
>
> > import com.google.gwt.event.shared.EventHandler;
> > import com.google.gwt.event.shared.GwtEvent;
>
> > public abstract class AbstractEvent
> >         , H extends AbstractEvent.AbstractHandler>
> > extends GwtEvent {
>
> >         public static interface AbstractHandler extends EventHandler {
> >                 void handleEvent(E event);
> >         }
>
> The problem with such a generic interface is that you can't implement
> 2 of them on the same class. For instance, in my presenters I
> generally create an inner Handlers class implementing all event
> handler interfaces I need:
> class MyPresenter {
>     private class Handlers implements
> PlaceChangeRequestedEvent.Handler, PlaceChangeEvent.Handler,
>         EmployeeRecordChanged.Handler {
>        public void onPlaceChange(PlaceChangeEvent event) { ... }
>        public void onPlaceChangeRequested(PlaceChangedRequestedEvent
> event) { ... }
>        public void onEmployeeChanged(EmployeeRecordChanged event)
> { ... }
>    }
>
>   �...@inject
>    public MyPresenter(HandlerManager eventBus) {
>       Handlers handlers = new Handlers();
>       eventBus.addHandler(PlaceChangeRequestedEvent.TYPE, handlers);
>       eventBus.addHandler(PlaceChangeEvent.TYPE, handlers);
>       eventBus.addHandler(EmployeeRecordChanged.TYPE, handlers);
>    }
>
> }
>
> Using a generic handleEvent method makes this impossible. Well, not
> impossible, but cumbersome, as you have to do some if/else with
> instanceof in your handler:
>    public void handleEvent(AbstractEvent event) {
>       if (event instanceof CalendarChangeRequestEvent) {
>          CalendarChangeRequestEvent ccre =
> (CalendarChangeRequestEvent) event;
>          ...
>       } else if (event instanceof EmployeeRecordChange) {
>          EmployeeRecordChange erc = (EmployeeRecordChange) event;
>          ...
>       }
>    }
>
> I'm not saying this is a show blocker, but it can then imply some
> refactoring, which is not what you "promised" above ;-)
>
> I'm not saying this is a show blocker, but I nonetheless suspect it
> could be an issue, otherwise GwtEvent would have gone this way from
> the beginning, or the RecordChangedEvent recently introduced.
> I know some people complained about not being able to implement two
> ValueChangeHandler on the same class (in this case you'd check the
> event's source to "disambiguate" the events).
>
> Personally I'm using a single inner class implementing all handlers
> instead of many anonymous handler classes, because I know a class has
> a cost in the output JavaScript cost. I can't tell "how many" it costs
> and whether the cost is negligible, and I know it costs less in each
> GWT release due to compiler optimizations (-XdisableClassMetadata, GWT
> 2.1 introduces some clinit pruning AFAICT), but still, it doesn't make
> my code less readable (not particularly more readable either) and
> implies only one class initialization and instantiation instead of, in
> the above example code, three.
> See for 
> instance:http://code.google.com/p/google-web-toolkit/wiki/ClassSetupAndInstant...http://code.google.com/p/google-web-toolkit/wiki/AggressiveClinitOpti...http://code.google.com/p/google-web-toolkit/wiki/ClinitOptimization
>
> All in all, I don't think it's really worth it, you're only saving 6
> lines of code (3 for the handler declaration, and 3 for the
> dispatchEvent implementation) with no substantial gain as a result.
>
>
>
>
>
> >         @SuppressWarnings("unchecked")
> >         @Override
> >         protected void dispatch(H handler) {
> >                 handler.handleEvent((E) this);
> >         }
>
> > }
>
> > ___
> > 2.
> > This is what an actual event class will look like. I think you'll
> > agree that th

Re: MVP with EventBus question

2010-06-29 Thread PhilBeaudoin
main screen should be accessible at /#main and your settings
> > at /#settings.
>
> > And lastly, your main page a header that is constantly present at the
> > top of the page, but then in the main area it is like the "Expenses"
> > example. i.e. it is a table of rows of data, but if you click on one
> > of the rows it slides across to reveal more data for that row you
> > clicked. So the main table would be available only at /#main, but
> > then /#main;item=20 (or should it be /#item;id=20?) would slide across
> > to reveal the details page for item 20. Then hitting /#main would
> > slide you back to the main table.
>
> > You can see from this example that there are a variety of Places, page
> > states and widgets usages. Would you be so kind as to explain where
> > you would apply Presenters, PresenterWidgets, etc and how you should
> > handle the history tokens in order to give this app coherent "state"
> > based on history, but optimal usage of GWTP in terms of correct MVP
> > patterns (which then assist greatly with JUnit testing!).
>
> > On Jun 27, 7:48 am, PhilBeaudoin  wrote:
>
> > > I answer to this earlier, but it somehow got gobbled by Google Groups.
> > > If you see it around, let me know. ;)
>
> > > Re: Complex widgets and PresenterWidgets
>
> > > You're exactly right. PresenterWidgets are GWTP's way of doing a
> > > complex widget with a nice testable class. Your PresenterWidget has
> > > all the widget's logic and gets injected with the EventBus (and the
> > > dispatcher if needed, or other services). The view is the complex
> > > widget itself.
>
> > > Re: Presenters vs PresenterWidget
>
> > > Presenters are singletons. They are totally decoupled from one another
> > > and communicate only via the Event bus. They can be organized
> > > hierarchically, but the hierarchical structure is very loose: parent's
> > > don't know their children in advance, and child don't know their
> > > parent. The hierarchy gets sets up entirely via the EventBus. The
> > > lowest-level Presenters of this hierarchy (so-called leaf Presenters)
> > > need to be attached to a Place. They are (lazily) instanciated
> > > whenever their history token is invoked, and at that point they set-up
> > > the hierarchy.
>
> > > PresenterWidget, on the other hand, are not singletons. Also, they are
> > > meant to be injected in their parent Presenter (a bit like you would
> > > expect complex widgets to contain one another). They are never
> > > attached to a place: they get setup when their containing presenter is
> > > set-up. Their parent presenter can communicate with them through
> > > method invocation if desired, it does not have to use the event bus.
> > > Really, PresenterWidget can be thought of as "widget with a testable
> > > layer".
>
> > > A typical complex page in a GWTP app might look something like:
>
> > > PresenterA (splits the page in a header and a main area )
> > > |
> > > +-- HeaderPresenter
> > > |
> > > +-- MainContentPresenter
> > >      |
> > >      +--> ClientListPresenterWidget
> > >           |
> > >           +--> CliendDetailPopupPresenterWidget
>
> > > Where:
> > >  "--" denotes an indirect relationship (via the event bus)
> > >  "-->" denotes an owned relationship (typically injected with GIN)
>
> > > There are some examples of the sort on the gwt-platform website, you
> > > may want to check them out.
>
> > > Cheers,
>
> > >    Philippe
>
> > > On Jun 26, 4:08 am, Paul Schwarz  wrote:
>
> > > > Ok, I didn't implement it this way, but would prefer to.
>
> > > > At the moment I have 3 mother-sized presenters + views. These have
> > > > EventBus injected into them by gwt-platform. Then the widgets that are
> > > > "owned" by this view are then constructed manually. I think I can
> > > > still test them atomically but I'm not sure... the concepts are still
> > > > a little hazy, learning UiBinder, Mocking and GWTP at the same time
> > > > causes some head spin.
>
> > > > My question now is when is it appropriate to make a new Presenter? and
> > > > how does a PresenterWidget compare? I'm confused because in GWTP a
> > > > presenter has a Place, so it seems like Presenters are "virtual" pages
> > > > in an ajax

Re: Anyone finds Contacts2 confusing?

2010-06-29 Thread PhilBeaudoin
Relying on a good MVP framework can dramatically cut down on
boilerplate. Personally, I'm now building all my apps with MVP
(without Roo for now) and find that the result is much more pleasing
to look at and develop than any GWT code I've written before. I would
say this is true even for single-person projects. Also, relying on a
standard framework could make your app compatible with annotation
processors like the new gwt-mvp-apt (http://www.draconianoverlord.com/
2010/06/28/gwt-mpv-apt-1.1.html), which could let you cut down even
more on boilerplate!

On Jun 29, 8:45 am, Thomas Broyer  wrote:
> On 29 juin, 14:27, Sean  wrote:
>
> > I think in general MVP is always going to be very wordy. There's a ton
> > of abstraction going on so that several developers can work on the
> > same app all at different levels and as long as the interfaces remain
> > intact, they won't step on each other's toes. I'm a single developer
> > working on my own website so I figured MVP wasn't a good fit for me
> > because I won't gain anything from the benefits of MVP.
>
> MVP allows you to unit-test the "P", which I think is worth it even
> for small projects (well, if you have somewhat "complex enough"
> interactions that they would benefit from being unit-tested, but
> that's quickyl the case even in small projects)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Creating new Presenter/View in a Presenter

2010-07-04 Thread PhilBeaudoin
> You mentioned you intend to write a big app, so you might be tempted
> at some time to go for one of the available libraries/frameworks for
> MVP, which might force you to rewrite a lot of code to be ported to
> 2.1.

Regarding the GWT-platform MVP framework, rest assured that it will be
ported to GWT 2.1 as soon as it gets out of the door. So you will not
have anything to rewrite and you can directly benefit from all the
extra features of GWTP.

Cheers,

Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: mvp for application with menutree

2010-07-04 Thread PhilBeaudoin
Hi Jeroen,

You might be interested in some of the examples included with GWT-
platform. The SimpleNestedExample (http://code.google.com/p/gwt-
platform/wiki/SimpleNestedSample) uses some of the features required
to build an MVP app with a navigation pane. My little side project
PuzzleBazar also has a more involved layout that uses a
DockLayoutPanel and a left menu bar. (http://code.google.com/p/
puzzlebazar/)

To answer your question: I would make the menu item either an
Hyperlink or an Anchor with an onClick revealing a new history token.
This way, navigating by clicking the menu triggers browser navigation
so you benefit from the browser history. This mechanism is very well
handled by GWTP and is the one demonstrated in the examples mentioned
above. Good luck!

Cheers,

   Philippe

On Jul 4, 1:12 am, Jeroen Wolff  wrote:
> Hi, i'm just starting with GWT. First is started to build my app without MVP 
> and now i see why they advise to use the MVP pattern and the eventbus.
>
> I'm building an application with a DockLayout with on the west a treemenu and 
> in the center a form. Which form to display depends on the selected menu item.
>
> How kan i replace presenters (the different forms) in the center of the main 
> DockLayout. Via an event?
>
> And in the menu i want submenu items and those will select a (Dock)panel 
> inside the center form pan.
>
> The screen layout is like this (screen-layout.png):
>
>  screen-layout.png
> 37KViewDownload
>
>
>
> Is a menu click an event on the bus? How can the application controller 
> replace the needed presenter inside the main docklayout?
>
> Thanks for all suggestions,
>
> Regards,
>
> Jeroen Wolff

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Have one of the edge widget of a DockLayoutPanel overflow into the center

2010-07-07 Thread PhilBeaudoin
I use a DockLayoutPanel to split my screen in a left navigation column
and a center area. My problem is that the app skinning requires that a
selected tab in the navigation column "overwrite" a 1 pixel wide
column of the central area. Is there a way to setup my DockLayoutPanel
to do this?

(Cross-posted to Stack Overflow.)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: concerns on 2.1 MVP approach

2010-07-09 Thread PhilBeaudoin
I found the following overview interesting too:
http://www.over-look.com/site/index.php/documentation/techblog/item/gwt-2-1-tutorial-1-mvp-the-model
The DTO model described there seems a little involved. If I understand
correctly, there is a client-side and server-side version of the DTO
for each of your model objects. The role of the latter seems to be to
support JDO/JPA. I have recently moved away from JDO and am a very
happy user of Objectify. As a consequence, both my server (objectify)
and my client (gwt-platform) are type-agnostic when it comes to model
objets. So another question I have:
* Does using GWT 2.1 MVP model forces me to annotate all my domain
objects with @DataTransferObject and have them inherit from Record?

Cheers,

Philippe

On Jul 9, 2:31 am, "marius.andreiana" 
wrote:
> Hi GWT developers,
>
> There are some concerns on 2.1 MVP approach, which have been raised
> herehttp://groups.google.com/group/google-web-toolkit/browse_thread/threa...
> and 
> herehttp://groups.google.com/group/gwt-platform/browse_thread/thread/862c...
>
> To summarize, here are some quotes:
> * It's extremely fast to build an initial scaffold (CRUD for all
> entities), but I'm not sure how easy it is to customize it for real
> world usage
> * When skimming the generated sources I saw A LOT of artifacts, which
> I don't feel comfortable with because it means that although
> "officially" my code is not coupled with Roo, if I were to drop it I
> would have to manage all these generated artifacts myself.
> * This expenses example is a nightmare to follow.  The bindings/
> wiring  of all the pieces both client and server is nuts.
> * In M2, things have been cleaned up a bit
>
> I'm just trying to make sure the final MVP implementation will be
> usable without Roo and without automatic code generation, and will be
> at least as easy to use and understand 
> ashttp://code.google.com/p/gwt-platform/
> . Otherwise, should it be left as a separate project rather than
> default GWT approach?
> What do others, more knowledgeable persons than me, think?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: concerns on 2.1 MVP approach

2010-07-12 Thread PhilBeaudoin
Following an off-group discussion with Marius, he suggested that I
comment back on this thread regarding the fear of many gwt-platform
users and developers that the GWT MVP approach is too tightly linked
to SpringRoo and the idea that it can generate a lot of boilerplate
automatically. Do you think this apprehension is grounded, or that
GWT's MVP can lead to lean code even when written manually?

Cheers,

   Philippe

On Jul 9, 1:25 pm, Philippe Beaudoin 
wrote:
> Thanks Thomas,
>
> I'm glad to hear that... It seems like some of these could be
> integrated in gwt-platform apps (i.e. Cell-based widgets, maybe even
> the RequestFactory). I wish I had more time to look into this.
>
>    Philippe
>
>
>
> On Fri, Jul 9, 2010 at 1:12 PM, Thomas Broyer  wrote:
>
> > On 9 juil, 11:31, "marius.andreiana" 
> > wrote:
> >> Hi GWT developers,
>
> >> There are some concerns on 2.1MVPapproach, which have been raised
> >> herehttp://groups.google.com/group/google-web-toolkit/browse_thread/threa...
> >> and 
> >> herehttp://groups.google.com/group/gwt-platform/browse_thread/thread/862c...
>
> >> To summarize, here are some quotes:
> >> * It's extremely fast to build an initial scaffold (CRUD for all
> >> entities), but I'm not sure how easy it is to customize it for real
> >> world usage
> >> * When skimming the generated sources I saw A LOT of artifacts, which
> >> I don't feel comfortable with because it means that although
> >> "officially" my code is not coupled with Roo, if I were to drop it I
> >> would have to manage all these generated artifacts myself.
> >> * This expenses example is a nightmare to follow.  The bindings/
> >> wiring  of all the pieces both client and server is nuts.
> >> * In M2, things have been cleaned up a bit
>
> >> I'm just trying to make sure the finalMVPimplementation will be
> >> usable without Roo and without automatic code generation, and will be
> >> at least as easy to use and understand 
> >> ashttp://code.google.com/p/gwt-platform/
> >> . Otherwise, should it be left as a separate project rather than
> >> default GWT approach?
> >> What do others, more knowledgeable persons than me, think?
>
> > I really do not approach the different features of 2.1 as a whole
> > "MVP" set of things: there's
> >  - RequestFactory and ValueStore (I don't think ValueStore has any
> > real use besides RequestFactory, though I'd be happy to be proved
> > wrong) for a record-oriented client-server communication;
> >  - Cell-based widgets for efficient data-backed lists, trees and
> > tables
> >  - PlaceController as typed layer over History (objects rather than
> > strings, even though it's not yet plumbed to History, which at least
> > proves it can be used without it)
> >  - ActivityManager as an "application controller" (to use the term
> > from the GWT tutorials) on top of PlaceController
> >  - and on top of that, GWT provides some base activities plumbed with
> > RequestFactory
> >  - and finally, though it's not documented at all, EditorSupport which
> > works with UiBinder in a view to generate "data-binding code" (as far
> > as I understood)
>
> > You're free to use any of them independently of the others.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Image setUrl and setResources IE8 JavaScriptException

2010-07-12 Thread PhilBeaudoin
I've encountered the problem and entered this as an issue in the
tracker:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5114

Cheers,

Philippe

On Jul 11, 2:51 am, Sven  wrote:
> Hi Stefan,
>
> > I did not encounter such a situation, yet. However, to my knowledge
> > IE8 has an limit on data-url of 32KB which are used by GWT
> > (url(data:...)).
> > Probably one gif is smaller than the limit but the other is NOT.
>
> that seems to be the cause. However, only one out of four images in
> the resoucebundle is (slightly) larger than 32k, the others are
> smaller and still not displayed.
>
> > For debugging just compile with "output style: detailed". This gives
> > you an idea of the position in your java code.
>
> Actually, I check the browser version and use setUrl() in case that it
> is IE 8. Using the resource bundle works for other browsers (including
> IE 7, but maybe I need to check).
>
> Thanks,
> Sven

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP Problem when implementing the presenter as singleton

2010-07-13 Thread PhilBeaudoin
How do you instantiate and populate your view? Is it fully created
before the presenter constructor is called?

For my part, I use GIN and the gwt-platform mechanism which has an
onBind() method that is invoked automatically after all the relevant
objects are constructed. The onBind() method is called only once
unless you manually unbind() the presenter.

It could also be totally unrelated, though. I had a similar behavior
at some point when I manipulated widget's elements (via getElement) a
bit too liberally.

Hope it helps,

Philippe


On Jul 12, 9:38 am, crojay78  wrote:
> Hi,
>
> I have a problem with my mvp project.
>
> I do the binding in the constructor of each presenter, every presenter
> is implemented as a singleton. I do that because otherwise I
> discovered that the binding to the buttons, textboxes etc will be
> established each time I use the presenter and so i had duplicated
> actions. Now the bind method will be called only once like excpected
> but when I click a button in my view there no action, its like the
> binding to my buttons does not exist? Does anyone has an advise for
> me? I do not see the issue? Or is it not possible to do that in gwt ?
>
> Thanks
> Best regards

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Passing data between modules - MVP architecture

2010-07-13 Thread PhilBeaudoin
You can easily use non-serializable structures to initialize a
presenter in gwt-platform by passing them through an event. This is
even easier to do with the new @ProxyEvent support. Check this thread
for details:
http://groups.google.com/group/gwt-platform/browse_thread/thread/814c50311fc011ae/46106729810d7ebf?lnk=gst&q=proxyevent#46106729810d7ebf

Cheers,

Philippe

On Jul 13, 1:10 am, grandanat  wrote:
> Communicating between modules directly is also a solution, but not so
> applicable in my case. As i said i have a application Controller that
> handles history, initialize and keep track of opened presenters. I
> could get rid of this app controller and replace it with some place
> handler mechanism from gwt platform or mvp4g libraries. I tried them
> but they were not exactly for my needs. For example u can pass
> parameters to a new place but they have to be serializable.
>
> But regarding those two approaches, which one is better. I have some
> performance problems with my application. Target device has very low
> hardware resources and is moving pretty slow. Initially i was using
> gxt library but it was to slow and i get rid of it. Now i'm using pure
> gwt + a custom gwt table (inherited from incubator). But still is very
> slow.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Share user input data within MVP + Lady_Gaga

2010-07-20 Thread PhilBeaudoin
Another approach that wasn't mentioned but that I use quite frequently
is to use the history and pass the information as parameters in the
history token. This is made really easy in frameworks like gwt-
presenter and gwt-platform and has a number of advantages provided the
parameter is serializable (and small enough). For example, it could
let the user bookmark the detail page of "Lady_Gaga". A bit trickier
when the presenter is a dialog box, but totally doable.

On Jul 20, 11:34 am, Mikael Couzic  wrote:
> Well, I pretty much agree with Eric. I believe the event should'nt
> depend on the listeners, rather it should be defined in consideration
> of the presenter that fires it. The attributes stored in the event are
> the ones that make sense in its own context (that helps a lot I know
> ^^).
> In your registration example, I'd fire a RegistrationSubmittedEvent
> that holds all the details of the registration. No need to create a
> data object, your event is your data object. However, you can
> instantiate model objects in the presenter and hold these objects in
> the event instead of duplicating instantiation code all over the
> listeners. But in that case, be careful, your model objects are shared
> and shouldn't be edited (consider making them immutable).
>
> I hope that helps !
>
> On 20 juil, 18:07, mk  wrote:
>
>
>
> > In case future presenter 3q requires a specific information which is
> > not sent in the old event thrown by presenter 1.
> > Than in future, we have to add that specific information in the event
> > thrown by presenter 1 ..  right ?
>
> > I mean information passed in the event is limited by what is required
> > by listening presenters?.
>
> > For eg a registration view may have different textboxes for first
> > name, address etc and the intial event may only be thrown with the
> > information that "submit button is clicked". And later on for future
> > presenter 3q we may have to add first name in the event thrown by
> > presenter 1.
>
> > Do you create event in the first place with all the information
> > available to accomodate all future presenters?
> > Do you create a "Value object" to pass this heavy weight information
> > from one presenter to another?
>
> > Thanks in advPlz respond
>
> > On Jul 20, 8:21 am, Eric  wrote:
>
> > > On Jul 19, 9:04 pm, mk  wrote:
>
> > > > Thanks a lot.
>
> > > > Now if there are three DIFFERENT presenters (say 2a,2b,2c) listening
> > > > event from 1st presenter.
> > > > Than do 1st presenter has to create event with all the appro. values
> > > > required by 2a,2b,2c presenters?
>
> > > In fact, you shouldn't be thinking about presenters 2a, 2b, or 2c
> > > when writing presenter 1.  Presenter 1 should just fire change
> > > events when its data changes.  Presenters 2a, 2b, 2c, and future
> > > presenters 3q and 7f should simply add event handlers to
> > > presenter 1 and pick out the information they need.
>
> > > Eric

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Release 0.3 of gwt-platform

2010-07-21 Thread PhilBeaudoin
I just wanted to announce that release 0.3 of the gwt-platform MVP
framework is now available at http://gwtplatform.com

It sports a number of cool new features including hierarchical history
tokens (for breadcrumbs) and a simple annotation-based syntax for
binding events to your proxies rather than your presenters.

The framework is growing in popularity, but we always welcome new
user's comments and proposals. And if you have any questions, I'm sure
you'll find the community over there to be very helpful.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Internet Explorer load standard.css after my CssResource

2010-07-21 Thread PhilBeaudoin
I want to override default styling for my dialog box, but I also want
to rely on CssResource and spriting. The way I do this is to define
@external styles in my CssResource .css file. For example:

@external .gwt-DialogBox, .Caption;
@sprite .gwt-DialogBox .Caption {
  gwt-image: 'dialogCaption';
  padding: 0px 4px 0px 18px;
  line-height: 39px;
  cursor: default;
  border-width: 0;
  color: #fff;
}

It works well under Chrome and FF but fails in IE. When looking at the
DOM it's clear that GWT's standard.css is loaded after the styles
defined in my CssResource and therefore overrides them. I believe it
might be related to:
http://code.google.com/p/google-web-toolkit/issues/detail?id=4464

Is this supposed to be supported? If not, what's the best workaround
for the moment?

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



Re: GWT app development in teams

2010-07-22 Thread PhilBeaudoin
If it's a new project and you're not tied to a specific backend, you
could could consider deploying on AppEngine. This has been very
efficient for our team where every developer works remotely. AppEngine
offers a standardized built-in environment right in eclipse so
everybody can test locally with good confidence that the behavior will
be the same on the deployed version. We also use continuous deployment
to a (free) AppEngine account, our continuous integration solution is
TeamCity with a relatively simple ant script.

Other practices we use and I would recommend:
- DVCS (we use mercurial hosted on bitbucket)
- Use a highly decoupled architecture, consider an MVP framework. (we
use gwt-platform)
- Heavily unit test (we use JUnit4, mockito)
- Use DI to simplify the two above (we use GIN and Guice)
- Use integration testing (we're still experimenting tools in this
area)
- Asynchronous code reviews (rietveld works really well for us)
- Use UiBinder so that you can easily port HTML mockups to GWT.
- Find a good tool to monitor your dev process (we use AgileZen)

Cheers,

Philippe

On Jul 22, 8:59 am, Uberto Barbini  wrote:
> Hi Ben,
>
> we're working in 10 people on a big gwt project.
> Some people work in office, some remotely.
> I think the problem in your scenario is
>
> > My situation: I'm developing and debugging locally, then deploy
> > the .war file manually on my tomcat server.
>
> everything should be done automatically either by maven or by an ant task.
>
> Then after the commit we have a CI server (hudson) that run tests and
> deploy it in a preprod env.
> All the debug is done locally.
> We have 2 main scripts, one for run in hosted mode and another for run
> on jetty. CI server deploy it on a Jboss configured like in
> production.
>
> hope this can help you.
>
> cheers
>
> Uberto
>
>
>
> On Thu, Jul 22, 2010 at 2:14 PM, Ben  wrote:
> > Hello all
>
> > I'm looking for best practices in developing GWT apps. Let's assume we
> > are 3-5 programmers working on a fairly big GWT app.
> > I could not find any straightforward information on this. Maybe
> > because it's absolutely clear for most developers or maybe there are
> > just too many possible solutions.
>
> > I know that this is not just a GWT specific question.
>
> > Anyways, back to our scenario. Let's assume its an GWT app with a
> > database behind, and using JAVA in the backend. Everything is working
> > on Linux basis.
>
> > My situation: I'm developing and debugging locally, then deploy
> > the .war file manually on my tomcat server. This works fine when
> > working alone. Now, a couple of friends want to join in. The whole
> > thing gets complex. What setup (e.g. server, software) would you use
> > to handle such a scenario?
>
> > Here are a couple thoughts I ran into:
>
> > 1. Should each developer develop and debug locally (sharing files via
> > subversion) ? There is a big down-side on this. Each developer needs
> > to do the server configuration in order to keep the app running
> > locally. Is there an alternative?
>
> > 2. How can one add server-side debug ability to the test server? On
> > the test server runs the app in hosted mode. How can errors, warnings
> > be stored and outputted to the developer? Is there a software or do
> > you work with error logs?
>
> > 3. How can one export the files from a test server to a production
> > server? Is there any software which supports such function?
>
> > I'm programming for quite a while now, but I don't have any
> > experiences in programming together with other developers. So,
> > basically I would love to know anything how you guys develop GWT apps
> > in teams.
>
> > Please let me know if I shall be more precise.
>
> > Thanks for your tips!
>
> > benjamin
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CSS in UIBinder or separate file?

2010-07-22 Thread PhilBeaudoin
Just to complement the answers here... I've found the new spriting
mechanism of GWT (@sprite) to be really simple and useful.
Unfortunately, it doesn't work for UiBinder-embedded CSS styles.
Therefore, I rely on an external CssResource for all my styles that
need spriting.

On Jul 22, 8:43 am, Sekhar  wrote:
> Yes, separate out the common stuff into a CSS (or more, as necessary)
> and put as much of the specific CSS as possible into the XML file.
> Below is an example that shows this setup and its power. Note that
> each UiBinder XML treats the definitions in the common file (color1
> and .roundCorners in this case) as if they're local. In fact, even
> auto-complete works to identify .roundCorners even though it isn't
> defined locally - very cool.
>
> E.g., here's the common file.
>
> Project.css:
> ...
> @def color1 #33;
> ...
> .roundCorners {
>    ...
>
> }
>
> Then, in each custom UiBinder XML, do this:
>
> 
>    .input {
>       color: color1;
>    }
> 
> ...
> ... styleName="{style.input}" ...
> ... styleName="{style.roundCorners}" ...
> ...
>
> On Jul 21, 5:18 pm, David Vree  wrote:
>
>
>
> > If I understand you correctly, I can put the CSS that pertains
> > directly to the UIBinder there...and the more general stuff I put in
> > the CSS fileand they'll both get picked up?  I assume here that
> > the stuff in the UIBinder XML file has precendence?
>
> > On Jul 21, 6:50 pm, Sekhar  wrote:
>
> > > Having the CSS inside XML makes it WAY more modular and convenient to
> > > tweak the UI. When I started, the common file was small, but as the
> > > project grew it became unmanageable, forcing me to switch to CSS in
> > > XML. I'm now a happy camper. You can pool common elements (e.g.,
> > > globals like colors, etc.) and source it in your different style
> > > blocks.
>
> > > I don't believe it's possible to use sprites in the XML however, since
> > > the CSS file and the bundle need to work in pairs as I understand. I
> > > really hope I'm wrong on this, could someone confirm one way or the
> > > other?
>
> > > On Jul 21, 2:21 pm, David Vree  wrote:
>
> > > > I'm new to UI Binder and see that it is possible to set CSS styles
> > > > within the binder file.  I've always understood a best practice to be
> > > > to separate these out into a single CSS file.  Why (or when) would I
> > > > put CSS in the UIBinder XML 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: CSS in UIBinder or separate file?

2010-07-22 Thread PhilBeaudoin
Wow! That's good to know Thomas, thanks... I'll bring things over to
my UiBinder file.

On Jul 22, 12:34 pm, Thomas Broyer  wrote:
> On 22 juil, 18:48, PhilBeaudoin  wrote:
>
> > Just to complement the answers here... I've found the new spriting
> > mechanism of GWT (@sprite) to be really simple and useful.
> > Unfortunately, it doesn't work for UiBinder-embedded CSS styles.
> > Therefore, I rely on an external CssResource for all my styles that
> > need spriting.
>
> It definitely works!
> You have to create your ImageResource using  though, just
> like your CssResource is created implicitly with . You can
> use DataResource too, using , useful to link to GIFs for IE6,
> for instance.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Internet Explorer load standard.css after my CssResource

2010-07-22 Thread PhilBeaudoin
Thanks Christian, excellent idea!

   Philippe

On Jul 21, 3:49 pm, Christian Goudreau 
wrote:
> Use stylePrimaryName ex:
> .mesy-MainMenu {
>        color: #424242;
>        font-size: 13px;
>        cursor: pointer;
>
> }
>
> @external gwt-MenuItem;
> .mesy-MainMenu .gwt-MenuItem {
>        color: #424242;
>        font-size: 13px;
>        vertical-align: bottom;
>
> }
>
> @external gwt-MenuItem-selected;
> .mesy-MainMenu .gwt-MenuItem-selected {
>          color: #682203;
>
> }
>
> and in ui.xml
> 
>                        Nos
> produits
>                         stylePrimaryName="{res.style.mesySeparator}"> src="{res.sepMenu.getURL}"/>
>                        À
> propos
>                         stylePrimaryName="{res.style.mesySeparator}"> src="{res.sepMenu.getURL}"/>
>                        La
> livraison
>                         stylePrimaryName="{res.style.mesySeparator}"> src="{res.sepMenu.getURL}"/>
>                        Nous
> rejoindre
>                         stylePrimaryName="{res.style.mesySeparator}"> src="{res.sepMenu.getURL}"/>
>                        FAQ
>                
>
> Cheers,
>
> On Wed, Jul 21, 2010 at 6:37 PM, PhilBeaudoin
> wrote:
>
>
>
>
>
> > I want to override default styling for my dialog box, but I also want
> > to rely on CssResource and spriting. The way I do this is to define
> > @external styles in my CssResource .css file. For example:
>
> > @external .gwt-DialogBox, .Caption;
> > @sprite .gwt-DialogBox .Caption {
> >  gwt-image: 'dialogCaption';
> >  padding: 0px 4px 0px 18px;
> >  line-height: 39px;
> >  cursor: default;
> >  border-width: 0;
> >  color: #fff;
> > }
>
> > It works well under Chrome and FF but fails in IE. When looking at the
> > DOM it's clear that GWT's standard.css is loaded after the styles
> > defined in my CssResource and therefore overrides them. I believe it
> > might be related to:
> >http://code.google.com/p/google-web-toolkit/issues/detail?id=4464
>
> > Is this supposed to be supported? If not, what's the best workaround
> > for the moment?
>
> > 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-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Christian Goudreau

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How do I set the border around elements in a DockLayoutPanel?

2010-08-14 Thread PhilBeaudoin
I haven't tried this, but you could try to put a LayoutPanel in each
the DockLayoutPanel side you want to style, then style that
LayoutPanel and add any other widget inside this LayoutPanel.

On Aug 13, 11:52 am, cokol  wrote:
> then do the same - use the decoratorpanel as container for elements
> where you want to have corners, u might also want to create a
> composite having decoratorpanel wrapping elements...
>
> On 13 Aug., 19:07, Greg Dougherty  wrote:
>
>
>
> > Thanks, but it's not the panel I want to decorate, it's the elements
> > within the panel (i.e. I want to put a box around Center).
>
> > On Aug 13, 6:08 am, cokol  wrote:
>
> > > wrap you panel into DecoratorPanel then you can use 9box round corners
>
> > > On 12 Aug., 20:50, Greg Dougherty  wrote:
>
> > > > With a DockPanel I just create a CSS style, and apply it to the
> > > > Panel.  I did that with a DockLayoutPanel, and nothing seemed to
> > > > happen.  I searched the archives of this group for CSS and
> > > > DockLayoutPanel, and the concolusion I came to is that CSS doesn't
> > > > work with DLPs.  If that's not correct, I'd love to hear it, and see
> > > > an example of how to do it correctly.
>
> > > > Presumably the people writing GWT actually test the features they put
> > > > in it.  Given the paucity of example code, this belief has to remain
> > > > merely an assumption. :-(
>
> > > > Greg
>
> > > > On Aug 12, 12:59 pm, "dane.molotok"  wrote:
>
> > > > > How did you do it with a DockPanel? Wouldn't you want to style the
> > > > > elements you've placed in the panel? So it shouldn't matter if it's a
> > > > > DockPanel or a DockLayoutPanel.
>
> > > > > On Aug 12, 12:09 pm, Greg Dougherty 
> > > > > wrote:
>
> > > > > > The topic pretty much says it all.  I know how to do this for a
> > > > > > DockPanel.  How do I do it for a DockLayoutPanel?
>
> > > > > > Yes, I know, "use uibinder".  That doesn't work when you're building
> > > > > > things grammatically, which is what I'm doing.
>
> > > > > > BTW, why don't the Showcase application use ANY *LayoutPanels?  I
> > > > > > thought they were supposed to be the preferred way to do things, no?
>
> > > > > > Greg

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT eat your own dogfood ? Future of GWT ?

2010-08-26 Thread PhilBeaudoin
On Aug 26, 7:06 am, Ed  wrote:
> > This is easy to do... I even like more the old widgets then the new Cell
> > widget for css customization.
>
> Did you try it ?
> Because it's hard, and in many cases, espcially with dependent styles
> not possible!
> Have a look as this issue and the related 
> topic...:http://code.google.com/p/google-web-toolkit/issues/detail?id=4903
>
> I would love to hear how you do it?

Personally, I did it simply by copying the standard theme CSS into my
CssResource's CSS and marking all the styles as @external. I was able
to style dialog boxes and plenty of other widgets using @Sprite and
other advanced features of CssResources. Never encountered a problem
with dependent styles.


For the rest of your email, I just want to say that I entirely
disagree. I really like what the GWT team is doing and how the
framework is progressing. Keep up the good work guys!

   Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What are some of the most valuable frameworks in your project?

2010-08-28 Thread PhilBeaudoin
Client-side: Gin + GWTP
Server-side: Guice + Objectify + GWTP

On Aug 28, 8:10 am, Thomas Broyer  wrote:
> On 28 août, 07:08, jocke eriksson  wrote:
>
> > Gin :) love it
>
> +1
> GIN, and nothing else:http://code.google.com/p/google-gin
>
> I just started a series of articles on GWT 2.1 Places to get you
> started with the concepts and APIs (second article to be published
> hopefully this week-end, third one will be about activities and will
> be written... as soon as I find enough time! ;-) hopefully next 
> week)http://tbroyer.posterous.com
>
> But the best doc currently is the set of design docs you can find in
> Wave (you must be a member of the GWT-Contributors google group to see
> them, search for tag:gwt and/or tag:bindery)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What are the benefits of using a MVP Framework?

2010-08-30 Thread PhilBeaudoin
In my opinion, using an MVP framework is yet another way to benefit
from the knowledge gathered by countless of your peers working on
similar problems. One key benefit of gwt-platform, for example, is to
crystallize the community around a specific implementation. I'm sure
GWTP users can tell you how great it is to post a problem to the forum
and get 3 answers within an hour.

So here is why I think you should go with a framework:
- It reduces boilerplate by introducing time-tested abstractions and
using tools like GWT code generators or annotation processors ;
- It reduces low level bugs by increasing the size of your pool of
testers ;
- It gives you access to features that would be long to develop
otherwise ;
- It drives you towards good design through it's documentation and
examples ;
- It helps you find your way around and resolve your problems through
its community ;
And something that many GWTP users seem to enjoy:
- It let's you contribute back and add features you like in the
project, helping many others in the process.

Waiting for GWT 2.1 classes can be an option, but even according to
Thomas Boyer, who has been investigating these thoroughly, even these
classes are meant to be extended through third party frameworks. I
enjoin you to read his blog posts:
http://tbroyer.posterous.com/gwt-21-places
http://tbroyer.posterous.com/gwt-21-places-part-ii

And the following discussion on the GWTP forum:
http://groups.google.com/group/gwt-platform/browse_thread/thread/4c00e59dc139ccdf

Hope it helps. And remember: "Good programmers write good code; great
programmers steal great code." ;)

Cheers,

Philippe


On Aug 30, 12:28 pm, Gal Dolber  wrote:
> Hope this won't sound too bad: why don't you hand-write dependency injection
> on every project?
>
> 2010/8/30 Falcon 
>
>
>
>
>
> > Gal, Jambi was asking why you would use an MVP framework instead of
> > just doing it the way described in the MVP tutorial on the GWT site.
>
> > Jambi, I don't have a great answer for you as I'm new to all of this
> > myself, but I'd imagine it's to make your life easier and to handle
> > more things automatically for you. When you're doing an MVP app, you
> > find yourself writing a lot of similar code over and over again, but
> > it can be difficult to figure out how to abstract some of that out;
> > there's just an awful lot of boilerplate that goes along with getting
> > MVP working. I think the frameworks are intended to mitigate that
> > somewhat.
>
> > I will probably wait for GWT's built-in 2.1 stuff as well and just
> > "roll my own" until then, but it might not be bad to start with one of
> > the frameworks and migrate from that once 2.1 is out. Someone with
> > more experience can probably answer that better than I.
>
> > On Aug 30, 1:56 pm, Gal Dolber  wrote:
> > > It makes unit-testing easier. Thats it.
> > > Without mvp you need to use GwtTestCase for all your client side tests,
> > and
> > > it isn't the fastest experience.
>
> > > 2010/8/30 Jambi 
>
> > > > Hey guys,
>
> > > > i´m asking myself these days what´s the benefit of using a MVP
> > > > Framework like GWTP (never realy used it because i´m very new to the
> > > > whole MVP architecture) instead of writing your MVP app like it´s
> > > > described on the google code page? Is it a lot easier and more
> > > > comfortable? What´s the point of using a MVP framework at all, since it
> > > > ´s "just" a design pattern? Isn´t there a good MVP integration coming
> > > > in GWT 2.1 so that it´s not realy worth it to start using those
> > > > frameworks or am I completely wrong?
>
> > > > thanks, Michael
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > Groups
> > > > "Google Web Toolkit" group.
> > > > To post to this group, send email to
> > google-web-tool...@googlegroups.com.
> > > > To unsubscribe from this group, send email to
> > > > google-web-toolkit+unsubscr...@googlegroups.com > > >  cr...@googlegroups.com>
> >  > nsubscr...@googlegroups.com>
>
> > > > .
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > > --
> > > Guit: Elegant, beautiful, modular and *production ready* gwt
> > applications.
>
> > >http://code.google.com/p/guit/
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.co

Release 0.4 of gwt-platform

2010-09-10 Thread PhilBeaudoin
We just released version 0.4 of the gwt-platform MVP framework, you
can get it from http://gwtplatform.com

New features include automatic event and action generation via
annotation processors, a new mechanism for delayed reveal of
presenters, simplified unit testing, and many other improvements and
bug fixes.

The number of projects that rely on gwt-platform is constantly
increasing. As a result, many different people contributed code in
this latest release. I wish to extend my most sincere thanks to
everyone who helped. The success of GWTP is largely due to its great
developer community!

If you're interested to see a project build with gwt-platform (and
running on AppEngine), check out the beta of BookedIN:
  https://booked-in.appspot.com
  user: d...@bookedin.net
  pass: demo

Cheers!

   Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Development Mode performance with Chrome

2010-09-16 Thread PhilBeaudoin
I echo these thoughts. Chrome is easily my favorite browser for
everything but testing my GWT apps in dev mode.

On Sep 16, 6:04 am, Sean  wrote:
> I'm not sure if this deserves it's own post either, but I can't stand
> using Chrome in dev mode because when Debugging Chrome constantly
> informs me that the plugin has stopped responding and do I want to
> kill it. Is there anyway to say Don't Tell Me Again for the rest of
> this page's session? Or for this address? Something?
>
> On Sep 15, 8:33 pm, Michael Kelley
>
>
>
>  wrote:
> > I have a WebGL application as well that is very slow in development
> > mode.  Serialization takes minutes in development mode while it takes
> > seconds in compiled mode.
>
> > On Sep 15, 9:13 am, "e...@2010"  wrote:
>
> > > I would like to echo the sentiment of this request and in a similar
> > > vein (and maybe this deserves a separate post) there is also an issue
> > > with the performance of Chrome in compiled mode in the following
> > > scenario:
>
> > > I am using WebGL and when creating very large Float32Arrays (of maybe
> > > 90,000 elements) it takes an exceptionally long time. I am creating
> > > only a few of these large arrays and it is instantaneous in Firefox
> > > (less than two seconds as I would expect) but takes 8 minutes(!) in
> > > the latest version of Chrome (and all previous versions). One thing
> > > that I observe during these 8 minutes is that the page fault rate
> > > (Windows XP) is about 160,000 page faults per second (for the entire 8
> > > minutes) for the Chrome process and the VMSize is going up and down
> > > all the time (varying from say 40MB to 50MB) instead of growing
> > > monotonically. It certainly seems to be some kind of O(n*n) problem
> > > and maybe even the garbage collector could be running as each element
> > > of the array is allocated? I don't know.
>
> > > Any ideas?
>
> > > Thanks, Ed
>
> > > On Sep 15, 6:34 am, Brian  wrote:
>
> > > > Can Chrome be made faster in development mode?
>
> > > > I use Chrome as my default browser as I really like the development
> > > > tools, but it's slow with gwt development mode.  On a table cell,
> > > > there's a click handler.  The click handler displays a popup built
> > > > with UIBinder.  In development mode with Chrome (v 7.0.517.5), it
> > > > takes approx 3 seconds from click to seeing the popup.  With Firefox
> > > > (3.5.11) it's 'almost' instant -- fast enough anyway that it's not a
> > > > performance issue.
>
> > > > In Web Mode with everything compiled, Chrome is super fast again, no
> > > > issues at all.  The perf loss is only in Dev mode.
>
> > > > Any ideas?  Should I switch over to the production branch of chrome
> > > > (and thus lose speed tracer)?
>
> > > > -Brian

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT-Platform with GWT 2.1

2010-09-30 Thread PhilBeaudoin
One good place to start are Thomas Broyer article on 2.1 MVP in case
you haven't read them already:
http://tbroyer.posterous.com/gwt-21-places
http://tbroyer.posterous.com/gwt-21-places-part-ii
http://tbroyer.posterous.com/gwt-21-activities
http://tbroyer.posterous.com/gwt-21-activities-nesting-yagni

I have never tried writing a complete app using 2.1 MVP classes, so my
analysis here is mostly based on the above articles and the javadoc.
As a result, I'm pretty sure there are some mistakes and I'd be more
than happy to listen to corrections from people who have used the 2.1
MVP clases.

If you don't have the time to read what follows my conclusion is that:
- 2.1 MVP is closer to the metal and will need you to write more
code ;
- 2.1 MVP takes the stance that presenter hierarchies are not
desirable, GWTP takes the opposite stance ;
- GWTP MVP's have more features out-of-the-box ;
- 2.1 MVP are still meant to sit behind a 3rd party tool, i.e.
SpringRoo or (eventually) GWTP.

1) Place mechanism

GWTP tries to make places really easy. A simple annotation is often
all you need to get your presenter to respond to a place. If you need
parameters your parse them in your presenter's prepareFromRequest()
method. This handles the 95% use case in a few lines of code. For the
exceptional situations where you want to do something else than reveal
a presenter on a place request (reveal non-nested presenters, trigger
an action, ...), you will have to go through the event bus.

GWTP shadows each of your presenter with an automatically generated
proxy (hurray for GWT's generators!). This is a light weight class
that listens on the event bus even before the presenter has been
instantiated. As a result GWTP's will always lazily load your
presenter. An annotation also makes it trivial to have your presenter
sit behind a GWT code splitting point. As a bonus, this proxy is the
perfect place for your presenter to listen to events that may be of
interest to him before it's instantiated.

In GWT 2.1, places are a subsystem entirely decoupled from the MVP
layer. You connect them via the ActivityManager and ActivityMapper,
which lets you lazily load or code split your presenters. The
ActivityManager and ActivityMapper are not generated for you however,
you have to maintain them manually. If you want your presenter to
listen to other events before it's instantiated, then you will
probably also have to create a proxy manually (or accept that your
presenter is not lazily instantiated).

Some features are offered by both framework (i.e. user confirmation
before navigation), but GWTP places offers more features out-of-the-
box:
- Gatekeepers makes it very easy to implement a right management
mechanism client-side. For example, you can make a presenter
accessible only to the admin, another one only to logged in users,
etc.
- Hierarchical places make it easy to implement breadcrumbs or a "back
to what I was doing before" link

2) Presenters (Called activities in 2.1)

GWTP offers two different concepts: Presenters, which are singletons
and PresenterWidget which can be non-singleton. These can be nested in
one another, offering a powerful set of cascading lifecycle hooks that
you can override: onBind, onReveal, onReset, onHide and onUnbind.
These are cascading in the sense that a call to onHide on a parent
presenter will cause onHide to be called on the child presenters. It
makes it easy to organize your app logically.

This ability to nest presenters doesn't imply higher coupling since
the nesting is entirely done via the event bus. A parent presenter
does not know who is child are until they are connected and vice-
versa. This makes it very easy to reorganize your app layout, either
dynamically or based on the configuration. For example, you can make a
different hierarchical layout for your mobile version.

Activities in 2.1 takes the stance that presenter nesting is not
required. This means, for one thing, that you will have to think in
advance as to how you want to split your screen in display regions.
Modifying the layout within one presenter means you have to modify the
global screen layout. This also means that you cannot get cascading
effects: you will have to manually stop all the presenters that need
to go away when you navigate.

For me, this last point is the most important turn off. In my
experience, building reusable components in the form of
PresenterWidgets (widgets with a nice separation between logic and
view) is really useful. In GWT 2.1 you would have to do these
manually, and to manually hook them to the lifecycle methods of your
presenter (mayStop, onStart, onStop). I'm sure users of 2.1 MVP have
found a solution to this -- or maybe it's just a question of
approaching the problem differently.

* In conclusion

It looks to me, and I remember hearing Thomas saying something to that
effect, that GWT 2.1 MVP classes are still meant to sit behind a third
party tool, be it SpringRoo or (eventually) GWTP. In their current
for

Re: GWT-Platform with GWT 2.1

2010-09-30 Thread PhilBeaudoin
Also, the following discussion will likely be of interest to you:
http://groups.google.com/group/gwt-platform/browse_thread/thread/4c00e59dc139ccdf

On Sep 30, 11:01 am, PhilBeaudoin  wrote:
> One good place to start are Thomas Broyer article on 2.1 MVP in case
> you haven't read them 
> already:http://tbroyer.posterous.com/gwt-21-placeshttp://tbroyer.posterous.com/gwt-21-places-part-iihttp://tbroyer.posterous.com/gwt-21-activitieshttp://tbroyer.posterous.com/gwt-21-activities-nesting-yagni
>
> I have never tried writing a complete app using 2.1 MVP classes, so my
> analysis here is mostly based on the above articles and the javadoc.
> As a result, I'm pretty sure there are some mistakes and I'd be more
> than happy to listen to corrections from people who have used the 2.1
> MVP clases.
>
> If you don't have the time to read what follows my conclusion is that:
> - 2.1 MVP is closer to the metal and will need you to write more
> code ;
> - 2.1 MVP takes the stance that presenter hierarchies are not
> desirable, GWTP takes the opposite stance ;
> - GWTP MVP's have more features out-of-the-box ;
> - 2.1 MVP are still meant to sit behind a 3rd party tool, i.e.
> SpringRoo or (eventually) GWTP.
>
> 1) Place mechanism
>
> GWTP tries to make places really easy. A simple annotation is often
> all you need to get your presenter to respond to a place. If you need
> parameters your parse them in your presenter's prepareFromRequest()
> method. This handles the 95% use case in a few lines of code. For the
> exceptional situations where you want to do something else than reveal
> a presenter on a place request (reveal non-nested presenters, trigger
> an action, ...), you will have to go through the event bus.
>
> GWTP shadows each of your presenter with an automatically generated
> proxy (hurray for GWT's generators!). This is a light weight class
> that listens on the event bus even before the presenter has been
> instantiated. As a result GWTP's will always lazily load your
> presenter. An annotation also makes it trivial to have your presenter
> sit behind a GWT code splitting point. As a bonus, this proxy is the
> perfect place for your presenter to listen to events that may be of
> interest to him before it's instantiated.
>
> In GWT 2.1, places are a subsystem entirely decoupled from the MVP
> layer. You connect them via the ActivityManager and ActivityMapper,
> which lets you lazily load or code split your presenters. The
> ActivityManager and ActivityMapper are not generated for you however,
> you have to maintain them manually. If you want your presenter to
> listen to other events before it's instantiated, then you will
> probably also have to create a proxy manually (or accept that your
> presenter is not lazily instantiated).
>
> Some features are offered by both framework (i.e. user confirmation
> before navigation), but GWTP places offers more features out-of-the-
> box:
> - Gatekeepers makes it very easy to implement a right management
> mechanism client-side. For example, you can make a presenter
> accessible only to the admin, another one only to logged in users,
> etc.
> - Hierarchical places make it easy to implement breadcrumbs or a "back
> to what I was doing before" link
>
> 2) Presenters (Called activities in 2.1)
>
> GWTP offers two different concepts: Presenters, which are singletons
> and PresenterWidget which can be non-singleton. These can be nested in
> one another, offering a powerful set of cascading lifecycle hooks that
> you can override: onBind, onReveal, onReset, onHide and onUnbind.
> These are cascading in the sense that a call to onHide on a parent
> presenter will cause onHide to be called on the child presenters. It
> makes it easy to organize your app logically.
>
> This ability to nest presenters doesn't imply higher coupling since
> the nesting is entirely done via the event bus. A parent presenter
> does not know who is child are until they are connected and vice-
> versa. This makes it very easy to reorganize your app layout, either
> dynamically or based on the configuration. For example, you can make a
> different hierarchical layout for your mobile version.
>
> Activities in 2.1 takes the stance that presenter nesting is not
> required. This means, for one thing, that you will have to think in
> advance as to how you want to split your screen in display regions.
> Modifying the layout within one presenter means you have to modify the
> global screen layout. This also means that you cannot get cascading
> effects: you will have to manually stop all the presenters that need
> to go away when you navigate.
>
> For me, this last point is the most important turn of

Re: GWT Spring integration - what is the best method in late 2010?

2010-09-30 Thread PhilBeaudoin
Many gwt-platform [1] users have also successfully integrated its
dispatch module with Spring. The next version (0.5), planned in a
month or so, will add built-in support for Spring. It will also make
it easy and seamless to switch the backing service for your various
server actions. (Some can use GWT rpc's, some can use REST, etc.) The
latter is already available in the trunk, although it's likely to
change before the release.

Cheers,

   Philippe

[1] http://gwtplatform.com


On Sep 30, 10:59 am, Jason Hatton  wrote:
> I honestly can't weigh in on all of these framesworks.  Gwt-dispatch is
> maintained and is pretty light weight and extensible which we have extended
> ourselves to add Spring support.  Looks like the latest version adds that in
> for anyone needing it.  We have also extended it to lessen the burden of
> creating new GWT-RPC end points.  We use an annotation based approach that
> basically adds a new Gwt-Dispatch action handler which equates to a new
> GWT-RPC endpoint.  Our current production code base is using Spring 3.x and
> Gwt-Dispatch 1.0.0.
>
>
>
> On Thu, Sep 30, 2010 at 12:22 PM, David  wrote:
> > Any other feedback about this ?
> > What's odd is that we are still asking this very same question after
> > several years of existence of both frameworks, don't you think ?
>
> > So, we have :
> > - GWT SL
> > - Spring4GWT
> > - Gwt-dispatch
> > - gwt-spring
>
> > (My) Questions are :
> > - which of them are still maintained ?
> > - which of them do provide a compatibility with the latest versions of
> > GWT and Spring ?
> > - which of them are non intrusive ?
>
> > David
>
> > On 20 sep, 23:41, Jason Hatton  wrote:
> > > Hey lalit,
>
> > > I will take a look at this further this was and example of how to
> > implement
> > > Spring on a previous version and is basically the servlet example class I
> > > posted earlier.  I will take a look at the newer version of gwt-dispatch
> > to
> > > see what else has been included.  We were waiting on upgrading but this
> > > peaks my interested on upgrading sooner.  WebApplication context is just
> > > Spring's way of bootstrapping an application context in a web container.
> > >  What that class does is grab the application context wires in the
> > > DispatchServlet so POJOS can be injected in to all the classes it
> > supports.
> > >  Definitely it is in the spring-web jar  but it appears that is the only
> > > Spring feature gwt-dispatch project takes advantage of.  If you take a
> > look
> > > at the ActionHandler and base dispatch classes you don't see any other
> > > Springy stuff.
>
> > > Gwt-dispatch helps us to avoid having to code the separate interfaces.
> >  We
> > > just code actions, action handlers, and result objects.  All the dispatch
> > > traffic routes through the one GWT-RPC service that gwt-dispatch
> > implements.
> > >  All the async workings have to be there but, we get to work on valuable
> > > object interactions and avoid ceremonial grunt work which always makes
> > > coding more fun.
>
> > > Later,
> > > Jas
>
> > > On Fri, Sep 17, 2010 at 1:12 AM, lalit  wrote:
> > > > Hi Jason,
>
> > > > I agree that both the approaches are same. But I still have a feeling
> > > > that gwtDispatch uses Spring MVC infra to do its job. The code that
> > > > you have posted above has WebApplicationContext. Also I looked into
> > > > gwtDispatch code and it seems it is using Spring MVC infra. The code I
> > > > looked into is here
>
> > > >http://code.google.com/p/gwt-dispatch/source/browse/src/main/java/net.
> > ..
>
> > > > Another thing you mentioned in your mail that you do not have to code
> > > > two interfaces which looked interesting. If possible can you elaborate
> > > > on that? We would like to incorporate that in our approach also if
> > > > possible.
>
> > > > thanks,
>
> > > > On Sep 16, 7:15 pm, Jason Hatton  wrote:
> > > > > Lalit we are not using Spring MVC.  We am using gwt-dispatch and have
> > > > > extended that project's dispatch servlet to get the Spring
> > integration.
> > > >  We
> > > > > then added a custom annotation to pick up the appropriate dispatch
> > action
> > > > > handler for a particular GWT-RPC on the server side.  All of our
> > GWT-RPC
> > > > > calls go through this servlet so we avoid the overhead and code bloat
> > of
> > > > > having to create the standard GWT-RPC interfaces for every new
> > service
> > > > call
> > > > > we want to implement.  I looked over your example again and they are
> > > > pretty
> > > > > similar.  I like your integration approach with Spring but I prefer
> > > > service
> > > > > call handling because we don't have to code the two separate RPC
> > > > interfaces,
> > > > >  i.e. the Service and ServiceAsync for every service we want to
> > > > implement.
> > > > >  We just create an new dispatch handler apply an annotation to it and
> > we
> > > > are
> > > > > off and running.
>
> > > > > On Wed, Sep 15, 2010 at 11:33 PM, lalit 
> > wrote:
> > > > > > Deepak - I

Re: GWT Spring integration - what is the best method in late 2010?

2010-10-01 Thread PhilBeaudoin
All the samples that come with gwt-platform uses UI Binder (and
@UiHandler), check the samples repo:
http://code.google.com/p/gwt-platform/source/browse?repo=samples

A larger example is PuzzleBazar:
http://code.google.com/p/puzzlebazar/

They all use gin.

Cheers,

   Philippe


On Sep 30, 2:33 pm, Jason Hatton  wrote:
> I took a brief look at gwt-platform.  I didn't see examples where the GWT
> 2.0 UI binding capability is used.  We are successfully using this with Gin.
>  Do you know of examples that include the use of UI Binder?
>
> On Thu, Sep 30, 2010 at 2:35 PM, PhilBeaudoin
> wrote:
>
>
>
> > Many gwt-platform [1] users have also successfully integrated its
> > dispatch module with Spring. The next version (0.5), planned in a
> > month or so, will add built-in support for Spring. It will also make
> > it easy and seamless to switch the backing service for your various
> > server actions. (Some can use GWT rpc's, some can use REST, etc.) The
> > latter is already available in the trunk, although it's likely to
> > change before the release.
>
> > Cheers,
>
> >   Philippe
>
> > [1]http://gwtplatform.com
>
> > On Sep 30, 10:59 am, Jason Hatton  wrote:
> > > I honestly can't weigh in on all of these framesworks.  Gwt-dispatch is
> > > maintained and is pretty light weight and extensible which we have
> > extended
> > > ourselves to add Spring support.  Looks like the latest version adds that
> > in
> > > for anyone needing it.  We have also extended it to lessen the burden of
> > > creating new GWT-RPC end points.  We use an annotation based approach
> > that
> > > basically adds a new Gwt-Dispatch action handler which equates to a new
> > > GWT-RPC endpoint.  Our current production code base is using Spring 3.x
> > and
> > > Gwt-Dispatch 1.0.0.
>
> > > On Thu, Sep 30, 2010 at 12:22 PM, David  wrote:
> > > > Any other feedback about this ?
> > > > What's odd is that we are still asking this very same question after
> > > > several years of existence of both frameworks, don't you think ?
>
> > > > So, we have :
> > > > - GWT SL
> > > > - Spring4GWT
> > > > - Gwt-dispatch
> > > > - gwt-spring
>
> > > > (My) Questions are :
> > > > - which of them are still maintained ?
> > > > - which of them do provide a compatibility with the latest versions of
> > > > GWT and Spring ?
> > > > - which of them are non intrusive ?
>
> > > > David
>
> > > > On 20 sep, 23:41, Jason Hatton  wrote:
> > > > > Hey lalit,
>
> > > > > I will take a look at this further this was and example of how to
> > > > implement
> > > > > Spring on a previous version and is basically the servlet example
> > class I
> > > > > posted earlier.  I will take a look at the newer version of
> > gwt-dispatch
> > > > to
> > > > > see what else has been included.  We were waiting on upgrading but
> > this
> > > > > peaks my interested on upgrading sooner.  WebApplication context is
> > just
> > > > > Spring's way of bootstrapping an application context in a web
> > container.
> > > > >  What that class does is grab the application context wires in the
> > > > > DispatchServlet so POJOS can be injected in to all the classes it
> > > > supports.
> > > > >  Definitely it is in the spring-web jar  but it appears that is the
> > only
> > > > > Spring feature gwt-dispatch project takes advantage of.  If you take
> > a
> > > > look
> > > > > at the ActionHandler and base dispatch classes you don't see any
> > other
> > > > > Springy stuff.
>
> > > > > Gwt-dispatch helps us to avoid having to code the separate
> > interfaces.
> > > >  We
> > > > > just code actions, action handlers, and result objects.  All the
> > dispatch
> > > > > traffic routes through the one GWT-RPC service that gwt-dispatch
> > > > implements.
> > > > >  All the async workings have to be there but, we get to work on
> > valuable
> > > > > object interactions and avoid ceremonial grunt work which always
> > makes
> > > > > coding more fun.
>
> > > > > Later,
> > > > > Jas
>
> > > > > On Fri, Sep 17, 2010 at 1:12 AM, lalit 
> > wrote:
> > > > > &

Re: 2.1 MVP Jumpstart

2010-10-18 Thread PhilBeaudoin
Alternative frameworks like gwt-platform and mvp4g offer similar MVP,
Place and event bus architectures but require much less boilerplate.
If you worry about departing from the main line of GWT, you should
know that GWTP's architecture share many similarities and we plan to
start integrating it as soon as GWT activities and places are stable
and well-tested. (GWTP is already quite stable and is used in various
production projects.)  You can basically see GWTP as an alternative to
SpringRoo for those who want to build MVP apps efficiently without
having to rely on code generation tools.

For more info: http://gwtplatform.com

Cheers,

   Philippe

On Oct 18, 6:06 am, Thomas Broyer  wrote:
> On 15 oct, 18:17, Evan  wrote:
>
> > I've been playing around with the Places/Activities features with 2.1
> > and I've really come to appreciate them.  I've spent a lot of time
> > deleting old boilerplate in the past few days.
>
> > While I appreciate the nicely decoupled design, it's a bit cumbersome
> > to get a new project going with everything wired together.  In
> > particular, it makes it rather tough to get new developers up and
> > running (and interested).
>
> > Thoughts?  Suggestions?
>
> Ray Ryan seems to agree:https://jira.springsource.org/browse/ROO-1326
> ;-)
>
> Given that I built something very similar a year ago, I tend to
> disagree, but I admit that's one more thing to understand  before you
> can really code (and be productive). It took my coworkers several days
> (if not weeks) to understand the concepts (and they're new to GWT, so
> they first had to understand how GWT works, then what is
> RequestFactory, MPV, MPV with activities, navigation with places,
> etc.)
> On the other hand, it's not really different from having to learn how
> ASP.NET MVC (or WPF/XAML) and LINQ work when you start to develop in
> C# nowadays.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT-Platform spring integration

2010-10-26 Thread PhilBeaudoin
Hi Travis,

The feature has been contributed only recently and has not even
compiled in the default jar. Some people have successfully compiled
and used the feature and are working on a sample and it will make it
in the soon to be released 0.5. You can star and follow this issue to
be notified of progress:
http://code.google.com/p/gwt-platform/issues/detail?id=44

Also you will get more answers if you post directly on the gwtp forum:
http://groups.google.com/group/gwt-platform

Cheers,

   Philippe

On Oct 25, 2:47 pm, tc  wrote:
> Does anyone have an example of using the Spring support for dispatch
> that has been integrated into GWT-Platform?  I am having trouble
> getting the client to hit the server ( 404 error ).
>
> 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: What Major Companies Use GWT???

2010-10-26 Thread PhilBeaudoin
VMWare uses it in its new Code2Cloud project:
http://tasktop.com/blog/tasktop/springsource-vmware-code2cloud

Google do use it in many products, in particular adwords. There is a
question on the topic in Quora, might be a good place to add some
answers:
https://www.quora.com/What-web-applications-use-Google-Web-Toolkit-(GWT)

  Philippe

On Oct 26, 6:42 am, Stefan Bachert  wrote:
> Hi,
>
> On 25 Okt., 11:06, Sir Codealot  wrote:
>
> > What major companies are already using GWT?  I'm a little surprised
> > that this sort of info is not available and obvious, front and center,
> > on the GWT FAQs, but I can't find it.  
>
> I agree the business position of GWT is to weak in spite of its
> strength.
> Google itself does not earn with GWT so the incentives are weak.
>
> Another point is, there are a lot of GUI technology out there. It is
> very hard for companies to decide
>
> JSP, JSF, Iceface, ASF, Wicket, Qt, jquery,
> Flash, Flex, SilverLight, JX,
> GWT with smartClient, GWT with GXT, GWT with Mosaic, GWT pure,
> CaptianCasa,
> Vaadin
> Swing, SWT, AWT
> Eclipse RCP, Eclipse RAP,
> quoxdoo
> JAXX,
> XUL.
>
> I am surely missed the most.
> Some of them are doing just half the way.
>
> I know companies that are using GWT in some way
> - RedHat
> - IBM, Lombardi
> - Google (quite sure)
>
> However, sometimes a tool uses GWT but this is not really published.
> XWiki, Magnolia CMS for example
>
> Stefan Bacherthttp://gwtworld.de

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Nested Views in MVP

2010-10-29 Thread PhilBeaudoin
And if you think, as a lot of people seems to do, that nesting
presenters helps make your app cleaner, then you can look at MVP
solutions built on top of GWT that natively support presenter nesting
such as GWTP:
http://gwtplatform.com

Cheers,

   Philippe

On Oct 29, 8:40 am, Thomas Broyer  wrote:
> On 29 oct, 06:52, DrG  wrote:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > I have been reading the excellent article 
> > at:http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAnd...
>
> > And love the new built in objects that facilitate the MVP design
> > paradigm.  My initial thought is great but how does this system cope
> > with Nested Views or Dock Panel style layouts where various elements
> > can be clicked and the widget that changes isn't necessarily always
> > the center one?
>
> > Looking at the example code given for HelloMVP it looks like when you
> > go to a new Place when the Activity is started by calling the start
> > method a widget is passed in that is the containerWidget or host for
> > that presenter:
>
> >         @Override
> >         public void start(AcceptsOneWidget containerWidget, EventBus
> > eventBus) {
> >                 GoodbyeView goodbyeView = clientFactory.getGoodbyeView();
> >                 goodbyeView.setName(name);
> >                 containerWidget.setWidget(goodbyeView.asWidget());
> >         }
>
> > Looking at the setup code from the onModuleLoad, a root SimplePanel is
> > added to the activity manager:
>
> > activityManager.setDisplay(appWidget);
>
> > This widget is then passed to the start method each time a new place
> > is revealed.  Thus causing a screen refresh?  each time a new place is
> > revealed.
>
> > How would you handle a scenario that has a Left hand menu (like gmail)
> > and a main container.  Where clicking options in the LHS initiates a
> > new widget to be displayed in the center.  Using the current logic it
> > looks like the whole screen is refreshed to show the newly selected
> > menu option and the center widget.  Perhaps it does, and perhaps this
> > is ok, but it sounds hacky.
>
> In addition to David's response, 
> seehttp://tbroyer.posterous.com/gwt-21-activities-nesting-yagni

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Announcing gwt4air 1.0

2010-11-01 Thread PhilBeaudoin
Alain,

According to the terms of the Apache 2.0 license of the original work:
"You must retain, in the Source form of any Derivative Works that You
distribute, all copyright, patent, trademark, and attribution notices
from the Source form of the Work, excluding those notices that do not
pertain to any part of the Derivative Works"

Cheers,

   Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Gwt 2.1 Activities + Code splitting + Gin

2010-11-06 Thread PhilBeaudoin
Hi Nicolas,

If you start using AsyncProvider, you might be interested in GWTP's
ProviderBundle at some point. The problem of AsyncProvider is that it
may introduce too many split points, and you will often want to do
some manual optimization and group a few things together behind the
same split point. ProviderBundle makes that really easy to do.

ProviderBundle is totally usable without the rest of GWTP. (Although
I'd love to hear your reason for not using it. ;))

Cheers,

   Philippe

On Nov 6, 4:40 pm, Nicolas Antoniazzi 
wrote:
> Thanks Thomas, I implemented something similar to what you said (I think)
> and it works fine ! All my activities are code splitted "automatically" now.
>
> I used the AsyncProvider.
> I used a gin version compiled by gwtp team that include the AsyncProxy
> (althouth that I do not use gwtp for severals resons, thanks to gwtp dev for
> this :) ) .
>
> @Ashton, you can get it from here 
> :http://code.google.com/p/gwt-platform/http://code.google.com/p/gwt-platform/downloads/detail?name=gin-r137.jar
>
> The usage of AsyncProvider is very simple. It's exactly like a normal
> Provider instead that you have to give an AsyncCallback to the get()
> method.
> example :
>
> @Inject
> Provider myProvider;
>
> @Inject
> AsyncProvider myAsyncProvider;
>
> private MyClass instance1;
> private MyClass instance2;
>
> public void myMethod() {
>   // To get an instance without code splitting
>   instance1 = myProvider.get();
>
>   // To get an instance with code splitting
>   myAsyncProvider.get(new AsyncCallback() {
> �...@override
> public void onSuccess(MyClass result) {
>      instance2 = result;
>   }
>  }
> �...@override
> public void onFailure(Throwable caught) {
>  }
>   }
>
> In the previous example, instance1 is instanciated without code splitting,
> instance2 with code splitting.
> This is just a small example to show you the syntax. This example is very
> stupid since if you declare a class with a class Provider in the
> same file than an AsyncProvider, MyClass code will not be code
> splitted.
>
> Now, just for people who would like to know how to implement an
> ActivityAsyncProxy, my implementation looks like this : (And it might really
> not be the best one. Thomas, maybe that you have a better code to share ;) )
>
> public class ActivityAsyncProxy implements Activity {
>
> �...@inject
> private AsyncProvider provider;
>  private boolean canceled = false;
> private Activity impl;
>
> @Override
>  public String mayStop() {
> if (impl != null) return impl.mayStop();
>  return null;
>
> }
>
> @Override
>  public void onCancel() {
> if (impl != null) {
>  impl.onCancel();} else {
>  canceled = true;
> }
>
>  }
>
> �...@override
> public void onStop() {
>  if (impl != null) {
> impl.onStop();
>  } else {
> canceled = true;
>  }
>
> }
>
> @Override
>  public void start(final AcceptsOneWidget panel, final EventBus eventBus) {
>  provider.get(new AsyncCallback() {
>
> �...@override
> public void onSuccess(T result) {
>  // Do not starts loaded activity if it has been canceled
>  if (!canceled) {
> impl = (Activity) result;
>  impl.start(panel, eventBus);}
>
>  }
>
> �...@override
> public void onFailure(Throwable caught) {
>  // TODO : send error message
>
> }
>  });
> }
> }
>
> Now, in my ActivityMapper :
>
> public class RootActivityMapper implements ActivityMapper {
>
> @Inject
>  Provider> loginActivityProvider;
>
> @Inject
>  Provider> profileActivityProvider;
>
> @Inject
>  Provider> privacyActivityProvider;
>
> @Override
>  public Activity getActivity(Place place) {
> if (place instanceof LoginPlace) return loginActivityProvider.get();
>  if (place instanceof ProfilePlace) return profileActivityProvider.get();
>  if (place instanceof PrivacyPlace) return privacyActivityProvider.get();
>
> return null;
>  }
>
> }
>
> And that's all.
>
> Well, Just for information, I created my custom provider for
> ActivityAsyncProxy :
>
> public class ActivityAsyncProxyProvider implements
> Provider> {
>
> @Inject
>  Provider> provider;
>
> �...@override
> public ActivityAsyncProxy get() {
>  return provider.get();
>
> }
> }
>
> Now, in my ActivityMapper, injection are less verbose :
>
> @Inject
> ActivityAsyncProxyProvider loginActivityProvider;
>
> @Inject
> ActivityAsyncProxyProvider profileActivityProvider;
>
> @Inject
> ActivityAsyncProxyProvider privacyActivityProvider;
>
> Thanks Thomas, you helped me a lot this week with all your tips ! :)
>
> Nicolas
>
> 2010/11/6 Ashton Thomas 
>
>
>
>
>
>
>
> > Does anyone have some words for implementing the AsyncProvider
> > (Still in trunk as Thomas points out)??
>
> > I have not see any code showing how to implement this so I am a little
> > lost on where to start.
>
> > How do we need to use AsyncProvider and what else needs to be change /
> > restructure anything?
>
> > Is the AsyncProvider even usable right now if we compile from source?
>
> > On Nov 6, 9:27 am, Thomas Broyer  wrote:
> > > On 6 nov, 01:24, Nicolas Antoniazzi 
> > > wrote:
>
> > 

Re: Gwt 2.1 Activities + Code splitting + Gin

2010-11-07 Thread PhilBeaudoin
 instead of a "half
> >> generation" that is (in my opinion) too complicated to declare.
> >> Finally (for the code style part), I did not like the fact that we have to
> >> use a local Widget variable in View and returns it with a asWidget() method
> >> for UiBinder Views.
> >> Today with GWT 2.1, all widgets implements IsWidget and provides a
> >> asWidget(). But since we have to store a local instance of Widget inside of
> >> view for UiBinder, it cannot be done automatically, we have to override it.
> >> However, I understand that IsWidget was not ready when you first
> >> implemented it. But today, it does not solve the problem of the local 
> >> Widget
> >> variable.
>
> >> 3 - My application has two top div. One called "root" for the main part of
> >> my application, and one called "overlay" for all elements that comes like a
> >> filter over my root elements (to display overlay help, ...). They have both
> >> some css declaration on them.
> >> I did not find any way to reuse this system with GWTP. GWTP come with a
> >> RootPresenter and I wanted to use a second RootPresenter plugged on overlay
> >> div but it is not possible.
> >> ActivityManager are more flexible for this, they have a setDisplay()
> >> method to setup the top element to use.
>
> >> Well, Phillipe, all those things are just my personal feelings for my
> >> specifical needs. I think that GWTP is a great framework for a lot of
> >> people.
> >> Unfortunatly, in my case, I had to fight against it (maybe that it was a
> >> design problem, but I am not sure), and there was all the more subjective
> >> aspects (abouts framework overlay and code style) that made me go away.
>
> >> In any case, Phillipe and Christian, thanks for your great work .
> >> I am going to try ProviderBundle, maybe that I will be more comfortable
> >> with it :)
>
> >> Nicolas.
>
> >>  2010/11/7 PhilBeaudoin 
>
> >> Hi Nicolas,
>
> >>> If you start using AsyncProvider, you might be interested in GWTP's
> >>> ProviderBundle at some point. The problem of AsyncProvider is that it
> >>> may introduce too many split points, and you will often want to do
> >>> some manual optimization and group a few things together behind the
> >>> same split point. ProviderBundle makes that really easy to do.
>
> >>> ProviderBundle is totally usable without the rest of GWTP. (Although
> >>> I'd love to hear your reason for not using it. ;))
>
> >>> Cheers,
>
> >>>   Philippe
>
> >>> On Nov 6, 4:40 pm, Nicolas Antoniazzi 
> >>> wrote:
> >>> > Thanks Thomas, I implemented something similar to what you said (I
> >>> think)
> >>> > and it works fine ! All my activities are code splitted "automatically"
> >>> now.
>
> >>> > I used the AsyncProvider.
> >>> > I used a gin version compiled by gwtp team that include the AsyncProxy
> >>> > (althouth that I do not use gwtp for severals resons, thanks to gwtp
> >>> dev for
> >>> > this :) ) .
>
> >>> > @Ashton, you can get it from here :
> >>>http://code.google.com/p/gwt-platform/http://code.google.com/p/gwt-pl...
>
> >>> > The usage of AsyncProvider is very simple. It's exactly like a
> >>> normal
> >>> > Provider instead that you have to give an AsyncCallback to the get()
> >>> > method.
> >>> > example :
>
> >>> > @Inject
> >>> > Provider myProvider;
>
> >>> > @Inject
> >>> > AsyncProvider myAsyncProvider;
>
> >>> > private MyClass instance1;
> >>> > private MyClass instance2;
>
> >>> > public void myMethod() {
> >>> >   // To get an instance without code splitting
> >>> >   instance1 = myProvider.get();
>
> >>> >   // To get an instance with code splitting
> >>> >   myAsyncProvider.get(new AsyncCallback() {
> >>> > �...@override
> >>> > public void onSuccess(MyClass result) {
> >>> >      instance2 = result;
> >>> >   }
> >>> >  }
> >>> > �...@override
> >>> > public void onFailure(Throwable caught) {
> >>> >  }
> >>> >   }
>
> >>> > In the previous example, instance1 i

Re: Gwt 2.1 Activities + Code splitting + Gin

2010-11-08 Thread PhilBeaudoin
Thanks Thomas.

So the way I understand it, the ActivityManager/ActivityMapper are GWT
2.1 equivalent's of GWTP's proxy for the purpose of navigation. It's
just that in GWTP you don't need to create or modify a separate class,
all is done within your presenter.

In my apps, I often have some presenters that need to be awoken when a
given message transit on the bus. Say, for example, a ChatBoxPresenter
would like to wake up when a NewChatMessageEvent transits on the bus.
In GWTP it's simply a matter of annotating a method with @ProxyEvent
in the presenter -- ChatBoxPresenter is still lazily instantiated and
code split. How would you handle such a case in GWT 2.1 short of
instantiating the ChatBoxPresenter at app start?

In the GWTP samples we use singleton presenters, which makes it easy
to retain state during the app lifetime, a frequent use case. Also, it
cuts down on the cost of instantiating and garbage collecting the
presenters all the time. Finally, singleton presenters ensure that you
don't mistakenly attach two instances of the presenter to the same
singleton view. However, nothing prevents you from using non-singleton
presenters. GWTP presenters have the equivalent of a resettable event
bus, and every handlers are unregistered upon an unbind(). In fact,
GWTP offers reusable components separating logic from (non-singleton)
views -- which we call PresenterWidget. These are quickly becoming one
of the most popular feature of the framework and I don't find their
equivalent in GWT.

@Nicolas, Re: the need for a proxy interface
I believe it is a limitation of GWT generators that they have to be
attached to classes/interfaces. If anybody has a better idea I'm a
buyer. But isn't it better than manually writing/editing
ActivityManagers?

Cheers,

   Philippe

On Nov 8, 1:35 am, Nicolas Antoniazzi 
wrote:
> Hi Phillipe,
>
> Also, I think it's a bit unfair to call GWTP's code generation "magic"
>
>  when GWT relies on it for so many different things... But if you
>
> > really want to write proxys yourself, GWTP's allows it.
>
> Yes, I agree that I was a bit unfair with GWTP. In my opinion, it would be a
> geater tool (for me) if the code in front of generators were more concise
> (just annotation, no empty interfaces to add), and maybe more "optional".
> bindPresenter() needs view, proxyplace, presenter. But if I prefer to not
> use ProxyPlace as you suggest, I can't.
>
> > Out of curiosity, which version of GWTP did you try?
>
> 0.4. But I might not have been in the depth of the framework (Just coded 4
> main pages of my app) until I get blocked by the Top Div/RootPresenter
> problem that I explained before.
>
> Cheers,
>
> Nicolas.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Entire Site in GWT?

2010-11-10 Thread PhilBeaudoin
We also decided to build our entire website using GWT (hosted on App
Engine). It's early in the development process, but with a good MVP
framework and UiBinder it is not that different from building a
traditional website but you get a faster, richer and much more
interactive experience. Check out the current version:
http://hive.arcbees.com/
All the code is open source at:
http://code.google.com/p/arcbees-hive/
It's based off many great open-source projects for GWT, including GWTP
as our MVP framework:
http://gwtplatform.com

Cheers,

Philippe

On Nov 9, 8:01 am, Gal Dolber  wrote:
> Checkouthttp://code.google.com/p/guit-ajax-crawler/for Ajax crawlability
>
> On Tue, Nov 9, 2010 at 10:19 AM, Nicolas Antoniazzi <
>
>
>
>
>
>
>
>
>
> nicolas.antonia...@gmail.com> wrote:
> > For our project we use Tomcat / Postgresql on server side. It works great.
> > The hardest part is to be able to configure maven (if you use it) with gwt
> > + wtp (eclipse tomcat plugin). But with the latest version of all the
> > eclipse plugins, it should work fine.
>
> > Nicolas.
>
> > 2010/11/9 mike.cann 
>
> > Hi Guys,
>
> >> Thanks for all the tips, im certainty going to take them on board when
> >> I make my choice.
>
> >> Im pretty sure im going to go with GWT now. The next step is to choose
> >> my server architecture.
>
> >> I really would like to have gone with GAE however I have done some
> >> research and read it cant handle files > 1mb in size. As I need to do
> >> some image manipulation involving merging several 1mb PNGs into larger
> >> ones I think im going to be stuck if I use GAE.
>
> >> So my next question is does GWT play nice with other technologies and
> >> if so which do people recommend?
>
> >> I hope I haven't outstayed my welcome on this list!
>
> >> Cheers,
> >> Mike
>
> >> On Nov 9, 8:10 am, farmazone  wrote:
> >> > Mike,
>
> >> > I am also flash/flex guy. Websites built with GWT can have workflow
> >> > almost the same as those built with flash (especially if you are using
> >> > Flash Builder od FDT). This is a great advantage for AS3 programmers.
> >> > But like flash it is not crawlable by google so you have to implement
> >> > it by yourself. If you are using Tomcat - HtmlUnit is good choice. If
> >> > not I recommend this approach:http://www.asual.com/jquery/address/.
> >> > You should be familiar with SWFAddress so it do you no harm :)
>
> >> > good luck
>
> >> > On Nov 8, 5:49 pm, "mike.cann"  wrote:
>
> >> > > Hi Guys,
>
> >> > > First post on this list. I have searched for this question before
> >> > > posting. The only answer I could come up with was from a post in 2008
> >> > > (http://groups.google.com/group/google-web-toolkit/browse_thread/
> >> > > thread/c852ff3491f4d128/4b1d9c08a91e25ab?lnk=gst&q=suitable+for+entire
> >> > > +site#4b1d9c08a91e25ab) so I thought I would ask it again in case
> >> > > anything has changed.
>
> >> > > As a Flash / Flex developer new to web-dev im loving the extra
> >> > > structure and type safety offered by GWT so im really keen to use it
> >> > > exclusively for a new project.
>
> >> > > So my questions are:
>
> >> > > Is GWT suitable for writing an entire website? Specifically im looking
> >> > > to write a site that may sit within a Facebook iframe.
>
> >> > > Has the "GWT isnt web-crawlable" issue been solved now?
>
> >> > > Is the script for every page on your site downloaded at the start or
> >> > > is it downloaded as you click a link (as in a traditional site)?
>
> >> > > Are there any other barriers to making an entire site in GWT?
>
> >> > > Cheers,
> >> > > Mike
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "Google Web Toolkit" group.
> >> To post to this group, send email to google-web-tool...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> google-web-toolkit+unsubscr...@googlegroups.com >>  cr...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP : VP to VP and Nested View communication

2010-11-11 Thread PhilBeaudoin
As Nicolas, though, I suggest you never use the event bus from your
view. Let your presenter do the talking.

On Nov 11, 5:01 am, Jambi  wrote:
> I think an EventBus would work fine here. Check out this 
> tutorialhttp://code.google.com/webtoolkit/articles/mvp-architecture.html
> (Events and the EventBus). A View (Presenter) can fire an event to the
> EventBus and trigger events on a different View.
>
> On Nov 11, 3:57 am, zixzigma  wrote:
>
>
>
>
>
>
>
> > Hello Everyone,
>
> > Problem: a View and its Presenter want to communicate with another
> > View/Presenter.
> > Special Case: one view is nested in another.
>
> > background:
> > to implement MVP for "one view and it's presenter"
> >  we would need a View Interface, a View Implementation which is
> > associated with a UiBinder, also a Presenter. Presenter uses View
> > Interface's inner Interface, to communicate with ViewImplementation.
> > (FooVIew, FooViewImpl, FooPresenter, ... )
>
> > this i understand.
>
> > now lets say we have another View/Presenter (BarView, BarViewImpl,
> > BarPresenter)
>
> > how can these two sets: Foo and Bar, communicate ?
> > i think its best for them to communicate through interfaces,
> > but i dont know who should be in control.
>
> > and in scenarios that these two sets (Foo and Bar) are having "has a"
> > relationship, should the interfaces talk ?
>
> > #1
> > FooViewImpl {
>
> > private BarView barView;
>
> > }
>
> > #2 FooViewImpl{
> > private BarPresenter barPresenter;
>
> > }
>
> > is it better if Views are Nested, or one presenter inside the other
> > viewimpl (basically #1 or #2)
>
> > if you have any experience with these situation, 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to change the panel in Activity.start()

2010-11-12 Thread PhilBeaudoin
Thanks Thomas for preempting me. Next time I'll try to be faster than
you and conclude with "you can also wait a bit and see what Thomas
will propose". ;)

That being said, I believe it's important to point out that there are
two point of views with respect to that problem. Some think nesting
presenters and cascading their lifecycle methods is never required --
that's the opinion of Thomas and the design team behind GWT 2.1 MVP.
(Although I see you had to work around the problem somehow.) Others
have been using nested presenters for a while and believe they make
development easier -- that's the opinion of the GWTP design team. If
you'd like to see the counterpoint opinion I invite you to read
Thomas' blog post and then the following GWTP wiki page:
http://code.google.com/p/gwt-platform/wiki/ComparisonWithGwtMVP

Cheers,

   Philippe

On Nov 12, 7:23 am, Thomas Broyer  wrote:
> On 12 nov, 01:24, Julio Faerman  wrote:
>
> > I want to start one activity (my form) inside another (my app). I am
> > trying to do that with the 2.1 MVP Framwork and would like to know...
>
> > 1) Is it possible to configure the ActivityManager (or add place
> > parameter) so that my FormActivity.start() receives a inner panel of
> > my app instead of the outer one set by
> > activityManager.setDisplay(appWidget) when the EntryPoint was loaded?
>
> No.
>
> > 2) The documentation reads "your app could create a CompositePlace,
> > CompositeActivity, and CompositePlace.Tokenizer classes that delegate
> > to the constituent members". Have anyone implemented that? (and would
> > be kind enough to share)
>
> We did create something similar to a "composite activity" (for a
> "dashboard"). The idea is to *not* use an ActivityManager for these
> inner parts, but manage your "sub activities" lifecycle "by hand".
> In retrospect though, I don't think using the Activity interface for
> our "dashlets" really brings us anything; we are nesting what I call
> "MVP components", but not really "activities" (the dashboard is the
> activity).
>
> > 3) Is there another way or recommended practice?
>
> I'd recommend 
> readinghttp://tbroyer.posterous.com/gwt-21-activities-nesting-yagni
>
> Another approach could be that your "inner activity" isn't an "inner",
> but rather an "outer", which shares some code with your current "outer
> activity" (i.e. the FormActivity doesn't start *within* the other, but
> it *replaces* it, just like any activity, and reuses part of its view,
> and maybe part of its presentation logic too)
>
> (you can also wait a bit and see what GWT-P developers will
> propose ;-) )

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to change the panel in Activity.start()

2010-11-13 Thread PhilBeaudoin
In french, très bien! :)

Yes, let's try to meet at some point. I always enjoy reading your
thoughtful articles and replies. I'm sure there would be a lot of
value in exchanging F2F. In fact, I never even met Christian! There
are also quite a few people on Guice, GIN, MVP4G and GUIT that I'd
like to meet.

Ah, and let's invite Ray Ryan too. ;)

Cheers,

Philippe


On Nov 13, 7:29 am, Thomas Broyer  wrote:
> On 13 nov, 05:24, Christian Goudreau 
> wrote:
>
> > Maybe it's a night call, but, when will we have a nice "meeting (Google IO
> > 2011 ?)" and talk about this for real ? :D
>
> My employer seems to want to communicate more on our GWT skills (see,
> I'm translating my GWT 2.1 articles to French:http://blog.atolcd.com
> ), so maybe I'll make it to I/O this time (he was OK last year but it
> was me who couldn't).
> It'd be way cool to have a F2F then, sure!
>
> (otherwise, huh, there's 9 hours between Vancouver and Dijon,France
> timezones!)

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: RootLayoutPanel strange code using MVP

2010-11-16 Thread PhilBeaudoin
Why make the Root a inner class? I think it should be either a static
nested class or a top-level class.

Also, you can remove a lot of your boilerplate and ugly news there
using GIN and binding asEagerSingleton. In this way you could bind:
- Root
- PlaceController
- ActivityMapper
- MyActivityManager:
   Inherit ActivityManager with a @Inject constructor receiving
ActivityMapper, EventBus and Root. Then call setDisplay(root)
- AppPlaceHistoryMapper
- MyPlaceHistoryHandler
   Inherit PlaceHistoryHandler with a @Inject constructor receiving
all you need, then call regiser(...) handleCurrentHistory in your
constructor.

Also, instead of Root extending LayoutPanel, you can have it simply
implement AcceptsOneWidget, then in setWidget you call directly
RootLayoutMapnel.get().add(...)

Cheers,

   Philippe

On Nov 16, 1:57 am, Baloe  wrote:
> Hi all,
>
> We are using MVP as much as possible, but it has been a pain so far,
> not a lot of documentation. There is one thing that we really couldn't
> get right. Please see how much boilerplate blabla this application
> needs, and see how ugly the class at the end is. We don't want the
> class near the end. And if someone has a tip how to clean up this
> code, please! Thanks a lot!
>
> Baloe
>
> public class OurApp implements EntryPoint {
>
>         @Override
>         public void onModuleLoad() {
>
>                 AppGinjector injector = GWT.create(AppGinjector.class);
>                 Root app = new Root();
>
>                 EventBus eventBus = injector.getEventBus();
>                 PlaceController placeController = 
> injector.getPlaceController();
>                 ActivityMapper activityMapper = injector.getActivityMapper();
>
>                 ActivityManager activityManager = new
> ActivityManager(activityMapper, eventBus);
>                 activityManager.setDisplay(app);
>
>                 AppPlaceHistoryMapper historyMapper =
> GWT.create(AppPlaceHistoryMapper.class);
>                 PlaceHistoryHandler historyHandler = new
> PlaceHistoryHandler(historyMapper);
>                 historyHandler.register(placeController, eventBus,
> ((AppPlaceController) placeController).getDefault());
>
>                 historyHandler.handleCurrentHistory();
>                 RootLayoutPanel.get().add(app);
>
>                 Resources.Instance.css().ensureInjected();
>         }
>
>         private class Root extends LayoutPanel implements AcceptsOneWidget {
>                 @Override
>                 public void setWidget(IsWidget w) {
>                         if (w == null) {
>                                 clear();
>                         } else {
>                                 add(w);
>                         }
>                 }
>
>         }
>
>
>
>
>
>
>
> }

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Filtering Code Splitting

2010-11-17 Thread PhilBeaudoin
For things like that you should definitely look into GIN:

- It will facilitate your deferred binding problems a lot, just add or
remove a module from your Ginjector to swap code based on
configuration.
- It will also facilitate your code splitting needs with the very nice
AsyncProvider<>

Cheers,

   Philippe

On Nov 16, 3:18 pm, Burly Jez  wrote:
> (In the end I'm going to just grep for a string I know will only exist
> in the "debug" code)
>
> On Nov 16, 7:05 pm, Burly Jez  wrote:
>
>
>
>
>
>
>
> > Thanks for the ideas, guys. Both good.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: How to get the next "day of week" date?

2010-11-17 Thread PhilBeaudoin
Say your looking for next tuesday:

int desiredDay = 2; // tuesday
Date currDate = new Date();
int currDay = currDate.getDay();
int daysToJump = (7+desiredDay-currDay)%7
if (daysToJump == 0) daysToJump = 7;
Date nextTuesday = new Date(currDate.getTime() + daysToJump * 24 * 60
* 60 * 1000);

No testing, and off the top of my mind. This will have issues with DSL
and all, but should be good in most cases.

   Philippe



On Nov 17, 7:25 am, "anthony.more...@stambia.com"
 wrote:
> Thank you for your quick answers.
> However, I dont know many days i must add to get to the next "day of
> week". Or should I make a huge and ugly if statement on the current
> day?
>
> For example, today we are wednesday, when is the next tuesday?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Errors in GWT SDK's BigDecimal?

2010-11-17 Thread PhilBeaudoin
When executing my app in development mode I started getting a long
list of errors in the tree log, all related to BigDecimal. Here are
the first few lines:

Errors in 'jar:file:/C:/eclipse/plugins/
com.google.gwt.eclipse.sdkbundle.2.1.0_2.1.0.v201010280102/gwt-2.1.0/
gwt-user.jar!/com/google/gwt/emul/java/math/BigDecimal.java'
Line 968: The method valueExact(int) is undefined for the type
BigDecimal
Line 1660: The method valueExact(int) is undefined for the type
BigDecimal
Line 1690: The method valueExact(int) is undefined for the type
BigDecimal
Line 2154: The method valueExact(int) is undefined for the type
BigDecimal
Line 2781: Syntax error, insert ")" to complete MethodDeclaration
...

It's strange because it just started happening even though I don't
think I upgraded my sdk recently. Also, I don't think we started using
BigDecimal or anything new from math.

The app still runs without problems, but I was curious as to whether
or not it's a known issue or some strange quirk of my environment.

Cheers,

   Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Styling Login Widget

2010-11-19 Thread PhilBeaudoin
I do all my styling using UiBinder and CssResource, with HTMLPanel you
can write all the HTML you need to make your app look perfect. This is
how we did BookedIn:
http://corp.bookedin.net/ (check the live demo)

Cheers,

Philippe

On Nov 18, 5:03 pm, Nicholas  wrote:
> I have the loginWidget in my application, and would like to customize
> the styling.  For instance, bold the email address, and make the sign-
> out link look like a link (blue and underlined).  What is the correct
> way to do 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Styling Login Widget

2010-11-20 Thread PhilBeaudoin
I agree with Thomas. If you really want to keep it, you could wrap it
in a div or FlowPanel and then use element CSS to style it. For
example:

...




And use styles like:

.loginWidgetHolder div {...}
.loginWidgetHolder div span {...}

A bit ugly though...

   Philippe

On Nov 20, 2:10 am, Thomas Broyer  wrote:
> On 20 nov, 05:03, Nicholas  wrote:
>
> > I was looking specifically at the GWT LoginWidget.  I don't see it
> > exposing any properties that I could use to style things the way I
> > want.  I guess I could always just re-implement the widget myself and
> > expose some style properties that can be assigned?
>
> Given how simple it is, I think that's the way to go.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT Examples

2010-11-26 Thread PhilBeaudoin
A couple of simple sample at:
http://gwtplatform.com

They are base on GWT platform, but might give you a good idea.

   Philippe

On Nov 26, 4:11 am, daniela iervolino  wrote:
> Well, there's something at this linkhttp://www.gwtapps.com
> On the right side there's some applications from the book that you can
> download.
> It was very useful for me.. I don't know if there's the application
> you required, but it's really a very good starting point.
> Bye!
>
> On 26 Nov, 10:28, csaffi  wrote:
>
>
>
>
>
>
>
> > Hi everybody,
> > I'm new to GWT, so I'm wondering if you could provide me some useful
> > examples and tutorials for building a client-side GUI and a server-
> > side backend, for developing a stupid simple Window with a Table
> > inside it, populated by data read from a db.
>
> > I hope you can help me. Thank you very much 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: "Large scale application development and MVP" tutorial / no Places or Activities

2010-12-01 Thread PhilBeaudoin
This conceptual leak between activity, presenters and places has also
confused me quite a bit. Now that I understand it (slightly) better I
think part of the confusion is caused by the fact that GWT expects you
to build your own presenter/view separation and doesn't provide base
classes or interfaces for presenters themselves. Instead it expects
you to use composition (with an EventBus, with an Activity, etc.) to
build the functionality you need when you need it.

This is a contrast to previous MVP frameworks. For example, gwt-
platform offers two different concepts:
- Presenter
  The base class for a presenter that is also an activity (and
optionally a place).
- PresenterWidget
  The base class for a reusable presenter that is only meant to
separate logic form view.

There are advantages and drawbacks to offering base classes for
presenters, but my guess is that most people using GWT's MVP will need
to build at least a small scaffolding of base classes similar to the
above.

Cheers,

Philippe


On Nov 30, 10:15 am, Brian Reilly  wrote:
> The fact that the Activities and Places documentation is under the heading
> "MVP Framework" in the GWT documentation and contains statements like "An *
> activity* in GWT 2.1 is analogous to a presenter in MVP terminology"
> (recently discussed in another 
> thread:http://groups.google.com/group/google-web-toolkit/browse_thread/threa...)
> doesn't help clear up the confusion. I'd actually say that Thomas Broyer's
> blog (http://tbroyer.posterous.com/) is required reading along with the MVP
> Framework docs.
>
> -Brian
>
>
>
>
>
>
>
> On Tue, Nov 30, 2010 at 11:51 AM, Ray Ryan  wrote:
> > +1
>
> > I think the community has inferred a linkage between place and presenter
> > that I never meant to imply. The MVP pattern is a lot more generally useful
> > than the place notion — it's all about decoupling view and app logic, a
> > pretty universal concern. IMHO Place is mainly useful for apps that are
> > about navigating around an object graph, like AdWords and most most simple
> > CRUD apps, a much narrower set. A concrete example: Wave made great use of
> > MVP, but never used the place notion because it was too limiting for them.
> > For details see Dan Danilatos's presentation from I/O 2010, which I never
> > get tired of flogging:
>
> >http://www.google.com/events/io/2010/sessions/gwt-continuous-build-te...
>
> > The activity and place packages in GWT 2.1 are pretty minimal first stabs,
> > kind of rushed out the door. One focus of GWT 2.2 will be improving their
> > flexibility and reducing the boilerplate they require.
>
> > On Tue, Nov 30, 2010 at 8:40 AM, David Chandler 
> > wrote:
>
> >> There are two reasons for this, actually:
>
> >> 1. The MVP tutorials were written months before Activities and Places
> >> became available in GWT 2.1.0.
> >> 2. The concepts are somewhat orthogonal, that is, Activity != Presenter.
>
> >> I think some of the reason for the confusion around Activity vs.
> >> Presenter has been that the community has different definitions of
> >> what is a presenter. In the first version of the gwt-presenter
> >> framework (and perhaps Ray Ryan's MVP talk at I/O '09--I'd have to go
> >> back and listen to be sure), a presenter was associated with a place,
> >> and this is the way many continue to think about presenters. Others
> >> take the more narrow view that it's just the biz logic behind a view
> >> or widget and is not tied to the concept of a place at all. In the
> >> latter concept, an Activity might load a view which consists of
> >> multiple sub-views or widgets, each backed by a presenter. Only the
> >> Activity itself is mapped to a Place.
>
> >> HTH,
> >> /dmc
>
> >> On Tue, Nov 30, 2010 at 9:03 AM, cri  wrote:
> >> > I've used the articles "Large scale application development and MVP" I
> >> > and II to model our MVP application. I notice that these tutorials
> >> > don't use either of the "Place" or "Activity" classes made available
> >> > by GWT. I'm wondering why this is. Does anyone know? 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-tool...@googlegroups.com.
> >> > To unsubscribe from this group, send email to
> >> google-web-toolkit+unsubscr...@googlegroups.com >>  cr...@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
> >>http://googlewebtoolkit.blogspot.com/
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this gr

Re: How to prevent CSRF/XSRF when using RequestFactory

2010-12-01 Thread PhilBeaudoin


On Dec 1, 2:39 am, Sripathi Krishnan 
wrote:
> RequestFactory (and GWT RPC as well) automatically adds a custom http header
> ("X-GWT-Permutation") to each request. See
> DefaultRequestTransport.java.
> In
> modern browsers, it is impossible to add such a request header in a
> cross-site manner. Because of this feature, most developers don't need to
> worry about CSRF - GWT automatically protects them.

This is really interesting and I was not aware of that feature of
modern browsers. Could you clarify how this works or link to a website
explaining it? (In particular, I'm interested to know how a browser
can prevent malicious javascript to insert this header in a request.)

Cheers,

   Philippe

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: GWT 2.1 Activities – nesting? YAGNI ? - an exa mple of where you NEED it !

2010-12-02 Thread PhilBeaudoin
For anybody considering GWTP (http://gwtplatform.com) as an
alternative to GWT MVP, I want to stress out the fact that, despite
the differences, there are a lot of similarity in the spirit of these
two libraries. For example, gwtplatform's proxies are very similar to
GWT's Activities. The place systems are quite similar too.

One of the difference is that GWTP already offers mechanisms to reduce
boilerplate via annotations and generators. You can hook (lazy) events
to your presenters, define their place, etc. all with simple
annotations right in your presenter. I'm sure GWT will evolve towards
that at some point, but if you need it right away GWTP might not be a
bad choice.

Another difference is that GWTP fully embraces the concept of
presenters, whereas in GWT MVP you need to create them using the
provided building blocks. As you start nesting presenters it is useful
to have mechanisms to maintain a hierarchy and propagate lifecycle
notifications within that hierarchy. In GWT you will likely have to
build some scaffolding for that.

GWTP also has more bells and whistles such as hierarchical places
(useful for breadcrumbs), support for tabbed presenters, etc.

Where GWT shines is in the level of decoupling of the various
components. And the GWTP developers appreciate this a lot. In fact, we
plan to migrate the backend of GWTP towards the core GWT MVP classes
(as they stabilize). Our goal is to let users of the current API
benefit from any improvement provided by the GWT team. In time, we
want GWTP apps to be interoperable with standard GWT MVP apps.

A closing remark: GWTP offers other components that can be used
independently of its MVP framework. If you want to use GWT MVP but
need a good dispatch solution, take a look at GWTP dispatcher.

Cheers,

Philippe

On Dec 2, 1:22 am, massimo malvestio 
wrote:
>  and what if data from one workspace is used in another ?
>
> In my opionion for this point you could fire a specific event, because, if
> data inside a workspace is needed by another one, this means user did
> something or a generic condition about displayed data happened. Am I 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-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: Announcing free online GWT/GAE mini-book

2010-12-02 Thread PhilBeaudoin
I've had the pleasure of reviewing an early version of this book, and
can confirm it is very well down!

I'm sure it will prove useful both to newcomers to GWT and to power
users who want to learn more about tools like Guice, Gin, GWT-
Platform, etc.

Congratulations Marius!

Philippe

On Dec 2, 3:06 pm, nino ekambi  wrote:
> Woah this is just getting better and better
> Thank you so much !
> Regards,
> Alain
>
> 2010/12/3 marius.andreiana 
>
>
>
>
>
>
>
> > Hi everyone,
>
> > I'm glad to announce a free, online GWT 2.1 & GAE mini-book. It's
> > available at
> >http://code.google.com/p/gwt-gae-book
>
> > The book aims to introduce engineers on how to professionally develop
> > applications using Google Web Toolkit and App Engine by developing a
> > full real application step by step.
>
> > I'd like to thank the following persons for reviewing the contents and
> > suggesting numerous improvements before making the book public:
> > Philippe Beaudoin, Christian Goudreau, John Patterson, Zack Grossbart.
> > Thanks!
>
> > Hope you'll find it useful. Looking forward to your feedback and
> > contributions,
> > Marius
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-toolkit+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwt-maven-plugin / "google plugin for eclipse" / working for anyone?!?!

2010-12-03 Thread PhilBeaudoin
A valuable resource that has helped me quite a bit are the POMs from
Harald Pehl in his various open source projects. Check out:

Super POM with global settings:
http://code.google.com/p/pehl-parent/source/browse/trunk/pom.xml

Super POM for Piriti:
http://code.google.com/p/piriti/source/browse/trunk/pom.xml

Piriti Core module (framework character):
http://code.google.com/p/piriti/source/browse/trunk/core/pom.xml

Piriti Sample module (GWT App deployed on AppEngine):
http://code.google.com/p/piriti/source/browse/trunk/sample/pom.xml


We are in the process of migrating gwt-platform to Maven, so you might
find some information in there too:
http://code.google.com/p/gwt-platform/issues/detail?id=211

Cheers,

 Philippe


On Dec 2, 4:25 pm, cri  wrote:
> No. No errors other than the ones mentioned in the original post.
> After resolving those errors, we could run the default project using
> "run as / web application". The problem only comes after we add
> dependencies to our pom file.
>
> On Dec 2, 2:43 pm, David Chandler  wrote:
>
>
>
>
>
>
>
> > Do you see errors in any of the Eclipse consoles (including Maven console)
> > while doing the import?
>
> > On Thu, Dec 2, 2010 at 3:28 PM, cri  wrote:
> > > We are trying to use gwt-maven-plugin to generate our mavenized gwt
> > > project. Our versions are:
>
> > > eclipse helios
> > > gwt 2.1
> > > gwt-maven-plugin 2.1.1-SNAPSHOT
>
> > > We generate our initial project with the command line:
>
> > > mvn archetype:generate \
> > > -DarchetypeRepository=https://nexus.codehaus.org/content/groups/
> > > snapshots-group/  \
> > > -DarchetypeGroupId=org.codehaus.mojo \
> > > -DarchetypeArtifactId=gwt-maven-plugin \
> > > -DarchetypeVersion=2.1.1-SNAPSHOT
>
> > > We then import the project into eclipse using "import / as existing
> > > project".
>
> > > Here are the problems we then encountered:
>
> > > (1) Eclipse compile errors complaining of unknown classes. These are
> > > classes the plugin generates and places in target/generated-sources/
> > > gwt. The classes are Messages.java and GreetingServiceAsync.java. We
> > > work around this problem by adding  target/generated-sources/gwt to
> > > our eclipse project classpath.
>
> > > (2) The class GwtTesttest.java has eclipse compile errors. We don't
> > > care much about this so for the moment we are just deleting that
> > > class.
>
> > > (3) This is the problem we can't find a workaround for. If we add
> > > dependencies to our pom, say spring framework, they then get added
> > > automatically to the "Libraries/Maven Dependencies". The problem comes
> > > when we invoke "Run As... / Web Application". Jetty fails to find
> > > classes in our newly added maven dependency, e.g Spring.
>
> > > Is there anyone out there that can shed some light on this? 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-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com > >  cr...@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 
> > Toolkithttp://googlewebtoolkit.blogspot.com/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: onResize issue with IE 7

2010-12-03 Thread PhilBeaudoin
I'm working with Mayumi on this bug and I'm pretty sure there is a
problem somewhere in GWT. In our case, it happens with deeply nested
layout panels. To reproduce the bug, we removeFromParent() a panel in
the middle of the hierarchy and later re-add() it. At that point, the
children of the re-added panel have wrong width/height and their width/
height does not update when resizing the browser window. (Again, only
in IE7.)

I have fixed the problem by calling forceLayout() recursively on the
nested layout panels. I do this by calling the following method on the
reattached panel right after we add() it:

private void forceLayoutRecursive(Widget widget) {
HasWidgets parent = null;
if (widget instanceof LayoutPanel) {
((LayoutPanel) widget).forceLayout( );
parent = (HasWidgets) widget;
}
if (widget instanceof DockLayoutPanel) {
((DockLayoutPanel) widget).forceLayout( );
parent = (HasWidgets) widget;
}
if (parent != null) {
Iterator iter = parent.iterator( );
while (iter.hasNext( )) {
Widget child = iter.next( );
forceLayoutRecursive(child);
}
}
}

If I had more time I would work on a simple test case that reproduces
the problem and file an issue... :)

   Philippe

On Dec 3, 12:01 pm, mayumi  wrote:
> A senior developer that I work with found the solution.
> We used forceLayout() on LayoutPanel which will
> layout the children immediately.
>
> Thanks for the reply.
>
> Mayumi
>
> On Dec 3, 12:20 pm, Magnus  wrote:
>
>
>
>
>
>
>
> > Hi Mayumi,
>
> > I am happy that there is someone else struggling with this problem.
>
> > Well, within onResize I just call resizeLater:
>
> >  public void onResize()
> >  {
> >   super.onResize();
> >   resizeLater();
> >  }
>
> > Ans resizeLater just schedules this action to be performed later:
>
> >  private void resizeLater ()
> >  {
> >   Scheduler.get().scheduleDeferred
> >   (
> >    new ScheduledCommand()
> >    {
> >     public void execute()
> >     {
> >      myResize ();
> >     }
> >    }
> >   );
> >  }
>
> > And in myResize I do the resize actions themselves. When this method
> > is called, the new sizes are available through getOffset[Width|
> > Height].
>
> > But this is not a solution for me, since I have to deal with this
> > stuff in every subclass.
>
> > HTH (but I hope that someone helps me .-))
> > Magnus

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: onResize issue with IE 7

2010-12-03 Thread PhilBeaudoin
Just found this issue which is basically recommending the same
workaround as the one proposed here:
http://code.google.com/p/google-web-toolkit/issues/detail?id=5245

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: A MVP widget within a View

2010-12-07 Thread PhilBeaudoin
Thanks metalhammer, the support is always appreciated.

Also, Fkereki, even if you don't want to use GWTP it might still be a
good place to look at for the pattern you are looking for.

Basically, the idea in GWTP is to compose the presenter of your widget
within your view's presenter. A bit more details.

Say you have:
  ContainingPresenter
  ContainingView
  WidgetPresenter
  WidgetView

You want to create WidgetPresenter (i.e. inject, or inject a
Provider<>) within ContainingPresenter. Then:
- ConainingPresenter call ContainingView.addWidget(WidgetView)
- ContainingPresenter can hold a reference to the created
WidgetPresenter, if it wants to communicate with it. Or you could use
the event bus for this.

Hope it helps!

   Philippe

On Dec 6, 11:50 pm, metalhammer29a  wrote:
> have a look at GWTP, a popular MVP framework for GWT.
>
> http://code.google.com/p/gwt-platform/
>
> GWTP is loaded with many added features,
> including Tabbed Navigation, Breadcrumbs, Spring integration, among
> others.
> The community is active, dedicated and very friendly.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: A MVP widget within a View

2010-12-07 Thread PhilBeaudoin
I use (2) personally: ContainingPresenter just knows about
WidgetPresenter and calls its methods (which in turn call methods on
WidgetView). ContainingPresenter has a factory to create
WidgetPresenter and WidgetPresenter has a factory to create
WidgetView. (Truth is, I never write these factories, I let Gin inject
the components.)

Cheers,

   Philippe

On Dec 7, 11:10 am, Brian Reilly  wrote:
> What do you think is the best way for ContainingPresenter get an
> instance of WidgetView? I think that either:
>
> 1. WidgetView needs to be an interface and ContainingPresenter is
> given a factory/provider for creating them
> 2. ContainingPresenter doesn't reference WidgetView at all
>
> One of the main benefits of using MVP is that the Presenter can be
> tested with a simple JRE test. To achieve that, you have to be very
> careful with how your view and presenter interact with each other.
>
> -Brian
>
> On Tue, Dec 7, 2010 at 11:44 AM, PhilBeaudoin
>
>
>
>
>
>
>
>  wrote:
> > Thanks metalhammer, the support is always appreciated.
>
> > Also, Fkereki, even if you don't want to use GWTP it might still be a
> > good place to look at for the pattern you are looking for.
>
> > Basically, the idea in GWTP is to compose the presenter of your widget
> > within your view's presenter. A bit more details.
>
> > Say you have:
> >  ContainingPresenter
> >  ContainingView
> >  WidgetPresenter
> >  WidgetView
>
> > You want to create WidgetPresenter (i.e. inject, or inject a
> > Provider<>) within ContainingPresenter. Then:
> > - ConainingPresenter call ContainingView.addWidget(WidgetView)
> > - ContainingPresenter can hold a reference to the created
> > WidgetPresenter, if it wants to communicate with it. Or you could use
> > the event bus for this.
>
> > Hope it helps!
>
> >   Philippe
>
> > On Dec 6, 11:50 pm, metalhammer29a  wrote:
> >> have a look at GWTP, a popular MVP framework for GWT.
>
> >>http://code.google.com/p/gwt-platform/
>
> >> GWTP is loaded with many added features,
> >> including Tabbed Navigation, Breadcrumbs, Spring integration, among
> >> others.
> >> The community is active, dedicated and very friendly.
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-web-tool...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > google-web-toolkit+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: MVP Issue

2010-12-15 Thread PhilBeaudoin
What Myles describe is discussed here:
http://code.google.com/webtoolkit/articles/mvp-architecture-2.html
And there:
http://arcbees.wordpress.com/2010/09/18/uihandlers-and-supervising-controlers/

It really makes it easier to use cool features like @UiHandler,
however if you want to keep your old approach here's how you can do:

public interface HasClickAndChangeHandlers extends HasClickHandlers,
HasChangeHandlers {}

public class HasClickAndChangeHandlersImpl
implements HasClickAndChangeHandlers {

  T widget;

  public HasClickAndChangeHandlersImpl(T widget) {
this.widget = widget;
  }
  @Override
  public HandlerRegistration addClickHandler(ClickHandler handler) {
return widget.addClickHandler(handler);
  }
  @Override
  public HandlerRegistration addChangeHandler(ChangeHandler handler) {
return widget.addChangeHandler(handler);
  }
  @Override
  public void fireEvent(GwtEvent event) {
widget.fireEvent(event);
  }
}




On Dec 14, 10:49 am, Myles Bostwick  wrote:
> I solve this by passing in the presenter to the view, the view catches these
> events and calls a particular method on the presenter.  That way the
> presenter doesn't have to know anything about the view code.  Hope that's
> helpful.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: gwtp puzzlebazar problems

2011-01-21 Thread PhilBeaudoin
Yes, PuzzleBazar is getting a bit outdated. Hive might be a better app
to check out as a good example of GWTP in action.

Cheers!

   Philippe

On Jan 20, 5:30 pm, Christian Goudreau 
wrote:
> Hive project:http://code.google.com/p/arcbees-hive/
>
> On Thu, Jan 20, 2011 at 8:29 PM, Christian Goudreau <
>
>
>
>
>
>
>
>
>
> goudreau.christ...@gmail.com> wrote:
> > I think the project needs a little update for GAE 1.4 and GWT 2.1 and also
> > Gwtp.
>
> > You could take a look at hive project to evaluate GWTP. It's a work in
> > progress that will be a complete sample for the Gwtp community.
>
> > Cheers,
>
> > On Thu, Jan 20, 2011 at 8:13 PM, Armishev, Sergey 
> > wrote:
>
> >>  Just started to evaluate GWTP library to be used in our project but have
> >> problems to run successfully PuzzleBazar app and need some help. I checked
> >> out both projects gwtp-platform and PuzzleBazar as recommended in  and
> >> configured my Eclipse project according to
> >>http://code.google.com/p/puzzlebazar/wiki/GettingStarted. It started from
> >> Eclipse OK but client started to Post  /dispatch request periodically and
> >> server was not setup to serve this request. I added  line  serve("/" +
> >> ActionImpl.*DEFAULT_SERVICE_NAME*).with(DispatchServiceImpl.*class*); to
> >> the  configureServlets() methos of DispatchServletModule and only after 
> >> that
> >> was able to sign in and see my name and “Setting” command. Setting works 
> >> but
> >> search doesn’t work. The click on search button doesn’t send any request to
> >> the server and not showing any new dialogs. I tried to set French language
> >> in “Setting” but it doesn’t make any change on GUI.
>
> >> I am using AppEngine 1.4 and GWT-2.1.0
>
> >> Am I doing something wrong or just code is broken somehow?
>
> >> -Sergey
>
> >> _
> >> This electronic message and any files transmitted with it contains
> >> information from iDirect, which may be privileged, proprietary
> >> and/or confidential. It is intended solely for the use of the individual
> >> or entity to whom they are addressed. If you are not the original
> >> recipient or the person responsible for delivering the email to the
> >> intended recipient, be advised that you have received this email
> >> in error, and that any use, dissemination, forwarding, printing, or
> >> copying of this email is strictly prohibited. If you received this email
> >> in error, please delete it and immediately notify the sender.
> >> _
>
> >>  --
> >> 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 >>  cr...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > Christian Goudreau
> >www.arcbees.com
>
> --
> Christian Goudreauwww.arcbees.com

-- 
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: chrome - prompting me to install gwt plugin but already installed

2011-01-26 Thread PhilBeaudoin
Same issue here.

-- 
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: chrome - prompting me to install gwt plugin but already installed

2011-01-26 Thread PhilBeaudoin
On Jan 26, 3:48 pm, PhilBeaudoin  wrote:
> Same issue here.

I verified this behavior on:
Chrome 9.0.597.83 beta
and
Chrome 8.0.552.237

The plugin version is:
GWT DMP Plugin - Version: 0.9.0

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



Announcing GWT-Platform 0.5

2011-01-31 Thread PhilBeaudoin
We just released version 0.5 of the GWT-Platform framework:
  http://gwtplatform.com

GWTP is one of the most popular MVP framework for GWT and is being
used in many production applications. It sports a simple annotation-
based API that makes it very easy to design web apps with nested
views, tabbed presenters, history support, and many other features.
Native support for code splitting and lazy loading ensures your app
loads very quickly even if you have a large number of presenters.

GWTP also includes a command pattern, annotation processors to
generate tedious GWT boilerplate, as well as a component to simplify
localization.

Highlights of release 0.5 include:
  * Full support for Spring in the serveer-side dispatcher
  * Client-side queuing, caching and handling of commands
  * User-customizable tabs for tabbed presenters
  * Now using the GWT 2.1 event bus (More use of GWT 2.1 MVP classes
coming soon...)

I hope you enjoy this release! Don't hesitate to join us on the GWTP
forum:
  https://groups.google.com/group/gwt-platform

Cheers,

Philippe

-- 
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: Announcing GWT-Platform 0.5

2011-01-31 Thread PhilBeaudoin
Travis' email reminded me that I did not mention how much of a
community effort GWTP is. I may be making the announcements, but the
framework wouldn't exist without the hard work of many GWT enthusiasts
bringing their strengths together.

Kudos to all contributors, and three cheers for open source!

   Philippe

On Jan 31, 6:37 am, Travis Camechis  wrote:
> Awesome. This definitely has turned out to be a great release.  I will do my
> best to try and help support the spring side of things as well as any other
> things that I could potentially aid.
>
> On Mon, Jan 31, 2011 at 7:29 AM, PhilBeaudoin
> wrote:
>
>
>
>
>
>
>
> > We just released version 0.5 of the GWT-Platform framework:
> >  http://gwtplatform.com
>
> > GWTP is one of the most popular MVP framework for GWT and is being
> > used in many production applications. It sports a simple annotation-
> > based API that makes it very easy to design web apps with nested
> > views, tabbed presenters, history support, and many other features.
> > Native support for code splitting and lazy loading ensures your app
> > loads very quickly even if you have a large number of presenters.
>
> > GWTP also includes a command pattern, annotation processors to
> > generate tedious GWT boilerplate, as well as a component to simplify
> > localization.
>
> > Highlights of release 0.5 include:
> >  * Full support for Spring in the serveer-side dispatcher
> >  * Client-side queuing, caching and handling of commands
> >  * User-customizable tabs for tabbed presenters
> >  * Now using the GWT 2.1 event bus (More use of GWT 2.1 MVP classes
> > coming soon...)
>
> > I hope you enjoy this release! Don't hesitate to join us on the GWTP
> > forum:
> >  https://groups.google.com/group/gwt-platform
>
> > Cheers,
>
> >    Philippe
>
> > --
> > 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 > cr...@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: History.replaceItem?

2011-02-04 Thread PhilBeaudoin
I agree with Ben. Here is how I would do it:

Starts on "#Home"
Selects a list: goes on to "#List?id=aaa"
Pages through: stays on "#List?id=aaa" but this view is stateful
(keeps information on the current page)
Selects a record: goes on to "#Record?id=bbb"
Hits back: goes back to "#List?id=aaa" on the last page viewed
(because it's stateful)
Back again: goes back to "#Home"

Cheers,

   Philippe

On Feb 3, 2:03 pm, Ben Imp  wrote:
> I have a possible alternative suggestion - instead of messing with the
> browser's history function, simply don't use the history tokens for
> navigating through the results list.  Then your back button will work
> as you will want it to.
>
> I do this in my application, and it seems to work quite well.
>
> -Ben
>
> On Feb 3, 12:23 pm, Jason  wrote:
>
>
>
>
>
>
>
> > Before I start, I'm working with GWT 2.1.1
>
> > In the example below the user goes to a list, pages through results,
> > views a record and then clicks Back.  Everything works as expected,
> > the user is viewing page 4, clicks a row and views the record, clicks
> > Back and they land on page 4.  But if they click Back again, it goes
> > to page 3, then page 2, etc.
>
> > 1. User is on the home page -> History.newItem( HOME, true )
> > 2. User selects list of records page -> History.newItem( LIST, true )
> > 3. User pages through results page (using CellTable) ->
> > History.newItem( LIST#page2, false )
> > 4. User pages through results page -> History.newItem( LIST#page3,
> > false )
> > 5. User pages through results page -> History.newItem( LIST#page4,
> > false )
> > 6. User selects record to view -> History.newItem( VIEW#record123,
> > true )
> > 7. User clicks Back, token is replaced with LIST#page4
> > 8. User clicks Back, token is replaced with LIST#page3
> > 9. User clicks Back, token is replaced with LIST#page2
> > 10. User clicks Back, token is replaced with LIST
>
> > What I'd prefer to see is that when the press back from the record
> > page, it goes to the list page they were viewing and if they click
> > back again, it moves back to the home page.  So far I've worked around
> > this by adding a 'Close' button to the list page that is moves them to
> > the home page directly.
>
> > This would be easy if I could call 'replaceItem( TOKEN, false )'
> > instead of 'newItem( TOKEN, false )' in steps 2 through 5 above.  This
> > call would replace the current URL in the browser, and rewrite the
> > last entry in the history stack with the new entry.
>
> > Anyone else have this 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: Gin, SingleInstanceProvider?

2011-02-05 Thread PhilBeaudoin
Here is a simple way to do what you want:

public class Lazy {
  @Inject Provider provider;
  private T instance;
  public T get( ) {
if (instance == null) {
  instance = provider.get();
}
return instance;
  }
}

public class Main {
  @Inject Lazy thingA;
  @Inject Lazy thingB;
  Main() { }
}

And then this passes:

Main main = ginjector.getMain();
assert(main.thingA.get() == main.thingA.get());
assert(main.thingA.get() != main.thingB.get());

I have tested it with Gin trunk, but it needs the fix mentioned by
Thomas in:
http://code.google.com/p/google-gin/issues/detail?id=136

(Cross-posted in the issue.)

On Feb 5, 3:34 am, Gal Dolber  wrote:
> Maybe this will clarify what I was looking 
> for:http://codereview.appspot.com/4128063/
> I implemented the SingleProvider, here is the test(FooBar isn't a
> singleton):
>
>   public void testProviderInGinjector() {
>
>     Provider fooProvider = injector.getFooBarProvider();
>
>     assertNotSame(fooProvider.get(), fooProvider.get());    // A Provider
> returns always new instances
>
>   }
>
>   public void testSingleProviderInGinjector() {
>
>     SingleProvider fooSingleProvider = injector
> .getFooBarSingleProvider();
>
>     assertEquals(fooSingleProvider.get(), fooSingleProvider.get());    // A
> SingleProvider returns always the same instance
>
>   }
>
>
>
>
>
>
>
>
>
> On Thu, Feb 3, 2011 at 7:40 PM, Gal Dolber  wrote:
> > Thanks
>
> > On Thu, Feb 3, 2011 at 7:02 PM, zixzigma  wrote:
>
> >> I am not sure if this helps,
> >> but there is a feature called Binding Annotations,
> >> you can use BindingAnnotation to differentiate the Provider used in Class
> >> A,
> >> from the one used in Class B.
>
> >>http://code.google.com/p/google-guice/wiki/BindingAnnotations
>
> >>  --
> >> 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 >>  cr...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-toolkit?hl=en.
>
> > --
> > Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> >http://code.google.com/p/guit/
>
> --
> Guit: Elegant, beautiful, modular and *production ready* gwt applications.
>
> http://code.google.com/p/guit/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.



Re: History.replaceItem?

2011-02-06 Thread PhilBeaudoin
@zixzigma: stateful in the sense that the view (or the presenter if
you're using MVP) has a private variable that keeps the last page seen
and is only initialized on a new search. As a consequence, it would
show the exact same page if you navigate back to it.

On Feb 4, 2:08 pm, Jason  wrote:
> Good suggestions, the reason that I've been using the URL to rewrite
> the list page parameters (rather than having a stateful page) is that
> I'm using it for both paging and the query parameters.  For example,
> if the user is searching for customers where the name starts with
> 'ABC' then the URL is rewritten as something like
> 'list#customerNameStartsWith=ABC&page=2'.  This allows the user to
> easily bookmark a query or page of results.

You could still use the stateful view approach with the query string
in the URL, letting the user bookmark the query. With that approach,
the only thing you can't do is let him bookmark the page number. IMHO
bookmarking a page often does not make sense, especially if you have a
dynamic database where the search results change through time.

-- 
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: ClientBundle images missing in IE8

2011-02-16 Thread PhilBeaudoin
I've had ClientBundle bugs specifically on IE with images larger than 32kb. 
If this is your problem you may want to star that issue:
  http://code.google.com/p/google-web-toolkit/issues/detail?id=5114

It also proposes a couple of workaround. In my case, I have reverted to 
using image URLs in IE8 for the few cases that did not work. (I still use a 
ClientBundle in the other modern browsers.)

   Philippe

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