Re: GWT Base Application Featuring Best-Practice Technologies
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
- 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
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
- 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
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
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
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.getSomeActivity()? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT Base Application Featuring Best-Practice Technologies
I have written (and am still working on) writing a simple base application which sets up and demonstrates the majority of GWT's new and recommended technologies. This is actually my first foray into GWT and instead of starting simple and integrating these technologies one- by-one I wanted to do all of the integration and configuration first. Having a solid foundation on which to build an app should allow myself and other users the ability dive right in to development and learn these technologies by following the existing example within the application. I'm looking for feedback on the implementation of all of these technologies. I have done my best to follow tutorials from the GWT website and suggestions from StackOverflow answers but there is still a few spots on which I am unsure that my usage is proper. Here are some issues on which I am looking for review: * The MVP pattern (more specifically the activities and views) seems like it would be over-eager in instantiating resources due to their injections. * RequestFactory and Editor tie-in. I have put the Driver in the view and the RequestFactory interaction in the activity which seemed most logical. Documentation on the interaction of these two features is scarce so I am not sure if it's being leveraged properly. Some things I wouldn't mind some assistance on implementing: * Testing setup. Both with traditional JUnit tests for the server- side code and the GWT JUnit tests for client-side code. * Logging. Both traditional server-side and proper client side through Guice/Gin injection. * Mobile application. I followed a tutorial somewhere which set up injection of the application itself on the client which allows you to feed a desktop and mobile application through the same code. Unfortunately I do not remember where the tutorial was nor how to detect or inject the mobile version. Any general thoughts or additional suggestions are also welcome. I'm looking to make this be useful for as many people as possible to ease the time required to get started with GWT. You can find the project on GitHub here: http://github.com/JakeWharton/GwtBase/ If you would like to contribute code, please fork the project and submit pull requests for your features. Check the project's issues for features that need implemented or add an issue of your own. Though it is not preferred, if you want to send patches or reply with diffs I will also accept those. -- You received 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
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.
Re: GWT Base Application Featuring Best-Practice Technologies
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
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.