David Geary
Author of Graphic Java, co-author of Core JSF, member of the JSF Expert Group
A prominent author, speaker, and consultant, David holds a unique qualification as a Java expert: He wrote the best-selling books on both Java component frameworks: Swing and JavaServer Faces. David's Graphic Java Swing was the best-selling Swing book, and is one of the best-selling Java books of all-time, and Core JSF, which David wrote with Cay Horstman, is the best-selling book on JavaServer Faces.
David was one of a handful of experts on the JSF 1.0 Expert Group (EG) that actively defined the standard Java-based web application framework, and David is currently on the JSF 2 Expert Group, helping to vastly improve JSF in version 2.
Besides serving on the JSF and JSTL Expert Groups, David has contributed to open-source projects and he has written questions for two of Sun's Certification Exams: Web Developer Certification and JavaServer Faces Certification. He invented the Struts Template library which was the precursor to Tiles, a popular framework for composing web pages from JSP fragments, was the 2nd Struts committer and contributed to the Apache Shale project.
David has spoken at more than 100 NFJS symposiums since 2003, and he also speaks at other conferences such as TheServerSide Java Symposium, JavaOne, JavaPolis, and JAOO. David has taught at Java University for the past three years, and is a three-time JavaOne rock star.
Presentations
Killer Web apps with JSF 2.0: Ajax
JSF 2 draws from open-source Ajax frameworks to provide built-in Ajax that's simple and easy to use. Come to this session to see how to take advantage of that Ajax to implement killer web apps with JSF 2.0.
When JSF 1 came out in March 2004, the term Ajax had not yet been coined, so JSF 1 did not come with Ajax support. Over the years, several Ajax frameworks were developed for JSF, most notably ICEFaces and Ajax4jsf, both of which were hugely popular.
For JSF 2, the authors of the most popular JSF Ajax frameworks joined the JSF 2 Expert Group, and helped to define JSF 2's built-in Ajax capabilities. JSF 2 Ajax is a simple, but powerful kernel of Ajax functionality that you can use to build rich client user interfaces.
Killer Web apps with JSF 2.0: Templates and Composites
In this talk, you will learn about JSF 2's support for templating, and how that feature is used to implement the most powerful feature in JSF 2: composite components. A live-coding fest, this session will teach you how to implement reusable components, and whet your appetite for implementing killer web apps with JSF 2.0.
Components are a powerful concept. You can share and reuse components, making it easier to develop application-specific functionality.
Components, however, were rendered essentially inconsequential with JSF 1 because they were so difficult to implement. JSF 2 finally brings the power of components to the common man by letting him easily implement components, with no Java code, and no configuration.
Books
by David Geary and Cay S. Horstmann
- JavaServer Faces is a Web application framework -- similar to Jakarta Struts -- that gives application developers access to custom components that facilitate the creation of rich user interfaces. JSF also provides Integrated Development Environment (IDE) vendors with a standard upon which to base their IDEs. In the Core tradition, this new book aims to be THE tutorial and reference for experienced programmers who need to learn this exciting new technology. Although J2EE is still the most popular platform for developing Web applications, Microsoft's .NET has gained market share over the past two years. J2EE is arguably more powerful, but .NET, is generally regarded as easier to use. J2EE currently lacks: a rich component model that makes it easy to develop custom components and an IDE (like Visual Studio) that facilitates Web application development. That's where JSF enters the equation, and this book aims to be the most authoritative treatment of the topic -- a must-have for any serious J2EE programmer.
by David Geary and Rob Gordon
-
Cu>
Google Web Toolkit (GWT) is an open source Java development framework for building Ajax-enabled web applications. Instead of the hodgepodge of technologies that developers typically use for Ajax–JavaScript, HTML, CSS, and XMLHttpRequest–GWT lets developers implement rich client applications with pure Java, using familiar idioms from the AWT, Swing, and SWT. GWT goes beyond most Ajax frameworks by making it easy to build desktop-like applications that run in the ubiquitous browser, where the richness of the user interface is limited only by the developer’s imagination.
This book focuses on the more advanced aspects of GWT that you need to implement real-world applications with rich user interfaces but without the heavy lifting of JavaScript and other Ajax-related technologies. Each solution in this practical, hands-on book is more than a recipe. The sample programs are carefully explained in detail to help you quickly master advanced GWT techniques, such as implementing drag-and-drop, integrating JavaScript libraries, and using advanced event handling methodologies.
Solutions covered include
• Building custom GWT widgets, including both high-level composites and low-level components
• Implementing a viewport class that includes iPhone-style automated scrolling
• Integrating web services with GWT applications
• Incorporating the Script.aculo.us JavaScript framework into GWT applications
• Combining Hibernate and GWT to implement database-backed web applications
• Extending the GWT PopupPanel class to implement a draggable and resizable window
• Creating a drag-and-drop module, complete with drag sources and drop targets
• Deploying GWT applications to an external server
• Dynamically resizing flex tables
• Using GWT widgets in legacy applications developed with other frameworks, such as Struts and JavaServer Faces
Complete Sample Code Available at www.coolandusefulgwt.com
All of the code used in this book has been tested, both in hosted and web modes, and in an external version of Tomcat (version 5.5.17), under Windows, Linux, and Mac OS X. For Windows and Linux, we used 1.4.60, and for the Mac we used 1.4.61. NOTE: There are three separate versions of the code. Please download the correct JAR file for the operating system you are using.
Foreword xiii
Preface xvi
Acknowledgments xviii
About the Authors xix
Solution 1: GWT Fundamentals and Beyond 1
Solution 2: JavaScript Integration 53
Solution 3: Custom Widget Implementation 71
Solution 4: Viewports and Maps 103
Solution 5: Access to Online Web Services 133
Solution 6: Drag and Drop 167
Solution 7: Simple Windows 199
Solution 8: Flex Tables 237
Solution 9: File Uploads 283
Solution 10: Hibernate Integration 303
Solution 11: Deployment to an External Server 325
Solution 12: GWT and Legacy Code 343
Index 371
by David Geary
- Core JSTL is an in-depth examination of the JavaServer Pages Standard Tag Library (JSTL), which provides a standard set of custom tags--including tags for iteration, accessing URLs, database access, internationalization, and the manipulation and transformation of XML documents--that Web page authors and software developers can use to develop Web sites. The book illustrates JSTL's capabilities with lots of code snippet and examples. These examples are creative and practical combinations of tags you can use right now! An advanced part of the book covers JSTL configuration and integration of Java code with JSTL. JSTL defines an expression language that facilitates Web site development by providing an alternative to Java code in Web pages. The JSTL expression language also allows easy access to data such as request parameters and attributes, cookies, and HTML headers. Core JSTL examines all aspects of this powerful new addition to the JavaServer Pages standard, and is written for page authors and software developers alike. JSTL is a Java standard for developing dynamic web sites. It gives non-programmers access to powerful operations through HTML-like tags.
by David M. Geary
-
Aimed at the more experienced Java Web developer, Advanced JavaServer Pages covers leading-edge techniques for writing more maintainable Web applications in Java. Stressing custom tag libraries and other reusable components, this book is all you need to take your programming skills to the next level.
There are any number of good introductory texts on JavaServer Pages. This title distinguishes itself with techniques recommended by Sun for building better Web applications. Backed up by the author's own collection of custom tag libraries, which allow ordinary Web designers to program with tags instead of Java code, this text covers all the bases from getting started with tags to more advanced techniques. Early examples of tag libraries include a variety of ways to validate data in HTML forms. Throughout, the book deftly describes installing tag libraries, and shows how HTML designers can use custom tags after Java developers have created them.
Readers also get best practices for JSP and Beans, which is a big plus. Author David Geary presents both Model 1 and Model 2 architectures. (In Model 1, JavaBeans are used to present data to front-end JSPs. In Model 2, a more sophisticated set of Java classes using the Model-View-Controller design pattern allows even greater flexibility.) Sample code for using JSP and JavaBeans for internationalized code (including French, German, and Chinese) will show you how to take your Web application to worldwide markets. The book concludes with a working case study of an online fruit stand (using several languages) and applies the techniques presented earlier on.
All in all, with its mix of practical advice and some very useful techniques for getting the most out of JSP and Java for Web applications, Advanced JavaServer Pages fills a valuable niche for any serious Java developer who wants to see some of the best ways to create Web applications today. --Richard Dragan
Topics covered:
- Custom tag tutorial (including JSP and TLD files)
- The tag life cycle
- Tag attributes
- Tag classes
- Body tag handlers
- Scripting variables
- Nested tags
- HTML forms and JavaBeans
- Validating form data with Beans and custom tags
- Templates and custom tags for defining regions within Web pages
- Model 1 and Model 2 basics
- Sample classes and tags for Model 2 framework (including samples for managing logins)
- Event handling
- Sensitive form resubmissions
- Internationalization techniques (including resource bundles and locales)
- Security issues (including basic, digest, form-based, and SSL authentication)
- Custom tags for JDBC database programming
- Database connection pooling, XML, and JavaBeans
- The Simple API for XML (SAX)
- The Document Object Model (DOM) and custom tags for these APIs
- XSLT and XML
- Case study for an internationalized online fruit stand
- Appendix on Servlet filters and the Servlet 2.3 specification
by David Geary
-
If you're developing software that will be used by a large group of people, you need to give it a good-looking front-end--in Java 2, that means you have to use Swing. An excellent resource, Graphic Java 2: Mastering the JFC, Third Edition (Volume 2: Swing) takes on the Swing components one at a time and shows you how to incorporate them into attractive, efficient programs.
In many ways, Graphic Java 2 is a cookbook. You search the table of contents or index for a reference to the kind of problem you want to solve, then examine the author's examples for the solution (or at least some clues to it). This is the book to turn to if you're wondering how to implement the JComboBox.KeySelectionManager interface (which enables users to select items in a combo box) or compare the various ways of making the JTree component into a file browser. Those are just two of hundreds of examples in David Geary's book.
While most examples don't serve any practical purpose by themselves, they do clearly illustrate how a specific aspect of Swing works. It's easy to adapt the details presented here into your own programs. Geary shows consideration for the reader by presenting all his examples as programs that can be compiled and including them on the enclosed CD-ROM. --David Wall
by David M. Geary
-
Java developers know that the Abstract Windowing Toolkit (AWT) is still an effective way to build functional user interfaces, whether inside Web browsers or in stand-alone applications. David Geary's guide to AWT programming in Graphic Java 1.2 shows you all the basics of AWT newly refitted for the new Java Developer's Kit (JDK) 1.2 standard from Sun, including some excellent 2-D animation examples.
After introducing the basics of the AWT library, the author looks at simple painting and 2-D graphics. Standout sections here look at displaying images--a staple of Internet programming--as well as transforming images with "filters" (such as dimming and rescaling an image). Graphic Java 1.2 shows you a variety of advanced techniques for getting control of your bit-mapped content. The tour of Java graphics capabilities moves on with coverage of layout managers and basic AWT components such as buttons, text fields, lists, and choices. For those who want to create stand-alone Java applications, there's much material on using Java menus.
The book's advanced material highlights new features of JDK 1.2, such as its support for lightweight controls, built-in double-buffering support, and advanced "native-style" operations (such as clipboard support and "rubber-banding" classes). The author also shows off his custom classes for 2-D sprite animation. --Richard Dragan
