CLI309 Building Effective Enterprise Mobile Applications Nick Randolph Development Manager AutumnCare Microsoft MVP - .NET CF
Agenda • Session Focus • “Enterprise” Mobile Software (EMS) • Agenda • Enterprise Mobile Architecture • Microsoft Mobility Roadmap • New Features in Visual Studio 2005 for EMS • Development Tool • Compact Framework 2.0 • SQL Sever 2005 and it’s mobile version • Tips, Tricks and Guidance on Building EMS • Prescriptive Guidance • Resources
Audience Profile • Who has written mobile apps before? • Who has written production Microsoft Mobile Application? • Who has worked with Compact Framework v1.1? • Who’s looking at Mobile application development for the first time?
What is Mobile Software? • What is Mobile? • Away from the desk out of the office • On the road traveling • On the factory floor – always moving • Engaging face to face with your customers • What is Mobile Software? • A device in your hands that helps you with your process • E.g. Capturing data, looking up data • Doesn’t mean wireless! • Concept of offline/online
Why Mobile Software? • Why develop mobile software? • Information/data at your fingertips • Make decisions on the spot • Perform your process on the spot • What make mobile software “Enterprise” mobile software • Access and integration to enterprise information and software assets • E.g. Lookup: Customer, Product and Stock information • E.g. Capture Data: New Customer Order, Customer Visit information
The Benefits of Mobile Software • Reduce paper costs • Reduce communication costs • Processes automation • Increase Productivity • Increase Service turn around • It is fundamentally about: • Saving costs • Making more money • Capturing data more efficiently • Providing data back more efficiently
Usage Examples • Couriers • Dispatch, Pickup and Sign • Territory Managers • View products/stock, Place orders • Auditors/Insurance • Complete audits, print report & quotes • Tourists • Why can I find information about places in this city?
Some Thoughts on Design Goals for Mobile • What problem(s) are you trying to solve? • What system(s) are involved? • What data do you need from these systems? • How will you secure your mobile system? • How will you connect your mobile users?
What is Mobile Software? Telecommunications Architectures Real Time vs. Synchronized System Integration Devices
Why is Mobile Software Unique? • You can’t always trust the mobile network • Devices have limited foot prints • Languages and development environments are often proprietary • But • You still need good software design • You still need good software architectures
The Spectrum of Architectures • In mobile it’s all about transactions • But how do you do these transactions? • Real Time • Real time over a permanent network • Process Data in Real time • Otherwise known as “Always Connected” • Synchronised • Process and store data on the device • Synchronise when needed • Otherwise know as “Cached”
Real Time Architectures • Pros • Information is always up to date • Data gets processed in the backend faster • Cons • Poorer user experience on low bandwidth networks. • Doesn’t cope well with large amounts of data • Working Examples • Warehouse Management Systems • High Bandwidth / Discrete Transactions
Synchronized Architectures • Pros • Good for dealing with unreliable networks • Data is either synchronised or not • Only changes are synchronised • User experience is much faster • User does not need to be online to process • Cons • Data can become stale if synchronisation does not often enough • Data is pumped into backend system “batch based” • Working Examples • Sales Force applications • Route Management applications • Anything with large amounts of reference data
Types of Mobile Applications • Smart Clients • Run locally on the device • Uses local processing power • Uses local resources • UI rendered on the device • Real time / Synchronized applications • Key focus for Enterprise Mobile Software • Mobile Web Applications • Server Side execution – HTML, WAP etc • Renders to specific device capability • UI rendered on the server • Real time applications only
Multi-device applications issues • Different form factors • Different device capabilities • Different browser standards Cross platform issues • Different platforms • Different APIs • Different languages Mobile Web Pages Local Code Mobile Web Browser Types of Mobile Application Continued What about writing for multiple devices? Device Operating System
Mobile Application Devices • Low end mobile phones & pagers • Smart Devices • Full Computer Experience • Device separated according to • Processor Ability • Memory / Storage Capacity • User input methods
Mobile Application DevicesLow End - Mobile Web Experience • Mobile Phones and Pagers • Micro browsers • WAP, HTML, XML, cHTML • Key based user input • Many different devices
Mobile Application DevicesSmart Devices • Application on Device • Stylus Input • Online/Offline Capability • Local processing power
Mobile Application DevicesFull PC Experience • Full processing power • Full screen display • Tablet PC / Laptop
Telecommunications • Build your architectures to support TCP/IP • And you can use any of these technologies! • But test, test, test! • Synchronized architectures work better over slower connections • Real time architectures tend to need faster connections for good user experience. • Always check for timeouts • Applications need to handle “no network” gracefully
System Integration • All this data is great but what about? • Integrating to / from existing systems? • Where does the data go? • Where do you need to get data from? • Examples • Where is your master customer list? • Where do your mobile orders get processed?
System Integration • Fully integrated vs. Print-outs • System Integration can make or break a mobile application • Concept of a central mobile database • Merge all information required for devices into one place • Consolidate all mobile data captured into one place and integrate back in one go • Shouldn’t matter whether synchronized or real time architecture
Design Issues • User Interface is critical • For user adoption • Must be simple yet powerful • Data resilience is imperative • Synchronisation must be seamless • It either works or it doesn’t with nothing in between • Data partitioning simplifies overheads • Deliver data to the users that need it
Design Issues cont. • Data partitioning • e.g. don’t get every sales person every other sales person’s clients • This is horizontal partitioning. • Each mobile device has only the data it needs • Static (All) vs. Static (Personal) • Vertical partitioning is about only pushing the data types on need on a devices • Always determine how much data you need and not more.
Scalability • To support thousands of users you must consider • Network / telecoms usage for all your users • Multiple synchronisation points • Over the air update frameworks • Data storage capacity • Keep your audit logs small
Seamless Deployment • Seamless Synchronisation • One Button • Incorporate over–the–air updates • Removable Media Card Install • e.g. Secure Digital, Compact Flash • Lower network costs • Enterprise Device Deployment Tool
Data Integrity • Data Synchronisation • Initialisation • Delta based updates • A synchronisation is transactional • Either works or not! • Test power failure scenarios • Reinitialise data over the air if required
What do we need? - Concepts • Online/Offline Capability • Offline – Replicated Data (Main Function) • Online – Real time Lookups • Security • Security access through firewall tunnel • Scalability • The ability to scale to 1000s of users • Integrated Approach • Consolidate data to/from Backend Systems
What do we need? - Layers • User Interface Layer • Telecommunications Layer • Application / Web Server • Data Repository • Integration Layer • Backend Systems
The Template EMS • Client Application – online/offline • Compact Framework for a rich application • SQL Server Mobile + Replication • Web Services for Real time • SQL Server for Centralised Data store • Real time Information • Web Services • Repository for Mobile Data • SQL Server • System Integration • SQL Server to Backend via Microsoft BizTalk Server
OEM/IHV Supplied BSP(ARM, SH4, MIPS) OEM Hardware and Standard Drivers Standard PC Hardware and Drivers Hardware/Drivers Windows XP DDK Device Building Tools Windows Embedded Studio Platform Builder Data Lightweight Relational EDB SQL Server 2005 Express Edition SQL Server 2005 Mobile Edition SQL Server 2005 Win32 Native Managed Server Side Programming Model MFC 8.0, ATL 8.0 .NET Compact Framework .NET Framework ASP.NET Mobile Controls ASP.NET Windows Media Multimedia DirectX Location Services MapPoint Development Tools Visual Studio 2005 Internet Security and Acceleration Server Communications& Messaging Exchange Server Live Communications Server Speech Server Device Update Agent ManagementTools Software Update Services Image Update Systems Management Server Microsoft Operations Manager
Overview • Talking about new features • Enterprise Focused • Everything in Visual Studio 2003 would require another session! • Development Tools • Visual Studio 2005 • Previously Visual Studio 2003 • Client Architecture • .NET Compact Framework 2.0 • Previous 1.1 in Visual Studio 2003 • Libraries across Display, Layout, Controls, Networking • Data Architecture • SQL Mobile 2005 • Previous SQL CE 2.0 (VS2003, SQL2K3)
Visual Studio 2005 for DevicesVisual Studio 2005 • Enhanced project wizard • Target Pocket PC or Smartphone • Enhanced designers • Emulator support • Based on ARM processor • Save multiple states
Visual Studio 2005 for DevicesVisual Studio 2005 • CAB and Setup projects • Integrated device and Emulator debugging • Remote tools • Process viewer, file • viewer, Heap walker, • and more…
Demonstration • Visual Studio 2005 Development Environment • Skins • New Device Manager • Emulators
.NET CF 2.0Compatibility and Performance • Think of .NET CF 2.0 of a superset of .NET CF 1.0 • Compatible with full .NET Framework • Interoperability – Type must be in .NET CF • Protocols – Web Services, Datasets etc • Compatible with .NET CF 1.0 • Side-by-side execution • Application compatibility • Essentially separate frameworks
.NET CF 1.0 .NET CF 2.0 .NET CF 2.0Compatibility and Performance Cont. • Enhanced performance • Unified JIT for All processors • 2 in .NET CF 1.0 • Improved string handling • String Class, StringBuilder • XML improvements • XMLTextReader, XMLTextWriter – Faster than XMLDocument • XMLSerialization • Improved ADO.NET with SQL Mobile • SQLCEResultSet – Direct Scrollable Cursor
.NET Compact Framework 2.0Displays and Layout • Orientation support • Docking and anchoring • AutoScroll property – forms, panels • ChangeOrientation – portrait or landscape • Resolution support • Automatic scaling • Lo to Hi Res Screens • Graphics • DpiX • DpiY
.NET Compact Framework 2.0New Windows Forms Controls • DateTimePicker • MonthCalendar • DocumentList • LinkLabel • Notification • Help • WebBrowser
.NET Compact Framework 2.0 System.Drawing Namespace • Bitmaps • Access Bitmap Pixels • Bitmap.LockBits(…) • Better Image Support • Image.Save(…) • png, jpg, bmp, tif, gif • Bitmap pattern brushes • Drawing Images on Containers • Direct 3D support in Visual Studio 2005
.NET Compact Framework 2.0 System.Xml Namespace • Improved performance • Schema validation support • XSD • No DTD or XDR Validation Support • Static creation methods for XmlTextReader and XmlTextWriter • XML searching and processing through XPath • XmlSerialization
.NET Compact Framework 2.0 System.Messaging Namespace • Support for message queuing • Send and receive messages • Inter-application communication without a live connection • Communication using unreliable connections • Administer, connect, and monitor network message queues
.NET Compact Framework 2.0 Language and Runtime Support • Enhanced VB.NET features • "My" namespace support • EnhancedC# features • Iterators • Anonymous methods • Cross language features • Generics • Partial classes
Future Windows Mobile PlatformKey Features • Enhanced services and device support • Messaging – SMS, POOM, and telephony • Notifications – signal, battery, connections • Location and Camera APIs • Peripherals support • Microdrvs, cameras, keyboards, second displays • Not part of the core .NET CF 2.0 • APIs embedded in operating system • Accessed through forthcoming SDK
Notifications Broker • Access to Important events that may occur on the device. • Centralized publish and subscribe mechanism • Store as well as detect the state of a device an application, or a service. • Easier access via managed object model.
State and Notifications Broker Development Scenarios • Register for notifications • You choose the notifications to which you respond • Examples • Connect to a server when GPRS is available • Initiate a synchronization event • When fast connectivity is available • Synchronize offline store • When device is cradled • Persist application settings across sessions • Respond to low battery notification • Schedule device management behavior • Create custom notification events