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.
Web Development News
|Alice, the Turtle of the Modern Age||Mar 07, 2014|
|Using Django and MongoDB to Build a Blog||Mar 05, 2014|
|What virtualization solution do you use/manage at work?||Mar 04, 2014|
|Our Assignment||Mar 04, 2014|
|March 2014 Issue of Linux Journal: 20 Years of Linux Journal||Mar 03, 2014|
|Have Resume - Will Travel||Feb 28, 2014|
- You have to be careful there
1 week 4 days ago
- Wonder when LJ is going to
1 week 4 days ago
- Puerto Rico Free Software
1 week 5 days ago
2 weeks 3 hours ago
- I hate voice commands
2 weeks 17 hours ago
- usabilty --- AGAIN with this nonsense
2 weeks 18 hours ago
- Don't make excuses
2 weeks 22 hours ago
- Sorry to let you know, but
2 weeks 23 hours ago
- Ridiculous statement. Not a
2 weeks 1 day ago
2 weeks 2 days ago