Web service architecture Web integration Self
Download
Report
Transcript Web service architecture Web integration Self
Smart Client Deployment
®
®
With Microsoft Windows
Forms
Ammar Abuthuraya
Developer & Platform Lead
Microsoft Arabia
®
What We Will Cover
What is the smart client?
What is no-touch deployment?
What are the advantages of Windows
Forms—client caching?
Calling Web services from Windows
Forms client applications
Agenda
What is the smart client?
Web service architecture
Web integration
Self-updating applications
Advanced tools
What Is the Smart Client?
History of the Smart Client
Pre-1980’s
1980’s
Computers were large server oriented
Server-based computing—dumb terminals
Dawn of the PC—first smart clients
‘Fat’ client computing took center stage
1990’s
Dawn of the Internet
Dumb browsers talking to powerful servers
What Is the Smart Client?
Smart Client Considerations
System impact
Initial installation
Installation of applications on every client
Application update
Will the install of application 2 break
existing application 1?
Need to updated every client with changes
to the application
Investment in current Web applications
What Is the Smart Client?
Smart Client Consideration Answers
.NET applications are isolated
Private deployment by default
Applications are self-describing—no
central registry
Multiple versions of an application can
coexist
Shared components are controlled and
explicit
Applications use the included assembly
versions they were built with
Different versions of the .NET Framework
can live side-by-side
What Is the Smart Client?
Smart Client Consideration Answers
How we can avoid sending an install to
each client
About management software
Avoid the application install altogether
Run the application without touching the
client
Ex. SMS, Microsoft® IntelliMirror™
Can extend our reach by placing
applications on the client
Can also use traditional MSIs to create
installed application footprint
What Is the Smart Client?
Smart Client Consideration Answers
Automate the update of the application
What about applications with a footprint?
Load assemblies from a Web server
Don’t need to touch client to update application
If running from a URL, nothing is installed
Application downloads its components at runtime
Update server assemblies to update
application
No-touch application update
What Is the Smart Client?
Smart Client Consideration Answers
Existing Web applications can be
leveraged
Web services are the glue
Run on the same server as browser
applications
Can share the context of the browser
application
Can share the data of the browser
application
What Is the Smart Client?
Smart Client Deployment
No-touch deployment
Application isolation is the default
No registration required
Deployment is simple
Copy exe onto client
Run from a file share
Click on a link in the browser
What Is the Smart Client?
Smart Client Deployment
Stored in the download cache
Not the GAC
Per user layer “on top of” WinInet cache
Maintains URL for security
Configurable cache size
Scavenged base on a LRU algorithm
Application “trickles” onto the client
Components are downloaded when
referenced at runtime
What Is the Smart Client?
Smart Client Deployment
Internet
Explorer
MyApp.exe
Client
runs
app
HTTP
MyApp.exe
Managed
Exe?
Update
cache?
Download
cache
.NET
Framework
Web server
Smart client
Demonstration 1
Deploying a Smart Client
Application
Reviewing a simple Windows Form
Deploying the Windows Form
application
Agenda
What is the smart client?
Web service architecture
Web integration
Self-updating applications
Advanced tools
Web Service Architecture
Smart Client Challenges
Copied applications are semi-trusted
Think Web pages in the browser
Permission to exchange data with the
server, but not for access to the local client
Strong names
Can be used to achieve a higher security
level
Security-based assembly signature
Challenging to implement and maintain
Web Service Architecture
Database Connectivity
Attempting to use database connection
requires elevated permissions
Can grant permission, but that means
bypassing the security model
Web services located at the same base
URL as the application are available
Communicate with same site from which
code is acquired
Use a business tier in the application to
maintain overall system security
Web Service Architecture
Web Services
Internet-enabled software that follows
SOAP standards of communication, and
may manage state
A Web service is similar to a component
Defines a specific interface for exchanging
request and responses
Web service definition language (WSDL)
Similar to traditional component interface
definition language (IDL)
Describes method calls and parameters
Web Service Architecture
Basic Web Service Security
Authentication is supported
Authentication does not protect data
Can use SSL for encryption
NTLM and Basic authentication are
available
Use: System.Net.NetworkCredential()
Modify <service>.url property to include
‘https://’
Custom encryption—such as DES,
TripleDES
Web Service Architecture
Web Service Design
Consider the type of data to be returned
DataSet is natural for .NET but not open
XML is more open but may be slower
Think of services as containing objects
Initially expose objects
Over time, business processes become
services
Several objects available via a service
Web Service Architecture
Managing Complexity
MyApp.exe
HTTP
Business service
Business
component
Business
component
HTTP
Business service
Business
component
Business
component
Demonstration 2
Using a Web Services
Architecture
Updating the Windows Form to use both
ADO.NET and Web services
Issues with running ADO.NET from a
smart client
Agenda
What Is the smart client?
Web service architecture
Web integration
Self-updating applications
Advanced tools
Web Integration
Goal
Replace client script languages
Difficult to debug
Throw unseen errors
Need to provide advanced UI
Users expect interactive applications
ActiveX has security issues
ASP.NET introduces event-based serverside logic
Web Integration
Extending Web Applications
Internet
Explorer
HTTP
MyApp.exe
Web application
HTTP
HTTP
Business service
Business
component
Business
component
Business service
Business
component
Business
component
Web Integration
Enhanced User Interface
Windows Forms browser controls
Improved security
Contained in the Web page
Replace ActiveX
Similar TCO to URL activation
Limited system access is a plus
Operate within the .NET environment
Can be synchronized with the Web
application
Web Integration
Network Communications
Windows Forms
Internet
Explorer
HTML:
data and display
XML:
data only
Web application
Web Integration
Less Network Traffic
Data can be cached on the client
Only updated data needs to be sent to Web
service
Web service can be used to poll for other
updates
The UI elements are only sent once
Web applications transfer the entire page
on every round trip
Windows Forms controls only need to
transfer the data
Demonstration 3
Using the Smart Client to
Complement a Web
Application
Examine a Web application that also
has a Windows Forms component
Keeping a Web application and
Windows Forms application in sync
Agenda
What is the smart client?
Web service architecture
Web integration
Self-updating applications
Advanced tools
Self-Updating Applications
Definition
What it is
A .NET assembly that can automatically
connect to a server and download the latest
components used as part of the assembly
Provides a footprint on the client, but relies
on server-based assemblies
Enabling technologies
Application isolation
.NET Framework class libraries
System.Reflection namespace
Self-Updating Applications
Assembly.LoadFrom
System.Reflection namespace supports
loading remote assemblies
Use Assembly.LoadFrom()
Downloads and caches the assembly
Automatically checks for newer versions
Permissions based on where the assembly
came from
Self-Updating Applications
Limitations
Expects connectivity
Not an application installer
Ex… can’t register file types
Security sandboxed
Updates only once per application run
On-demand download is great
But requires careful thought on application
design
Self-Updating Applications
Runtime Deployment
HTTP
AppStub.exe
MyApp.exe
MyApp.exe
Update
cache?
Download
cache
Web server
Smart client
Demonstration 4
Self-Updating Applications
What code is needed to create a selfupdating application
A self-updating application in action
Agenda
What is the smart client?
Web service architecture
Web integration
Self-updating applications
Advanced tools
Advanced Tools
UDDI Services
Universal Description Discovery and
Integration (UDDI)
Previously was published for general
public by large providers
Microsoft® Windows Server™ 2003
supports UDDI within the enterprise
Central server lookups
Use UDDI server to define not only where
services exist, but where the application
code is stored
Advanced Tools
Web Service Extensions
Going beyond the basic Web services
Security
Reliability (routing)
Attachments
Web Services Enhancements (WSE) 2.0
recently released
Provide a way to extend your Web service
interfaces from your client
Session Summary
Smart client fits the Internet model
Can rely on HTTP/HTTPS protocol
Leverage Web services
Improved scalability—display refresh
Smart clients can auto-deploy and autoupdate
Launch applications from a Web site
Internet deployment with Web services
Automatically download updates
For More Information…
MSDN Web site at
Windows Forms
www.windowsforms.net
Windows Forms information at:
msdn.microsoft.com
http://msdn.microsoft.com/netframework/using/bu
ilding/windows/default.aspx
White Paper on smart client development
with version 1.1 of the .NET Framework
http://msdn.microsoft.com/netframework/using/bu
ilding/windows/analystreports/smartclient.aspx
© 2003 Microsoft Corporation. All rights reserved.
Microsoft, Windows, the Windows logo, MSDN, Visual Studio, SQL Server, MSN, Windows Server, Visual Basic, Visual C#, JScript, and Microsoft Press are either registered
trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the
trademarks of their respective owners.