Web 2.0 Development with the Google Web Toolkit
Listing 4. Source Code for the Main Program
The code in Listing 4 shows access to a single service, but it would be easy to connect to several sources at once and produce a mashup of news.
After testing the application, it's time to distribute it. Go to the directory where you created the project, run the compile script (in this case, example_script.sh), and copy the resulting files to your server's Web pages directory. In my case, with OpenSUSE, it's /srv/www/htdocs, but with other distributions, it could be /var/www/html (Listing 5). Users could use your application by navigating to http://127.0.0.1/com.kereki.example/example.html, but of course, you probably will select another path.
Listing 5. Compiling the Code and Deploying the Files to Your Server
# cd ~/examplefiles/ # sh ./example-compile Output will be written into ./www/com.kereki.example Copying all files found on public pathCompilation succeeded # sudo cp -R ./www/com.kereki.example /srv/www/htdocs/
GWT is a very powerful tool, allowing you to apply current software engineering techniques to an area that is lacking good, solid development tools. Being able to apply Java, a high-level modern language, to solve both client and server problems, and being able to forget about browser quirks and incompatibilities, should be enough to make you want to give GWT a spin.
Google Web Toolkit Applications by Ryan Dewsbury, Prentice-Hall, 2008.
Google Web Toolkit for AJAX by Bruce Perry, PDF edition, O'Reilly, 2006.
Google Web Toolkit Java AJAX Programming by Prabhakar Chaganti, Packt Publishing, 2007.
Google Web Toolkit Solutions: Cool & Useful Stuff by David Geary and Rob Gordon, PDF edition, Prentice Hall, 2007.
Google Web Toolkit Solutions: More Cool & Useful Stuff by David Geary and Rob Gordon, Prentice Hall, 2007.
Google Web Toolkit—Taking the Pain out of AJAX by Ed Burnett, PDF edition, The Pragmatic Bookshelf, 2007.
GWT in Action: Easy AJAX with the Google Web Toolkit by Robert Hanson and Adam Tacy, Manning, 2007.
AJAX: a New Approach to Web Applications: www.adaptivepath.com/ideas/essays/archives/000385.php
AJAX: Getting Started: developer.mozilla.org/en/docs/AJAX:Getting_Started
AJAX Tutorial: www.xul.fr/en-xml-ajax.html
Apache 2.0 Open Source License: code.google.com/webtoolkit/terms.html
Google Web Toolkit: code.google.com/webtoolkit
GWT4NB, a Plugin for GWT Work with NetBeans: https://gwt4nb.dev.java.net
Java SE (Standard Edition): java.sun.com/javase
Java Development Kit (JDK): java.sun.com/javase/downloads/index.jsp
JSON: the Fat-Free Alternative to XML: www.json.org/xml.html
Same Origin Policy, from Wikipedia: en.wikipedia.org/wiki/Same_origin_policy
Web 2.0, from Wikipedia: en.wikipedia.org/wiki/Web_2
What Is Web 2.0?, by Tim O'Reilly: www.oreillynet.com/pub/a/oreilly/tim/news/2005/09/30/what-is-web-20.html
Federico Kereki is a Uruguayan Systems Engineer, with more than 20 years' experience teaching at universities, doing development and consulting work, and writing articles and course material. He has been using Linux for many years now, having installed it at several different companies. He is particularly interested in the better security and performance of Linux boxes.
Pick up any e-commerce web or mobile app today, and you’ll be holding a mashup of interconnected applications and services from a variety of different providers. For instance, when you connect to Amazon’s e-commerce app, cookies, tags and pixels that are monitored by solutions like Exact Target, BazaarVoice, Bing, Shopzilla, Liveramp and Google Tag Manager track every action you take. You’re presented with special offers and coupons based on your viewing and buying patterns. If you find something you want for your birthday, a third party manages your wish list, which you can share through multiple social- media outlets or email to a friend. When you select something to buy, you find yourself presented with similar items as kind suggestions. And when you finally check out, you’re offered the ability to pay with promo codes, gifts cards, PayPal or a variety of credit cards.Get the Guide
- An Introduction to Tabled Logic Programming with Picat
- Ubuntu MATE, Not Just a Whim
- Build Your Own Raspberry Pi Camera
- Nasdaq Selects Drupal 8
- Non-Linux FOSS: Screenshotting for Fun and Profit!
- Secure Desktops with Qubes: Compartmentalization
- Canonical Ltd.'s Ubuntu Core
- A New Mental Model for Computers and Networks
- The Peculiar Case of Email in the Cloud
- Netlist, Inc.'s HybriDIMM Storage Class Memory