• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
A new world with cdi en
 

A new world with cdi en

on

  • 2,726 views

An essay around some of the design changes encouraged by CDI + Seam 3

An essay around some of the design changes encouraged by CDI + Seam 3

Statistics

Views

Total Views
2,726
Views on SlideShare
2,158
Embed Views
568

Actions

Likes
2
Downloads
0
Comments
0

4 Embeds 568

http://techblog.joserodolfo.com 564
http://www.slideshare.net 2
url_unknown 1
http://webcache.googleusercontent.com 1

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    A new world with cdi en A new world with cdi en Presentation Transcript

    • A new world with CDI An essay around some of the design changes encouraged by CDI + Seam 3Monday, May 16, 2011
    • Who am I ? • Software developer at R&D department at Softplan in Brazil • Seam 3 Contributor • Hobbyist game programmer • CIA spy (it’s a secret, don’t tell anyone)Monday, May 16, 2011
    • AgendaMonday, May 16, 2011
    • Agenda • ContextualizationMonday, May 16, 2011
    • Agenda • Contextualization • A quickly introduction to CDIMonday, May 16, 2011
    • Agenda • Contextualization • A quickly introduction to CDI • A real quickly introduction on Seam 3Monday, May 16, 2011
    • Agenda • Contextualization • A quickly introduction to CDI • A real quickly introduction on Seam 3 • Design simplicity with CDIMonday, May 16, 2011
    • ContextualizationMonday, May 16, 2011
    • A little of web application historyMonday, May 16, 2011
    • The rise of Java • CGI • Servlet • Servlet + JSP • Templating, tag libraries • The era of frameworksMonday, May 16, 2011
    • Struts, Hibernate, Spring • It was almost impossible to develop an application with pure J2EE • Different frameworks to approach different application development needs • Data abstractions • IoC • Flow controlMonday, May 16, 2011
    • JEE 5 • JPA • EJB3 • JSF1.2 • Annotations • ...Monday, May 16, 2011
    • Seam • The Glue between JSF and EJB • Context management and DIMonday, May 16, 2011
    • The Real story • A king tired of lazyInitializationExceptionsMonday, May 16, 2011
    • Have you seen similar method names? • getCustomerWithAddress() • getCustomerWithFoo() • getCustomerWithFooAndBar()Monday, May 16, 2011
    • JEE6 • CDI • JSF2 • JPA2 • EJB3.1 • ...Monday, May 16, 2011
    • CDI main goals • The Standard glue between JSF and EJB • Injectable beans with Managed lifecycle • loose coupling • TypeSafe • AOP and EventsMonday, May 16, 2011
    • “CDI simplifies and sanitizes the API for DI and AOP”Monday, May 16, 2011
    • “CDI simplifies and sanitizes the API for DI and AOP” Rick HightowerMonday, May 16, 2011
    • “CDI rulez!”Monday, May 16, 2011
    • “CDI rulez!” meMonday, May 16, 2011
    • “Designing with CDI is a road to be discovered, specially when we consider the event handling feature”Monday, May 16, 2011
    • “Designing with CDI is a road to be discovered, specially when we consider the event handling feature” me tooMonday, May 16, 2011
    • And seam? what is seam now after it externalized the CDI?Monday, May 16, 2011
    • Seam’s mission is to provide a fully- integrated development platform for building rich, standards-based internet applications tailored for traditional and cloud developmentMonday, May 16, 2011
    • Now we can beginMonday, May 16, 2011
    • Monday, May 16, 2011
    • Pragmatics approachMonday, May 16, 2011
    • ECB Pattern • Entity - Control - Boundary EJB CDI Bean JPAMonday, May 16, 2011
    • CEC Pattern • CDI - EJB - CDI EJB CDI Bean JPAMonday, May 16, 2011
    • CEC Pattern • CDI - EJB - CDI EJB CDI Bean JPAMonday, May 16, 2011
    • CEC Pattern • CDI - EJB - CDI CDI bean EJB CDI Bean JPAMonday, May 16, 2011
    • CEC Pattern • CDI - EJB - CDI Presenter CDI bean EJB CDI Bean JPAMonday, May 16, 2011
    • SimplicityMonday, May 16, 2011
    • Goals • Clean design • Less coding, less bugs • Higher productivity • Easier test automationMonday, May 16, 2011
    • Common designMonday, May 16, 2011
    • javaee 5Monday, May 16, 2011
    • javaee 6Monday, May 16, 2011
    • Easy boy! the world won’t endMonday, May 16, 2011
    • Keeps the served list and provides it to the view through EL Renders a list Returns a listMonday, May 16, 2011
    • Renders a list Returns a listMonday, May 16, 2011
    • And what about the actions?Monday, May 16, 2011
    • Problems: • Messages to the view • Flow controlMonday, May 16, 2011
    • Messages to UI • Proposed solution : Seam MessagesAPIMonday, May 16, 2011
    • Flow control • Success and Error: the typical case • Validation can be done before the service with Bean Validations • In case of exceptions it could be handled by a decoupled class (Seam Catch )Monday, May 16, 2011
    • Complex cases: JSF Nav. RulesMonday, May 16, 2011
    • xml??Monday, May 16, 2011
    • xml navigation pros • More flexible than implicity navigation • IMO, returning a string as outcome is bad • Clean solution to totally abstract a flow controller • It is tool friendly • ...Monday, May 16, 2011
    • Let the structure do its work JSF2 complete Reference, page 12 • JSF CompleteMonday, May 16, 2011
    • Monday, May 16, 2011
    • what about presentation logic?Monday, May 16, 2011
    • Model View PresenterMonday, May 16, 2011
    • Be careful! • take a closer look at your case • choose to simplify whenever is possible.Monday, May 16, 2011
    • Basic references • http://seamframework.org/ • http://www.jcp.org/en/jsr/detail?id=299 • http://www.adam-bien.com/Monday, May 16, 2011
    • Thank you! • Contact: José Rodolfo Freitas joserodolfo.freitas@gmail.com • Supported by: Softplan/Poligraph http://talentos.softplan.com.br • Follow on Twitter: @joserodolfo_f • Blog techblog.joserodolfo.comMonday, May 16, 2011