640 likes | 903 Views
MES903: Mobile Application Development Best Practices. Alex Reif Product Manager areif@ianywhere.com August 16, 2004. Goals. Make you aware of the differences between desktop and mobile application development
E N D
MES903: Mobile Application Development Best Practices Alex Reif Product Manager areif@ianywhere.com August 16, 2004
Goals • Make you aware of the differences between desktop and mobile application development • Identify some of the interesting challenges present when developing mobile applications • Focus will be on Pocket PC and Palm OS devices • Demo will focus on Pocket PC devices (.NET Compact Framework)
The Enterprise. Unwired. Industry and Cross Platform Solutions Manage Information Unwire Information Unwire People • Adaptive Server Enterprise • Adaptive Server Anywhere • Sybase IQ • Dynamic Archive • Dynamic ODS • Replication Server • OpenSwitch • Mirror Activator • PowerDesigner • Connectivity Options • EAServer • Industry Warehouse Studio • Unwired Accelerator • Unwired Orchestrator • Unwired Toolkit • Enterprise Portal • Real Time Data Services • SQL Anywhere Studio • M-Business Anywhere • Pylon Family (Mobile Email) • Mobile Sales • XcelleNet Frontline Solutions • PocketBuilder • PowerBuilder Family • AvantGo Sybase Workspace
Agenda • Introduction • Considerations • Demo: Building an Application • Best Practices Summary
Demo: CustDB Enterprise Pocket PC Device Consolidated Database (ASA) Local Database (UltraLite) Sync Server (MobiLink) CustDB Application Sybase Central
The Wireless Golf Scoring Application • Platforms • Palm OS, Windows CE • Features • Team scoring for a “scramble” format tournament • Record score, player’s drive used, special holes • Local data store (UltraLite) and wireless synchronization (MobiLink) • “Poor man’s” device management • Simple messaging • Leaderboard • Database features • Common UltraLite database code • Common MobiLink synchronization scripts
Agenda • Introduction • Considerations • Demo: Building an Application • Best Practices Summary
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Device Selection • Think about your users • Where will the application be used? • How will this application be used? • How often will the device be used? • Single-purpose or multi-purpose device? • What are your constraints? • Cost • Edicts from above • Current expertise • Special requirements? • Connectivity (wired or wireless) • Peripherals (printers, scanners, …)
Hardware Considerations • Power (batteries) • Processor speed • Memory • Screen • Ruggedness
Varied Screen Sizes • Desktop vs. handheld • Across handheld platforms • Move an application from Pocket PC to Palm OS • Within a platform • Pocket PC vs. CE .NET • Palm OS 4 vs. Palm OS 5
UI Differences - Input • Most devices have no keyboard • Other input methods • Touch screen with stylus • Handwriting recognition, “Graffiti”, Gestures • Virtual keyboards • Navigation pad • Jog dials • Future? • Voice recognition • Bluetooth pens • …
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Network Issues • Need to learn about a new networking technology? Use it!
The Eight Fallacies of Distributed Computing – Peter Deutsch • The network is reliable • Latency is zero • Bandwidth is infinite • The network is secure • Topology doesn't change • There is one administrator • Transport cost is zero • The network is homogeneous http://today.java.net/jag/Fallacies.html
Network Considerations - General • Bandwidth • What does “19.2 Kbps” really mean? • How much do I need now? Later? • Are there multiple “pipes” available to my application? • Availability • Does no network mean no application? • Applications should be architected in such a way that lack of network doesn’t stop application from working • Security (or lack thereof) • Public networks can be dangerous for sensitive data • Even “private” networks can be sniffed…
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Application Design • If you are extending a desktop application • What subset of the desktop app is feasible on a handheld device? • What subset of data does the device need? • If you are creating a new application • Determine the applications’ scope: what makes sense on the device? • Take a lesson from ergonomics… • Understand how people will use these devices • Use the device yourself • Once you know how the device will be used, you can design a better application/UI
Application Development • Development tools • Migrating an application from desktop to mobile • Memory constraints • Building a user interface for a small screen
Development Tools • Many options, depending on platform • Pocket PC • PocketBuilder • eMbedded Visual C++, eMbedded Visual Basic • Visual Studio.NET (Compact Framework/Smart Device Extensions) • Java (Jeode VM) • Palm OS • Metrowerks CodeWarrior • Few cross-platform options • M-Business Anywhere • AppForge MobileVB/Crossfire
Migrating Applications From Desktop to Mobile • Don’t forget your current development practices: they still apply to mobile! • Source control • Build and test environments • Etc. • What can feasibly be ported or re-used? • Development tool/language used • Development tools/language available • Where does your business logic reside? • Databases? • Application servers? • Does all of that logic need to be on the device?
Memory Constraints • Amount of memory available varies according to platform • New Pocket PC devices typically have >= 32 MB available • New Palm OS (non-entry level) devices typically have 8-16 MB available • Memory is shared between storage and applications • Older devices may have different constraints • Palm OS device with 2 MB of memory has < 36 KB of heap space available!
User Interface Design • Good UI is very important • More important than on the desktop? • Handheld != desktop • No keyboard • Small screen • Platform differences • How do you squeeze lots of information onto a small screen? • Tab controls, menus, etc. • Iterative development • Keep application logic separate from GUI! • This helps when porting to other platforms
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Data Storage • Any mobile enterprise application will need to store at least some data on the device • How will you store this data? • How much on-device data does your application require? • How much now? • How much later? • How much on-device data manipulation will occur? • Do you need to synchronize on-device data with an enterprise data source?
Other Mobile Data Storage Options • Proprietary APIs • Palm DB, flat file • Custom-coded solutions • Customer built data structures, searching, sorting, and synchronization • ‘Shrunk-down’ enterprise database • Vendor reduces capabilities of enterprise database to make it fit on small devices
Other Mobile Data Storage Limitations • Proprietary APIs • One table per ‘database’ • Poor performance • Limited capabilities • Custom-coded solutions • Very resource intensive • Increased risk • Increased maintenance costs • ‘Shrunk-down’ enterprise database • Pre-chosen limited functionality • Architecture not geared for mobile and wireless devices
UltraLite • “Small-fingerprint” database in SQL Anywhere Studio • High-performance mobile data store • Data synchronization with the enterprise (MobiLink) • Aimed at small, mobile, embedded and wireless devices • Personal organizers, smart phones, etc. • Point-of-sale devices • Typical constraints • No hard disk • Limited memory • Slow processors • Limited power • Wireless connection
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Data and Communications Security • General observations • Costs must be compared to cost and risk of security breech • No solution is perfect • Security is reducing risk, not eliminating risk • If security is cumbersome, it will likely be circumvented • User education is important • What security problem are you trying to solve? • Interception of data transmission • Loss of device • User authentication
Considerations • Device Selection • Network Issues • Application Design and Development • Data Storage • Data and Communications Security • Application Deployment and Management
Application Deployment and Management • Cost of mobile and remote computing • Expensive application & update rollouts • Significant assets (software/hardware) not tracked • Cost of support • Direct support center costs and lost productivity • Employees can’t function without devices – mission critical • Security risks • Mobile / remote / embedded operation outside the firewall • Risk when devices are corrupted or lost • Update/enforce virus protection, OS, software configuration • Desktop management solutions don’t fit • Not suited to the mobile environment • Complexity, footprint, connection flexibility, device diversity
XcelleNet Frontline Solutions • XcelleNet: Afaria and RemoteWare • MES913 Managing and Securing Frontline Devices: An XcelleNet Overview • http://www.xcellenet.com
Agenda • Introduction • Considerations • Demo: Building an Application • Best Practices Summary
UltraLite and the .NET Compact Framework • We’re going to create and deploy an application from scratch • Developed using Visual Studio.NET • UltraLite for data storage • MobiLink for data synchronization • Application: Survey application • Data-driven: questions and response choices all in database • Signature capture • Runs on Pocket PC devices • First, let’s see the completed application…
UltraLite USM Demo: Survey Application Device Enterprise Consolidated Database (Sybase/Oracle/ Microsoft/IBM) .NET Compact Framework Survey Application (.NET) TCP/IP HTTP HTTPS HotSync (wired or wireless) MobiLink
UltraLite • “Small-fingerprint” database in SQL Anywhere Studio • High-performance mobile data store • Data synchronization with the enterprise (MobiLink) • Aimed at small, mobile, embedded and wireless devices • Personal organizers, smart phones, etc. • Point-of-sale devices • Typical constraints • No hard disk • Limited memory • Slow processors • Limited power • Wireless connection
Goals of UltraLite • Provide advantages of an enterprise database • Transaction processing, data types (including numeric and date/time), referential integrity, indexing, strong encryption • Provide synchronization to industry standard enterprise databases (robust and secure) • Maintain extremely small footprint • Maintain hand-coded speed • Reduce the requirement for platform specific knowledge
UltraLite Programming Interfaces • UltraLite Components • Set of components to enable UltraLite development with various development tools • UltraLite.NET • AppForge MobileVB/Crossfire • Microsoft eMbedded Visual Basic • Native UltraLite for Java • UltraLite for M-Business Anywhere • UltraLite C++ Component • UltraLite ODBC • Sybase PocketBuilder • “Classic” UltraLite • Embedded SQL • C++ API • JDBC
UltraLite.NET • .NET wrapper for UltraLite Component API • All .NET languages supported • Platform support • Pocket PC (.NET Compact Framework) • Windows XP (Tablet PC - desktop .NET Framework) • Namespace is iAnywhere.UltraLite • SQL928 Building Hand-held Database Applications Using UltraLite • Wednesday, 3:30 PM, Captiva 2
UltraLite Schema Files • Schema file (.usm file) • Provides schema information for a new database • Can be used to “upgrade” an existing database • Schema files can be created with: • Existing ASA database (ulinit) • XML file (ulxml) • UltraLite Schema Painter GUI tool (ulview)
Demo: Create an UltraLite Schema Device Enterprise Consolidated Database (Sybase/Oracle/ Microsoft/IBM) .NET Compact Framework Survey Application (.NET) TCP/IP HTTP HTTPS HotSync (wired or wireless) MobiLink UltraLite USM
UltraLite Components - Class Hierarchy DatabaseManager ConnectionParms Connection DatabaseSchema PublicationSchema Table Column ColumnSchema TableSchema IndexSchema PreparedStatement ResultSet ResultSetSchema SyncResult SyncParms
UltraLite USM Demo: UltraLite.NET in the Compact Framework Device Enterprise Consolidated Database (Sybase/Oracle/ Microsoft/IBM) .NET Compact Framework Survey Application (.NET) TCP/IP HTTP HTTPS HotSync (wired or wireless) MobiLink