Since my last post I've started using jQuery paired with GSon. Though I barely know javascript, the ease with which I was able to take data from my GAE backend and stick it into already-designed HTML in an AJAXy manner was breathtaking. I think I'll be able to live without GWT's RPC for this one project. I certainly see the appeal of GWT, I'm used to building sophisticated desktop UIs. But for this app whose UI will resemble a basic tumblr site, I think jquery+gson is the right fit for the job. Now if only I could figure out history management/simple URLs/bookmark support, I'd be golden!
On Sep 10, 8:08 pm, "Ikai L (Google)" <ika...@google.com> wrote: > It's very hard to use GWT's RPC mechanism without using GWT. GWT's RPC > mechanism is nice because it provides a server side implementation, but on > the client side, you're still creating an AsyncCallback and programming in > an asynchronous manner. This is an area where Javascript really shines > because of first class functions you can pass around (not available in Java) > and closures (not available in Java unless you count anonymous inner > classes). > > Rather than look at a single feature, look at the bigger picture. With GWT, > you get a ton of useful widgets and a way to programmatically (or via XML > via UiBinder) define your UI, you get an out-of-the-box event bus and > history manager. This is actually a pretty neat way to develop a web app > because you can compose widgets of widgets. I'd probably pick jQuery for > more "web page" like interaction or applications with a less desktop like > experience, because the interface for working with the DOM is one of the > best I've ever used (to select and hide all parents of list elements with a > class "item", you'd do this: $("li.item").parents().hide());. jQuery's XHR > interface is simple and straightforward, and combined with a library like > Google GSON (http://code.google.com/p/google-gson/), you can build XHR rich > applications fairly easily. > > I personally prefer GWT for anything that has to deal with detecting where a > mouse click is or key handler events, or something where I have to > programmatically assemble the UI which can be represented as a hierarchical > bag of widgets. The jQuery way would be to output some HTML and jam it into > an element using the .html() function, which is really only a notch above > using the DOM's innerHTML= attribute. > > > > > > On Fri, Sep 10, 2010 at 4:47 AM, tempy <fay...@gmail.com> wrote: > > Thanks for the advice John. I've been reading about GQuery and it > > does seem good, though I have some concerns about whether it might be > > abandoned. I think my plan is to learn JQuery, as I feel like that > > should also teach me a lot about how the browser operates, which is a > > gap in my knowledge. I think I should learn something "close to the > > metal" (metal being browser in this case) before moving on to > > frameworks that abstract the browser away to a greater extent. I > > guess if I use JQuery, switching to GQuery at any time should not be > > problematic, and I get the best of both worlds. And I would sure love > > to hang on to GWT's RPC mechanism. > > > Mike > > > On Sep 10, 12:56 am, John Patterson <jdpatter...@gmail.com> wrote: > > > BTW, you can use GWT in a manor very similar to JQuery. Take a look a > > > GQuery by Ray Cromwell. He has an incredible benchmark page which > > > dynamically shows how GQuery out performs JQuery in almost every measure. > > > > On 10 September 2010 05:53, John Patterson <jdpatter...@gmail.com> > > wrote: > > > > > You might want to look into Sitebricks which is a Google developed web > > app > > > > framework built on top of Guice. It is a simple request response > > processor > > > > with no fancy "component" abstractions like Wicket or Tapestry. This > > model > > > > fits in very well with GWT (or other client frameworks) which request > > data > > > > via RPC or small snippets of rendered html to assemble on the client. > > > > > It is still very much in active development so you have to be prepared > > to > > > > dig into the code and figure out the plumbing yourself. The author, > > Dhanji, > > > > has built a fantastic API here - simple, powerful and clever. > > > > >http://code.google.com/p/google-sitebricks/ > > > > > John > > > > > On 10 September 2010 05:35, tempy <fay...@gmail.com> wrote: > > > > >> Thanks for the explanation Chris! > > > > >> Guess I'm learning jquery, golly, I'll be a real web programmer yet. > > > >> =) > > > > >> On Sep 9, 7:58 pm, "Chris (Google Employee)" <api.ch...@google.com> > > > >> wrote: > > > >> > Hi Mike, > > > > >> > I think the reason we don't explicitly publish a list of "frontend > > > >> > frameworks that play well with App Engine" is because there really > > is > > > >> > no technical barrier between front end frameworks that work in the > > > >> > browser such as JQuery, etc and the backend (App Engine). Many App > > > >> > Engine users make full use of a myriad of front end technologies/ > > > >> > frameworks for UI creation ranging from HTML5/JS/CSS to flash etc. > > > > >> > JQuery is especially popular for a variety of Web app usages, so if > > > >> > that works for you, I'd definitely continue trying it out. > > > > >> > Hope this helps, > > > >> > -Chris > > > > >> > On Sep 9, 10:43 am, tempy <fay...@gmail.com> wrote: > > > > >> > > Hello all, > > > > >> > > A little background... I'm mostly new to web frontend development, > > I > > > >> > > come from a mostly backend and desktop background. I have a GAEj > > app > > > >> > > that provides the backend for a rather sophisticated > > desktop/mobile > > > >> > > app. This backend will also drive a website in addition to the > > > >> > > desktop/mobile app. > > > > >> > > The website will show a small subset of the data in the system. I > > > >> > > started with GWT, but it doesn't seem to be quite right. The > > website > > > >> > > is for presentation of a small subset of the system's data only, > > and > > > >> > > users do not interact with the data in any way other than > > searching > > > >> > > for it. As the data is mostly unstructured text and some images, > > I > > > >> > > feel most comfortable formatting it with plain old html/css. In > > fact, > > > >> > > the layout of the site will be minimal and look a lot like a blog. > > As > > > >> > > such, the website should certainly not feel like a single-page > > "web > > > >> > > application" a la gmail. With GWT, I have little use for widgets > > and > > > >> > > find myself constantly fighting with it to get a non-application > > look- > > > >> > > and-feel. > > > > >> > > The only functionality that I thus really need from GWT is the RPC > > > >> > > component, the page should be AJAX, I don't want to do round trips > > to > > > >> > > the server for every navigation event. > > > > >> > > So, I'm not quite sure which framework to use with the GAEj > > backend. > > > >> > > At first GWT seemed like a natural fit, but now seems like > > overkill. > > > >> > > I'm doing some research on jquery, but I haven't seen a list of > > > >> > > "frontend frameworks that play well on GAEj" anywhere. > > > > >> > > Thanks for any advice, > > > >> > > Mike > > > > >> -- > > > >> You received this message because you are subscribed to the Google > > Groups > > > >> "Google App Engine for Java" group. > > > >> To post to this group, send email to > > > >> google-appengine-j...@googlegroups.com. > > > >> To unsubscribe from this group, send email to > > > >> google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2B > > > >> unsubscr...@googlegroups.com><google-appengine-java%2B > > unsubscr...@googlegroups.com> > > > >> . > > > >> For more options, visit this group at > > > >>http://groups.google.com/group/google-appengine-java?hl=en. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google App Engine for Java" group. > > To post to this group, send email to > > google-appengine-j...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-appengine-java+unsubscr...@googlegroups.com<google-appengine-java%2B > > unsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-appengine-java?hl=en. > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blog:http://googleappengine.blogspot.com > Twitter:http://twitter.com/app_engine > Reddit:http://www.reddit.com/r/appengine -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.