This book covers many topics with DWR for a client and server side with concrete theory and a good amount the code. Furthermore Geronimo including DataBase and ActiveMQ are covered. Web Services with Eclipse are explained too at a higher level.
Chapter 1: Introduction
The shortest chapter presents information about Ajaxand DWR. Although the chapter is short, it has some important images that reenforce the explanation,giving you a better idea about how Ajax and DWR workChapter 2: DWR Features
Here the chapter starts with Reverse Ajax, so Piggyback, Polling and Comet are covered, along with code snippets and configuration. For Comet an image representing it's interaction with the server side is shown.
Converters and what types are supported, from the basic to the more complicated (Dates, Collections), are explained too.
A simple list of which frameworks can be integrated with DWR is available, as well as how to enable debug for test/debug purposes.Chapter 3: Getting Started
The configuration (web.xml) is introduced, with two tables about init parameters (security, load protection). Then we turn to dwr.xml, to see it's structure (allow, creator and its attributes, has a goodexplanation). But there's almost nothing about Annotations or Fluent Configuration.
Development configuration including the FireFox browser, the Eclipse IDE(with a server configuration based with Apache Geronimo), and FireBug used for testing and debugging purposes.
Error Handling with DWR covers types, configuration and provides some example code. How to package as a war file with Eclipse and some basic configurations with Geronimo are covered too (how install a .war file from server console or by commands)Chapter 4: User Interface: Basic Elements
The chapter starts with the introduction for Dynamic User Interface to be developed as a page with many tabs.
This chapter shows how to create a project and test the configuration for Geronimo (definition and startup with Eclipse). After that the basic configuration for web.xml and dwr.xml is explained, following with a css file. Furthermore a good amount of jsp pages are covered in the chapter for each tab.
Tables and Lists
A table with many fields (e.g: credit card number, and a date of its expiration) and the classic submit button is developed again in a jsp file, for the server side the validation of the form data is coveredMap Scrolling
If you have used Google Maps before, you'll know the approach that is is applied here (zoom level used)
Chapter 4 and 5 are well covered with many pages of code, keeping things simpleChapter 6: Backend Integration
Advanced and more realistic topics are covered here, as the chapter starts with Database Management, then the configuration is done through the embeded Database in Geronimo. The creation of the database and a table and its respectives records to be inserted and even pooling are covered through steps and images
A Java class to manage the database operations is included too, nothing complicated.
Now it's time to work with Web Services. Here they are configured with Eclipse (Web Service Client). Specific instructions to get a service and generate classes related with credit card validation is covered, along with the generated clases, the author explains an interface and its respective implementation, in my opinion deeper explanation could be necessary.
After of this, the author uses a tool to verify our Web Service Integration, Wireshark is used here
The author adds other interesting topic, Messaging System. Again the configuration for Queue is done with Geronimo, therefore it is related with the creation of ActiveMQ, JMS Resource Group, destination and its type.
Again a Java class to handle the Order System is explained, this class imports many packages from DWR (e.g: org.directwebremoting.xxx ). The class is little long, covering management with ActiveMQ, of course integrated with DWR and something interesting is that reverse ajax is used but in a non-web class. Testing for this backend work is done with Phyton STOMP client for ActiveMQ
A browser with the application is shown too, getting DWR working together with web servicesChapter 7: Sample Applications
This chapter is very interesting, two sample applications are provided with a lot of pages with code.
The chapter starts with a Collaborative Book Authoring
Among many files with CSS and JSP, almost nine pages of code working with DWR in the JSP are available and almost two pages of explanation of such code too. Perhaps a deeper explanation would have been good. Java classes for server side exists too, and an imitation of a database. By this, I mean working with static Maps "crud" operations, among other classes (the entity, utils). Five pages showing pictures of the application in action are covered too
The second application is a Chatroom
It follows the same logic presentation (about distribution of code and explanation) as the previous application
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)