Table of Contents

Copyright

Brief Table of Contents

Table of Contents

Foreword

Preface

Acknowledgments

About this Book

About the Authors

About the Cover Illustration

1. Starting Spring apps rapidly with Roo

Chapter 1. What is Spring Roo?

1.1. Configuration is a burden

1.1.1. Spring reduces the pain

1.1.2. Shifting from code to configuration

1.1.3. Spring makes development less painful

1.1.4. Batteries still required

1.1.5. Those other guys—RAD frameworks

1.1.6. Java needs RAD

1.2. Enter Spring Roo

1.2.1. Installing the Roo shell

1.2.2. Launching the shell

1.3. Roo by example—the Pizza Shop

1.3.1. The pizzashop.roo sample

1.3.2. Running the Pizza Shop with Maven

1.3.3. Creating toppings—forms

1.3.4. Creating a pizza form—dependencies

1.3.5. JSON-based web services with the Pizza Shop

1.3.6. Wrapping up the walk-through

1.3.7. The Pizza Shop script

1.4. Roo application architecture models

1.4.1. The web layer

1.4.2. Service-and-repository layering in Roo

1.4.3. Roo’s Active Record architecture

1.4.4. Which pattern is better?

1.5. Summary

1.6. Resources

Books

Web

Chapter 2. Getting started with Roo

2.1. Working with the Roo shell

2.1.1. Give me a hint!

2.1.2. Common Roo commands

2.1.3. Creating an application

2.1.4. Adjusting the logging level

2.1.5. Adding persistence and running the application

2.1.6. Backup, the Roo log, and scripting

2.1.7. The Roo shell log file

2.1.8. A final word on scripting

2.2. How Roo manages your projects

2.2.1. The taskmanager project layout

2.2.2. Adding a service and repository

2.2.3. The tests and data on demand

2.2.4. The web layer

2.2.5. Spring configuration files

2.2.6. About AspectJ ITDs

2.2.7. What ITDs did you just generate?

2.2.8. Exploring an ITD

2.2.9. Yeah, they handle your dirty work

2.2.10. Multimodule projects

2.3. I want my IDE!

2.3.1. SpringSource Tool Suite

2.3.2. The Roo context menu

2.3.3. The Roo shell

2.3.4. Showing and hiding Roo ITDs

2.3.5. IntelliJ IDEA and other IDEs

2.4. Refactoring, Roo ITDs and leaving Roo

2.4.1. Push-in refactoring

2.4.2. Verify refactoring

2.4.3. Pulling code out to ITDs

2.4.4. Leaving Roo behind

2.5. Summary

2.6. Resources

Books

Web

2. Databases and entities

Chapter 3. Database persistence with entities

3.1. Your business objects and persistence

3.1.1. The Java Persistence API

3.1.2. Setting up JPA in Roo

3.1.3. Schema management settings

3.2. Working with entities

3.2.1. Creating your first entity

3.2.2. Adding fields to the Course

3.2.3. Adding the course type enum

3.2.4. Exercising the Course entity

3.2.5. Exploring the Course entity API

3.2.6. Roo’s Active Record entity methods

3.2.7. Using the entity API

3.2.8. Writing a JUnit Roo entity test

3.3. Validating Courses with Bean Validation

3.3.1. Validating Courses

3.3.2. Testing Course validations

3.3.3. Bean Validation annotations

3.3.4. Using the @AssertTrue annotation

3.3.5. Bean Validation in review

3.4. Searching with finders

3.4.1. A sample Roo finder

3.4.2. Multifield finder queries

3.4.3. More complex finders

3.5. Leaving Active Record—JPA repositories

3.5.1. The JpaRepository API

3.5.2. Queries with JpaSpecificationImplementor

3.5.3. Annotation-driven queries with @Query

3.5.4. Repository wrap-up

3.6. Code samples

3.7. Summary

3.8. Resources

Chapter 4. Relationships, JPA, and advanced persistence

4.1. Object relations: it’s all relative

4.2. A sample Course Manager database

4.3. Course Manager relationships

4.3.1. One to many: training programs to courses

4.3.2. More on database keys

4.3.3. Many-to-many relationship: courses to tags

4.3.4. The inverse many-to-many: courses have tags

4.3.5. Putting the people in courses...

4.3.6. People teach and attend courses—inheritance

4.3.7. Testing your inheritance hierarchy

4.3.8. JPA providers and your database schema

4.3.9. The rest of your schema

4.4. Reverse engineering your database

4.5. Adding a service layer

4.5.1. Building services with service create

4.6. Using JPA directly

4.7. NoSQL databases with MongoDB

4.7.1. Persistence with MongoDB

4.7.2. Setting up MongoDB

4.7.3. MongoDB and Roo

4.7.4. A MongoDB Course entity

4.7.5. Generating a Course MongoDB repository

4.7.6. Creating a service for your MongoDB repository

4.8. Summary

4.9. Resources

Books

Web

3. Web development

Chapter 5. Rapid web applications with Roo

5.1. The Spring MVC web framework

5.2. Roo Spring MVC quick-start

5.2.1. The web application and first controller

5.2.2. Creating your first controller

5.2.3. Views, tags, and templates

5.2.4. Launching the web application

5.2.5. Customizing your view

5.2.6. Customize that message!

5.3. Web scaffolding for entities

5.3.1. Creating the course scaffold

5.3.2. Fetching courses

5.3.3. Creating a new course

5.3.4. Updating courses with PUT

5.3.5. Removing a course with DELETE

5.3.6. Scaffolding and finders

5.3.7. Scaffolding wrap-up

5.4. Accessing other Spring beans

5.4.1. Automatic detection in scaffolds

5.4.2. Nonscaffolded controllers and Spring beans

5.4.3. Multimodule scaffolds

5.5. Summary

5.6. Resources

Books

Web

Chapter 6. Advanced web applications

6.1. Customizing Roo CRUD views

6.1.1. Element naming conventions

6.1.2. Scaffold’s magic z attribute

6.1.3. Modifying list views

6.1.4. Form view customizations

6.1.5. Common form field attributes

6.2. Advanced customization

6.2.1. Changing field types

6.2.2. Disabling or hiding features

6.2.3. Style-based date formatting

6.2.4. Pattern-based date formatting

6.2.5. Adjusting date formats in views

6.2.6. Providing reference data

6.3. View layouts, theming, and localization

6.3.1. How Roo resolves scaffold labels

6.3.2. Configuring additional locales

6.3.3. Tiles and Roo

6.3.4. Roo’s tile layouts

6.3.5. Putting it all together

6.3.6. Customizing the tiles layout engine

6.3.7. Theming

6.4. Summary

6.5. Resources

Books

Web

Chapter 7. RIA and other web frameworks

7.1. JavaScript and Ajax

7.1.1. Spring JavaScript

7.1.2. Calculating Course cost with Ajax

7.1.3. The JavaScript event handler

7.1.4. Easy Ajax with Spring MVC

7.2. Google Web Toolkit

7.2.1. The GWT Course Manager

7.2.2. Supporting browser types

7.2.3. Summary—GWT

7.3. Using JavaServer Faces

7.3.1. Installing JSF

7.3.2. JSF installation details

7.3.3. Scaffolding in JSF

7.3.4. The CourseBean page bean

7.3.5. The Course page view

7.3.6. The facelet itself

7.3.7. JSF developer guidelines

7.4. Other Roo UI frameworks

7.5. Summary

7.6. Resources

Books

Web

Chapter 8. Configuring security

8.1. Installing Spring Security

8.1.1. The security context file

8.1.2. Web configuration elements

8.2. Securing a sample application

8.2.1. Restricting URLs

8.2.2. Storing roles and users in a database

8.2.3. Database-backed authentication

8.2.4. LDAP-based authentication

8.2.5. Handling access denied errors

8.2.6. Adding login links

8.3. Testing security setup

8.4. Adding security event logging

8.5. Summary

8.6. Resources

4. Integration

Chapter 9. Testing your application

9.1. Roo testing philosophy

9.1.1. Layers of testing

9.1.2. Test-specific shell commands

9.1.3. The DataOnDemand component

9.1.4. Key DataOnDemand methods

9.1.5. Working with the DataOnDemand framework

9.2. Stubbed unit tests

9.3. Unit tests using mock objects

9.3.1. Mocking services with Mockito

9.3.2. The entity mocking framework

9.3.3. Creating an entity mock test

9.3.4. Unit testing the completeRegistration() method

9.3.5. Mocking with the RegistrationServiceBean

9.4. Testing in-container with Roo

9.4.1. Creating entity integration tests

9.4.2. Testing other Spring beans

9.5. Web testing with Selenium

9.5.1. What is Selenium?

9.5.2. Installing Selenium

9.5.3. Autogenerated Selenium tests

9.5.4. Writing your own Selenium test

9.5.5. Adding JUnit semantics

9.5.6. The WebDriver API

9.5.7. Final thoughts on web testing

9.6. Improving your testing

9.7. Summary

9.8. Resources

Books

Web

Chapter 10. Enterprise services—email and messaging

10.1. Roo integration with enterprise services

10.1.1. Email support

10.1.2. Asynchronous messaging

10.2. Defining the sample Course Manager use cases

10.2.1. Use case 1: course catalog distribution

10.2.2. Use case 2: course registration confirmation notification

10.2.3. Use case 3: course registration wait-list notification

10.3. Setting up JMS in the Course Manager

10.3.1. Course catalog updates

10.3.2. Testing the course catalog distribution use case

10.4. Adding email support for course registration

10.4.1. Registration confirmation via email

10.4.2. Testing the course registration confirmation notification use case

10.5. Asynchronous messaging for registration confirmation

10.5.1. JMS configuration

10.5.2. Testing JMS setup for wait-list notification

10.5.3. Course completion certificate use case

10.6. Monitoring messaging activity

10.6.1. Application monitoring using VisualVM JConsole

10.6.2. Application monitoring using Spring Insight

10.7. Summary

10.8. Resources

Chapter 11. Roo add-ons

11.1. Extending Roo with add-ons

11.2. How add-ons work

11.3. Working with published Roo add-ons

11.3.1. Finding the Roo repository add-ons

11.3.2. Installing with add-on install

11.3.3. Using the Git add-on

11.3.4. Upgrading Roo add-ons

11.3.5. Trusting PGP keys

11.3.6. Removing add-ons

11.4. Enough OSGi to be dangerous

11.4.1. OSGi bundles and manifests

11.4.2. Bundle lifecycle

11.4.3. Viewing bundles in the OSGi container

11.4.4. Starting and uninstalling a bundle

11.5. Types of Roo add-ons

11.6. Roo wrapper add-ons

11.7. Adding a language to Roo with i18n

11.8. A simple add-on: jQuery UI

11.8.1. Creating the jQuery UI add-on

11.8.2. The jQuery UI add-on goals

11.8.3. Defining the jQuery install operations

11.8.4. Copying jQuery to the web application

11.8.5. Installing jQuery in JavaScript

11.8.6. Defining the availability of the jquery setup

11.8.7. Installing the jquery UI setup command

11.8.8. Installing your commands

11.8.9. Building and installing the add-on

11.8.10. Installing jQuery in your project

11.8.11. Using the jQuery UI in your application

11.9. Summary

11.10. Resources

Chapter 12. Advanced add-ons and deployment

12.1. Advanced add-ons

12.2. To create an advanced add-on, you need Coffee(Script)

12.2.1. What is CoffeeScript?

12.2.2. Creating a CoffeeScript add-on

12.2.3. Configuring the Maven plug-in

12.2.4. Creating the setup command

12.2.5. Setting up the CoffeescriptCommands

12.2.6. Accessing parameters

12.2.7. Building and installing the CoffeeScript add-on

12.2.8. Using the CoffeeScript add-on

12.2.9. Testing the CoffeeScript add-on

12.2.10. Removing CoffeeScript from a project

12.2.11. Detecting setup and remove command availability

12.3. Key add-on beans and services

12.3.1. ProjectOperations

12.3.2. The PathResolver

12.3.3. The file manager

12.3.4. Manipulating files transactionally

12.3.5. Services wrap-up

12.4. Publishing your add-ons

12.4.1. Manual distribution

12.5. Deploying to an OBR

12.5.1. Generating and using your PGP keys

12.5.2. Using a version control system

12.5.3. Releasing the add-on

12.5.4. Using the OBR to fetch your add-on

12.6. Submitting your add-on

12.7. Summary

12.7.1. Resources

5. Roo in the cloud

Chapter 13. Cloud computing

13.1. What is cloud computing?

13.1.1. Platform as a service

13.2. Cloud Foundry

13.2.1. Hosting

13.2.2. Database support

13.2.3. Messaging

13.3. Roo add-on for Cloud Foundry

13.3.1. How to install the Cloud Foundry add-on

13.3.2. Add-on commands

13.3.3. Cloud Foundry command-line interface

13.4. Deploying the Course Manager application to the cloud

13.4.1. Cloud Foundry login

13.4.2. Deploying the Course Manager application

13.5. Managing cloud services

13.5.1. Application statistics

13.5.2. Binding services

13.6. Application monitoring in the cloud

13.6.1. View application logs

13.6.2. Provisioning memory

13.7. The road ahead

13.8. Summary

13.9. Resources

Chapter 14. Workflow applications using Spring Integration

14.1. Workflow applications

14.1.1. Enterprise application integration

14.1.2. Event-driven architecture

14.2. Using the Spring Integration framework

14.2.1. Spring Batch

14.3. Adding Spring Integration to your Roo application

14.3.1. Course registration: a workflow-based approach

14.3.2. Integration patterns used in the solution

14.4. Spring Integration add-on for Roo

14.4.1. How to install the Roo add-on for Spring Integration

14.4.2. Verifying the add-on installation

14.5. Course registration workflow components

14.5.1. Spring Integration flow setup

14.5.2. Configuring Spring Integration components

14.5.3. Spring Integration configuration details

14.5.4. Testing Spring Integration flow

14.6. Summary

14.7. Resources

Index

List of Figures

List of Tables

List of Listings

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.144.59