Re: History and server call.

2010-06-17 Thread Tristan Slominski
cation for Mobile or new
web look create ur view again. This is what MVP gives.



Basically i am quite excited about using this new MVP archt. and
History and event bus(I Love Eventbus, it solves me lot of things and
long chains of async calls and also it gives me opportunity to make
client side calls asynch(i.e. if i find that data is present in cache
then i raise the event and view/presenter handler will be called in
async was as if server has returned)

happy coding guys.
Feel free to comment.


Thanks,
Ravi.














On Jun 17, 1:45 pm, Tristan Slominski 
wrote:

> here's an example i wrote that walks through place service, hope that
helps
> with place service c...
> 2010/6/17 Jaroslav Záruba 

>
>
>
> > I searched too but have found only this:
>
> >http://code.google.com/p/google-web-toolkit/source/browse/branches/2
> > <http://code.google.com/p/google-web-toolkit/source/browse/branches/2...
.>It

> > seems to be missing in 2.1 m1 yet.
>

> > On Thu, Jun 17, 2010 at 12:30 PM, Ravi Sharma 
wrote:
>
> >> Hi Thomas,
> >...
> >> google-web-toolkit+unsubscr...@googlegroups.com

> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/google-web-tool...
> > google-web-toolkit+unsubscr...@googlegroups.com

> > .
> > For more options, visit this group at
> >http://groups.google.com/group/google-web-toolkit...

-- 
You received 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: History and server call.

2010-06-17 Thread Tristan Slominski
here's an example i wrote that walks through place service, hope that helps
with place service concepts. note that I got feedback that two types of
place events that i implemented here are not necessary and that one would be
sufficient, but i haven't had the time to refactor yet. it should however
capture the essence of what a place service does. I too am waiting for 2.1
to settle and see where Google wants to go with that, in the mean time this
is a production system description:

http://code.google.com/p/handlebars/wiki/PlaceServiceOverview

2010/6/17 Jaroslav Záruba 

> I searched too but have found only this:
>
> http://code.google.com/p/google-web-toolkit/source/browse/branches/2.1/bikeshed/src/com/google/gwt/app/place/
> It
> seems to be missing in 2.1 m1 yet.
>
>
> On Thu, Jun 17, 2010 at 12:30 PM, Ravi Sharma  wrote:
>
>> Hi Thomas,
>> I checked this URL
>> http://code.google.com/webtoolkit/doc/latest/ReleaseNotes.html,
>> for GWT 2.1 but didnt find much information about Activities. Is it
>> explained somewhere else. Can you share such info/link so i can look
>> into it dont reinvent everything. I am about to start implementing
>> "switch view only when ready" pattern but if its present in 2.1 then i
>> would love to use it instead of writing my own.
>>
>> Thanks,
>> Ravi.
>>
>> On Jun 17, 10:59 am, Thomas Broyer  wrote:
>> > On 16 juin, 15:31, Tristan  wrote:
>> >
>> > > sounds like you're reinventing the place service, with event bus, with
>> > > local cache rpc service, but doing it in a new, innovative, complex
>> > > and if the code grows on you perhaps unintelligible way. if you're the
>> > > only one who will support this ever, that may work. otherwise i would
>> > > seriously look into a bunch of mvp-like frameworks out there and look
>> > > at how place services/managers, local caches, and event buses are
>> > > implemented. you don't need to use the framework, but the concepts are
>> > > very helpful to organize the code. they're straightforward and most
>> > > people understand the design.
>> >
>> > Sure Ravi is "reinventing" the "place service" here. Sure he should
>> > move its "cache" to a "local cache rpc service". But the main issue
>> > with his code is that he has a "synchronous method" which has to do
>> > something "asynchronous".
>> >
>> > Now, most "place services & MVP" implementations I've seen don't use
>> > the "switch view only when ready" pattern. The "activities" coming
>> > into GWT 2.1 do that however.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Web Toolkit" group.
>> To post to this group, send email to google-web-tool...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscr...@googlegroups.com
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/google-web-toolkit?hl=en.
>>
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received 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, servlet, JSP and datastore

2010-06-17 Thread Tristan Slominski
hey there, my work is on app engine so i don't have an example you
requested, but probably someone else in the community does.

On Thu, Jun 17, 2010 at 06:06, kensai yanesha wrote:

> Tristan maybe you could help me, do you have any completed Eclipse
> project with grid connected to database? I would thank you if you
> could provide me such thing to learn more. I am on dead point. We will
> use only stored procedures for communication with database and I am
> not able to find any rich subject related to this over net.
>
> Our application will run finally on intranet, so in our case there is
> no possibility of using online google app engine, altough I already
> tried to use it and it worked well.
>
> Thank you
>
>
> On 9 čvn, 18:32, Tristan Slominski 
> wrote:
> > @kensai
> >
> > If you look at Google App Engine, the datastore is part of Google's
> > free-to-start cloud hosting service.
> >
> > On Wed, Jun 9, 2010 at 02:56, kensai yanesha  >wrote:
> >
> > > Hi Laurent,
> >
> > > I am also new to GWT, also fascinated :-). I also already went trough
> > > samples and tutorials and well stopped at the point how to bind
> > > components to, in my case, database table in Oracle database. I don't
> > > know what do you mean exactly by "Google datastore" but I think you
> > > mean the Datastore class in GWT framework.
> >
> > > Even GWT is very good for creating nice GUI on the client side, it's
> > > object-relational mapping is still in incubation period and you
> > > following options how to proceed:
> > > 1.) You need to manually write the functions which manipulate with
> > > data  on the server side and call it via AJAX (JavaScript) from the
> > > client side when necessary.
> > > 2.) Look at EoD SQL project athttp://eodsql.sourceforge.net/this
> > > library may help you, there are also tutorials how to use it together
> > > with GWT
> > > 3.) This is the easiest, free for trial then payed, option. Use
> > > SmartGWT Professional or Enterprise. Take a look at it
> > >http://code.google.com/p/smartgwt/. It has integrated tomcat inside.
> > > In the SDK there are lot of examples and tutorials, but also something
> > > what you will find maybe really useful:
> > > Datasource generator - generate XML DS descriptional file, works with
> > > standard database engines, etc.
> > > Visual designer - you can create client layouts in visual way, in this
> > > tool you are also able to use for example Datagrid directly with
> > > Datasource you created in generator, and you have component directly
> > > interacting with any datasource.
> >
> > > I found SmartGWT SDK best for learning, as standard GWT, you have
> > > access to all Java, XML files, but from Visual designer you also
> > > generate JSP file and can see what have you created.
> >
> > > Hope I helped you. Also send me your experiences I you already found
> > > something better, different.
> >
> > > Best regards,
> >
> > > Kensai
> > > On Jun 8, 11:08 am, laurentleb  wrote:
> > > > To the GWT community,
> >
> > > > I am pretty new to GWT but familiar with n-tiers application
> > > > development. I find GWT fascinating to develop rich web applications
> > > > and went through the tutorial. This is amazingly simple to achieve.
> >
> > > > On the other side, I tested also Google app Engine to develop and
> > > > deploy a JSP/servlet + datastore testing app. Once again, it is
> really
> > > > efficient.
> >
> > > > My question is : how can I combine these two approaches to build nice
> > > > applications on the client side with efficient business java code on
> > > > the server side and data storing in Google datastore ?
> >
> > > > Are there some guidelines ? Is there a policy ?
> >
> > > > Thank you in advance for your help.
> >
> > > > Laurent
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received 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: layout problems with positioning or aligning content

2010-06-11 Thread Tristan Slominski
it was just a rough example.. not the exact code

here's a production code that centers content in the center of the page
vertically and horizontally

  

  

  <  content that's centered here >

On Fri, Jun 11, 2010 at 06:58, Magnus  wrote:

> Hi,
>
> your example does not work for me.
>
> 
>
> This means AFAIK that the content of the VerticalPanel are aligned
> within the VerticalPanel, but not the VerticalPanel itself.
> Also it does not align vertically...
>
> Magnus
>
>
> On 11 Jun., 09:40, Tristan Slominski 
> wrote:
> > I don't understand how UiBinder cannot be used to do what you describe.
> You
> > may have to create multiple views (for example "fileMenuView") that you
> > attach when the user clicks on "File" in the menu. But that
> "fileMenuView"
> > could be fully described in UiBinder.  how it is attached probably won't
> be
> > done in UiBinder but it's just one dynamic part of it...   I haven't
> looked
> > into the menu widget too much, but that itself can probably do some of
> that
> > declaratively
> >
> > centering a form is as easy as centering some panels
> >
> > 
> >   
> > ...
> >etc..
> >
> > I use UiBinder and I have centered forms, popups, menus, etc
> >
> > it's possible.. but remember it's a tool.. you may not be able to declare
> > where the menu should be attached, but you can declare the menu itself in
> > the uibinder. use what works best for each purpose.
> >
> > On Tue, Jun 8, 2010 at 12:13, Magnus 
> wrote:
> > > I would like a menubar, and whenever a menu item is selected, I would
> > > like to show a panel.
> >
> > > The screen should have a north, west, east and south section, and in
> > > the center the current panel should be shown.
> >
> > > For example, if the user selects "create account", a form should be
> > > shown to enter the data for a new account.
> >
> > > And I would like the form to be centered within the middle space...
> >
> > > Magnus
> >
> > > On Jun 8, 5:48 pm, Tristan Slominski 
> > > wrote:
> > > > What do you mean by "dynamically generated"? Are you setting styles
> and
> > > > widths programmatically? What's the use case?
> >
> > > > On Tue, Jun 8, 2010 at 10:45, Magnus 
> > > wrote:
> > > > > Hi fmod,
> >
> > > > > I am thinking about your advice using UIbinder, but I think I
> cannot
> > > > > use it, because my layout is dynamically generated. I think that
> the
> > > > > declarative way using UIbinder is for fixed panels like forms,
> isn't
> > > > > it?
> >
> > > > > 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.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Google Web Toolkit" group.
> > > To post to this group, send email to
> google-web-tool...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-web-toolkit+unsubscr...@googlegroups.com
> 
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received 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: layout problems with positioning or aligning content

2010-06-11 Thread Tristan Slominski
I don't understand how UiBinder cannot be used to do what you describe. You
may have to create multiple views (for example "fileMenuView") that you
attach when the user clicks on "File" in the menu. But that "fileMenuView"
could be fully described in UiBinder.  how it is attached probably won't be
done in UiBinder but it's just one dynamic part of it...   I haven't looked
into the menu widget too much, but that itself can probably do some of that
declaratively

centering a form is as easy as centering some panels


  
...
   etc..

I use UiBinder and I have centered forms, popups, menus, etc

it's possible.. but remember it's a tool.. you may not be able to declare
where the menu should be attached, but you can declare the menu itself in
the uibinder. use what works best for each purpose.



On Tue, Jun 8, 2010 at 12:13, Magnus  wrote:

> I would like a menubar, and whenever a menu item is selected, I would
> like to show a panel.
>
> The screen should have a north, west, east and south section, and in
> the center the current panel should be shown.
>
> For example, if the user selects "create account", a form should be
> shown to enter the data for a new account.
>
> And I would like the form to be centered within the middle space...
>
> Magnus
>
> On Jun 8, 5:48 pm, Tristan Slominski 
> wrote:
> > What do you mean by "dynamically generated"? Are you setting styles and
> > widths programmatically? What's the use case?
> >
> > On Tue, Jun 8, 2010 at 10:45, Magnus 
> wrote:
> > > Hi fmod,
> >
> > > I am thinking about your advice using UIbinder, but I think I cannot
> > > use it, because my layout is dynamically generated. I think that the
> > > declarative way using UIbinder is for fixed panels like forms, isn't
> > > it?
> >
> > > 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.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: GWT, servlet, JSP and datastore

2010-06-09 Thread Tristan Slominski
@kensai

If you look at Google App Engine, the datastore is part of Google's
free-to-start cloud hosting service.

On Wed, Jun 9, 2010 at 02:56, kensai yanesha wrote:

> Hi Laurent,
>
> I am also new to GWT, also fascinated :-). I also already went trough
> samples and tutorials and well stopped at the point how to bind
> components to, in my case, database table in Oracle database. I don't
> know what do you mean exactly by "Google datastore" but I think you
> mean the Datastore class in GWT framework.
>
> Even GWT is very good for creating nice GUI on the client side, it's
> object-relational mapping is still in incubation period and you
> following options how to proceed:
> 1.) You need to manually write the functions which manipulate with
> data  on the server side and call it via AJAX (JavaScript) from the
> client side when necessary.
> 2.) Look at EoD SQL project at http://eodsql.sourceforge.net/ this
> library may help you, there are also tutorials how to use it together
> with GWT
> 3.) This is the easiest, free for trial then payed, option. Use
> SmartGWT Professional or Enterprise. Take a look at it
> http://code.google.com/p/smartgwt/. It has integrated tomcat inside.
> In the SDK there are lot of examples and tutorials, but also something
> what you will find maybe really useful:
> Datasource generator - generate XML DS descriptional file, works with
> standard database engines, etc.
> Visual designer - you can create client layouts in visual way, in this
> tool you are also able to use for example Datagrid directly with
> Datasource you created in generator, and you have component directly
> interacting with any datasource.
>
> I found SmartGWT SDK best for learning, as standard GWT, you have
> access to all Java, XML files, but from Visual designer you also
> generate JSP file and can see what have you created.
>
> Hope I helped you. Also send me your experiences I you already found
> something better, different.
>
> Best regards,
>
> Kensai
> On Jun 8, 11:08 am, laurentleb  wrote:
> > To the GWT community,
> >
> > I am pretty new to GWT but familiar with n-tiers application
> > development. I find GWT fascinating to develop rich web applications
> > and went through the tutorial. This is amazingly simple to achieve.
> >
> > On the other side, I tested also Google app Engine to develop and
> > deploy a JSP/servlet + datastore testing app. Once again, it is really
> > efficient.
> >
> > My question is : how can I combine these two approaches to build nice
> > applications on the client side with efficient business java code on
> > the server side and data storing in Google datastore ?
> >
> > Are there some guidelines ? Is there a policy ?
> >
> > Thank you in advance for your help.
> >
> > Laurent
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: layout problems with positioning or aligning content

2010-06-08 Thread Tristan Slominski
What do you mean by "dynamically generated"? Are you setting styles and
widths programmatically? What's the use case?

On Tue, Jun 8, 2010 at 10:45, Magnus  wrote:

> Hi fmod,
>
> I am thinking about your advice using UIbinder, but I think I cannot
> use it, because my layout is dynamically generated. I think that the
> declarative way using UIbinder is for fixed panels like forms, isn't
> it?
>
> 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.
>
>

-- 
You received 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: Feedback on "Large scale app development MVP article"

2010-06-03 Thread Tristan Slominski
maybe it's that I expect too much MVPness from an MVP framework? as you
pointed out, the data widgets are pretty much the MVC observer pattern that
uses Request Factory to get it's stuff. From the programmer's perspective i
would argue that a data widget has nothing to do with MVP (not as i look at
it as a programmer and how it fits as a component into my application). it's
not a bad thing in itself, but when I'm writing a large application, then
this is where complexity begins...  now I have some MVP things, ok, let's
add some data widgets that talk directly to things.. ok, let's tie my data
directly to JPA representation on the server... and viola, I have a
datastore viewer in GWT. Sort of missing the point of a rich web application
I think.

On Thu, Jun 3, 2010 at 10:53, Thomas Broyer  wrote:

>
>
> On 3 juin, 17:15, Tristan Slominski 
> wrote:
> > i think at this point we should all probably see
> >
> > http://code.google.com/events/io/2010/sessions/architecting-productio...
> >
> > and see what they're trying to do there. Seems like Google decided the
> MVP
> > approach is obsolete, which might muddle the issue.
>
> Not at all, on the contrary!
> It however clarify things about how Google sees MVP in GWT.
> They're even adding some MVP "framework" to GWT 2.1 (IsWidget and
> Activities, where an Activity is more or less your presenter, from
> what I understood).
> RequestFactory on the other hand is a new thing for efficient CRUD
> operations on entity objects, which plugs more-or-less directly into
> the new Data widgets. Those widgets do blur the line a bit, but
> they're not really about presentation "logic", and they're somehow MVP-
> based themselves.
>
> >
> >
> >
> > On Thu, Jun 3, 2010 at 09:26, Thomas Broyer  wrote:
> >
> > > On 2 juin, 20:43, nogridbag  wrote:
> > > > Mainly because of habit - I always try to avoid mixing UI related
> code
> > > > with client/server code.  IMHO, it seems similar to doing RPC calls
> in
> > > > a controller or view in MVC which I think is a big no-no.
> >
> > > > Sticking with the article example, let's say you have two places
> where
> > > > you want to display contacts.  The data is the same, but the views
> may
> > > > be completely different and thus you may want different presenters.
> >
> > > > So now you have:
> > > > ContactsModel
> > > > ContactsPresenter
> > > > ContactsView
> >
> > > > ContactsPresenter2
> > > > ContactsView2
> >
> > > > You already have the RPC call to load and initialize the
> ContactsModel
> > > > in ContactsPresenter. Do you simply duplicate this in
> > > > ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> > > > ContactsPresenter?
> >
> > > > Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> > > > and coded any thing with MVP yet.  If this is the accepted practice I
> > > > will probably do it this way too.
> >
> > > How about using some client-side cache, so that when your second
> > > presenter asks for the same data as the first one, you don't send a
> > > request on the wire (have a look at Ray Ryan's I/O 2009 talk:
> >
> > >http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPr.
> ..
> > > )
> > > Your presenters don't have to know there's some caching involved
> > > though, as long as the service instance is injected into the
> > > presenter, you can pass a "right to the wire" implementation (a direct
> > > GWT.create() on your service interface) or a "through cache"
> > > implementation.
> >
> > > If you want your views to be somehow "synchronized" (when one
> > > presenter makes a request, the other is informed, at least when the
> > > response comes back), then fire some events on the event bus (again,
> > > this would be implemented in your service, not in the presenters
> > > themselves).
> >
> > > Again, MVP as used in GWT (at least as promoted by Google) has mainly
> > > three goals:
> > >  - making unit tests possible in "pure Java" (no browser, or browser-
> > > emulation, involved), which reduces testing time drastically!
> > >  - decoupling things a bit so you could use different views for a
> > > single "presentation logic" (let's say a desktop view that presents
> > > data in c

Re: How to add new event to HandlerManager

2010-06-03 Thread Tristan Slominski
@Thomas  haha... wow... now looking at it in the morning i see what you're
pointing out. I didn't even realize it was KeyPressEvent :)

On Thu, Jun 3, 2010 at 09:39, Thomas Broyer  wrote:

>
>
> On 31 mai, 20:54, justint  wrote:
> > Hi,  I'm fairly new to GWT and I'm trying to add events to my
> > "eventBus"...
> >
> > final HandlerManager eventBus = new HandlerManager(null);
> > ..
> >
> > eventBus.addHandler(RequestEvent.TYPE, new
> RequestEvent.Handler() {
> > public void onRequestEvent(RequestEvent
> requestEvent) {
> > if (requestEvent.getState() ==
> State.SENT) {
> > System.out.println("RPC sent!");
> > }
> > }
> > });
> >
> > This RequestEvent event works fine, but this doesn't work for
> > instance...or at least I don't think it works:
> > eventBus.addHandler(KeyPressEvent.getType(), new
> KeyPressHandler()
> > {
> > public void onKeyPress(KeyPressEvent arg0) {
> > System.out.println("Key pressed event!");
> > }
> > });
> >
> > Any tips are greatly appreciated!
>
> Are you *really* firing KeyPressEvents on your event bus ?!
>
> @Tristan: getAssociatedType and getType return the same object,
> getAssociatedType is not static though, it's part of the GwtEvent
> interface (and used by the HandlerManager to find back corresponding
> handlers in its internal registry).
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Feedback on "Large scale app development MVP article"

2010-06-03 Thread Tristan Slominski
i think at this point we should all probably see

http://code.google.com/events/io/2010/sessions/architecting-production-gwt.html

and see what they're trying to do there. Seems like Google decided the MVP
approach is obsolete, which might muddle the issue.

On Thu, Jun 3, 2010 at 09:26, Thomas Broyer  wrote:

>
>
> On 2 juin, 20:43, nogridbag  wrote:
> > Mainly because of habit - I always try to avoid mixing UI related code
> > with client/server code.  IMHO, it seems similar to doing RPC calls in
> > a controller or view in MVC which I think is a big no-no.
> >
> > Sticking with the article example, let's say you have two places where
> > you want to display contacts.  The data is the same, but the views may
> > be completely different and thus you may want different presenters.
> >
> > So now you have:
> > ContactsModel
> > ContactsPresenter
> > ContactsView
> >
> > ContactsPresenter2
> > ContactsView2
> >
> > You already have the RPC call to load and initialize the ContactsModel
> > in ContactsPresenter. Do you simply duplicate this in
> > ContactsPresenter2 or does ContactsPresenter2 have a dependency on
> > ContactsPresenter?
> >
> > Anyway, I'm really just thinking out loud here ;)  I haven't sat down
> > and coded any thing with MVP yet.  If this is the accepted practice I
> > will probably do it this way too.
>
> How about using some client-side cache, so that when your second
> presenter asks for the same data as the first one, you don't send a
> request on the wire (have a look at Ray Ryan's I/O 2009 talk:
>
> http://code.google.com/events/io/2009/sessions/GoogleWebToolkitBestPractices.html
> )
> Your presenters don't have to know there's some caching involved
> though, as long as the service instance is injected into the
> presenter, you can pass a "right to the wire" implementation (a direct
> GWT.create() on your service interface) or a "through cache"
> implementation.
>
> If you want your views to be somehow "synchronized" (when one
> presenter makes a request, the other is informed, at least when the
> response comes back), then fire some events on the event bus (again,
> this would be implemented in your service, not in the presenters
> themselves).
>
> Again, MVP as used in GWT (at least as promoted by Google) has mainly
> three goals:
>  - making unit tests possible in "pure Java" (no browser, or browser-
> emulation, involved), which reduces testing time drastically!
>  - decoupling things a bit so you could use different views for a
> single "presentation logic" (let's say a desktop view that presents
> data in columns, and a mobile view that uses a taller single-column
> screen)
>  - presenters a lightweight compared to views, so instead of
> "resetting" your presenter with some new data, just throw it away,
> create a new one with the new data, and "attach" it to the very same
> view.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: GWT Design Problem

2010-06-03 Thread Tristan Slominski
I for one don't want to write any more xml in my life than I have to. I
prefer my history service written in Java with auto completion, etc...
that's why I use Guice over other DI frameworks. I think your argument is
for declarative history service, which I could get behind. But the
particular xml implementation of it, yuck.

On Thu, Jun 3, 2010 at 07:06, Nathan Wells  wrote:

> I would suggest watching Ray Ryan's videos on architecture from Google
> I/O 2009 and 2010. That couple of hours will help you understand how
> to solve a lot of your architecture/design problems.
>
> On Jun 3, 4:22 am, ping2ravi  wrote:
> > This post i am not asking a problem but suggesting a feature request
> > for GWT.
> > 
> >
> > Now history stuff is working well, except few things(Basic GWT issue/
> > feature, because of its nature of converting java into javascript at
> > the time of compilation and the classes it supports in .client
> > packages).
> >
> > I have declared the ValueChangeHandler but then in that code i need to
> > check one or more particular param, lets say page and then i write
> > 5-10 if then else statement to call my proper handlers.
> >
> > say if page=main, then call com.my.MainPanel.loadFromHistory(params)
> > say if page=editData1, then call
> > com.my.EditData1Panel.loadFromHistory(params)
> > say if page=editData2, then call
> > com.my.EditData2Panel.loadFromHistory(params)
> > say if page=showData1, then call
> > com.my.ShowData1Panel.loadFromHistory(params)
> > say if page=showData2, then call
> > com.my.ShowData2Panel.loadFromHistory(params)
> > etc etc
> >
> > In Spring/MVC architect we have seen that we don't need to write such
> > ifs as DispatchServlet can read our xml and call our handlers
> > depending on xml content(url-handler mappings). In Spring it was
> > implemented using Reflection which cant be used in GWT as there are no
> > JAVA classes at run time, its all javascript. Understandable.No
> > argument over it but its still solvable.
> >
> > We should not forget the javascript is loosely coupled language and
> > implementing such things(Reflection) should not be a big
> > hassle.Reflection makes Java loosely coupled at compile time(ofcourse
> > wrong types will create problem at runtime)
> >
> > Solution :
> >
> > We already have UIBinders where GWT compiler reads the xml and
> > generate proper java script. Why cant we have something like for
> > History(say HistoryBinder.xml) and i should be able to define some xml
> > like
> > 
> >   
> > 
> > 
> >  
> > 
> >
> > And all handlers can implement a Interface like
> > public interface HistoryHandler{
> > public handleHsitory(Map params, any other param which
> > is required)
> >
> > }
> >
> > and at compile time, compiler will check each class mentioned in this
> > xml and generate error if anything wrong with class else generate the
> > proper code behind the scene as lots of If then else(Compiler writers
> > cant use Reflection for generated scriptts too :) )
> >
> > and then GWT can call our proper handler whenever history event occurs
> > and we will never have to implement ValueChangeHandler.And GWT will
> > also take care of converting our history tokens into proper hashmap
> > like structure or any other key-value pair structure.
> >
> >  This will make code writing much easier, more understandable, makes
> > Developer's life bit easier. And i am sure it will add value to GWT.
> >
> > Thanks,
> > Ravi
> >
> > On Jun 2, 8:13 pm, Frederic Conrotte 
> > wrote:
> >
> >
> >
> > > Hello
> >
> > > You should check this book:http://apress.com/book/view/9781590599853
> >
> > > And the associated website:http://code.google.com/p/tocollege-net/
> >
> > > It mix both HTML/Freemarker templates with GWT modules.
> >
> > > Fred
> >
> > > On 1 juin, 18:02, ping2ravi  wrote:
> >
> > > > Hi All,
> > > > I am trying to create a website and stuck with confusion over whether
> > > > to use GWT for presentation or JSP based framework like Spring MVC. I
> > > > want UI to be very user friendly,faster etc and this is possible with
> > > > GWT. But following problem comes with GWT
> >
> > > > 1) Book marking of any page. As GWT is suppose to be one url
> > > > application and everything should come under it. But how i will solve
> > > > the problem if i have a site like Facebook, where url can be for User
> > > > profile(/profile/1), My Home(/home), community(/cpmm),video(/video)
> > > > etc. I can solve it by using one html and keeping everything as
> > > > params(i.e. /myapp.htm?type=profile&id=1) but then i feel its not how
> > > > GWT should be used or is this the only way i will be able to use it.
> >
> > > > 2) Not searchable by Search Engines. Search engine can not see what
> > > > the content is as it always comes through RPC calls.
> >
> > > > 3) Implementing History is Overhead, if i fix the issue 1
> >
> > > > 4) Its not possibkle to mix jsps and GWT. I tried but GWT css start

Re: Share access beween two UiBinder files?

2010-05-28 Thread Tristan Slominski
Hmm...

Why don't you do it in main? It's the one thing that knows about both.

Buttons.java:

@UiHandler("nextButton")
void onClickNext(ClickEvent click) {
  getMain().onClickNext();
}

Main.java:

public void onClickNext(){
  getTextFields.setText("something");
}

On Fri, May 28, 2010 at 10:19, Mark Schewe  wrote:

> First of all thank you for the answer.
> I am new to GWT so I am a bit confused and not know yet the correct
> terminology :)
>
> Main.ui.xml:
>
> 
>
> // calls TextFields.ui.xml
>  // calls Buttons.ui.xml
>
> 
>
>
> Buttons.ui.xml:
>
> 
>prev
>next
> 
>
>
> TextFields.ui.xml:
>
> 
>blah
> 
>
>
> Buttons.java:
>
> @UiHandler("nextButton")
> void onClickNext(ClickEvent click) {
>// change text field in TextFields.ui.xml
> }
>
> In this last handler I need to access the textfield. I hope my problem
> is now easier to understand. I guess this has something to do with
> @UiFactory  but I just don't get it.
>
> 2010/5/28 Tristan :
> > like this?
> >
> > Buttons buttons = new Buttons();
> > TextFields fields = new TextFields();
> > buttons.setFieds(fields);
> > fields.setButtons(buttons);
> >
> > ??
> >
> > Can you elaborate?
> >
> > On May 28, 7:05 am, Mark  wrote:
> >> Hello,
> >>
> >> I need your help! I've got two files:
> >>
> >> Buttons.ui.xml / Buttons.java
> >> TextFields.ui.xml / TextFields.java
> >>
> >> Now I need to change the content of the TextFields in the Buttons and
> >> vice versa. Is it possible to do this without merging the two ui and
> >> java files? I hope you understand what I mean.
> >>
> >> Thank you very much for your help!
> >> Mark
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> > To post to this group, send email to google-web-toolkit@googlegroups.com
> .
> > To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> > For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
> >
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-tool...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

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



Re: Grid uibinder

2010-03-24 Thread Tristan Slominski
Same as other widgets.

@UiField
Grid myGrid;

or

@UiField(provided = true)
Grid myGrid = new Grid(1,1);

Depending on what you're doing.

On Mar 22, 2010 9:50 AM, "gadaleta.marco"  wrote:

but if i want to use grid inside code, how can bind it with uibinder
method?

On 20 Mar, 18:33, Tristan  wrote:
> someone said this here before, but it might be easier to use
>
> 
>   
>
> 
> etc...
> 
>
> On Mar 20, 11:45 am, "gadaleta.marco" 
> wrote:
>
>
>
> > Can anyone help me to usegridwidget insideuibinder?
>
> > Thx
> > Marco

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

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