2. Who Are We?
Ganesh Prasad
Senior Architect, Westpac Banking Corporation
Rajat Taneja
Chief Architect, Zurich Financial Services Australia
Vikrant Todankar
Senior Consultant, Hyro Limited (formerly with EDS)
Life above the Service Tier 2
3. Life in the Business Logic Tier is Moving Along SOAmmingly...
...but the Presentation Tier is a mess.
SOA principles - Loosely coupled systems, no implicit dependencies, all
legitimate dependencies in the form of explicit contracts.
No such architectural blueprint exists for the Presentation Tier.
Two Service Models today:
SOAP-based Web Services
REST
Both are based on XML document exchange.
Any Presentation Tier technology should be able to interface to legacy
services painlessly, i.e., should support both SOAP and REST.
Life above the Service Tier 3
4. The Presentation Tier and its Three Main Processes
Application Download Download
Client Server
Application
Network
Business
Application
Logic Persistence
Container
(Service)
Presentation Flow
Download
Client Server
Application
Network
Application Business
Container Logic Persistence
(Service)
Client Download
Application Server
Network
Application Business
Container Logic
Data Interchange Persistence
(Service)
Service Interface
Life above the Service Tier 4
5. The Presentation Tier and its Three Main Processes
Application Download Download
Client Server
Application
Network
Business
Application
Logic Persistence
Container
(Service)
Presentation Flow
Download
Client Server
Application
Network
Application Business
Container Logic Persistence
(Service)
Client Download
Application Server
Network
Application Business
Container Logic
Data Interchange Persistence
(Service)
Service Interface
Life above the Service Tier 5
6. The Presentation Tier and its Three Main Processes
Application Download Download
Client Server
Application
Network
Business
Application
Logic Persistence
Container
(Service)
Presentation Flow
Download
Client Server
Application
Network
Application Business
Container Logic Persistence
(Service)
Client Download
Application Server
Network
Application Business
Container Logic
Data Interchange Persistence
(Service)
Service Interface
Life above the Service Tier 6
7. The Presentation Tier and its Three Main Processes
Application Download Download
Client Server
Application
Network
Business
Application
Logic Persistence
Container
(Service)
Presentation Flow
Download
Client Server
Application
Network
Application Business
Container Logic Persistence
(Service)
Client Download
Application Server
Network
Application Business
Container Logic
Data Interchange Persistence
(Service)
Service Interface
Life above the Service Tier 7
8. The Presentation Tier and its Three Main Processes
Application Download Download
Client Server
Application
Network
Business
Application
Logic Persistence
Container
(Service)
Presentation Flow
Download
Client Server With Thin Clients,
Application
Network the Web Server
Application Business plays a role in all
Container Logic
(Service)
Persistence three processes.
Client Download
Application Server
Network
Application Business
Container Logic
Data Interchange Persistence
(Service)
Service Interface
Life above the Service Tier 8
9. However...
The Thin Client Model has Three Flaws
Life above the Service Tier 9
10. Flaw 1 – Lack of Respect for Data
Data Structures
From Browser to Web Server Flattened to a set of
Name-Value pairs
Name “Joe Bloggs”
Data Types
BirthDate “01-JUL-1978”
Everything reduced to
AnnualSalary “120000.00” a String
NoOfDependents “3”
Data Constraints
None
From Web Server to Browser
Data as Data?
Specialised formatting
and markup for <Presentation-Markup>Data</Presentation-Markup>
Presentation
We can do better than this!
Life above the Service Tier 10
11. Flaw 2 – Coupling of Presentation Flow and Data Interchange
Symptom – Remember the Browser Back-Button Problem?
Server
GET POST GET
Page Page Page
1 2 3
Client
What the user wants to do (Presentation Flow)
Page 1 Page 2 Page 3
What the browser does in response (Data Interchange)
Unsafe operation!
GET POST GET
Yes, the POST-Redirect-GET pattern fixes
this problem, but the fundamental
architecture is broken.
Life above the Service Tier 11
12. Flaw 3 – No Support for Peer-to-Peer Data Interchange
Client/Server (Request/Response)
Client
Application
Business
Network Web Server Logic Persistence
Application (Service)
Container
Server messages can only
be in response to client
requests – no unsolicited
messages such as event
notifications
Life above the Service Tier 12
13. AJAX is the Answer!
NOT!
AJAX provides Raw Capability, not Architecture.
We can build badly architected applications even with AJAX.
Web Server acts as Web Server drives
intermediary for Data Presentation Flow
Interchange based on Data
Interchange requests
Data is still
treated
shabbily Web Server
Application Download
Presentation Flow Data Interchange
Data Interchange
Thin Client Business Logic
Network Persistence
(Browser) (Service)
AJAX Data
Interchange
Service Interface
So what is the answer?
Life above the Service Tier 13
14. The Answer
...is an architecture that decouples orthogonal concerns and respects data.
Life above the Service Tier 14
15. So What Technologies Can We Use?
The following technologies and frameworks are available today:
DHTML/AJAX frameworks for Current Browsers
1. Handcrafted DHTML/AJAX with Third-Party JavaScript Libraries
2. Google Web Toolkit (GWT, GWT-Ext)
3. TIBCO General Interface Builder
XML Dialects for Advanced Browsers
4. XForms embedded in XHTML 2
5. Mozilla XUL
6. Microsoft SilverLight/XAML
Java-based Technologies
7. Java WebStart (Swing, SWT, Spring Rich Client)
8. JavaFX
Adobe Flash Runtime-based frameworks
9. Adobe Flex
10. OpenLazslo
The degree of fit with the SOFEA model varies, but designers play a critical role
in ensuring compliance with the model. We also need to consider factors like
performance, ease of use, etc.
Life above the Service Tier 15
16. What Is Our Contribution?
A cleaner architectural model for the Presentation Tier that
decouples the orthogonal concerns of Application Download,
Presentation Flow and Data Interchange.
Positioning the web server as a Download Server alone. The evils
of web server involvement in Presentation Flow and Data
Interchange are avoided.
Affirmation of MVC rather than Front Controller as the natural
pattern to control Presentation Flow.
End-to-end data integrity in Data Interchange, which traditional
thin-client technology does not and cannot enforce.
Unification of the thin-client and rich-client models, now seen as
an artificial distinction.
Support for SOAP- and REST-based business services, and a
natural integration point between the Presentation and Service Tiers
Life above the Service Tier 16