Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-13 Thread George Moschovitis

>
> - I would prefer using ApplicationRequestFactory instead of 
>> MyRequestFactory, etc...
>>
> - I would move the files in client.application to client
>>
>
> Done. Much more logical.
>

how about moving:

model

to: 

shared/proxy 

?

-g.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-13 Thread George Moschovitis

>
> Is what you are suggesting closer to a 1:1 mapping of places to activities? 
> With an AdminUserPlace taking you to AdminUserActivity and AdminPagePlace to 
> AdminPageActivity? Then each place only stores information relevant to the 
> activity to which it maps to?
>
 
I am not really suggesting something, certainly not a 1:1 mapping. I was 
thinking about having 3 places:

PersonListPlace
PersonEditPlace
PersonCreatePlace

and 2 activities:

PersonListActivity
PersonEditActivity

but to tell you the truth, I kind of like your version (one single 
PersonPlace). I am wondering what more experienced GWT developers think 
though.

thanks,
-g.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-12 Thread Jake Wharton

>
> - Is using a single PlaceController with multiple 'identifiers' really a 
> best practice?
>

I'm not sure of the proper implementation of this. In other implementations 
of this type of system, I have always used what GWT calls a "place" as 
something which encapsulates numerous "activities" which have a common 
similarity.

For example, I would have thought you would have a single AdminPlace which 
managed activities such as AdminUserActivity, AdminPageActivity, 
AdminForumActivity, etc.

Is what you are suggesting closer to a 1:1 mapping of places to activities? 
With an AdminUserPlace taking you to AdminUserActivity and AdminPagePlace to 
AdminPageActivity? Then each place only stores information relevant to the 
activity to which it maps to?
 

> - I would prefer using ApplicationRequestFactory instead of 
> MyRequestFactory, etc...
>
- I would move the files in client.application to client
>

Done. Much more logical.
 

> Moreover, I would love to see a more advanced domain object and related 
> Editor (maybe even
> an object graph Editor).
>

I definitely agree. The current implementation is more of a proof-on-concept 
than anything useful. I have a GitHub issue to expand editors already 
created: https://github.com/JakeWharton/GwtBase/issues/issue/11

Also, thanks for the pull request! It has been merged.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-12 Thread George Moschovitis
Some questions / suggestions:

- Is using a single PlaceController with multiple 'identifiers' really a 
best practice?
- I would prefer using ApplicationRequestFactory instead of 
MyRequestFactory, etc...
- I would move the files in client.application to client

Moreover, I would love to see a more advanced domain object and related 
Editor (maybe even
an object graph Editor).

thanks,
-g.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-11 Thread Jake Wharton
Hi Thomas,

Thanks for the suggestions. This is exactly the type of feedback I was 
looking for. I have updated the project with implementations of your 
recommendations.

I do have a question about provider injection into the ActivityMapper, 
though. Is it necessary for me to inject an instance of a Provider for each 
of the activity types? Is it possible to inject a generic provider which can 
instantiate any of the activities via something like 
provider.get(SomeActivity.class) or provider.get()?

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-11 Thread Thomas Broyer
Why are your activities singletons? (they're injected into the 
ActivityMapper, which is instantiated once only, so in practice they are 
singletons, even if not declared as such in your GIN bindings). Activities 
are "cheap", so unless you *have* to maintain state between use (I believe 
it's not the case for the PersonEditActivity, it could be for the 
PersonListActivity but not currently in your code), you shouldn't use 
singletons.
Note that in this case, you should call setPresenter from within your 
activity's start() (to make sure an "instantiated but not started" activity 
doesn't set itself as the "presenter for the view" and "steal" this role 
from an "already started" activity); and I like to call setPresenter(null) 
from onCancel and onStop.

They're also instantiated eagerly (because they're injected in the 
ActivityMapper, instead of injecting a Provider), which means their view is 
instantiated eagerly too. In such a simple app that's not really a problem 
because you're likely to "use" all the activities and their views, but as 
the application grows, it means you're instantiating things that you might 
never use.

Finally, you should probably extend AbstractActivity rather than directly 
implement Activity (there was a discussion a few months back about possibly 
introducing new methods to the interface, which would be breaking changes if 
you implement it directly, whereas there would be a default implementation 
in AbstractActivity)

BTW, I've only looked at the activities.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-11 Thread Ernesto Reig
Very good contribution Jake. I think this is what most developers who are
taking their first steps in GWT would like to have. And it can be used as
the foundations of every single web app you make. Just use whatever you need
and delete what you don´t. That´s the aim, isn´t it?

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-10 Thread George Moschovitis

>
> I suppose I should also look at supplying a Maven archetype so that you can 
> just generate the project in one command, but for now this allows for simple 
> setup and execution out-of-the-box.
>

Yeah, a Maven archetype would be useful!

thanks,
-g. 

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-10 Thread Jake Wharton
Well it's not supposed to actually *do *anything. It is only sample 
application which provides the foundation for building your own web app. It 
is meant to be used as a platform to provide recommended design patterns 
using the most current technologies GWT has to offer. I am going to add a 
few fields to each person and maybe another Place but overall it will be 
functionally limited.

I am more just looking for assurance that I am using things like MVP, 
RequestFactory, and Editors correctly and in the most-efficient manner.

I suppose I should also look at supplying a Maven archetype so that you can 
just generate the project in one command, but for now this allows for simple 
setup and execution out-of-the-box.

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



Re: GWT Base Application Featuring Best-Practice Technologies

2011-02-10 Thread George Moschovitis
Great projects, looks to be at an early stage though :(

-g.

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