Stripes:...And Java Web Development Is Fun Again
Buy it now
One Minute Bottom Line
|This is an excellent book, highly readable and loaded with tons of working code. The book has several side bars "Joe Asks.." and "Tim Says..." which are really fun and also informative to read. Stripes:...And Java Web Development Is Fun Again is a book that actually lives up to its title--and it actually makes writing web applications with Stripes fun.|
The book is organized in three parts.
Part I introduces the different parts of Stripes and how they work. After setting up a development environment and getting a Hello, World! example running to make sure everything works, you start building the sample application that you’ll keep improving throughout the book.
Part II introduces more sophisticated functionality to the application.
Part III delves into some of the more advanced features of Stripes and shows how to integrate third-party libraries such as Hibernate, Spring, Guice, JUnit, and jQuery.
Chapter 1: Introduction
As the title suggests, this chapter introduces you to stripes and gives a quick feature summary explaining what Stripes can do for you. And each and every feature is explained in great detail in the next 14 chapters. Here is a sneek peek of what Tim says:
Chapter 2: Stripes 101:Getting Started
Inspite of getting the Sun Certified Web Component Developer certification, I never was comfortable saying I was a web developer. I have used many of the web frameworks and never was happy with all the XML configurations, going back and forth betwene the source code and XML files.
Stripes completely changed my perspective. Even before reading this book, I was able to get Stripes to work with my EJB project in less than an hour and just a few lines of XML. This chapter shows how to write a simple Hello World web application. If you are familiar with Ant, you can run the example in just a few seconds.
Chapter 3: The Core:Action Beans and JSPs
This chapter helps the reader understand Action beans and JSPs, which are the building blocks of the Stripes framework. The author starts a webmail application and builds on this application throughout the book.
Chapter 4:Validating User Input
Once you have forms, you want to make sure the user enters valid data before you submit the same right? Stripes gives you many options to validate user input. The chapter starts off by explaining Stripes validation concepts using annotations. Followed by a section which explains how Stripes offers built-in validations with attributes of @Validate, followed by controlling validation execution. The final section explains how to write custom validation methods.
Chapter 5: There's More to Life Than Strings: Working with Data Types
This chapter has sections which cover type conversion concepts, built-in type converters in Stripes, formatting, and finally customizing data types.
Chapter 6:Customizing Stripes Messages
You have validated the user input and created your own data types until now. How about customizing information and error messages to the user? This chapter covers all those topics, here is what the author discusses in this chapter:
- Customizing the appearance of information and error messages
- Displaying error messages in a group or individually next to corresponding fields
- Customizing how fields that are in error are highlighted
- Changing the text of error messages
Chapter 7:Reusable Layouts
In this chapter, the author shows how easy it is to create resusable layouts using Stripes. For those of you who are Tiles or SiteMesh experts, the author has one complete section showing how to integrate these two frameworks with Stripes.
Chapter 8: Adding Form Input Controllers
No web application is complete without some fancy radio buttons, checkboxes or images. The chapter helps expose the reader to the different types of form input controls and how excatly they work with Stripes tags and action bean properties and in the process enhances the look of the webmail application.
Chapter 9:Advanced Features Made Easy
No web application is complete without state management. The first section of this chapter gives you step by step details about how to manage session data using the ActionBeanContext class. The next few sections explain how to alter form values in the action beans, use indexed proeperties, and finally work with files.
Chapter 10:Registering and Logging In
If you are planning on building web applications using Stripes, than you should read this chapter as well. It covers topics that show how to create registration pages, login pages, adding passwords. Some other topics which are covered are handling the required fields, how to use validation metadata, and of course creating a wizard.
Chapter 11:Parlez-Vous Français? Making It Multilingual
Is it Spanish or French? I have no clue, but if you want your web application available to the users in more than one language, you need to read this chapter. It covers topics such as:
- Offering an Application in Multiple Languages
- Translating the Text of an Application
- Switching Between Languages
- Using Different Resource Bundles
Chapter 12:Completing the Stack
Even before reading this book, I had Stripes installed and had it working with EJB3 and JPA. I was just amazed about how easy it was to integrate Stripes with EJB3 and JPA. In this book, the author covers persistence with Stripersist, JPA, and Hibernate, dependency injection with Spring, and testing with Stripes Mock Objects. The author shows most sample test code using JUnit, but if you are a big fan of TestNG, than read on..:
Chapter 13:Tapping into Stripes
The author provides detailed information about how the internals of Stripes work, which includes exception handling, customizing URL bindings, and everything you need to know about how to write interceptors. The author also takes some time to explain DI using Guice. To quote the author :We’ll add support for Guice DI using an interceptor. Tapping into Stripes and guicing up action beans is surprisingly easy!"
Can you see how fun reading a book with such similar quotes is?
Chapter 14:It's a Dangerous World; Adding Security
In recent times we have frequently heard reports of breaches involving company data and personal information. Most organizations have some security built-in, but in this chapter the author shows how to build security into your software. This chapter alone is worth all the money to buy this book. The chapters covers topics such as:
- Controlling Parameter Binding
- Preventing Cross-site Scripting Attacks
- Using Encryption
- Ensuring the User Is Logged In
- Showing Users Their Data, Not Other People’s
- Using Roles
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)