Stateful and Secure Enterprise Applications with JBoss Seam - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Stateful and Secure Enterprise Applications with JBoss Seam

Description:

http://edemmorny.wordpress.com. Challenges of Enterprise Applications. Remote Invocation ... http://in.relation.to. My blog. http://edemmorny.wordpress.com ... – PowerPoint PPT presentation

Number of Views:184
Avg rating:3.0/5.0
Slides: 24
Provided by: aitika
Category:

less

Transcript and Presenter's Notes

Title: Stateful and Secure Enterprise Applications with JBoss Seam


1
Stateful and Secure Enterprise Applications with
JBoss Seam
  • Edem Morny
  • Enterprise Java Application Developer
  • SCWCD,SCBCD
  • http//edemmorny.wordpress.com

2
Challenges of Enterprise Applications
  • Remote Invocation
  • Transactions
  • Load balancing Fail over
  • Message-orientation
  • Resource Pooling
  • Security
  • Integration
  • And a LOT more...

3
Enterprise Platforms Evolution
  • Enterprise Java technologies before Java EE 5
  • J2EE 1.3/1.4 (Standard promoted by Sun, IBM etc)?
  • Spring (Alternative promoted by SpringSource)?
  • Advancements achieved by Java EE 5
  • JSF Java's Standard Web Presentation Framework
  • A rich set of custom components to leverage
  • JavaBean Binding using Expression Language
  • Advanced AJAX capabilities
  • Simplified Business Logic Components Enterprise
    Java Beans (EJB) 3.0 using Annotations
  • JPA Standard ORM framework for persistence.
  • Enter JBoss Seam An RAD Web Framework
  • Improving integrating already standard
    technologies as well as incorporating
    non-standard ones

4
JBoss Seam
  • Simplified programming model through
  • Bijection
  • The exciting concept of scopes/contexts
  • Powerful yet simple navigation
  • Business process integration
  • Powerful events model
  • DRY validation on entities
  • Security model applicable on all tiers of
    application

5
JBoss Seam Continued
  • Other exciting features
  • Productivity IDE Support

6
Achieving Statefulness
  • The Statelessness of HTTP
  • A more stateful model through
  • Contexts/Scopes
  • Bijection
  • AJAX Support
  • Advanced navigation
  • Stateful workflows business process modelling
  • Events

7
Contexts/Scopes
  • Application
  • Business Process
  • Session
  • Conversation
  • Page
  • Event
  • Stateless

8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
Conversations - A Closer Look
  • _at_Name("shopper")?
  • _at_Scope(CONVERSATION)?
  • public class BookingManager
  • _at_In EntityManager entityManager
  • _at_Out(requiredfalse)private Booking booking
  • _at_Begin public void selectHotel(Hotel
    selectedHotel)
  • hotel em.merge(selectedHotel)
  • _at_End public void confirm()
  • em.persist(booking)
  • facesMessages.add("Your booking id
    isbooking.getId)
  • facesMessages.add("Thank you for your custom)

12
Bijection
  • Injection and Outjection Bijection
  • _at_Name("shopper")?
  • _at_Scope(CONVERSATION)?
  • public class Shopper
  • _at_RequestParameter Integer cartId
  • _at_In EntityManager entityManager
  • _at_Out(requiredfalse)_at_In private Cart cart
  • public String initilizeCart()
  • cart entityManager.find(Cart.class,cartId)
  • return ok

13
AJAX Support
  • Asynchronous JavaScript XML
  • AJAX Support on JSF Components
  • Ajax4jsf from JBoss RichFaces (JBoss)?
  • MyFaces Trinidad (Apache)?
  • ICEFaces AJAX Support (ICESoft)?
  • Direct AJAX Remoting
  • Can also make use of other JavaScript AJAX
    libraries which are not Java based
  • Dojo Toolkit
  • JMaki
  • Prototype
  • JQuery

14
Navigation
  • JSF 1.1-1.2
  • XML based navigation. Sometimes too complex.
  • No support for opening in new tabs
  • No support for binding selected data in a
    DataModel
  • Limited support for exception handling
  • Seam solves these with
  • component
  • _at_DataModel and _at_DataModelSelection annotations
  • pages.xml navigation better than faces-config.xml

15
Stateful Workflows - BPM
  • Business Process Management a gist.
  • Involves many tasks
  • Involves many users
  • A task normally maps to a Seam conversation
  • A business process could take more than a day
  • JBoss JBPM Open source Java's preferred
    business process management engine.
  • Integration with Seam
  • jpdl.xml describe business process, tasks etc.
  • JBPM Actor object hold identity of users
  • _at_CreateProcess, _at_BeginTask, _at_EndTask etc.

16
Events Model
  • _at_Name(hotelBooker)
  • public class BookingManager
  • _at_End public void saveBooking()
  • entityManager.persist(booking)
  • Events.instance().raiseEvent(roomBooked)?
  • _at_Name(roomList)
  • public class RoomList
  • _at_DataModel List rooms
  • _at_Observer(roomBooked)?
  • public void reload()
  • rooms em.createQuery(select r from ...)

17
DRY Validation
  • Hibernate Validator integration
  • Example Annotations - _at_Min, _at_Max, _at_Email,
    _at_Future, _at_Past, _at_NotNull etc.
  • public _at_Entity class Student
  • _at_NotNull
  • _at_Length(min5,max40,messageName must be
    between 5 and 40 chars long)?
  • private String name
  • _at_Email
  • private String email
  • _at_Past
  • private Date dateOfBirth
  • ...

18
Achieving Security
  • Seam Identity object
  • Authentication, authorisation, integrity
    confidentiality at
  • Presentation tier
  • schemehttps
  • shasRole('Admin')
  • Business Logic tier
  • _at_Restrict(shasRole('Admin'))?
  • public class AdminManager
  • Model tier as well

19
Other features
  • PDF document generation using Facelets
  • Email using Facelets
  • Web Services
  • Asynchronicity (Quartz or EJB3)?
  • Unit Integration testing
  • Portal support
  • Dynamic language support - Groovy
  • Deploys to most Java application servers eg.
    Apache's Tomcat, JBoss' JBAS, Sun's Glassfish,
    IBM's WebSphere, Oracle's OC4J etc.
  • And a whole lot more.

20
Productivity Tools
  • The Red Hat Developer Studio (commercial).
  • Eclipse with JBoss Tools (open source).
  • NetBeans with Seam plugin and Facelets support
    (open source).

21
The Future
  • Standardization efforts led by JBoss (Seam) and
    Google (Guice) Web Beans.
  • Web Beans to be official standard in Java EE 6.
  • Seam becomes a middle tier support for GWT,
    Wicket and Flex being worked on.
  • JSF 2.0 Incorporating new features
  • JSR 303 Standard validation support on the way
  • And further enhancements to the framework.

22
Summary
  • The Web is the New Desktop. The Statelessness of
    HTTP is well on its way to being overcome and
    Seam is spearheading that revolution.

23
Further info
  • The home of the Seam Community
  • http//www.seamframework.org
  • JBoss Seam
  • http//www.jboss.com/products/seam
  • Seam blogs and news
  • http//in.relation.to
  • My blog
  • http//edemmorny.wordpress.com
Write a Comment
User Comments (0)
About PowerShow.com