Chapter 12. Classic Ajax and HTML forms
This chapter covers
In chapter 7 we introduced you to GWT-RPC, which is great for greenfield projects, but for most of us the baggage that comes with many projects constrains us. Project requirements sometimes make using GWT-RPC impossible. This chapter is about those times where GWT-RPC just won’t fit.
A good example of this incompatibility is when you don’t control the data, and in this age of mash-ups this is somewhat common. In this chapter the majority of our examples will use Google’s YouTube video data as a data source. This data is made available in several formats, and we’ll explore different ways to get this data into an application.
We’ll begin the chapter by looking at RequestBuilder, a tool that allows you to fetch a text file from your server and act on the returned contents. A related tool that we’ll look at is JsonpRequestBuilder, a tool that has the same job as RequestBuilder but is specific to working with JSONP[1] web services. If you haven’t heard of JSONP, it’s an acronym for JavaScript Object Notation with Padding, and this chapter will cover its use in detail.
1 Wikipedia maintains a good article on JSONP that you can find at http://en.wikipedia.org/wiki/JSONP.