gwt-presenter and gwt-dispatch Google Groups

2009-08-17 Thread David Peterson
Hi guys, Just a note for anyone who's using the 'gwt-presenter' or 'gwt- dispatch' libraries. Because I can't monitor this group actively (too much traffic here I'm afraid), I've created a Google Group for each of the above, so if you want to ask questions, make suggestions, etc, that's the best

Re: tying the user interface together using MVP

2009-08-17 Thread David Peterson
Hi Arthur, I'm not sure what the 'best practice' is, but using our 'gwt- presenter' library (http://code.google.com/p/gwt-presenter) I've ended up tying the Presenters together. In some cases you can be more generic (use @Named to specify a particular implementation of a common Presenter subclass

Re: Command Pattern, MVP, EventBus

2009-07-27 Thread David Peterson
Hi all, I've been off-list for a bit. Good to see the discussion has been continuing in my absense :) For the record, I'm not in love with the current 'Place' manager implementation in 'gwt-presenter'. I've gone through about 4 different designs, and this is the one I hate the least so far. My ne

Re: Determine implemented interfaces

2009-07-18 Thread David Peterson
Given that 'Class.getInterfaces()' and 'Class.isInstance()' are not implemented, basically all you've got is 'X instanceof Y'. A switch/ case statement perhaps? David On Jul 19, 6:04 am, Jacob wrote: > I'm trying to determine whether or not an object implements a given > interface at runtime. A

Re: Command Pattern, MVP, EventBus

2009-07-18 Thread David Peterson
hit wrote: > On Jul 15, 9:36 pm, David Peterson wrote: > - Thinking further, I think it's better to separate the EventBus from > - the Command system somewhat. The reason being that generally, events > - are used to update on changes that have already happened, or are > a

Re: Command Pattern, MVP, EventBus

2009-07-17 Thread David Peterson
Fair point :) On Jul 16, 9:32 pm, Daniel Jue wrote: > Alejandro's source code is here: > > http://code.google.com/p/puntosoft/ > > > Anyway, there are ways to do it of course. I'll be interested to see > > your solution if you make it public :) > > --~--~-~--~~~---~--

Re: Command Pattern, MVP, EventBus

2009-07-16 Thread David Peterson
Hi Alejandro, Firstly, you can absolutely do it using the same EventBus. I just don't think it's that great a fit, personally. But if what you have works, use it :) > > Thinking further, I think it's better to separate the EventBus from > > the Command system somewhat. The reason being that gene

Re: Using MVP + Google Maps for GWT API

2009-07-16 Thread David Peterson
view and complex presenters > which include other presenters? > > Thx for any help, > Norman > > 2009/7/15 David Peterson : > > > > >> I already use your gwt-dispatch successfully;) Thx for the pointer anyway.. > > > Heh - of course you do, sorry ab

Re: Using MVP + Google Maps for GWT API

2009-07-15 Thread David Peterson
> I already use your gwt-dispatch successfully;) Thx for the pointer anyway.. Heh - of course you do, sorry about that. FYI, I've now added a short 'Getting Started' doc: http://code.google.com/p/gwt-presenter/wiki/GettingStarted Enjoy :) David --~--~-~--~~~---~--~

Re: Using MVP + Google Maps for GWT API

2009-07-15 Thread David Peterson
ocs up for 'presenter'... :) David On Jul 16, 5:32 am, Norman Maurer wrote: > Very interesting.. could you add some "Get started" documentation ? I > just want to get a better idea how to use it ;) > > Bye, > Norman > > 2009/7/15 David Peterson : > >

Re: Command Pattern, MVP, EventBus

2009-07-15 Thread David Peterson
O Talk. (what I understand from the > > slides). > > The working example is trivial but the code uses an event bus (using gwt > > HandleManager) and the command pattern for the RPC Service. > > > Comments are welcome, I would like to know if the implementation is good. &g

Re: Using MVP + Google Maps for GWT API

2009-07-15 Thread David Peterson
My realistic approach has been to just pass out the original widget. An alternate approach would be to create your own interface with the methods you need from the widget in question, and then create a simple sub-class of the widget which implements your interface. Eg: public interface Mapable {

Re: UIBinder

2009-07-13 Thread David Peterson
Yeah, I was wondering the same thing. The only note of it I could see was an outstanding issue where it needs to be brought into the GWT trunk... Let me know if you dig it up. David On Jul 14, 12:30 pm, "brett.wooldridge" wrote: > Trite answer.  It would be a good answer if the UIBinder were a

Re: Command Pattern, MVP, EventBus

2009-07-13 Thread David Peterson
There's certainly nothing to stop you, and you could even just add your own RPC Event and have a listener trigger the server-side call. In fact, in my own implementation of Ray's example (http:// code.google.com/p/gwt-dispatch), the Action and Response are both interfaces, so you could just have t

Re: problems with finding Actions

2009-07-08 Thread David Peterson
just not  sure if its a bug or if I'm to stupid ;) > > Thx, > Norman > > Ps: could you please upload the new snapshot to your maven2 repos ? > > On Jul 7, 10:27 am, David Peterson wrote: > > > Yeah, thanks for the report. I've just been able to get back to >

Re: Best practice to implement Command Pattern RPC on server?

2009-07-08 Thread David Peterson
On Jul 8, 8:03 am, pohl wrote: > > Essentially, I couldn't get the GWT compiler to work with a service > > with the following definition: > > > public interface DispatchService extends RemoteService { > >     , R extends Result> R execute( A action ) > > throws Exception; > > > } > > I tried to d

Re: Best pattern for client/server communication?

2009-07-07 Thread David Peterson
My approach is basically along the lines of #2. However, taking it a step further, my rule is essentially to remove all operational code from data objects completely. So, no 'save()' methods, etc on the actual object. Instead, you would call a 'save( myObject )' method on the service instead. That

Re: problems with finding Actions

2009-07-07 Thread David Peterson
Yeah, thanks for the report. I've just been able to get back to plugging the library back into my own project and found the same problem. There was a bug in the ActionHandler linking code. I've checked in the fix to SVN and updated the SNAPSHOT download. Just download and replace your existing JAR

Re: Best practice to implement Command Pattern RPC on server?

2009-07-06 Thread David Peterson
Hi Nathan, On Jul 7, 7:24 am, Nathan Wells wrote: > I think this is mostly directed at David, but if anyone has answers, > I'd welcome them. > > In your command pattern implementation or somewhere on this thread > (can't remember where I saw it) you mention that GWT doesn't properly > implement

Re: Content Management System

2009-07-06 Thread David Peterson
I think we're not exactly sure how you want to connect GWT with a CMS. GWT is a toolkit for building applications, while CMS's are actual applications. How are you wanting to combine them exactly? David On Jul 7, 12:07 am, Tracy Greene wrote: > Just to clarify: > > Are you suggesting that I wr

Re: Best practice to implement Command Pattern RPC on server?

2009-07-06 Thread David Peterson
complete. Where does the actual > > > > action take place in his example, let's say, querying some contact > > > > details from a remote data base? I think this important part is > > > > missing. > > > > The ContactService defines a method called "e

Re: GWT Best Practices doubt

2009-07-05 Thread David Peterson
Hey Geraldo, Check out this thread: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/ccb5b07a24ac5a97/4b98bf080e8bf231?lnk=gst&q=command+pattern#4b98bf080e8bf231 Also, I've posted an implementation of my understanding of Ray's example here: http://code.google.com/p/gwt-di

Re: Best practice to implement Command Pattern RPC on server?

2009-07-05 Thread David Peterson
On Jul 5, 6:16 pm, martinhansen wrote: > Hello David, > > I've read your source code and your example. It is very interesting. > But although it's short and simple, I still don't understand it. > Especially "GIN" and "GUICE" confuses me a lot. Can I use your example > without these technologies

Re: Best practice to implement Command Pattern RPC on server?

2009-07-04 Thread David Peterson
Hi Nathan, On Jul 5, 2:15 am, Nathan Wells wrote: > I updated my project to only use the two interfaces as suggested by > David. Instead of using actionhandlers and registering them, I created > an annotation for the IRemoteProcedureCall implementations that > contains the canonical class name o

Re: Best practice to implement Command Pattern RPC on server?

2009-07-04 Thread David Peterson
Yeah, there is some added complexity, however I found myself basically implementing it in a much more ad-hoc fashion anyway, it's just that some operations required a 'token' object with multiple parameters, or returning another token with multiple return values, and some didn't. This way, it's mo

Re: Best practice to implement Command Pattern RPC on server?

2009-07-04 Thread David Peterson
adjustments and bug fixes, but it should be fairly stable. Enjoy! David Peterson --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-W

Re: Best practice to implement Command Pattern RPC on server?

2009-07-04 Thread David Peterson
Jason: I'll admit I was unable to figure out exactly what Shindig's approach is, exactly, unfortunately. However there is definitely more than one way to skin this cat. My current implementation an Action, a Result and a Handler for each operation. This does result in some class proliferation, but

Re: Best practice to implement Command Pattern RPC on server?

2009-07-03 Thread David Peterson
Just a couple of other comments on this general topic. 1. Yes, it's one-class-per RPC method. This is actually a good thing, since it lets you do item 2, which is: 2. You can add 'undo' to your actions. This is particularly handy if you build your Action classes using item 3: 3. You can have one

Re: Best practice to implement Command Pattern RPC on server?

2009-07-03 Thread David Peterson
I'm going to try to implement. How do you register your > ActionHandlers? > > On Jul 3, 8:55 am, David Peterson wrote: > > > Hey ClusterCougar, > > > I think your implementation is over-complicated. On the client side, > > just stick to two basic interfaces (an

Re: Best practice to implement Command Pattern RPC on server?

2009-07-03 Thread David Peterson
Hey ClusterCougar, I think your implementation is over-complicated. On the client side, just stick to two basic interfaces (and concrete implementations there- of) - Action and Result (I'm using 'Result' rather than 'Response' because that is often used in HTTP-related APIs), or in your API, IPro

Re: GWT architecture MVP/EventBus (mentioned at Google I/O)

2009-06-21 Thread David Peterson
On Jun 20, 1:33 am, Ian Petersen wrote: > > My (limited) understanding of what Ray Ryan was saying (and what I > > understand of MVP) is that the presenter is completely separated from the > > DOM elements (in order to facilitate testing, and because the view is solely > > responsible for the vie