Castle in the clouds - SaaS Enabling JavaServer Faces applications Lucas Jellema AMIS, The Netherlands http://technology.a...
Overview <ul><li>What makes an application ‘SaaS’? </li></ul><ul><ul><li>And why provide an application as SaaS </li></ul>...
Software as a Service common characteristics <ul><li>Single instance of standard application & database </li></ul><ul><li>...
 
Software as a Service (perceived) benefits <ul><li>Small up-front investment </li></ul><ul><li>Quick startup – ‘turn on th...
Software as a Service concerns & potential disadvantages <ul><li>Dependence on 3 rd  party for </li></ul><ul><ul><li>Secur...
SaaS Requirements <ul><li>Integration across the cloud </li></ul><ul><ul><li>Make SaaS application integrate with the SOA ...
Application ‘levels of reality’ Organization B Organization A
Application Mode Switcher <ul><li>Application Managers can switch between Application Modes </li></ul><ul><ul><li>To view ...
Application Rollout process… <ul><li>Development in the Factory </li></ul><ul><li>Production-time refining </li></ul><ul><...
Proposal <ul><li>Let’s approach every end user application as a SaaS application! </li></ul><ul><ul><li>Both standard and ...
Desirable SaaS features & facilities <ul><li>Dynamic, Wiki like, context sensitive help </li></ul><ul><li>Integration with...
Customization <ul><li>Allow adaption of terminology to organization </li></ul><ul><ul><li>Resource Bundles per organizatio...
Customizing terminology  <ul><li>Boilerplate text – prompt, title, button label, messages, help,… - come from resource bun...
Implementing Self Service Customization of Resource Bundles <ul><li>Resource Bundle implemented as class (extend ListResou...
Custom(izing) fields <ul><li>Some fields are never used by some organizations and are therefore ‘in the way’ </li></ul><ul...
Application Settings for customizing application behavior <ul><li>Some Application Behavior is developed as  dynamically c...
Integrating Application Settings during development
Application Settings Data Model Date Format dd-mm-yyyy Use Photo Metric/ Imperial … Y m mm/dd/yyyy dd-mm-yy N Y N i Applic...
Application Personalization
Personalization Features – My… options <ul><li>My Navigation History </li></ul><ul><li>My Favorites (quick links, bookmark...
Demo SaaS style Customization in JSF <ul><li>Run Time Management of Organization specific Resource Bundles </li></ul><ul><...
SOA across the cloud SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Validation Service Service API internal in...
Integration and SOA across the cloud <ul><li>Service API as programmatic alternative to UI </li></ul><ul><ul><li>RSS, SOAP...
SOA across the cloud: data & operations SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Validation Service Serv...
SOA across the cloud: UI / Navigation / Process/Presentation SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Po...
Implementing Deep Linking in JSF <ul><li>URL like  http://host/SaaSApp/UpdateJob/Scott </li></ul><ul><ul><li>Cookie provid...
Demonstrating the SaaS Service API <ul><li>Create a new Employee  </li></ul><ul><li>Call the SaaS API to propagate the new...
Demonstrating cross-cloud event listeners SaaS A App D Service API Service API RSS listener registration <ul><li>Register ...
Demonstrating Deep Link Navigation SaaS A Service API RSS <ul><li>To Do list shows task “Handle promotion for Employee Sco...
Register Event Listener by calling the WebService
SaaS in the Multi-Org world App Z SaaS A  SaaS B Service API Service API RSS Export CMS internet App D Workflow Engine Ser...
Summary and Conclusion SaaS and the road ahead <ul><li>SaaS applications need special facilities </li></ul><ul><ul><li>Cus...
Lucas Jellema [email_address] http://technology.amis.nl/blog  (with all source code of the demos)
Upcoming SlideShare
Loading in …5
×

Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2009)

2,039 views
1,806 views

Published on

SaaS applications are typically web applications that serve users in many customer organizations from a single instance that runs in the cloud, controlled by the SaaS provider. All customers share a single instance of the application while having private data access. SaaS applications are usually multi-lingual (or at least multi-terminology), multi-time zone and -country and run 24/7. There is a number of common requirements for SaaS applications, such as: self service management of users and roles, customization of the application for the needs of a specific customer organization including hiding and adding fields and changing the boilerplate text, specification of customer specific default values and validation rules and influencing the look and feel. Deep link navigation into the SaaS application should be supported as well as the ability to embed context sensitive links from the SaaS application. In addition, facilities for importing and exporting data to and from the SaaS application are crucial as well as support for 'SOA on the cloud' : SaaS application should publish Services for retrieving and manipulating data as well as registering listeners that the SaaS application invokes when specific events occur.

This presentation tells our story of the development of three SaaS style applications based on JavaServer Faces over the past two years. It will introduce the best practices we have arrived at for implementing the requirements listed above. The presentation will include several demonstrations of both the customization and the service interface of JSF based SaaS applications.


Even shorter:

SaaS applications serve users in many organizations from a single application instance that runs in the remote cloud. SaaS applications are usually multi-lingual (or at least multi-terminology) and run 24/7. Common requirements for SaaS applications include: customization including hiding and adding fields and managing boilerplate text and influencing the look & feel. Deep link navigation into the SaaS application allows visual integration between the SaaS application and local apps or SaaS running in another cloud. Facilities for importing and exporting data to and from the SaaS application are crucial. SaaS applications ideally also publish Services for retrieving and manipulating data as well as allow registration of listeners - applications outside the SaaS cloud that are invoked by the SaaS application when specific events occur.

This is our story of developing three SaaS JSF applications in the past two years. It shows the best practices we have arrived at for implementing SaaS requirements. It includes demos of both the customization and the service interface.

Target Audience
Experienced Java Web Developers, preferably familiar with JavaServer Faces

Key Points

What are typical requirements for SaaS style web applications?
Best practices for implementing customization features in JSF applications
How to implement deep link navigation into JSF web applications
An infrastructure for registering and notifying remote listeners for business events in JSF applications

Outline
Intro of SaaS style application
Brief overview of our business cases + discussion on typical requirements for SaaS application
Focus on Customization (various aspects)
Focus on (remote) Integration (deep link, service api, remote event listeners)
Summary & road ahead

Code Samples:
Approach to factory, organization (customer) and user level application settings
Deep Link navigation into JSF application
Register Remote Listener with SaaS application + notification upon business event

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,039
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Castle in the Clouds: SaaS Enabling JavaServer™ Faces Applications (JavaOne 2009)

    1. Castle in the clouds - SaaS Enabling JavaServer Faces applications Lucas Jellema AMIS, The Netherlands http://technology.amis.nl/blog
    2. Overview <ul><li>What makes an application ‘SaaS’? </li></ul><ul><ul><li>And why provide an application as SaaS </li></ul></ul><ul><li>Requirements of SaaS applications </li></ul><ul><li>Focus on Customization </li></ul><ul><li>Integration & SOA across the cloud </li></ul><ul><ul><li>Deep Linking, Mash Up and UI Services </li></ul></ul><ul><ul><li>Services API </li></ul></ul><ul><ul><li>Remote Events Listeners </li></ul></ul><ul><li>Summary and Road Ahead </li></ul>
    3. Software as a Service common characteristics <ul><li>Single instance of standard application & database </li></ul><ul><li>Running in a shared infrastructure, 24/7 </li></ul><ul><li>Managed by central administration team </li></ul><ul><li>Delivered over the internet to web browsers </li></ul><ul><li>Used by individuals from multiple organizations </li></ul><ul><li>globally distributed & multi-lingual user community </li></ul><ul><li>Licence model based on usage metrics </li></ul><ul><li>Service Level Agreement to specify quality of service </li></ul>
    4.  
    5. Software as a Service (perceived) benefits <ul><li>Small up-front investment </li></ul><ul><li>Quick startup – ‘turn on the software tap’ </li></ul><ul><li>Professional administration with guaranteed performance and application availability </li></ul><ul><li>Low TCO through ‘economies of scale’ </li></ul><ul><li>Dynamic Scalability </li></ul><ul><li>Rapid evolution of new features and bug resolution – quick deployment </li></ul><ul><li>Quick adoption of new technology </li></ul><ul><li>Community to forster and share best practices </li></ul>
    6. Software as a Service concerns & potential disadvantages <ul><li>Dependence on 3 rd party for </li></ul><ul><ul><li>Security, Availability & Performance, Scalability </li></ul></ul><ul><li>Data outside the own infrastructure </li></ul><ul><li>Standard application – not at all tailor-made </li></ul><ul><ul><li>Our own terminology, fields, default values, validation rules, workflow </li></ul></ul><ul><li>How does SaaS application integrate with </li></ul><ul><ul><li>Our SOA & EDA, Mash Up/Portal and Workflow </li></ul></ul><ul><ul><li>Identity Management and Single Sign On </li></ul></ul><ul><li>How to prevent lock in with the SaaS provider </li></ul>
    7. SaaS Requirements <ul><li>Integration across the cloud </li></ul><ul><ul><li>Make SaaS application integrate with the SOA & EDA, workflow management, identity management and other shared central facilities in the organization using the SaaS </li></ul></ul><ul><ul><li>Two way, based on open standards, geared towards both programmatic and UI integration </li></ul></ul><ul><li>Customization </li></ul><ul><ul><li>Allow organizations and individuals to tailor the ‘standard’ application for better fit </li></ul></ul><ul><ul><ul><li>Within the single instance of the SaaS application </li></ul></ul></ul><ul><ul><li>Easy, dynamic, run-time, self-service in browser </li></ul></ul>
    8. Application ‘levels of reality’ Organization B Organization A
    9. Application Mode Switcher <ul><li>Application Managers can switch between Application Modes </li></ul><ul><ul><li>To view and manipulate the application at the selected level </li></ul></ul>
    10. Application Rollout process… <ul><li>Development in the Factory </li></ul><ul><li>Production-time refining </li></ul><ul><li>Customer (organization) specific implementation </li></ul><ul><ul><li>By SaaS Helpdesk, on site consultant, Application Admin </li></ul></ul><ul><li>End User (dynamic, run-time) Personalization </li></ul>
    11. Proposal <ul><li>Let’s approach every end user application as a SaaS application! </li></ul><ul><ul><li>Both standard and custom application </li></ul></ul>
    12. Desirable SaaS features & facilities <ul><li>Dynamic, Wiki like, context sensitive help </li></ul><ul><li>Integration with incident registration </li></ul><ul><ul><li>Automatic passing of page, context data & logging </li></ul></ul><ul><li>‘ Simulate user’ option for the service desk </li></ul><ul><li>SLA metrics and application usage monitoring </li></ul><ul><li>Self Service style application management </li></ul><ul><li>‘ Toggle’ between factory, organization and user </li></ul><ul><li>Integrated workflow & collaboration </li></ul><ul><ul><li>Communication (email, chat), task list, tagging, … </li></ul></ul><ul><li>“ Register interest in” – notification of events </li></ul>
    13. Customization <ul><li>Allow adaption of terminology to organization </li></ul><ul><ul><li>Resource Bundles per organization (and individual) </li></ul></ul><ul><ul><li>Dynamic, run-time resource bundle management </li></ul></ul><ul><li>Support for adding/hiding fields </li></ul><ul><li>Configuration of application behavior through organization and user level preferences </li></ul><ul><li>Personalization (my…) features for fine tuning </li></ul><ul><li>Workflow and task-scope configuration </li></ul><ul><li>Configure menus and add new items </li></ul><ul><li>Fine tune look & feel – e.g. skins, styles, logos </li></ul>
    14. Customizing terminology <ul><li>Boilerplate text – prompt, title, button label, messages, help,… - come from resource bundles </li></ul><ul><ul><li>Built in support for i18n – language & country </li></ul></ul><ul><ul><li>Typically held in property files deployed in WAR </li></ul></ul><ul><li>We need to implement resource bundles </li></ul><ul><ul><li>that can be updated and refreshed at run time </li></ul></ul><ul><ul><ul><li>Or at least extended with any overrides of default values </li></ul></ul></ul><ul><ul><li>keys that support the notion of organization specific versions of bundle entries in addition to factory ones </li></ul></ul><ul><ul><li>maintenance facilities with self service support </li></ul></ul><ul><ul><ul><li>That presents bundle entries in understandable format </li></ul></ul></ul>
    15. Implementing Self Service Customization of Resource Bundles <ul><li>Resource Bundle implemented as class (extend ListResourceBundle) that read from database </li></ul><ul><li>Keys are constructed as: <base_key>_<org_id> </li></ul><ul><ul><li>And even <base_key>_<org_id>_<user_id> </li></ul></ul><ul><li>JSF page refers to resources through intermediate bean: #{bundleHandler[‘baseKey’]} </li></ul><ul><li>The bundleHandler bean first tries user specific key; if not found then org key and then base key </li></ul><ul><ul><li>It can also access several resource bundles – first the dynamic, database based one with overrides </li></ul></ul>
    16. Custom(izing) fields <ul><li>Some fields are never used by some organizations and are therefore ‘in the way’ </li></ul><ul><ul><li>or they may even be legally forbidden in a country! </li></ul></ul><ul><li>Every organization finds the application lacking with one or more fields </li></ul><ul><ul><li>but no two organizations ahree on which fields… </li></ul></ul><ul><li>To allow optimal customization, a SaaS application ideally allows </li></ul><ul><ul><li>Customization of standard items </li></ul></ul><ul><ul><li>Addition of custom items embedded in pages </li></ul></ul><ul><ul><ul><li>And associated with data records like ‘regular’ items </li></ul></ul></ul>
    17. Application Settings for customizing application behavior <ul><li>Some Application Behavior is developed as dynamically configurable </li></ul><ul><ul><li>Through Preferences or Application Settings </li></ul></ul><ul><ul><li>Display : Locale, Format, Units for Height and Weight (converter parameters), feature on/off </li></ul></ul><ul><ul><li>Business logic : Default Values for new records, Validation parameters, Field & Button Authorization </li></ul></ul><ul><ul><li>Styling : Images, Fonts, Colors, Skins/Themes </li></ul></ul><ul><li>Settings can be configured at Factory (default), Organization and User level </li></ul><ul><ul><li>At run-time through self service pages </li></ul></ul>
    18. Integrating Application Settings during development
    19. Application Settings Data Model Date Format dd-mm-yyyy Use Photo Metric/ Imperial … Y m mm/dd/yyyy dd-mm-yy N Y N i Application Settings * Name o Factory Value o Allowable Values o Description o Data Type o Level Updatable o Updatable By Customized Settings * OrgId o Value o UserId o Comment
    20. Application Personalization
    21. Personalization Features – My… options <ul><li>My Navigation History </li></ul><ul><li>My Favorites (quick links, bookmarks) </li></ul><ul><li>My own custom properties (‘flex fields’) </li></ul><ul><li>My Date Format, Weight & Height units, Currency, Default Values </li></ul><ul><li>My lingo in titles, labels, prompts & messages </li></ul><ul><li>Personalized Menu-structure </li></ul><ul><li>… (my logo!) </li></ul>
    22. Demo SaaS style Customization in JSF <ul><li>Run Time Management of Organization specific Resource Bundles </li></ul><ul><ul><li>Change the boilerplate text defined in the factory </li></ul></ul><ul><ul><li>Create organization and user specific resources </li></ul></ul><ul><li>Influencing application behavior through application settings at organization level </li></ul><ul><ul><li>Configure date format pattern </li></ul></ul><ul><ul><li>Specify validation parameters </li></ul></ul><ul><li>Toggle between user/organisation/factory scope </li></ul>
    23. SOA across the cloud SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Validation Service Service API internal internet LDAP Service API CMS Social API
    24. Integration and SOA across the cloud <ul><li>Service API as programmatic alternative to UI </li></ul><ul><ul><li>RSS, SOAP, REST </li></ul></ul><ul><li>Event Listener registration to be notified by SaaS </li></ul><ul><li>Service Registration (Dependency Injection) </li></ul><ul><ul><li>Authentication/Authorization, Translation, Validation, Workflow, Communication </li></ul></ul><ul><li>Identity cross referencing (SaaS & local identifier) </li></ul><ul><li>Deep Link API for context sensitive navigation </li></ul><ul><li>UI Services (Portlets) to fit into Mashups & Portals </li></ul><ul><li>Data Export, Synch & Import – bulk facilities </li></ul><ul><li>“ internet service bus” – integrating multiple SaaSs </li></ul>
    25. SOA across the cloud: data & operations SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Validation Service Service API Service API Service API RSS internal internet listener registration service dependency injection LDAP Export Service API CMS Social API
    26. SOA across the cloud: UI / Navigation / Process/Presentation SaaS A SaaS B App D App C CMS Workflow Engine Email IM Fax Portlet API Portlet API RSS Deep link Interface CMS internal internet Deep link Interface Portlet API Portlet API ToDo RSS RSS News HTML Pages Social API
    27. Implementing Deep Linking in JSF <ul><li>URL like http://host/SaaSApp/UpdateJob/Scott </li></ul><ul><ul><li>Cookie provides hook for Single Sign On </li></ul></ul><ul><li>ServletFilter intercepts and redirects to proper JSF page – after storing parameters in the request </li></ul><ul><li>JSF PhaseListener intercepts the request to the page and prepares the backing beans </li></ul><ul><ul><li>Using the request parameters </li></ul></ul><ul><li>JSF page is rendered with proper data context </li></ul><ul><li>When the user is done, the JSF application could </li></ul><ul><ul><li>update the task by calling the workflow engine SAPI </li></ul></ul><ul><ul><li>publish a SaaS event </li></ul></ul>
    28. Demonstrating the SaaS Service API <ul><li>Create a new Employee </li></ul><ul><li>Call the SaaS API to propagate the new employee record </li></ul><ul><ul><li>Right after succesful transaction commit </li></ul></ul><ul><li>Inspect the new record in the SaaS UI </li></ul>SaaS A App D Service API RSS HTML Pages Portlet API
    29. Demonstrating cross-cloud event listeners SaaS A App D Service API Service API RSS listener registration <ul><li>Register App D’s Update Employee service as Event Listener for SaaS event </li></ul><ul><li>Update a salary in the SaaS UI </li></ul><ul><li>Event is routed to the remote listener that calls the App D Service API that “does something with it” </li></ul>Portlet API DB
    30. Demonstrating Deep Link Navigation SaaS A Service API RSS <ul><li>To Do list shows task “Handle promotion for Employee Scott” </li></ul><ul><li>Selecting this task will bring up a popup loaded through a deep link into SaaS A </li></ul><ul><ul><li>Presenting the ‘Update Job’ page with the details of Scott loaded </li></ul></ul>Portlet API HTML Pages Workflow Engine ToDo News
    31. Register Event Listener by calling the WebService
    32. SaaS in the Multi-Org world App Z SaaS A SaaS B Service API Service API RSS Export CMS internet App D Workflow Engine Service API App X Service API App Y Service API Portlet API HTML Pages Portlet API Social API
    33. Summary and Conclusion SaaS and the road ahead <ul><li>SaaS applications need special facilities </li></ul><ul><ul><li>Customization & personalization </li></ul></ul><ul><ul><li>Service API (UI and programmatic), Event support </li></ul></ul><ul><ul><li>SLA management, metrics monitoring & self service </li></ul></ul><ul><li>Enterprise Service Bus and Portal/Mashup connect the SaaS applications </li></ul><ul><li>JavaServer Faces can be used for implementing the customizable and integratable front end </li></ul><ul><li>Most applications could do with the same facilities: let’s regard all applications as SaaS! </li></ul>
    34. Lucas Jellema [email_address] http://technology.amis.nl/blog (with all source code of the demos)

    ×