SlideShare a Scribd company logo
Seam


             Pete Muir
    JBoss, a Division of Red Hat

http://in.relation.to/Bloggers/Pete

       pete.muir@jboss.org
Road Map

 •   What is Seam?
 •   Why should I care about atomic conversations?
 •   How do I quickly build an application with Seam?
 •   What tools are available?
 •   The future
Application Stack
                                                    "%'($%%
                      :.&8!0&/1%quot;*quot;23               )*+,$%%

                                                     !quot;#$%


                      !quot;#!$%&'quot;()%*
                      4&5!6,7#&8quot;,9                  -.,/$




                                             !quot;#$
                                                    0,/$1quot;#$

                      !quot;#$quot;%&%'!(quot;)&*               0$,quot;*'23


                                                    4+,quot;5$(2
                    +&,-.-'&%/&!0&/1%quot;*quot;23
                                                      62,777
Where can I run my app?

                 WebSphere                   Web Logic



                   Tomcat                     Glassfish




                                          JBoss Enterprise
           JBoss Application Server
                                         Application Platform


                            JBoss SOA Platform
!quot;#quot;$%$&&
Seam is contextual
                                                 '($)quot;
 •   Stateful
     •   store objects for as long as you        *#+$
         need them

     •   Seam manages all interactions       ,-)($.&#quot;/-)
         with the context

     •   dependencies are injected and          !$&&/-)
         updated every time a component
         is accessed
                                            01&/)$&&!*.-2$&&


                                              344%/2#quot;/-)
Seam will store the
 The unified component model                                    component in the
                                                             conversation context
@Name(quot;discEditorquot;) @Scope(CONVERSATION)
public class DiscEditor {
                                          Inject the
    @In EntityManager entityManager;    EntityManager

    @In Session mailSession;

    @In @Out Item disc;                                                   Inject a
                                                                         JavaMail
    @In(scope=SESSION) User user;                                         session
                                           Alias the item from the
    // Use the components in some way     context, and update the
                                        ;-)
                                            context if the object
}                                                  changes
        Specify the
      context to inject
           from                                                      8
Road Map

 •   What is Seam?
 •   Why should I care about atomic conversations?
 •   How do I quickly build an application with Seam?
 •   What tools are available?
 •   The future
Why do I want an atomic conversation?

 •   Here’s a common scenario:
     •   A user has a task to complete which:
         •    spans multiple pages

         •    should be able to click cancel or back at any time, no changes made
              until the user is finished

         •    should be able to do the same task in multiple windows



                                                         Review and confirm
         View a hotel           Enter your booking
                                                              booking
What does Seam provide?
 •   A conversation scope
     •   shorter than the session, longer than a request

     •   demarcated by the application developer

     •   a conversation per window/tab


                                          Application
                                Session                                Session
               Conversation                             Conversation
     Request                  Request
What does Seam provide?

 •   A conversation scoped persistence context keeps entities
     attached for the entirety of the user’s task
     •   guarantees object equality

     •   allows lazy loading

 •   An atomic conversation needs to only flush changes at
     particular points
     •   Only flush the persistence context when explicitly instructed to
What does Seam provide?
 •   An atomic conversation needs to only flush changes at
     particular points
     •   Need to use a manual flush mode from Hibernate


         @Begin(flushMode=MANUAL)
         public void editDisc() {
             // Load the item to edit
         }

         @End
         public void saveDisc() {
            entityManager.flush();
         }
How do I manage the system transaction then?
  •   Seam manages the system transaction for you
      •   A read-write transaction

      •   A read only transaction for rendering the page (slightly better
          than Open Session in View)

                              CONVERSATION
                        EVENT                                 EVENT
          APPLY                          INVOKE     RENDER
RESTORE          PROCESS      UPDATE
        REQUEST                        APPLICATION RESPONSE
  VIEW          VALIDATIONS   MODEL
         VALUES


                         PERSISTENCE CONTEXT
                                                                 FLUSH

            SYSTEM TRANSACTION
Road Map

 •   What is Seam?
 •   Why should I care about atomic conversations?
 •   How do I quickly build an application with Seam?
 •   What tools are available?
 •   The future
Application Framework
  •   UI orientated controller components               Can define in XML or
                                                          Java for custom
  •   EntityHome for CRUD                                    behaviour

<fwk:entity-home entity-class=quot;com.acme.Discquot; name=quot;discHomequot;/>



<s:decorate template=quot;/edit.xhtmlquot;>
  <h:inputText value=quot;#{disc.name}quot; required=quot;truequot; />
</s:decorate>
<h:commandButton action=quot;#{discHome.update}quot; value=quot;Savequot; />
<h:commandButton action=quot;#{discHome.remove}quot; value=quot;Deletequot; />

 Seam provides JSF                             Bind directly to
  controls for easy                            the entities, no
 decoration of fields                           need for DTOs
Application Framework
   •   EntityQuery for search
<fwk:entity-query name=quot;discsquot; ejbql=quot;select d from Disc dquot; order=quot;d.namequot;
max-results=quot;5quot;>
  <fwk:restrictions>
    <value>lower(d.name) like concat(#{exampleDisc.name}, '%'))</value>
  </fwk:restrictions>
</fwk:entity-query>                               Basic queries can be
                                                   specified in XML

<component name=quot;exampleDiscquot; class=quot;com.acme.Artistquot; scope=quot;sessionquot; />

                         A prototype, used
                           to bind query
                            parameters
                          between UI and
                               query
Application Framework
   •   EntityQuery for search
                                        Search criteria
<h:form>
  Filter by name:
  <h:inputText value=quot;#{exampleDisc.name}quot;>
    <a:support reRender=quot;artistsquot; event=quot;onkeyupquot; />
  </h:inputText>
</h:form>
                                                          Output the results
<h:table value=quot;#{discs.dataModel}quot; var=quot;dquot; id=quot;discsquot;>
  <h:column>
    <s:link action=quot;discquot; value=quot;#{disc.name}quot;>
      <f:param name=quot;discIdquot; value=quot;#{disc.id}quot; />

   </s:link>
  </h:column>
</h:table>
<h:inputText value=quot;#{disc.name}quot; required=quot;truequot;>
                          <s:validate />
                        </h:inputText>



Validation
 •    Need to report validation errors back to the user on the correct
      field
 •    BUT normally need to enforce same constraints at the
      persistence layer and the database

@Entity public class Item {

    @Id @GeneratedValue Long id;

    @Length(min=3, max=1000, message=quot;Must be between 3 & 1000 charsquot;)
    String description;
}
Road Map

 •   What is Seam?
 •   Why should I care about atomic conversations?
 •   How do I quickly build an application with Seam?
 •   What tools are available?
 •   The future
Tooling

 • seam-gen - command line tool for generating skeleton
    project and reverse engineering a database schema
    using Seam Application Framework
 • JBoss Developer Studio - Eclipse based IDE
    •     For $99 you get a full installer + JBoss EAP
    •     Based on the freely available JBoss Tools Eclipse plugins
Demo
Road Map

 •   What is Seam?
 •   Why should I care about atomic conversations?
 •   How do I quickly build an application with Seam?
 •   What tools are available?
 •   The future
Flex as a view layer

•   A community effort
•   Uses Granite Data Services or Blaze Data Services
•   Check out a couple of demos at


                    http://www.rationaldeveloper.com
JSF 2

 •   Easy Component Creation & Templating
     •   Standardizes Facelets

     •   No XML needed to create a component

 •   Built in Ajax support
 •   Many improvements to JSF
     •   lifecycle (performance!)

     •   error handling

     •   navigation
What else?

 •   Seam 2.1 release candidate in the next week or two
     •   Friendly URLs

     •   Identity Management

     •   ACL style permissions

     •   Wicket support

     •   Excel reporting module

     •   Support for JAX-RS (REST)
Q&A




      http://in.relation.to/Bloggers/Pete


      http://www.seamframework.org

More Related Content

What's hot

Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Leonardo Balter
 
Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSockets
Ben Limmer
 
Video.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video PlayerVideo.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video Player
steveheffernan
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
Javier Eguiluz
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend Con
ZendCon
 
Hands on Pier
Hands on PierHands on Pier
Hands on Pier
ESUG
 
Seam Introduction
Seam IntroductionSeam Introduction
Seam Introduction
ihamo
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
dynamis
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
Remy Sharp
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
David Kaneda
 
Developing for Mobile
Developing for MobileDeveloping for Mobile
Developing for Mobile
Remy Sharp
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialYi-Ting Cheng
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
James Pearce
 
Firefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next levelFirefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next level
Frédéric Harper
 
Angularjs Performance
Angularjs PerformanceAngularjs Performance
Angularjs Performance
Steven Lambert
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
dion
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
Peter Lubbers
 

What's hot (19)

Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSockets
 
Video.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video PlayerVideo.js - How to build and HTML5 Video Player
Video.js - How to build and HTML5 Video Player
 
Symfony tips and tricks
Symfony tips and tricksSymfony tips and tricks
Symfony tips and tricks
 
Step objects
Step objectsStep objects
Step objects
 
State And Ajax Zend Con
State And Ajax   Zend ConState And Ajax   Zend Con
State And Ajax Zend Con
 
Hands on Pier
Hands on PierHands on Pier
Hands on Pier
 
Seam Introduction
Seam IntroductionSeam Introduction
Seam Introduction
 
Keypoints html5
Keypoints html5Keypoints html5
Keypoints html5
 
Browsers with Wings
Browsers with WingsBrowsers with Wings
Browsers with Wings
 
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
How to Develop a Rich, Native-quality User Experience for Mobile Using Web St...
 
Developing for Mobile
Developing for MobileDeveloping for Mobile
Developing for Mobile
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
HTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applicationsHTML5 and the dawn of rich mobile web applications
HTML5 and the dawn of rich mobile web applications
 
Firefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next levelFirefox OS Web APIs, taking it to the next level
Firefox OS Web APIs, taking it to the next level
 
Angularjs Performance
Angularjs PerformanceAngularjs Performance
Angularjs Performance
 
Future of Web Apps: Google Gears
Future of Web Apps: Google GearsFuture of Web Apps: Google Gears
Future of Web Apps: Google Gears
 
[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design[cssdevconf] Adaptive Images in Responsive Web Design
[cssdevconf] Adaptive Images in Responsive Web Design
 
HTML5 Real-Time and Connectivity
HTML5 Real-Time and ConnectivityHTML5 Real-Time and Connectivity
HTML5 Real-Time and Connectivity
 

Viewers also liked

[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practicejavablend
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cooljavablend
 
windows linux BEÑAT HAITZ
windows linux BEÑAT HAITZwindows linux BEÑAT HAITZ
windows linux BEÑAT HAITZguest5b2d8e
 
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your applicationjavablend
 
Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360 Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360
Sergio Akash
 

Viewers also liked (7)

[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice[Roblek] Distributed computing in practice
[Roblek] Distributed computing in practice
 
[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool[Strukelj] Why will Java 7.0 be so cool
[Strukelj] Why will Java 7.0 be so cool
 
.
..
.
 
Bryanpulido
BryanpulidoBryanpulido
Bryanpulido
 
windows linux BEÑAT HAITZ
windows linux BEÑAT HAITZwindows linux BEÑAT HAITZ
windows linux BEÑAT HAITZ
 
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
[Pilarczyk] Adrenaline programing implementing - SOA and BPM in your application
 
Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360 Portfólio - Zarabatana Digital 360
Portfólio - Zarabatana Digital 360
 

Similar to [Muir] Seam 2 in practice

Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
Steve Souders
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
jeresig
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
Bruce Snyder
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyond
dion
 
Sinatra
SinatraSinatra
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
Tamir Khason
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
John Quaglia
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
John Brunswick
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验yiditushe
 
SXSW: Even Faster Web Sites
SXSW: Even Faster Web SitesSXSW: Even Faster Web Sites
SXSW: Even Faster Web Sites
Steve Souders
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
Orlando_Ruby_Users_Group
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
dosire
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
Christopher Judd
 
Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2
sleguiza
 
How Not To Code Flex Applications
How Not To Code Flex ApplicationsHow Not To Code Flex Applications
How Not To Code Flex Applications
jeff tapper
 
Developing Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and JavascriptDeveloping Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and Javascript
Jeff Haynie
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
Matt Todd
 

Similar to [Muir] Seam 2 in practice (20)

Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09Even Faster Web Sites at jQuery Conference '09
Even Faster Web Sites at jQuery Conference '09
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
More Secrets of JavaScript Libraries
More Secrets of JavaScript LibrariesMore Secrets of JavaScript Libraries
More Secrets of JavaScript Libraries
 
Service Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMixService Oriented Integration With ServiceMix
Service Oriented Integration With ServiceMix
 
Google Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and BeyondGoogle Back To Front: From Gears to App Engine and Beyond
Google Back To Front: From Gears to App Engine and Beyond
 
Sinatra
SinatraSinatra
Sinatra
 
Smart Client Development
Smart Client DevelopmentSmart Client Development
Smart Client Development
 
I Feel Pretty
I Feel PrettyI Feel Pretty
I Feel Pretty
 
Boston Computing Review - Java Server Pages
Boston Computing Review - Java Server PagesBoston Computing Review - Java Server Pages
Boston Computing Review - Java Server Pages
 
Google在Web前端方面的经验
Google在Web前端方面的经验Google在Web前端方面的经验
Google在Web前端方面的经验
 
SXSW: Even Faster Web Sites
SXSW: Even Faster Web SitesSXSW: Even Faster Web Sites
SXSW: Even Faster Web Sites
 
Sxsw 20090314
Sxsw 20090314Sxsw 20090314
Sxsw 20090314
 
Os Haase
Os HaaseOs Haase
Os Haase
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
When To Use Ruby On Rails
When To Use Ruby On RailsWhen To Use Ruby On Rails
When To Use Ruby On Rails
 
IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009IPhone Web Development With Grails from CodeMash 2009
IPhone Web Development With Grails from CodeMash 2009
 
Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2Webcast 09/2008 - Silverlight 2 Beta 2
Webcast 09/2008 - Silverlight 2 Beta 2
 
How Not To Code Flex Applications
How Not To Code Flex ApplicationsHow Not To Code Flex Applications
How Not To Code Flex Applications
 
Developing Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and JavascriptDeveloping Desktop Applications using HTML and Javascript
Developing Desktop Applications using HTML and Javascript
 
Adventurous Merb
Adventurous MerbAdventurous Merb
Adventurous Merb
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
ThomasParaiso2
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
Rohit Gautam
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...GridMate - End to end testing is a critical piece to ensure quality and avoid...
GridMate - End to end testing is a critical piece to ensure quality and avoid...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Large Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial ApplicationsLarge Language Model (LLM) and it’s Geospatial Applications
Large Language Model (LLM) and it’s Geospatial Applications
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 

[Muir] Seam 2 in practice

  • 1. Seam Pete Muir JBoss, a Division of Red Hat http://in.relation.to/Bloggers/Pete pete.muir@jboss.org
  • 2. Road Map • What is Seam? • Why should I care about atomic conversations? • How do I quickly build an application with Seam? • What tools are available? • The future
  • 3. Application Stack &quot;%'($%% :.&8!0&/1%quot;*quot;23 )*+,$%% !quot;#$% !quot;#!$%&'quot;()%* 4&5!6,7#&8quot;,9 -.,/$ !quot;#$ 0,/$1quot;#$ !quot;#$quot;%&%'!(quot;)&* 0$,quot;*'23 4+,quot;5$(2 +&,-.-'&%/&!0&/1%quot;*quot;23 62,777
  • 4. Where can I run my app? WebSphere Web Logic Tomcat Glassfish JBoss Enterprise JBoss Application Server Application Platform JBoss SOA Platform
  • 5. !quot;#quot;$%$&& Seam is contextual '($)quot; • Stateful • store objects for as long as you *#+$ need them • Seam manages all interactions ,-)($.&#quot;/-) with the context • dependencies are injected and !$&&/-) updated every time a component is accessed 01&/)$&&!*.-2$&& 344%/2#quot;/-)
  • 6. Seam will store the The unified component model component in the conversation context @Name(quot;discEditorquot;) @Scope(CONVERSATION) public class DiscEditor { Inject the @In EntityManager entityManager; EntityManager @In Session mailSession; @In @Out Item disc; Inject a JavaMail @In(scope=SESSION) User user; session Alias the item from the // Use the components in some way context, and update the ;-) context if the object } changes Specify the context to inject from 8
  • 7. Road Map • What is Seam? • Why should I care about atomic conversations? • How do I quickly build an application with Seam? • What tools are available? • The future
  • 8. Why do I want an atomic conversation? • Here’s a common scenario: • A user has a task to complete which: • spans multiple pages • should be able to click cancel or back at any time, no changes made until the user is finished • should be able to do the same task in multiple windows Review and confirm View a hotel Enter your booking booking
  • 9. What does Seam provide? • A conversation scope • shorter than the session, longer than a request • demarcated by the application developer • a conversation per window/tab Application Session Session Conversation Conversation Request Request
  • 10. What does Seam provide? • A conversation scoped persistence context keeps entities attached for the entirety of the user’s task • guarantees object equality • allows lazy loading • An atomic conversation needs to only flush changes at particular points • Only flush the persistence context when explicitly instructed to
  • 11. What does Seam provide? • An atomic conversation needs to only flush changes at particular points • Need to use a manual flush mode from Hibernate @Begin(flushMode=MANUAL) public void editDisc() { // Load the item to edit } @End public void saveDisc() { entityManager.flush(); }
  • 12. How do I manage the system transaction then? • Seam manages the system transaction for you • A read-write transaction • A read only transaction for rendering the page (slightly better than Open Session in View) CONVERSATION EVENT EVENT APPLY INVOKE RENDER RESTORE PROCESS UPDATE REQUEST APPLICATION RESPONSE VIEW VALIDATIONS MODEL VALUES PERSISTENCE CONTEXT FLUSH SYSTEM TRANSACTION
  • 13. Road Map • What is Seam? • Why should I care about atomic conversations? • How do I quickly build an application with Seam? • What tools are available? • The future
  • 14. Application Framework • UI orientated controller components Can define in XML or Java for custom • EntityHome for CRUD behaviour <fwk:entity-home entity-class=quot;com.acme.Discquot; name=quot;discHomequot;/> <s:decorate template=quot;/edit.xhtmlquot;> <h:inputText value=quot;#{disc.name}quot; required=quot;truequot; /> </s:decorate> <h:commandButton action=quot;#{discHome.update}quot; value=quot;Savequot; /> <h:commandButton action=quot;#{discHome.remove}quot; value=quot;Deletequot; /> Seam provides JSF Bind directly to controls for easy the entities, no decoration of fields need for DTOs
  • 15. Application Framework • EntityQuery for search <fwk:entity-query name=quot;discsquot; ejbql=quot;select d from Disc dquot; order=quot;d.namequot; max-results=quot;5quot;> <fwk:restrictions> <value>lower(d.name) like concat(#{exampleDisc.name}, '%'))</value> </fwk:restrictions> </fwk:entity-query> Basic queries can be specified in XML <component name=quot;exampleDiscquot; class=quot;com.acme.Artistquot; scope=quot;sessionquot; /> A prototype, used to bind query parameters between UI and query
  • 16. Application Framework • EntityQuery for search Search criteria <h:form> Filter by name: <h:inputText value=quot;#{exampleDisc.name}quot;> <a:support reRender=quot;artistsquot; event=quot;onkeyupquot; /> </h:inputText> </h:form> Output the results <h:table value=quot;#{discs.dataModel}quot; var=quot;dquot; id=quot;discsquot;> <h:column> <s:link action=quot;discquot; value=quot;#{disc.name}quot;> <f:param name=quot;discIdquot; value=quot;#{disc.id}quot; /> </s:link> </h:column> </h:table>
  • 17. <h:inputText value=quot;#{disc.name}quot; required=quot;truequot;> <s:validate /> </h:inputText> Validation • Need to report validation errors back to the user on the correct field • BUT normally need to enforce same constraints at the persistence layer and the database @Entity public class Item { @Id @GeneratedValue Long id; @Length(min=3, max=1000, message=quot;Must be between 3 & 1000 charsquot;) String description; }
  • 18. Road Map • What is Seam? • Why should I care about atomic conversations? • How do I quickly build an application with Seam? • What tools are available? • The future
  • 19. Tooling • seam-gen - command line tool for generating skeleton project and reverse engineering a database schema using Seam Application Framework • JBoss Developer Studio - Eclipse based IDE • For $99 you get a full installer + JBoss EAP • Based on the freely available JBoss Tools Eclipse plugins
  • 20. Demo
  • 21. Road Map • What is Seam? • Why should I care about atomic conversations? • How do I quickly build an application with Seam? • What tools are available? • The future
  • 22. Flex as a view layer • A community effort • Uses Granite Data Services or Blaze Data Services • Check out a couple of demos at http://www.rationaldeveloper.com
  • 23. JSF 2 • Easy Component Creation & Templating • Standardizes Facelets • No XML needed to create a component • Built in Ajax support • Many improvements to JSF • lifecycle (performance!) • error handling • navigation
  • 24. What else? • Seam 2.1 release candidate in the next week or two • Friendly URLs • Identity Management • ACL style permissions • Wicket support • Excel reporting module • Support for JAX-RS (REST)
  • 25. Q&A http://in.relation.to/Bloggers/Pete http://www.seamframework.org