Stripes -- and Java web development is fun again

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Personally, I consider this book the best confluence of a great explication with a great technology since C Programming by K&R. Like K&R, this book proceeds from the deceptively simple yet powerful through all the features and facets in a linear and consistent way. It bucks the paper happy approach (pioneered by Petzold in in his Programming Windows series) of showing 5 wrong ways before finally one right, and constantly gives the best way for each practice and then moves on. Daoud does have the benefit of describing an enlightened platform, a meta MVC platform (a MVC framework for your MVC2 application) that is to software as The Declaration of Independence is to documents. Stripes is a container to web applications as Smalltalk was (is) for client applications. The features and facets of stripes are consistent, thematic, similarly sized and driven by both a view from 10,000 feet and the experience of a programmer in the trenches. While Stripes uses Java 5 features to implement code driven code that does programmatic busywork automatically, it also roles off gracefully where the platform ends and the user starts. So, while many facets of Stripes use smart binding driven by metadata (whether java inherent or decorated with annotations), it continues with use of interfaces and generics to allow user defined plug-in polymorphism for formatters (data to strings), converters (strings to data) and other platform features. While other well begun and meaning projects and books (e.g Spring and Hibernate) become increasingly full of Petzold-like blather (first 5 wrong ways to do it, just so you can appreciate what comes next, and then 3 right ways to do it), this book is a constant jazz-like crescendo of best-practices. I will credit reading Harnessing Hibernate by James Elliott with turning me on to Stripes. But even this book presented a Rube Goldberg solution to the problem of facile binding of request data to Hibernate model objects (with yet-to-be lazily loaded related data requiring a session) using a Stripes Interceptor to rebind the unbound data. Stipersist, as described by Daoud, continues Fennel's approach of: given everything we've learned and everything we have available, how can we do this right FOR YOU. This is my new favorite programming book and framework. Because of this book, I will use Stripes to coordinate other best practice technologies, such as Hibernate and Spring, rather than the other way around. Having said that, let me acknowledge what Daoud and Fennel do: Stripes knows it's place in the software ecology. It doesn't strive to be Kudzu-like, overwhelming diversity. It has a carefully described and confined mission - being the MVC of your VC and facilitating co-operation with the rest with no xml config.

Author(s): Frederic Daoud
Series: Pragmatic programmers
Edition: 1
Publisher: Pragmatic Bookshelf
Year: 2008

Language: English
Pages: 391
City: Raleigh, N.C

Contents......Page 9
Introduction......Page 13
What Can Stripes Do for You?......Page 15
Getting the Most Out of This Book......Page 16
Acknowledgments......Page 19
Learning the Controls......Page 21
Setting Up a Stripes Application......Page 22
Hello, Stripes!......Page 27
Binding to Action Beans......Page 36
Wrapping Up......Page 39
The Core: Action Beans and JSPs......Page 40
Let's CRUD......Page 41
Writing a Base for a Stripes Application......Page 43
Displaying Data with Action Beans and JSPs......Page 46
Parameterized Links......Page 52
Displaying Messages to the User......Page 57
Creating Forms......Page 60
Use a Forward or a Redirect?......Page 67
Stripes Validation Concepts......Page 70
Using Built-in Validations......Page 76
When You Need More: Custom Validation Methods......Page 88
Type Conversion Concepts......Page 98
Built-in Type Converters......Page 100
Formatting......Page 107
Working with Custom Data Types......Page 110
Customizing Information Messages......Page 121
Customizing Error Messages......Page 124
Changing the Text of Error Messages......Page 131
Creating Messages for Custom Errors......Page 138
Reusable Layouts......Page 141
Basic Stripes Layout Concepts......Page 142
Putting Layouts to Work: Decorators......Page 146
Using View Helpers......Page 156
If You're Used to Tiles or SiteMesh......Page 161
Revving Up......Page 165
Adding Form Input Controls......Page 166
Checkboxes......Page 167
Select Boxes......Page 170
Image Buttons and Text Areas......Page 174
Using Cross-page Controls......Page 178
Radio Buttons......Page 180
Managing Session Data......Page 183
Altering Form Values in the Action Bean......Page 188
Using Indexed Properties......Page 191
Working with Files......Page 195
The Registration Page......Page 203
Adding Password and Confirm Password Boxes......Page 205
Dealing with a Bunch of Required Fields......Page 207
Using Validation Metadata......Page 208
Creating a Wizard......Page 210
The Login Page......Page 216
Offering an Application in Multiple Languages......Page 218
Translating the Text of an Application......Page 221
Switching Between Languages......Page 233
Using Different Resource Bundles......Page 236
In High Gear......Page 244
Persistence with Stripersist, JPA, and Hibernate......Page 245
Dependency Injection with Spring......Page 261
Automated Testing with Mock Objects......Page 267
Houston: Exception Handling......Page 277
Customizing URL Bindings......Page 283
Everything Is Possible: Interceptors......Page 294
Interceptor Example: Adding Support for Guice......Page 299
Another Interceptor Example: Ensuring Login......Page 302
The Stripes Life Cycle in More Detail......Page 304
Controlling Parameter Binding......Page 307
Preventing Cross-site Scripting Attacks......Page 311
Using Encryption......Page 313
Ensuring the User Is Logged In......Page 315
Showing Users Their Data, Not Other People's......Page 319
Using Roles......Page 321
Using JavaScript and Ajax......Page 336
Using JavaScriptResolution......Page 337
Working with Ajax Requests and Responses......Page 341
Ajaxifying the Webmail Application......Page 351
Adding Client-Side Validation......Page 360
Required Configuration......Page 369
Extensions......Page 370
Settings......Page 376
Interceptors......Page 378
Stripes Dependencies......Page 379
Third-Party Frameworks, Libraries, and Tools......Page 380
Bibliography......Page 381
B......Page 382
E......Page 383
I......Page 384
M......Page 385
S......Page 386
T......Page 387
W......Page 388
X......Page 389