apache myfaces 1.2 web application development

23
WWW.TRANSFER-SOLUTIONS.COM AUTHOR : E-MAIL : DATE : Apache MyFaces 1.2 Web Application Development BART KUMMEL [email protected] MARCH 2010

Upload: bart-kummel

Post on 13-Jun-2015

1.323 views

Category:

Technology


2 download

DESCRIPTION

Book presentation of the new book "Apache MyFaces 1.2 Web Application Development".

TRANSCRIPT

Page 1: Apache MyFaces 1.2 Web Application Development

WWW.TRANSFER-SOLUTIONS.COM

AUTHOR :

E-MAIL :

DATE :

Apache MyFaces 1.2 Web Application Development

BART KUMMEL

[email protected]

MARCH 2010

Page 2: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 2

Apache MyFaces 1.2 Web Application Development

Building Java EE web applications using:

JSF 1.2FaceletsApache MyFaces and sub projects

Focus on reuse and maintainability

Page 3: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 3

Table of Contents

1. Introduction2. Getting started3. Facelets4. Tomahawk5. Trinidad – the

Basics6. Advanced Trinidad7. Trinidad Skinning

and Tuning

8. Integrating with the Backend

9. Orchestra10. Extensions Validator11. Best Practices

Page 4: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 4

1. Introduction

Introduces the Apache MyFaces project and all of its sub projects:

CoreTomahawkSandboxTrinidadOrchestraExtensions Validator

Page 5: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 5

2. Getting Started

Setting up the development environmentDetailed instructions for Eclipse and JDeveloper, as well as introduction to the MyFaces Maven archetypes

Setting up the application serverExplaining the common steps that are the same for all Java EE application servers

Introduction of the example caseThroughout the book an example scenario is used to work towards a fully functional application when the book is finished.

Page 6: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 6

3. Facelets

The book starts out with an introduction to FaceletsFacelets is also used in all examples in the rest or the bookThroughout the book we focus on getting the most out of the combination of Facelets with the MyFaces productsThis makes the book also an excellent resource to get started with Facelets

Page 7: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 7

3. Facelets – ToC

Why Facelets?This chapter starts by discussing why we should use Facelets instead of JSP in all our projects.

Templating with FaceletsThe creation and use of page templates with Facelets is dicussed

Creating and using composition componentsComposition components: create your own JSF components by combining existing components

Other Facelets topics that are discussed in this chapter:Using static functions

Using inline texts

Page 8: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 8

4. Tomahawk – ToC

Extended componentsCreating basic data tablesUsing advanced data table featuresUploading filesWorking with dates and calendarsExtra validators

Page 9: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 9

5. Trinidad – the Basics – ToC

Creating data tablesIncluding AJAX-based pagination

Creating input and edit formsFile uploadingUsing Trinidad’s hierarchical navigation features

Trinidad has a comprehensive navigation framework that is covered in this section

Creating layouts for our pagesUsing the many Trinidad layout components

Page 10: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 10

6. Advanced Trinidad – ToC (1/2)

Data visualizationCreating nice, SVG-based charts

Passing on data with page flowsIntroducing the page flow scope

Using AJAX and Partial Page RenderingTrinidad has AJAX embedded in every component

Page 11: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 11

6. Advanced Trinidad – ToC (2/2)

Creating dialogsTrinidads powerful dialog framework allows us to create dialogs easilyWe can easily return values from a dialog

Client-side validation and conversionFor the optimal AJAX experience

Page 12: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 12

7. Trinidad Skinning and Tuning – ToC

SkinningUnderstanding the terminologySetting up skinningCreating a Trinidad skinExtending skins

Tuning AccessibilityPerformanceDebuggingAppearanceLocalization

Page 13: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 13

8. Integrating with the Backend

This chapter shows how we can integrate our View layer with a backend. Only Java EE standard components are usedThis chapter is just an introduction so we have a good basis for chapters 9 and 10

Page 14: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 14

8. Integrating with the Backend – ToC

The Model-View-Controller architectureA short recap of the MVC theory

Setting up the Java EE application structureHow to apply MVC on a Java EE application

Preparing a database environmentImplementing the ModelUsing the service facade in the View layerLimitations and problems

The presented aproach has some limitations and problems. MyFaces can fix this!

Page 15: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 15

9. MyFaces Orchestra

Managing persistence (database) transactions is often a difficult task, especially when transactions have to stay open over multiple UI page requestsThis chapter shows how we can let Orchestra manage the transactionsOrchestra can guarantee that we have a single transaction during a conversation

Page 16: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 16

9. MyFaces Orchestra – ToC

Setting up OrchestraUsing the Orchestra ViewControllerSetting up Orchestra conversationsGenerating forms with DynaForm

Page 17: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 17

10: Extensions Validator

This is the first book to cover MyFaces ExtValBased on the lastest ExtVal release, that was released a few days after the book was publishedExtVal gives us the chance to use JSR 303 Bean Validation without the need for JSF 2.0

Page 18: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 18

10: Extensions Validator – ToC (1/2)

Basic usage – JPA annotationsExtVal can create JSF validators based on JPA annotations in our Model

Complementing JPA annotationsExtVal has extra annotations if we cannot express our validation rule in JPA annotations

Applying cross validationIf validation of one field depends on a value in another field

Page 19: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 19

10: Extensions Validator – ToC (2/2)

Creating custom error messagesCreating our own validation strategy

This use case is used to show the flexibility and extendability of ExtVal

Extending ExtVal with add-onsUsing Bean Validation

Instead of JPA or ExtVal annotations, we can also use Bean Validation (JSR 303) annotations

Page 20: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 20

10: Extensions Validator

On the website of Packt Publishing, a series of articles on ExtVal is published:

Apache MyFaces Extensions ValidatorCustomizing and Extending Apache MyFaces ExtValUsing Bean Validation (JSR 303) annotations withApache MyFaces 1.2

Page 21: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 21

11: Best Practices – ToC

Preventing direct access to page definitionsUsing container-managed security with JSFUsing component bindings wiselyKeeping the state of a component

Page 22: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 22

Apache MyFaces 1.2 Web Application Development

author: Bart Kummelisbn: 978-1-847193-25-4publisher:Packt Publishing408 pages, paperback or e-book

Page 23: Apache MyFaces 1.2 Web Application Development

© COPYRIGHT TRANSFER SOLUTIONS B.V. 23

Apache MyFaces 1.2 Web Application Development

order via: http://tinyurl.com/am12wadauthor’s website: http://www.bartkummel.net