Wednesday, November 29, 2006

Review of Pro Ajax and Java Frameworks


This is a review of Pro Ajax and Java Frameworks by Nathaniel T. Schutta and Ryan Asleson. This book seeks to give the experienced developer of Java web applications the knowledge necessary to add Ajax to their webapps. This is another Ajax book that goes broad rather than deep. Instead of investigating one or two frameworks, it delves into more than a half dozen, both Javascript and Java.

Quick summary: Chapters 2, 3 and 5 are the strongest in the book with useful information on tools, Javascript libraries and enhancing Struts applications with Ajax. The other chapters are not as strong and spend too much time covering old ground.

The book is divided into two parts. Part 1 is an introduction to a variety of Javascript and Java Ajax libraries and frameworks. Part 2 shows how to integrate those libraries and frameworks into existing Java web frameworks such as Struts and JSF. One place that this book differs from other Ajax books is that it doesn't have a chapter introducing the reader to the browser technologies that comprise Ajax. It doesn't dwell on the basics of Javascript, DOM and CSS. It expects you to have already read the Apress books on those topics. Instead, chapter 1 covers what I would call best practices and patterns -- autocomplete, partial page update, draggable DOM.

  • Chapter 2 covers the tools of the Ajax development trade -- IDE's, debuggers, HTTP monitors, logging, testing, etc. -- and provides links to where these tools can be downloaded. While those tools that are mentioned -- Venkman, Selenium, Firebug -- are all solid and useful, there is usually only one tool in each category. For Javascript editing, Aptana for Eclipse deserved a mentioned, as did JSMin and Packer for Javascript compression. While Venkman is a great tool for debugging and profiling in Firefox, the various solutions for IE are not addressed. Still, the tools are all solid choices, and the tutorial alone on how to debug Ajax with Selenium is worth the price.
  • Chapter 3 looks at three (four if you count Scriptaculous, which is based on Prototype) Javascript Ajax libraries -- Prototype, Taconite and Dojo. Each library is treated with some brief but useful examples along with a short example on how to use them to integrate with a servlet or JSP on the server. As always seems to be the case, Dojo seems to get short shrift. In fairness, dealing with Dojo is probably a worthy subject for an entire book of its own.
  • Chapter 4 looks at Direct Web Remoting (DWR) and AjaxTags. The chapter consists mostly of the basic syntax and workings of the frameworks and a few simple examples.

Part 2, as previously mentioned, builds on what the reader has learned about the preceeding Ajax frameworks and libraries and looks at integrating them into existing non-Ajax web application frameworks.

  • Chapter 5 is probably the most useful chapter in the book. For those maintaining Struts applications -- and there are a lot of them out there -- it provides a detailed blow by blow on how to turn a simple Struts-based form validation into an Ajax powered on using Prototype. This example doesn't address all possible uses of Ajax, but it does give you a clue on exactly where to splice the Ajax magic into the Struts infrastructure.
  • Chapter 6 looks at the Tacos (Ajax enabled) components of the Tapestry framework. This is the first chapter that seems to voilate the book's guiding principle: it spends the lions share of its length in explaining the workings of Tapestry rather than focusing on how to add Ajax to it.
  • Chapter 7 combines DWR and the Spring framework to develop a simple inventory control system. Again. lots of time is taken in explaining Spring and relatively little in showing how to add in the Ajax with DWR.
  • Chapter 8 shows two ways of adding Ajax to JSF, one with a roll your own approach using raw XHR and no libraries. The other using some Ajax JSF components from the Apache Tomahawk project. Again, too much time is spent explaining vanilla JSF and not enough with the Ajax enhancements. I would have like to see more written on both using and developing Ajax components, since the component is, after all, the heart of JSF.

Summary: As previously mentioned, this book goes broad rather than deep in picking out more than a half dozen frameworks and libraries. Also, the examples throughout the book are little more than snippets, not applications that would demonstrate the development of a full Ajax app. Still, there are a wealth of tool and library tutorials and Ajax conversion best practices in it to make it a valuable reference for anyone looking to enhance a legacy webapp with Ajax.

Get more information

Tuesday, November 28, 2006

Download Oracle PL/SQL Programming ebook


If you're doing database application development in the Oracle environment, you're going to have to know PL/SQL, the company's extended query and update language. If you want your programs to exploit the special capabilities of Oracle software, you'll need to know the language well. That's where the third edition of Oracle PL/SQL Programming comes into play. It's an absolutely comprehensive reference (as well as a rather extensive tutorial) on PL/SQL, ideally suited to answering your questions about how to perform some programming tasks and reminding you of the characteristics of functions, triggers, and other elements of the database programmer's toolkit. The new edition covers calls to Java methods from within PL/SQL programs, autonomous transactions, object type inheritance, and the new Timestamp and XMLType data types. There's also more information about server internals--the way PL/SQL programs are run--than before, better enabling readers to optimize their code for fast and safe execution.

Steven Feuerstein takes care to explain, with prose and example code, the characteristics of PL/SQL elements. In explaining number conversions, for example, he explores Oracle's different ways of formatting numbers, then details the behavior of the to_number function under different conditions (with and without a specified format model, and with National Language Support information attached). It's a helpful approach that will have readers using the index to locate places in which Feuerstein mentions language elements of interest. --David Wall

Topics covered: How to use Oracle PL/SQL in all its manifestations through Oracle9i. Fundamentals of program structure (loops, cases, exceptions, etc.) and execution get attention, as do data types, transaction management, triggers, and the object-oriented aspects of the language. There's also coverage of calls to external Java and C programs.

Download Oracle PL/SQL Programming ebook   Download 

    Password : ebooksatkoobe