Don't get me wrong; I'm (mostly) just complaining about the GWT gadget linker, which doesn't let you do some of the cool things that GWT does.
This is much nicer in my opinion: <?xml version="1.0" encoding="UTF-8" ?> <Module> <ModulePrefs title="State Example" height="220"> <Require feature="wave" /> </ModulePrefs> <Content type="url" href="http://www/cgi-bin/example/gadgets/ mystats.cgi" /> <- Normal web application end point. </Module> (ok, that doesn't actually work because the container doesn't support cross domain calls, but it's so _elegant_... *sigh~*) Unrelated, but it looks like wave is actually _built_ out of a modified shindig version (go spelunking in the gadget sandbox and you'll see what I mean). It's possible we might just be able to lift the js straight off the wave servers and use that with a bit of modification. I'm going to have a shot at that and see if I can get it working... ...but even if I do, you're right; it won't really help. It'll make it easier to test, but the mock framework is really the only way I can think of test in hosted mode. ~ Doug. On Feb 10, 10:37 pm, Jonas Huckestein <[email protected]> wrote: > Wow, I never knew the gadget linker did not support any of these > features. Is there any reason for that? In that case we could also try > to improve on the linker :) > > I didn't know about shindig either, but from the looks of it, we would > have to build a GWT wrapper around it first. > > So here's what my final goal and masterplan is: > - I want to develop wave gadgets using ALL of GWTs features > - I want to test in hosted mode with multiple versions of the gadget > running side by side > - I want to be able to simulate mode changes and participant updates > all from one interface > > I thought I was pretty close but the gadget linker not working with > some of GWTs power features is a real letdown! So does anybody have > any ideas how to build what I want to build in another way? > > I didn't understand your point about why you cannot put a web > application in a gadget container, though. Using JSONP you can develop > any application you want and connect it to a webservice. There is no > reason for this to be slower than anything that doesn't run in a > gadget container. (I don't know what opensocial's makerequest does, > though). > > Cheers, Jonas > > On Feb 10, 8:11 pm, dougx <[email protected]> wrote: > > > > > Hm. > > > I've never been a fan of gadgets. It's always seemed rather contrived > > to me, to suggest you can have an entire web application all wrapped > > up in a single xml file. > > > All of the open social applications you'll find in the real world make > > use of makeRequest() and server side services; the way you would > > expect a modern web application to. In fact, I'd argue the huge delay > > in adding makeRequest() and the REST api is why Hi5 and Myspace > > applications never took off the way Facebook ones did (traffic too, to > > be fair). > > > Still, practically speaking I strongly advise you not to use the > > gadget linker. It's old, barely supported (seriously, look at the > > change log...), generates very large files (no cute splitting into per- > > browser components like the normal linker does), and makes several of > > the powerful GWT features available; specifically RPC, code splitting, > > debugging and resource bundles. > > > Still, you know. It's kind of fun for tooling around and making little > > bits and pieces with I guess. > > > Regarding the wave container... I suspect we're re-inventing the > > wheel; I wonder if it wouldn't be a better plan to implement an > > independent wave client container on top of shindig (http:// > > shindig.apache.org/) ... > > > ~ > > Doug. > > > On Feb 11, 10:32 am, Jonas Huckestein <[email protected]> wrote: > > > > Hi Doug, > > > > nice, I didn't think of using a normal GWT application as a wave > > > gadget like that before. But I think that is just a way of manually > > > doing what the Gadget API for GWT is doing for you. > > > > What you said about being able to see two different views of the > > > gadget side by side in local testing is easily accomplished in > > > WaveConnector (actually it's the primary design goal). We can view two > > > versions of the Gadget (which is no more than a GWT widget) side by > > > side in a browser. All we need to do is give them two different > > > eventBuses (to prevent them from interfering with one another) and > > > make sure that wave-related events are shared across the buses. (more > > > generally using singletons in the GWT widget might cause problems). > > > > I don't think there is need to include a server in order to test the > > > gadget with more than one participant :) > > > > We can also add a user interface to add/remove participants, switch > > > the wave mode etc.. I will try to get this done next week. > > > > Thanks for your feedback. I'm glad you liked it! > > > > Cheers, Jonas > > > > On Feb 10, 6:08 pm, dougx <[email protected]> wrote: > > > > > Mmm... did you realize you can use a normal GWT application in wave as > > > > a gadget? > > > > > All you need is a frame: > > > > <?xml version="1.0" encoding="UTF-8" ?> > > > > <Module> > > > > <ModulePrefs title="State Example" height="220"> > > > > <Require feature="wave" /> > > > > </ModulePrefs> > > > > <Content type="html"> > > > > <![CDATA[ > > > > <html> > > > > <head> > > > > <meta http-equiv="content-type" content="text/html; > > > > charset=UTF-8"> > > > > <script type="text/javascript" src="http://xxx.appspot.com/xxx/ > > > > xxx.nocache.js"></script> > > > > <link type="text/css" rel="stylesheet" href="http:/xxx.appspot.com/ > > > > xxx/xxx.css"> > > > > <title>Jewels</title> > > > > </head> > > > > <body> > > > > </body> > > > > </html> > > > > ]]> > > > > </Content> > > > > </Module> > > > > > Then use the cross domain compiler to compile the code (this is > > > > actually exactly what it's for...): > > > > <?xml version="1.0" encoding="UTF-8"?> > > > > <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 1.7.0// > > > > EN" "http://google-web-toolkit.googlecode.com/svn/tags/1.7.0/distro- > > > > source/core/src/gwt-module.dtd"> > > > > <module rename-to='xxx'> > > > > <inherits name='com.google.gwt.user.User'/> > > > > <inherits name='com.google.gwt.user.theme.standard.Standard'/> > > > > <entry-point class='com.hax.wave.xxx.client.XXXWidget'/> > > > > <add-linker name="xs"/> <-- You _must_ include this step to access > > > > teh wave API. > > > > </module> > > > > > And finally, use JSNI to access the wave api: > > > > public static native boolean isInWaveContainer() throws Exception /*-{ > > > > var rtn = false; > > > > if (($wnd.wave) && ($wnd.wave.isInWaveContainer())) > > > > rtn = true; > > > > return(rtn); > > > > > }-*/; > > > > > ... > > > > > So yeah. Might find that helpful. Note that in 2.0 you can't debug > > > > using the xs linker, so you'll need to comment that line out while > > > > you're developing your widget, and then put it back when you do a > > > > deployment build. > > > > > That wave connector is very cool; nice work! :) > > > > > Hm... I wonder if we could add an app engine based data store based > > > > state so just when you're debugging locally you can have two browser > > > > windows open and it'll treat those as different viewers of the gadget, > > > > so you can do full testing. That'd involve defining separate servlet > > > > end points though; perhaps it'd be better as a separate gwt > > > > application, and you can include it on your testing pages... > > > > > ~ > > > > Doug. > > > > > On Feb 11, 7:42 am, Jonas Huckestein <[email protected]> wrote: > > > > > > Hi Everybody, > > > > > > I have just released WaveConnector - a turnkey solution for developing > > > > > wave gadgets using GWT and testing them in hosted mode. Please head > > > > > over to my blog > > > > > athttp://thezukunft.comortheprojectpageathttp://code.google.com/p/waveconnector-gwt/fordetails. > > > > > It's as easy > > > > > as downloading a zip archive :D > > > > > > Chris, how di you achieve the 90%? I assume you must also decouple the > > > > > GWT code from the Gadget/Wave API? I have simply implemented a mock > > > > > version of the wave API. That way I think I can do all testing > > > > > locally. > > > > > > Kayode, WaveConnector is exactly the mock framework (+ some > > > > > convenience functions) I was talking about :) > > > > > > Sorry for this shameless selfpromotion on this board but I think this > > > > > might actually help a lot of people or get them to develop for Wave in > > > > > the first place. > > > > > > What do all of you think of a dedicated Wave+GWT group? I asked that > > > > > question on the GWT groups earlier and people seemed to be interested. > > > > > > Cheers, Jonas > > > > > > This is my first ever open source contribution so please give me > > > > > comments and feedback on my blog or the project page. > > > > > > On Feb 10, 2:07 am, HaiColon <[email protected]> wrote: > > > > > > > What I do is I write the gadget in a way that makes it work both > > > > > > locally (or as a website on a remote server) and then I add a layer > > > > > > on > > > > > > top that makes it work with Google Wave. That way I can test 90% of > > > > > > the gadget locally, no problem. And for the other 10% I just use the > > > > > > debug features of the sandbox Wave client. That has worked good so > > > > > > far > > > > > > even for bigger/more involved gadgets and the bonus is that your > > > > > > gadget then doesn't need to be Wave exclusive. > > > > > > > If you'd want to use a test-driven development approach you could > > > > > > only > > > > > > test this 90% non-Wave part of the application but none of the > > > > > > Google > > > > > > Wave specific stuff in the other 10%, so this approach may not be > > > > > > good > > > > > > enough for everyone. > > > > > > > Cheers, > > > > > > Chris > > > > > > > On Feb 9, 6:52 am, Jonas Huckestein <[email protected]> wrote: > > > > > > > > Hi guys, > > > > > > > > so I just started developing Wave Gadgets and I'm currently using > > > > > > > GWT. > > > > > > > While there are obvious benefits such as unit testability, cross- > > > > > > > browser support and code-splitting, there are also some > > > > > > > downsides. For > > > > > > > instance I cannot easily test gadgets locally (not to mention > > > > > > > testing > > > > > > > robots!). I had to create a local mock implementation of the wave > > > > > > > API > > > > > > > for testing and every time I use a new API feature I have to add > > > > > > > it to > > > > > > > my mock implementation. All in all it feels kind of clunky and > > > > > > > strange. > > > > > > > > Are there any easier ways to develop (possibly very complex) wave > > > > > > > gadgets? What do you guys use? > > > > > > > > In case you are interested, I wrote a tutorial in how to get > > > > > > > started > > > > > > > developing gadgets with gwt. Also, I guess I will be uploading my > > > > > > > WaveMock framework to Google Cloud this week (if anybody is > > > > > > > interested): > > > > > > > >http://thezukunft.com/2010/02/08/a-wave-gadget-robot-using-gwt-2-0-an... > > > > > > > > Cheers, Jonas -- You received this message because you are subscribed to the Google Groups "Google Wave API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-wave-api?hl=en.
