• Save
Apache Myfaces - Standard meets Innovation
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,542
On Slideshare
4,533
From Embeds
9
Number of Embeds
2

Actions

Shares
Downloads
0
Comments
0
Likes
3

Embeds 9

http://www.slideshare.net 8
http://www.slideee.com 1

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Apache MyFacesStandard meets Innovation
    Matthias Wessendorf | matzew@apache.org
    http://matthiaswessendorf.wordpress.com
    http://twitter.com/mwessendorf
  • 2. Matthias Wessendorf
    Oracle Corporation
    Apache Software Foundation
    ASF Member
    Committer and PMC @Apache MyFaces  PMC Chair
    Committer and PMC @Apache Shale (RIP)
    Author
    (German) Java- and Eclipse-Magazine
    Books on Struts, J2ME & WebServices
    Speaker
    Oracle Open World
    ApacheCon
    JavaOne
    JAX, WJAX
    @mwessendorf (Twitter)
  • 3. YOU ?
  • 4. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 5. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 6. JSF Ecosystem
    Apache MyFaces
    Jenia
    GMaps4JSF
    IceFaces
    PrettyFaces
    Tomahawk
    PrimeFaces
    Woodstock
    Mojarra (Sun RI)
    Facelets
    Oracle ADF Faces
    PureFaces
    Jboss RichFaces
    Tobago
    Seam
    Trinidad
    <<YOUR LIB>>
  • 7. JSF Ecosystem
    3rd Party Libraries
    Implementations
    JSF Spec
    Tools / IDEs
    Frameworks
    Templating
  • 8. JSF Ecosystem
    News, articles, ...
    JSFCentral.com
    @JSFCentral
  • 9. Agenda
    Introduction
    Apache MyFaces CORE
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 10. Planet „Apache MyFaces“
    Commiters: 62 (soon more ... No kidding!)
    First! OpenSource JSF Implementation
    JSF 1.1, JSF 1.2 and JSF 2.0 (alpha release is out  )
    Since 2005 an Apache project
    2002 -> 2005 on sourceforge (LGPL)
    Biggest JSF (user) community
    Apache: Community over Code!
    A good community builds good code
    More than „just“ an implementation
    Innovation happens at Apache (MyFaces)
    Interesting  JSR RI* for JSF/Portlet stuff (301 and 329)
  • 11. Planet „Apache MyFaces“
    The many Faces of MyFaces:
    Tomahawk
    Sandbox as its LAB
    Tobago
    Trinidad
    has Maven features
    Orchestra
    Portlet Bridge
    Commons
    Extensions
    ExtVal and Scripting (Groovy)
  • 12. Team Diversity
    Interoperability
    Apache Tomcat
    JBoss Seam / JSFUnit
    Apache Shale ( RIP)
    Apache Tiles
    Sun RI (patches and contributions)
    Facelets
    Portlets
    Apache Commons
    Apache Geronimo

  • 13. Team Diversity
    Standards
    JSF 1.0  2.0 (multiple JSRs)
    CDI (aka WebBeans)  JSR 299
    Portlets  JSR 168
    JSF Metadata  JSR 276
    Portlet Bridge 1  JSR 301
    Portlet Brdige 2  JSR 329
    TBC !!
  • 14. Team Diversity
    Companies
    Oracle, IBM, Sun, Goolge
    ThoughtWorks, RedHat
    Irian.at, CodeBeat, Ordina J-Technologies, ...
    ... and Freelancers
  • 15. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 16. Trinidad – Background I
    Donated to Apache by Oracle in 2006
    Something between 10g and 11g
    Has already some „11g“ APIs...
    Contains more than 100 JSF components
    Ajax-enabled JSF components
    Tree-Navigation
    Helpers (e.g. Extra converters and validators)
    Ajax is first class citizens
    Mother of PPR (Partial Page Rendering) 
    Ajax support since UIX days !
    Ajax-API
    Client (JavaScript)
    Server (Java)
  • 17. Trinidad – Background II
    Trinidad is a framework
    Several framework bits
    Skinning
    Ajax API
    Maven2 Plugins
    Used as base for:
    Oracle ADF Faces Rich Client Framework
    ADF mobile
    Stable library
    JSF 1.2 support
    JSF 1.1 support
    JSF 2.0 support (a branch right NOW!)
  • 18. Trinidad Chart Component
    Multiple types: pie, horizontalBar, area, ...
    Requires a ChartModel impl
    http://matthiaswessendorf.wordpress.com/2008/10/11/nice-charts-with-trinidad/
  • 19. Trinidad Mobile
    Mobile Web is old
    Never really took off...
    Modern devices (Android, iPhone, black-berry) bring back hype
    Trinidad hides limitations or capabilities of different browsers
    (some) supported Devices
    Microsoft Windows Mobile 5 and 6, Microsoft Pocket Internet Explorer
    Symbian S60 devices
    Apple iPhone
    RIM BlackBerry Browser 4.6
    RIM BlackBerry Browser 4.7
    Android Based Phones
    WAP 2.0 phones (XHTML Basic or XHTML MP)
    Nokia S40 Phone Browser
    Opera Mini Browser
  • 20. Trinidad Mobile
    Navigation Panel Lists:
  • 21. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 22. Groovy – a dynamic language
    dynamic language for the JVM
    backed by JSR 241 (unfinished / inactive ...)
    similar to Java
    easy to learn for Java folks
    Integrates seamless with Java
    (RE)MIX IT
    feature rich
    has already closures (maybe? they arrive in JDK 7*)
    used in the industry
    Apache MyFaces  Hey, that‘s here ..
    Oracle
    JBoss Seam etc...
  • 23. Apache MyFaces Scripting
    (currently) extra module in extensions project
    status: VERY alpha
    Don‘t BYE it today --- playing never hurts!
    mastermind: Werner Punz (Irian.at)
    feature
    Supports Groovy for JSF artifacts
    nice sample application (blog) ...
    Future
    Make it stable ;-)
    Add more (cool) stuff
    Scala
    (J)Ruby
    ...
  • 24. Groovy MyFaces!
    Support for (almost) all JSF artifacts:
    Managed Beans
    Renderers / Components
    Listeners (Action / ValueChange)
    PhaseListener
    NavigationHandler
    Application object
    Factories ...
  • 25. MyFaces gets Groovy!
    GettingReal !
    https://issues.apache.org/jira/browse/EXTSCRIPT-27 (only on Windoze ...)
  • 26. MyFaces gets Groovy!
    public class JavaNightRenderer extends MyRealRenderer {
    public void encodeBegin(FacesContext fc, UIComponent comp) {
    fc.responseWriter.write “““
    <h2> Apache MyFaces in Action </h2>
    <p>Welcome to the JavaNight, guys! </p>
    ...
    Some component access: $comp.xyz
    ...
    “““
    super.encodeBegin(fc, comp);
    }
    ...
    }
    just reload it (F5)
  • 27. ExtVal - Introduction
    Validation Framework (for JSF)
    fits some needs...
    Leverages JPA @nnotations! (JSR backed)
    Seam is using Hibernate Validation
    cross-component validation
    Client-Side Validation (not easy with JSF default)
    only for Trinidad
    tbc...
    Create your own @ValidateMyOnlyOnMonday
    JSR 303 (Bean Validation)
  • 28. ExtVal – some code...
  • 29. ExtVal - Details
    Introduction
    ExtVal vs. JBoss Seam
    Conditional Validation
    Cross Component Validation
    JPA 1.0 support
    http://jsfcentral.com/articles/myfaces_extval_1.html
  • 30. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 31. Apache MyFaces Orchestra
    JSF Extension Library
    Conversation Scope (for multi request)
    for managed beans (spring or @nnotations)
    Persistence Context Handling
    ConversationScope & PersistenceContext
     no more LazyInitializationExceptions
    ViewController
    callbacks (initView(), preProcess(), preRenderView())
    Declarative Transactions
    Requires Spring ...
  • 32. Apache MyFaces Orchestra
    <bean name="ballotTopic"
    class="org.apache.myfaces.examples.ballot.backings.BallotTopic"
    scope="conversation.access"/>
    @Transactional
    public String saveAction(){ topic.setOwner(getVoterDao().getByKey(getBallotState().getVoterId()));
    topicDao.save(topic);
    Conversation.getCurrentInstance().invalidate();
    return "success";
    }
    public class VoterDao {
    @PersistenceContext
    private EntityManager entityManager;
    public Voter getByKey(Long id) {
    return entityManager.find(Voter.class, id);
    } }
  • 33. Agenda
    Introduction
    Apache MyFaces
    JSF implementation
    Apache MyFaces Trinidad
    Apache MyFaces Extensions
    Groovy Support
    Validation Framework
    Apache MyFaces Orchestra
    MISC
  • 34. Apache MyFaces - MISC
    More innovation to come
    Interested ?
    Get started  http://myfaces.apache.org
    Contributions ...
    mailing list / discussions
    patches / code fixes / new feature
    documentation 
    ... are VERY welcome !!!
  • 35. Links and Resources
    Apache MyFaces
    http://myfaces.apache.org
    Slides (soon)
    http://www.slideshare.net/mwessendorf
  • 36. Thank you!matzew@apache.orgBLOG:matthiaswessendorf.wordpress.com