JSF and Seam

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    8 Favorites, 1 Group & 1 Event

    JSF and Seam - Presentation Transcript

    1.  
    2. Java Server Faces adopting the standard Roi Aldaag Consultant, AlphaCSP
    3. Agenda
      • Introduction
      • Architecture
      • Configuration
      • Features
      • Pros & Cons
    4. Introduction
      • Not so long ago, if you “Googled“
      • the word JSF , you probably would
      • have come across …
    5. Introduction The F-35 J oint S trike F ighter (JSF) …
    6. Introduction
      • Today you’d find…
      JavaServer Faces Technology
    7. Introduction :: What is JSF?
      • What is JSF ?
        • Specification
        • UI framework
        • Component based
        • Server side
        • Java web applications
    8. Introduction :: Motivation
      • 9 Billion Reasons for JSF…
    9. Introduction :: Motivation
      • JCP Standard
        • JSF 1.0/1.1 JSR 127 May 2005
          • JSF 1.2 JSR 252 May 2006
          • JSF 2.0 JSR 314 Q4 2008 ?
          • / JEE6
    10. Introduction :: Motivation
      • Vendor adoption
        • JSF RI
        • MyFaces
    11. Introduction :: Motivation
      • Popularity
        • Commercial Projects
        • Open Source Projects
        • Market
        • Documentation
    12. Introduction :: Motivation
      • IDE integration
        • Visual tool support
        • Drag & Drop
        • Auto-complete
    13. Introduction :: Motivation
      • Tools
        • Component Libraries
          • IceFaces
          • RichFaces
          • ADF / Trinidad
          • Tomahawk
        • Extensions
          • Facelets
          • Ajax4Jsf
          • DinoFaces
    14. Introduction :: Motivation
      • View Technology
        • JSP / Servlet
        • Other template engines
          • Facelets
          • JSFTemplating
        • Multiple rendering output from same pages
    15. Introduction :: What is Seam?
      • What is Seam ?
        • A lightweight framework for JEE5
        • Unifies JSF and EJB models (Web Beans / JSR 299)
        • Integrates JSF, POJOs, JPA, jBMP, Drools
        • Annotation / EL based
        • Extends JSF
        • JBoss OS (LGPL)
        • Release at 2006
        • Current version 2.0.2 SP1
    16. Introduction :: What is Seam?
      • Misconceptions
        • Can be used without EJB3
        • Does not need a container
        • Has a small footprint
        • Easy integration
    17. Introduction :: Why JSF+Seam?
      • Why JSF + Seam?
        • JSF has some weaknesses…
        • Seam extends and enhances JSF
          • Reduces boilerplate code
          • Annotations
          • RESTful URLs
          • JSF Lifecycle
          • Contextual state management
          • Ajax Remoting
          • Exception Handling
        • Simple Integration
          • EJB3 / jBMP/ Drools / Spring
    18. Introduction :: Seam in action
    19. Agenda
      • Introduction
      • Architecture
      • Configuration
      • Features
      • Pros & Cons
    20. Architecture :: JSF MVC
      • Model
      • View
      • Controller
    21. Architecture :: JSF MVC
      • Model
      • POJO’s
    22. Architecture :: JSF MVC
      • Controller
      • Front Servlet
      • Configuration
      • Event Listeners
    23. Architecture :: JSF MVC
      • View
      • Component Tree
      • Component Model
      • Delegates
      • Resources
    24. Architecture :: Component Tree ... <f:view> <h:form> <h:panelGrid columns = &quot;2&quot;> <h:inputText/> <h:inputSecret/> </panelGrid> </h:form> </f:view> .. HTML JSP WML XML Markup
        • Component Tree
      JSF tags
    25. Architecture :: JSF Lifecycle
      • JSF Lifecycle
      • Restore view
      • Apply request values
      • Process validations
      • Update model values
      • Invoke application
      • Render response
    26. Architecture :: Seam Lifecycle
      • Seam Lifecycle
      • Restore view
      • Restore Conversation
      • Apply Page Parameters
      • Apply request values
      • Process validations
      • Update model values
      • Invoke application
      • Process Selection
      • Store Conversation
      • Render response
    27. Architecture :: Seam Concepts
      • Seam Concepts
      • Three Tier
      • POJOs and annotations
      • IoC and bijection
      • Contextual state management
      • Interceptors
    28. Agenda
      • Introduction
      • Architecture
      • Configuration
      • Features
      • Pros & Cons
    29. Configuration :: JSF
      • faces-config.xml
    30. Configuration :: Seam
      • faces-config.xml
    31. Configuration :: JSF
      • web.xml
    32. Configuration :: Seam
      • web.xml
    33. Agenda
      • Introduction
      • Architecture
      • Configuration
      • Features
      • Pros & Cons
    34. Features :: Demo JSF Project LoginBean.java MasterDetailBean.java jsfLogin.jsp jsfMasterDetail.jsp faces-config.xml web.xml XML XML JSP JSP
    35. Features :: Demo Seam Project LoginBean.java MasterDetailBean.java jsfLogin.jsp jsfMasterDetail.jsp faces-config.xml web.xml XML XML JSP JSP seam.properties jboss-seam.jar jboss-seam-ui.jar components.xml
    36. Features :: Demo Login page jsfLogin.jsp UIViewRoot UIPanel UIOutput UIPanel UIInput UIForm UIOutput UIInput UICommand UIPanel
    37. Features :: JSF Value Binding LoginBean.java jsfLogin.jsp faces-config.xml Unified EL Managed Bean
    38. Features :: JSF Method Binding LoginBean.java jsfLogin.jsp Invoke Application Phase
    39. Features :: JSF State Management jsfLogin.jsp jsfMasterDetail.jsp User Dependency Injection
    40. Features :: Seam State Management
      • Contextual state management
        • Bijection
          • @In - Injection
          • @Out – Outjection
          • Dynamic, contextual, bidirectional
        • Context Scope
          • Event < Page < Conversation < Business Process < Session < Application
        • Conversation
          • Temporary conversation
          • Long-running conversation
          • ConversationId
    41. Features :: Seam State Management MasterDetailBean.java
    42. Features :: JSF Page Flow LoginBean.java jsfLogin.jsp jsfMasterDetail.jsp faces-config.xml
    43. Features :: Seam Page Flow
      • Page Actions
        • HTTP GET
        • Bookmarking
        • RESTful URLs
      HTTP POST HTTP GET
    44. Features :: Seam Page Flow
      • Page Flow
        • JBoss Business Process Management (jBPM)
        • Used to define process workflow / page flow
        • Define transition between pages
        • Define navigation rules for each page
        • Flow is based on events and conditions
      • Back button
        • In conversation mode, back button is disallowed
        • Undefined transition
        • Seam blocks actions from “stale” pages
        • Redirects to relevant page
    45. Features :: JSF Validations MasterDetailBean.java jsfMasterDetail.jsp
    46. Features :: Seam Validations jsfMasterDetail.jsp MasterDetailBean.java @org.hibernate.validator.Email
    47. Features :: JSF Error Handling javax.servlet.ServletException: javax/servlet/jsp/tagext/JspIdConsumer
    48. Features :: Seam Error Handling
    49. Features :: Seam Error Handling
      • Exception Annotations
    50. Features :: Demo MasterDetail page jsfMasterDetail.jsp MasterDetailBean.java
    51. Features :: Demo MasterDetail page jsfMasterDetail.jsp - continued HtmlDataTable HtmlColumn HtmlColumn HtmlOutputText HtmlOutputText
    52. Features :: JSF Ajax
      • Ajax: Page Wide
        • Page wide support (region, zone) ‏
        • Add support to existing components
        • Sub view processing
        • Partial tree rendering
        • Normal lifecycle
        • Partial page refresh
        • Example:
          • Ajax4Jsf, Dynamic Faces
    53. Features :: JSF Ajax
      • Ajax: Component Wide
        • Ajaxified components
        • Client validations
        • Client component interaction
        • Custom lifecycle
        • Example:
          • RichFaces, IceFaces, ADF (Trinidad) ‏
    54. Features :: Seam Ajax
      • Ajax Remoting
        • Similar to DWR
        • Access seam components from JS
        • JavaScript APIs
          • Seam.Component
          • Seam.Remote
        • Expose server side components
          • @WebRemote
        • Compatible with Ajax4Jsf
        • Dojo / GWT integration
    55. Features :: Documentation
      • JSF
        • Specification
        • Forums
        • Books
      • Seam
        • Reference
        • Forums
        • Books
    56. Agenda
      • Introduction
      • Architecture
      • Configuration
      • Features
      • Pros & Cons
    57. Pros & Cons
      • Seam Sweet spots
        • Seam Gen (RoR)
        • Security (Role / Rule based)
        • Spring Integration
        • Integrated testing FW (TestNG)
    58. Pros & Cons
      • JSF Shortcomings
        • Too much wiring
        • HTTP GET / REST is hard
        • Complicated Lifecycle
        • Slow learning curve
        • Writing new components
        • Poor exception handling
    59. References
      • JSF
        • http://www.jcp.org/en/jsr/detail?id=252
        • http://jcp.org/en/jsr/detail?id=314
        • http://myfaces.apache.org/
      • Seam
        • http://www.jboss.com/products/seam
        • http://www.seamframework.org/
      • Thank
      • You !

    + yuvalbyuvalb, 2 years ago

    custom

    3298 views, 8 favs, 1 embeds more stats

    JSF & Seam by Roi Aldag from AlphaCSP
    www.alphacsp. more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 3298
      • 3244 on SlideShare
      • 54 from embeds
    • Comments 0
    • Favorites 8
    • Downloads 197
    Most viewed embeds
    • 54 views on http://javathreads.de

    more

    All embeds
    • 54 views on http://javathreads.de

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories