Smart Client Deployment With Microsoft Windows Forms Ammar








































- Slides: 40
Smart Client Deployment ® ® With Microsoft Windows Forms Ammar Abuthuraya Developer & Platform Lead Microsoft Arabia ®
What We Will Cover l l 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 l l l 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 l Pre-1980’s Ø Ø l 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 l System impact Ø l Initial installation Ø l Installation of applications on every client Application update Ø l 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 l . NET applications are isolated Ø Ø l 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 l How we can avoid sending an install to each client Ø Ø l About management software Ø Ø l Avoid the application install altogether Run the application without touching the client Ex. SMS, Microsoft® Intelli. Mirror™ 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 l Automate the update of the application Ø Ø l l What about applications with a footprint? Load assemblies from a Web server Ø l 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 l l 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 l No-touch deployment Ø Ø l 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 l Stored in the download cache Ø l l l Not the GAC Per user layer “on top of” Win. Inet 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 My. App. exe Client runs app Download cache HTTP My. App. exe Managed Exe? Update cache? Smart client . NET Framework Web server
Demonstration 1 Deploying a Smart Client Application Reviewing a simple Windows Form Deploying the Windows Form application
Agenda l l l What is the smart client? Web service architecture Web integration Self-updating applications Advanced tools
Web Service Architecture Smart Client Challenges l Copied applications are semi-trusted Ø Ø l 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 l Attempting to use database connection requires elevated permissions Ø l 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 l l Internet-enabled software that follows SOAP standards of communication, and may manage state A Web service is similar to a component Ø l 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 l Authentication is supported Ø Ø l l Authentication does not protect data Can use SSL for encryption Ø l NTLM and Basic authentication are available Use: System. Network. Credential() Modify <service>. url property to include ‘https: //’ Custom encryption—such as DES, Triple. DES
Web Service Architecture Web Service Design l Consider the type of data to be returned Ø Ø l Data. Set 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 My. App. exe HTTP Business service 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 l l l What Is the smart client? Web service architecture Web integration Self-updating applications Advanced tools
Web Integration Goal l Replace client script languages Ø Ø l Difficult to debug Throw unseen errors Need to provide advanced UI Ø Ø Ø Users expect interactive applications Active. X has security issues ASP. NET introduces event-based serverside logic
Web Integration Extending Web Applications Internet Explorer HTTP My. App. exe Web application HTTP Business service Business component
Web Integration Enhanced User Interface l Windows Forms browser controls Ø Ø Ø l Improved security Ø Ø l Contained in the Web page Replace Active. X 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 l Data can be cached on the client Ø Ø l Only updated data needs to be sent to 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 l l l What is the smart client? Web service architecture Web integration Self-updating applications Advanced tools
Self-Updating Applications Definition l What it is Ø Ø l 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. Load. From l l System. Reflection namespace supports loading remote assemblies Use Assembly. Load. From() Ø Ø Ø Downloads and caches the assembly Automatically checks for newer versions Permissions based on where the assembly came from
Self-Updating Applications Limitations l l Expects connectivity Not an application installer Ø l l l 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 App. Stub. exe My. App. exe HTTP My. App. exe Update cache? Download cache Smart client Web server
Demonstration 4 Self-Updating Applications What code is needed to create a selfupdating application A self-updating application in action
Agenda l l l What is the smart client? Web service architecture Web integration Self-updating applications Advanced tools
Advanced Tools UDDI Services l Universal Description Discovery and Integration (UDDI) Ø Ø l 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 l 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 l Smart client fits the Internet model Ø Ø Ø l 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… l MSDN Web site at Ø l Windows Forms Ø l www. windowsforms. net Windows Forms information at: Ø l 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.