Apache MyFaces 1.2 Web Application Development

1,565 views

Published on

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

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,565
On SlideShare
0
From Embeds
0
Number of Embeds
18
Actions
Shares
0
Downloads
14
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Apache MyFaces 1.2 Web Application Development

  1. 1. Apache MyFaces 1.2 Web Application Development AUTHOR : BART KUMMEL E-MAIL : BART@BARTKUMMEL.NET DATE : MARCH 2010 WWW.TRANSFER-SOLUTIONS.COM
  2. 2. Apache MyFaces 1.2 Web Application Development Building Java EE web applications using: JSF 1.2 Facelets Apache MyFaces and sub projects Focus on reuse and maintainability © COPYRIGHT TRANSFER SOLUTIONS B.V. 2
  3. 3. Table of Contents 1. Introduction 8. Integrating with the 2. Getting started Backend 3. Facelets 9. Orchestra 4. Tomahawk 10. Extensions Validator 5. Trinidad – the 11. Best Practices Basics 6. Advanced Trinidad 7. Trinidad Skinning and Tuning © COPYRIGHT TRANSFER SOLUTIONS B.V. 3
  4. 4. 1. Introduction Introduces the Apache MyFaces project and all of its sub projects: Core Tomahawk Sandbox Trinidad Orchestra Extensions Validator © COPYRIGHT TRANSFER SOLUTIONS B.V. 4
  5. 5. 2. Getting Started Setting up the development environment Detailed instructions for Eclipse and JDeveloper, as well as introduction to the MyFaces Maven archetypes Setting up the application server Explaining the common steps that are the same for all Java EE application servers Introduction of the example case Throughout the book an example scenario is used to work towards a fully functional application when the book is finished. © COPYRIGHT TRANSFER SOLUTIONS B.V. 5
  6. 6. 3. Facelets The book starts out with an introduction to Facelets Facelets is also used in all examples in the rest or the book Throughout the book we focus on getting the most out of the combination of Facelets with the MyFaces products This makes the book also an excellent resource to get started with Facelets © COPYRIGHT TRANSFER SOLUTIONS B.V. 6
  7. 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 Facelets The creation and use of page templates with Facelets is dicussed Creating and using composition components Composition 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 © COPYRIGHT TRANSFER SOLUTIONS B.V. 7
  8. 8. 4. Tomahawk – ToC Extended components Creating basic data tables Using advanced data table features Uploading files Working with dates and calendars Extra validators © COPYRIGHT TRANSFER SOLUTIONS B.V. 8
  9. 9. 5. Trinidad – the Basics – ToC Creating data tables Including AJAX-based pagination Creating input and edit forms File uploading Using Trinidad’s hierarchical navigation features Trinidad has a comprehensive navigation framework that is covered in this section Creating layouts for our pages Using the many Trinidad layout components © COPYRIGHT TRANSFER SOLUTIONS B.V. 9
  10. 10. 6. Advanced Trinidad – ToC (1/2) Data visualization Creating nice, SVG-based charts Passing on data with page flows Introducing the page flow scope Using AJAX and Partial Page Rendering Trinidad has AJAX embedded in every component © COPYRIGHT TRANSFER SOLUTIONS B.V. 10
  11. 11. 6. Advanced Trinidad – ToC (2/2) Creating dialogs Trinidads powerful dialog framework allows us to create dialogs easily We can easily return values from a dialog Client-side validation and conversion For the optimal AJAX experience © COPYRIGHT TRANSFER SOLUTIONS B.V. 11
  12. 12. 7. Trinidad Skinning and Tuning – ToC Skinning Tuning Understanding the Accessibility terminology Performance Setting up skinning Debugging Creating a Trinidad Appearance skin Localization Extending skins © COPYRIGHT TRANSFER SOLUTIONS B.V. 12
  13. 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 used This chapter is just an introduction so we have a good basis for chapters 9 and 10 © COPYRIGHT TRANSFER SOLUTIONS B.V. 13
  14. 14. 8. Integrating with the Backend – ToC The Model-View-Controller architecture A short recap of the MVC theory Setting up the Java EE application structure How to apply MVC on a Java EE application Preparing a database environment Implementing the Model Using the service facade in the View layer Limitations and problems The presented aproach has some limitations and problems. MyFaces can fix this! © COPYRIGHT TRANSFER SOLUTIONS B.V. 14
  15. 15. 9. MyFaces Orchestra Managing persistence (database) transactions is often a difficult task, especially when transactions have to stay open over multiple UI page requests This chapter shows how we can let Orchestra manage the transactions Orchestra can guarantee that we have a single transaction during a conversation © COPYRIGHT TRANSFER SOLUTIONS B.V. 15
  16. 16. 9. MyFaces Orchestra – ToC Setting up Orchestra Using the Orchestra ViewController Setting up Orchestra conversations Generating forms with DynaForm © COPYRIGHT TRANSFER SOLUTIONS B.V. 16
  17. 17. 10: Extensions Validator This is the first book to cover MyFaces ExtVal Based on the lastest ExtVal release, that was released a few days after the book was published ExtVal gives us the chance to use JSR 303 Bean Validation without the need for JSF 2.0 © COPYRIGHT TRANSFER SOLUTIONS B.V. 17
  18. 18. 10: Extensions Validator – ToC (1/2) Basic usage – JPA annotations ExtVal can create JSF validators based on JPA annotations in our Model Complementing JPA annotations ExtVal has extra annotations if we cannot express our validation rule in JPA annotations Applying cross validation If validation of one field depends on a value in another field © COPYRIGHT TRANSFER SOLUTIONS B.V. 18
  19. 19. 10: Extensions Validator – ToC (2/2) Creating custom error messages Creating our own validation strategy This use case is used to show the flexibility and extendability of ExtVal Extending ExtVal with add-ons Using Bean Validation Instead of JPA or ExtVal annotations, we can also use Bean Validation (JSR 303) annotations © COPYRIGHT TRANSFER SOLUTIONS B.V. 19
  20. 20. 10: Extensions Validator On the website of Packt Publishing, a series of articles on ExtVal is published: Apache MyFaces Extensions Validator Customizing and Extending Apache MyFaces ExtVal Using Bean Validation (JSR 303) annotations with Apache MyFaces 1.2 © COPYRIGHT TRANSFER SOLUTIONS B.V. 20
  21. 21. 11: Best Practices – ToC Preventing direct access to page definitions Using container-managed security with JSF Using component bindings wisely Keeping the state of a component © COPYRIGHT TRANSFER SOLUTIONS B.V. 21
  22. 22. Apache MyFaces 1.2 Web Application Development author: Bart Kummel isbn: 978-1-847193-25-4 publisher: Packt Publishing 408 pages, paperback or e-book © COPYRIGHT TRANSFER SOLUTIONS B.V. 22
  23. 23. Apache MyFaces 1.2 Web Application Development order via: http://tinyurl.com/am12wad author’s website: http://www.bartkummel.net © COPYRIGHT TRANSFER SOLUTIONS B.V. 23

×