Windows Forms and Smart Device Extensions in the End-to-End Application Hans Verbeeck hansver@microsoft.com Developer Consultant Microsoft EMEA
Football247.net clients or Business Data admin reporter browser Presentation Business Data admin WS Façade (asmx) WS Façade Biz Services D A L reporter WIN Service SP or ES Façade ASP .NET UI (aspx) browser
Football247.Presentation .Administrator, .Reporter Football247.net Football247.Common .Core Application Architecture Solution Structure System Architecture .Datasets Football247.Presentation .Administrator, .Reporter .WinControls User Tier .WebSite .WebControls .Facades Football247.Business Business Tier .Facades .Host .Services Football247.Data Data Tier .DataAccess
Agenda Building a Framework using Visual Inheritance Using Web Services in Windows Forms No-touch deployment Using the Compact Framework and Smart Device Extensions
Building a framework Panel UserControl TreeItemHandler TreeView TreeNode TreeItem .Tag
Framework’s Guided Tour Show the server explorer. Add sp’s, tables, open tables Drag objects on forms DEBUG the get quote of the day stored procedure
Agenda Building a Framework using Visual Inheritance Using Web Services in Windows Forms No-touch deployment Using the Compact Framework and Smart Device Extensions
Using Web Services Where’s my .config? Add app.config to Windows Application project When building, this becomes ApplicationName.exe.config Asynchronous calls make sense in Windows Applications
Using XML Web Services in Windows Forms Show the server explorer. Add sp’s, tables, open tables Drag objects on forms DEBUG the get quote of the day stored procedure
Agenda Building a Framework using Visual Inheritance Using Web Services in Windows Forms No-touch deployment Using the Compact Framework and Smart Device Extensions
Deployment Options What affects client TCO? Problems to solve System Impact First Time Deployment Application Update Problems to solve Isolate applications Run app without touching the client (no installation) Update the app without touching the client Will the install of app1 break app2? Every client has to have the app explicitly installed on it Every client has to re-install the app to pickup updates
URL Launched Apps Run a managed app from a URL Start -> Run -> http://myserver/myapp.exe <a href=http://myserver/myapp.exe> My App </a> No-Touch Update for free Just update the files on the server On-Demand download Must have .NET FX on the client
Code Download Load Assemblies from a Web Server App downloads itself at runtime Update server assemblies to update app Use Assembly.LoadFrom(url) Takes a URL to an assembly Downloads and caches the assembly Automatically checks for newer versions Permissions based on where the assembly came from
Auto-Updating Applications Traditional installed client apps Automatically downloads and applies updates from a server No explicit uninstall / install to update Examples: Windows® XP, MS Money, MSN™ Messenger, Terrarium, … .NET Application Updater Component What is it? A .NET sample component that enables a .NET application to automatically update Same code used in the .NET Terrarium Enabling Technologies Application Isolation .NET Framework Class Libraries
Deployment options summary URL Launched Code Download Auto Updating Components No-Touch Deployment Yes No-Touch Update Dynamic Modules Offline Full Trust
Know your Sandbox Security is based on evidence Where does the application come from? Who is the author of this application? .NET Framework Configuration / caspol.exe
No-touch deployment Show the server explorer. Add sp’s, tables, open tables Drag objects on forms DEBUG the get quote of the day stored procedure
Agenda Building a Framework using Visual Inheritance Using Web Services in Windows Forms No-touch deployment Using the Compact Framework and Smart Device Extensions
Compact Framework client-side applications client-side applications Visual Studio.NET .NET Framework code client-side applications web pages client-side applications web applications There are two basic application models to consider when developing for devices: Mobile Web Applications, which are web applications with web pages formatted to run on small form factor devices Client-side applications, which use secure .NET code designed to be deployed to and execute on the target device Mobile Web Browser .NET Compact Framework
.NET Framework .NET Compact Framework System.Web System.WinForms Services UI Design ComponentModel Description HtmlControls Discovery WebControls Protocols System.Drawing Caching Security Drawing2D Printing Configuration SessionState Imaging Text System.Data System.Xml ADO.NET SqlClient XmlDocument Serialization Design SQLServerCE Xslt/XPath Reader/Writers System Collections IO Configuration Runtime InteropServices Security Net ServiceProcess Text Reflection Diagnostics Remoting Serialization Globalization Resources Threading
Controls for CF Applications Supported controls Button CheckBox ComboBox ContextMenu DataGrid DomainUpDown HScrollBar ImageList InputPanel Label ListBox ListView MainMenu NumericUpDown OpenFileDialog Panel PictureBox ProgressBar RadioButton SaveFileDialog StatusBar TabControl TextBox Timer ToolBar TreeView VScrollBar Unsupported controls GroupBox RichTextBox NotificationBubble Print Controls Unsupported controls – not available in CE CheckedListBox ColorDialog ErrorProvider HelpProvider LinkLabel NotifyIcon ToolTip Splitter FontDialog
.NET Compact Framework Show the server explorer. Add sp’s, tables, open tables Drag objects on forms DEBUG the get quote of the day stored procedure
Resources In the pack you receive at the end of the day Post-event CD http://www.football247.net Football247.Net Workspace on http://www.gotdotnet.com http://www.windowsforms.net http://www.microsoft.com/mobile
© 2002 Microsoft Corporation. All rights reserved.