Fred Daoud
 
"Passionate about Programming and Web application development."
 

Getting Started With Apache Click (English version only)

$19.99 Paperback, $13.99 Download

Click here to purchase


"Wow, what can I say, I was blown away! This is a great book. It really captures the design intent of Click and the reasons why it is the way it is, and I learned stuff as well."

-- Malcolm Edgar, creator of Apache Click


"I've just finished reading the book and think it is superb. Freddy really nailed it. The book sets a nice pace and is very easy to follow and understand. I'm also impressed that the book covers quite a lot of ground in such few pages. Really great work. Freddy has a knack for making a technical book read like a novel."

-- Bob Schellink, Apache Click committer


Ready for easy component-based web development? Apache Click is a framework designed with simplicity in mind. Develop web applications with Java and Apache Velocity templates, create reusable controls, use them to assemble your pages, and give your application a consistent look with reusable layouts. This book will help you get started with this excellent framework, starting with the basics and moving on to creating a sample application. You'll also learn how to integrate popular third-party frameworks such as Spring, Hibernate, Java Persistence API (JPA), and more.


Product Details
Paperback:150 pages
Language:English
Publication Date:January 4, 2010
Copyright:© 2010 Frederic Daoud (Standard Copyright License)
Size:6 x 9 inches
Interior Color:Black and White

Download sample code, updated 2011-03-04 with Apache Shiro 1.1.0: examples.zip

Table of contents

1 INTRODUCTION
  1.1 CLICK: THE BIG PICTURE
      1.1.1 Component based
      1.1.2 Pages and controls 
  1.2 WHO SHOULD READ THIS BOOK 
      1.2.1 What you should already know
      1.2.2 Is Click right for you?
  1.3 HOW THIS BOOK IS ORGANIZED
      1.3.1 Getting the source code 

2 HELLO, CLICK! 
  2.1 SETTING UP A CLICK APPLICATION 
      2.1.1 Installing Maven 
      2.1.2 The pom.xml file 
      2.1.3 The web.xml file 
      2.1.4 The index.html file 
  2.2 HELLO, CLICK 
      2.2.1 The click.xml file 
      2.2.2 The Page class
      2.2.3 The Velocity template 
  2.3 RUNNING THE EXAMPLE 

3 VELOCITY IN EIGHT MINUTES
  3.1 MERGING A CONTEXT WITH A TEMPLATE
  3.2 VARIABLE REFERENCES 
  3.3 DIRECTIVES 
      3.3.1 Setting a variable 
      3.3.2 Branching 
      3.3.3 Looping 
  3.4 MACROS
  3.5 COMMENTS
  3.6 INCLUDING OTHER FILES
  3.7 DYNAMICALLY DYNAMIC CODE
  3.8 HALT! 

4 A TOUR OF OUR PROJECT 
  4.1 WELCOME TO CLICK POLL
  4.2 REGISTERING AND LOGGING IN
  4.3 CREATING POLLS
  4.4 MODERATOR TASKS
      4.4.1 User roles 

5 PAGE LAYOUTS AND MENUS 
  5.1 READY, SET, GO!
  5.2 CREATING A REUSABLE PAGE LAYOUT 
      5.2.1 Using the layout 
      5.2.2 Why that works
  5.3 ADDING A CASCADING STYLE SHEET
  5.4 USING MENUS
      5.4.1 Introducing Click Extras
      5.4.2 Defining the menu
      5.4.3 Rendering the menu
      5.4.4 Styling the menu 
      5.4.5 Why that works

6 STACKING THE DECK 
  6.1 SETTING UP A DATABASE 
  6.2 CREATING A PERSISTENCE LAYER 
      6.2.1 Setting up a JPA persistence unit 
      6.2.2 Setting up Spring and Hibernate
      6.2.3 Creating a DAO 
  6.3 CREATING MODEL CLASSES 
  6.4 TESTING OUR PERSISTENCE LAYER 
  6.5 INTEGRATING SPRING WITH CLICK 

7 CREATING FORMS
  7.1 CREATING THE REGISTRATION FORM 
  7.2 VALIDATING INPUT
      7.2.1 Method chaining 
      7.2.2 Required fields
      7.2.3 Minimum and maximum length 
      7.2.4 JavaScript validation
      7.2.5 Custom validation
      7.2.6 Using a flash message with a redirect 
  7.3 CUSTOMIZING THE FORM LAYOUT

8 AUTHENTICATION AND AUTHORIZATION
  8.1 IMPLEMENTING A LOGIN MECHANISM WITH APACHE SHIRO
      8.1.1 Installing Apache Shiro
      8.1.2 Setting up a realm 
      8.1.3 Configuring Shiro in web.xml 
      8.1.4 Implementing the login form 
      8.1.5 Logging out 
  8.2 USING ROLES 

9 EXPLORING MORE CONTROLS 
  9.1 CREATING TABLES
      9.1.1 Creating a simple table
      9.1.2 Table style classes 
      9.1.3 Sorting and paging 
  9.2 ADDING LINKS 
      9.2.1 Adding a value to a link 
      9.2.2 Adding a JavaScript confirmation 
  9.3 VOTING 
  9.4 REMOVING POLLS 

10 CONCLUSION

INDEX