Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Compact Framework Development For The Desktop Developer

4,400 views

Published on

An introductory presentaton on .NET Compact Framework development that I presented to the Christchurch .NET User Group

Published in: Economy & Finance, Technology
  • Be the first to comment

  • Be the first to like this

Compact Framework Development For The Desktop Developer

  1. 1. Introduction to Compact Framework Development Christopher Fairbairn ARANZ Medical Ltd [email_address]
  2. 2. Agenda <ul><li>Why? </li></ul><ul><li>Windows Mobile Overview </li></ul><ul><li>Development Tools </li></ul><ul><li>Platform Constraints </li></ul><ul><li>Tips & Tricks </li></ul><ul><li>Helpful Resources </li></ul>
  3. 3. Why? <ul><li>Empower a mobile workforce </li></ul><ul><li>Increase value of business data </li></ul><ul><li>Reduce administration overheads </li></ul><ul><li>Competitive Advantage </li></ul>
  4. 4. The Device Landscape .NET Micro Framework .NET Framework .NET Compact Framework Windows Mobile, Pocket PC, SmartPhone, Windows CE Windows XP, Windows Vista, Windows XP Embedded Remote Controls, Wearable Devices, Auxiliary Displays Increasing functionality
  5. 5. Windows Mobile History <ul><li>WinPad and Pulsar projects </li></ul><ul><li>Pegasus Group formed </li></ul><ul><li>H/PC reference design </li></ul><ul><li>Componentised Operating System </li></ul>
  6. 6. Windows Mobile History <ul><li>Two main device types </li></ul><ul><ul><li>Pocket PC </li></ul></ul><ul><ul><li>Smartphone </li></ul></ul><ul><li>Typical Specifications </li></ul>Pocket PC 200 – 700 Mhz 32 – 128 MB 128 MB Yes 240 x 320 Smartphone 100 – 300 Mhz 16 - 64 MB 64 MB No 176 x 220 Processor RAM ROM Touch Screen LCD Resolution
  7. 7. Development Environments <ul><li>Embedded Visual C++ </li></ul><ul><li>Embedded Visual Basic </li></ul><ul><li>C#, VB.NET </li></ul><ul><li>Scripting Languages </li></ul><ul><ul><li>Python, Ruby, …. </li></ul></ul><ul><li>ASP.NET Mobile Web Toolkit </li></ul>
  8. 8. .NET CF – What is it? <ul><li>Runtime for small devices </li></ul><ul><li>80% of functionality in 20% of footprint </li></ul><ul><li>Released late 2002 </li></ul><ul><li>v2.0 SP2 is current </li></ul><ul><li>v3.5 due soon </li></ul>
  9. 9. .NET CF – Platform Support <ul><li>Windows CE </li></ul><ul><li>Windows Mobile </li></ul><ul><li>XBOX-360 </li></ul><ul><li>Symbian? </li></ul>
  10. 10. .NET CF – Requirements C# or VB.Net experience VS 2005 Standard Edition Device specific SDKs A real device
  11. 11. Group Project <ul><li>Blogging Tool </li></ul><ul><ul><li>Smartphone / Pocket PC Support </li></ul></ul><ul><ul><li>Submit posts </li></ul></ul><ul><ul><li>Upload photos </li></ul></ul><ul><ul><li>Offline mode </li></ul></ul>
  12. 12. DEMO Tour of VS2005 from a Mobile Perspective
  13. 13. Platform Differences <ul><li>File System </li></ul><ul><li>User Interface capabilities </li></ul><ul><li>Performance constraints </li></ul><ul><li>Screen size </li></ul>
  14. 14. DEMO Introducing the OFone!
  15. 15. Screen Differences <ul><li>Resolution </li></ul><ul><li>Orientation </li></ul><ul><li>Touch Screen </li></ul><ul><li>Desktop UI designs do not port well </li></ul>
  16. 16. <ul><li>Software-based Input Panel </li></ul><ul><li>One handed or two? </li></ul><ul><li>IME Modes </li></ul>Keyboard Differences
  17. 17. DEMO Supporting Multiple Platforms
  18. 18. Windows Mobile Extensions <ul><li>Part of the operating system </li></ul><ul><li>Windows Mobile 5.0 or higher </li></ul><ul><li>Microsoft.WindowsMobile namespaces </li></ul><ul><ul><li>PocketOutlook </li></ul></ul><ul><ul><li>Configuration </li></ul></ul><ul><ul><li>Status </li></ul></ul><ul><ul><li>Telephony </li></ul></ul><ul><ul><li>Forms </li></ul></ul>
  19. 19. Image Capture CameraCaptureDialog SelectPictureDialog
  20. 20. State and Notification Broker <ul><li>if ( SystemState.CameraPresent) </li></ul><ul><li>{ </li></ul><ul><li>// Display camera capture dialog </li></ul><ul><li>} </li></ul><ul><li>else </li></ul><ul><li>{ </li></ul><ul><li>// Display picture picker dialog </li></ul><ul><li>} </li></ul>Network Messaging Phone Appointments Media Player Available hardware
  21. 21. DEMO Image Capture
  22. 22. Network Communications <ul><li>SMS, TCP, HTTP… </li></ul><ul><li>Web Service Proxies </li></ul><ul><li>Network connectivity may be lost at any time </li></ul><ul><li>Avoid automatic retries </li></ul>
  23. 23. Data Access <ul><li>SQL Server </li></ul><ul><li>SQL Server Compact Edition </li></ul><ul><li>SQLite </li></ul><ul><li>SQL Server Management Studio integration </li></ul>
  24. 24. Data Access Performance <ul><li>Properly index tables </li></ul><ul><li>Avoid excessive joins </li></ul><ul><li>Favor ExecuteResultSet over ExecuteReader </li></ul>
  25. 25. Demo SQL Mobile and Integration with VS2005
  26. 26. Application Deployment <ul><li>Smart Device CAB Setup Projects </li></ul><ul><ul><li>CAB for device </li></ul></ul><ul><ul><li>MSI for desktop </li></ul></ul><ul><li>Code signing </li></ul><ul><ul><li>Two tier security model </li></ul></ul>
  27. 27. Tips and Tricks <ul><li>Mobilise use cases not applications </li></ul><ul><li>Assume you are disconnected </li></ul><ul><li>Embrace Smart Minimise </li></ul><ul><li>Set Form.Owner </li></ul>
  28. 28. Configuration Service Provider <ul><li>Standardised way to configure devices </li></ul><ul><li>Over 50 CSPs available </li></ul><ul><li>Provisioning via a number of methods </li></ul><ul><ul><li>Programmatically </li></ul></ul><ul><ul><li>CAB files </li></ul></ul><ul><ul><li>Over The Air (OTA) </li></ul></ul><ul><ul><li>ActiveSync (RAPIConfig) </li></ul></ul>
  29. 29. CSP Configuration Example using Microsoft.WindowsMobile.Configuration; using System.Xml; XmlDocument configDoc = new XmlDocument(); configDoc.LoadXml( @&quot;<wap-provisioningdoc> <characteristic type=&quot;&quot;BrowserFavorite&quot;&quot;> <characteristic type=&quot;&quot;Christopher Fairbairn&quot;&quot;> <parm name=&quot;&quot;URL&quot;&quot; value=&quot;&quot;http://www.christec.co.nz/blog/&quot;&quot; /> </characteristic> </characteristic> </wap-provisioningdoc>&quot;); ConfigurationManager.ProcessConfiguration(configDoc, false ); Makecab _setup.xml addBrowserFavorite.cpf
  30. 30. Development Tools <ul><li>Remote Tools </li></ul><ul><li>RAPIConfig </li></ul><ul><li>Device Security Manager </li></ul><ul><li>Device Emulator Manager (DEM) </li></ul><ul><li>Cellular Phone Emulator </li></ul>
  31. 31. <ul><li>Webcasts </li></ul><ul><li>MCTS Exam 70-540 </li></ul><ul><li>Mobile LOB Accelerator </li></ul><ul><li>Mobile Software Client Factory </li></ul><ul><li>Microsoft Mobile Development Handbook </li></ul>Getting Started
  32. 32. Diving Deeper <ul><li>Over 150 Samples available in the SDKs </li></ul><ul><li>Windows Embedded CE 6.0 Evaluation </li></ul><ul><li>OpenNETCF Smart Device Framework </li></ul>
  33. 33. Where to get help <ul><li>MSDN Forums </li></ul><ul><li>Windows Mobile Team Blog </li></ul><ul><li>Compact Framework Team Blog </li></ul>
  34. 34. Contact Information Christopher Fairbairn ARANZ Medical Ltd Questions? Email: [email_address] Website: www.christec.co.nz/blog /

×