Meera has posted 70 posts at DZone. You can read more from them at their website. View Full User Profile

Stripes:...And Java Web Development Is Fun Again

02.11.2009
| 15393 views |
  • submit to reddit
Published by: Pragmatic Bookshelf
ISBN: 1934356212

Reviewer Ratings

Relevance:
5

Readability:
4

Overall:
4

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.

Review

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

Chapter 15:Using JavaScript and Ajax
Now that your web application is secure enough, the author shows how to spice up your web application using Ajax and JavaScript.
Published at DZone with permission of its author, Meera Subbarao.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Sebastien replied on Wed, 2009/02/11 - 10:33am

Can you see how fun reading a book with such similar quotes is?

 I don't know if it's me being fussy for paying more attention to the layout rather than the content, but the excerpts typeset in Avant Garde or whatever is used there are somewhat painful to read...

Meera Subbarao replied on Wed, 2009/02/11 - 10:39am in response to: Sebastien

Hi Sebastien,

I have been reading a lot of ebooks recently, so didn't actually notice anything painful to read. It might also be the screen shots which are painful to see. Anyway, the publisher has a free chapter available for download, you should check that out as well.

Freddy Daoud replied on Wed, 2009/02/11 - 8:10pm

You'll find a sample excerpt here. Hopefully, you'll find that the PDF is of good quality. Other sample excerpts are available on the book's page.

Aurangzeb Agha replied on Wed, 2009/02/11 - 8:51pm

I'm nearly finished with Freddy's book (8 pages left) and I have to say this is one of the best written programming books I've ever read.  The thing that wasn't so clear to me before I bought the book was how comprehensive it was--after having (nearly) read it, it's one of the most comprehensive, end-to-end books I've ever read.  VERY well written!

Freddy Daoud replied on Thu, 2009/02/12 - 3:58pm

Thanks very much for your kind words, Aurangzeb!

Joaquin Valdez replied on Wed, 2009/03/11 - 6:06pm

Hello! Freddy!

 

How would you recommend someone get started? I have only used JSP1.1 and servlets.   should i use an ide?

 

Thanks!

Freddy Daoud replied on Mon, 2009/03/16 - 11:52am

Hi Joaquin, You can try Stripes-Quickstart to quickly set up a Stripes project. An IDE such as Eclipse or NetBeans might help you save time, but make sure that you understand how web applications are structured and deployed. Cheers, Freddy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.