Smart Client versus Web/Smart Client

ARC312
When, Where and Why?
Smart Client versus
Web/Smart Client Architecture
Troy Magennis
Senior Consultant
Readify / Aspiring Technology
Question….
Which company is best
known for its web apps?
Google?
Why do they deliver Google
Earth, Picasa as thick
client apps?
Why me…
Web Developer (turned to the dark side)
Grappled with this issue 2 years ago
Project: Automotive cataloguing
Had to sell management of the idea
Had to sell the clients on the idea
Had to deliver on those promises
Goals of this talk…
Define & Discuss the various
connected application architectures
Discuss the tradeoffs and why you
might choose one over another given
business case
Discuss techniques, tips and advice
based on some real experiences
Problem /
Question
Examples /
Stories
Definitions
Questions…
Summing
Up
Lessons
Definitions…
Browser Based Application (Thin)
Browser Based with Client side
interactivity (Chubby – thanks Anders
Norås) eg. OWA, Google AutoSuggest
Windows Forms Based Application
(Rich)
Smart Client…
Web Services &
Offline/Online
support
Heavy
Footprint
Tough to
Deploy
Rich User
Experience
Broad
Reach
Developer
Productivity
DLL Hell
Easy Change
Management
Ease of
Deployment
Responsive
Device
Adaptability
Network
Dependency
Poor User
Experience
Rich UI
Complex
To Develop
Smart clients are easily deployed and managed client applications
that provide an adaptive and interactive experience by leveraging
local resources and intelligently connecting to distributed data sources.
Smart Clients…
Can leverage local resources
Integrate with other applications
Local Disk and Resources
Are Connected
Are Offline Capable
Allow Intelligent deployment
Web vs Smart Client
Design Factor
Pure
Web
Network Independence & Offline Usage
Multiple form factors
Deployment and Maintenance
Application Reach



Access to Local Resources
IT Considerations
Development Experience




User Interface
Security
Smart
Client




The Problem / Question…
Which application architecture
is the right choice for a given
set of business requirements
Browser based application
Asp.net / DHTML (Ajax, Atlas, JScript)
Flash (Flash, Flex, Open Lazlo)
Windows forms based application
Offline / Stand Alone
Online
Both
Consumer Site selling CD’s
Smart Client
(Winforms &
Web Services)
Winforms
Based
Browser
Based
Animation / CAD Software
Smart Client
(Winforms &
Web Services)
Winforms
Based
Browser
Based
“Web applications and smart client
applications are both viable and
effective architectures when used
appropriately. When offline usage
and rich user interfaces are
required, smart client applications
are the clear design choice. When
broad reach and zero-touch
deployment is a requirement, Web
applications have the winning
design.”
Making our lives easier…
ClickOnce
Reporting Services 2005
Network presence
(NLA API in the Winsockets library in XP)
Indigo
Reporting Services 2005
ClickOnce
Web, Win or Smart Client?
web
Automotive Parts catalogue / order
entry system for > 40,000 users
web
Data updated at least monthly (new
VIN’s, pricing, part end of life, etc.) ???
High intensity use, business critical
Integration with local accounting apps.
Mix of user specific and man. data
Must work without fast or available
Internet connection
Smart
client
Client Usage Scenarios
DVD Only
Web Services Only
Local
cache
Firewall
Firewall
Web Services AND / OR DVD
Firewall
Local
cache
Firewall
Sipping from the firehose
Out of 8GB of Data, each user might
use 1MB
We don’t know what 1MB they need!
Common scenario
Cataloguing
Mapping
Others….
Satellite Imagery / Mapping
Web Interface
Virtual Earth
Google Maps
Smart Client
World Wind (NASA)
Google Earth
Performance…
Number of calls
Frequency of calls
Bandwidth of the calls
Consider Normal and Peak usage (is
there a time of day for intense use, like
the RTA at lunchtime!)
Predicting Server Reqs.
Estimate
1. Determine a standard user session
2. Estimate # users
3. Estimate # sessions / hour
4. Estimate data size (text, images, etc)
Measure
1. Test lab
2. Confirm bandwidth usage
3. Get real users doing REAL searches
Predicting Server Requirements
Estimating Bandwidth
Capacity Plan.xls
Test Script
Runner
Run the scenarios as quick as
possible and measure results
Measure Bandwidth
Server
Running XML
Web service
Measure CPU / Requests per
Sec & RAM usage (drive to
100% utilisation)
Measure Bandwidth
SQL
Server
Measure CPU / Requests per
Sec & RAM usage
Reducing Bandwidth
Do more on the Client
Client side caching
Compression across the wire
Only sending what is required
Only using SSL on sensitive data
Web Client side interactivity
JavaScript / EcmaScript
Dynamic HTML / Behaviours
AJAX (Async. Java and XML)
ATLAS
AJAX.NET
Bindows (http://www.bindows.net/)
Flash
Flash Natively
Flex Builder
Open Lazlo
Client side caching
Before making a call to the server,
check to see if we already have it
Balance / Trade-offs
Reduced server load and bandwidth
Risk of out-of-date data being shown
Local storage space
Examples
IE image caching
Proxy servers (ISA, etc.)
Compression on the wire
Before sending data, compress it
Balance / Trade-offs
Reduced bandwidth
Server load, compression is numerically
intensive
Client load, decompression is less
expensive, but not free
Examples
HTTP Compression
WSCompression – Thanks Paul Glavich
Only send what is required
Sounds simple, but often more data is
sent than is needed at that time
Balance / Trade-offs
Reduced bandwidth
Increased “chatty-ness”
Specific web service calls for each
purpose (more to maintain and test)
Example
Summary then detail views
Secure Sockets Layer (SSL)
SSL encryption is expensive. Use
wisely and only where required
Balance / Trade-offs
Private data must be kept safe
Expensive session initiation
Processor intensive on the server
How expensive?
8-40% in time
Server failover and sessions affinity
Denial of Service
Normal use calls that cause
excessive server resources
excessive bandwidth transfer
Malicious attacks
Log web-service calls and input
arguments that time-out
Implement
WS Calls
Refactor
Data Calls
Refine
User
Exp.
Measure
Bandwidth
Balance
Chunky /
Chatty
Commercialisation…
Helpdesk
Installations issues
“My internet has stopped working….”
User accounts / accounting (CRM)
Account application / initiation / closure
Password resetting / recovery
Billing / invoice disputes / account lockout
Authorisation (Role Based)
Security…
Authentication
who are you (login, proof)
Authorisation
what you can do (eg. Admin, user, manager)
Licencing
what you have paid for (monthly subscription?)
Repudiation
I didn't do that ("I'm not paying because....")
Confidentiality
Who can see what we send across the wire (SSL,
WSE2, Encryption)
Privacy
You're the custodian of important information,
keep it safe (Legislation, due-diligance)
Versioning…..
Multiple client applications on the
streets at the same time
Changing Web Service API’s
Changing SQL Database Stored
procedure signatures
Summing Up…
There is no absolutes, some business
cases suit browser interfaces better,
some suit SmartClient WinForms better
Huge performance gains can be made
using either technology
References
Slide 7 :
TechDays 05, Interlarken (Mike Hernandez,
Christina Storm, and VSTO Team)
Slide 8, 10 :
Web vs SmartClient Comparison (Durstin
Selfridge, 3 Leaf Development)
We invite you to participate in our
online evaluation on CommNet,
accessible Friday only
If you choose to complete the evaluation
online, there is no need to complete
the paper evaluation
© 2005 Microsoft Corporation. All rights reserved.
This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.