Mobile Application Development By Sam Nasr July 25, 2006

Download Report

Transcript Mobile Application Development By Sam Nasr July 25, 2006

Mobile Application
Development
2005
By
Sam Nasr
July 25, 2006
www.ClevelandDotNet.info
Agenda








Introduction
Mobile Platform
.Net Compact Framework
Demo
Data Management
Web Services
Q&A
Feedback
Windows Mobile Devices

Windows Mobile provides a variety of device types



Pocket PC
Smartphone
Pocket PC Phone Edition
Windows Mobile Platform

Common Win32 platform across device types

Mobile versions of productivity tools


Excel Mobile, Word Mobile, Pocket Outlook
Simplified access to device extensions

Camera, GPS, Phone
Thin Clients
VS.
Fat Client
Developing Mobile Applications

NET Compact Framework 2.0





Visual Studio 2005






Leverage desktop .NET Framework skills
Classes for forms, drawing, storage, net, data access, XML
Optimized for smart devices (28% of coverage, 8% of size).
Full support for VB.NET and C# language features
Development experience consistent with desktop
Automated application deployment
Integrated device debugging
Run managed .EXEs and .DLLs directly
Debug with Visual Studio .NET
Emulators


Develop and debug applications without a device
Emulator Manager provides centralized control
Windows Mobile Managed API’s

Focus on simplifying device development

Encapsulate common device tasks
Global Positioning System interaction
 Camera and picture management
 3-D Graphics and multimedia support


State and Notifications Broker (SNAPI)

Common repository for device information


Phone state, battery life, what song is playing
Sends notifications of changes in device state


Network availability, arrival of phone call
Arrival of SMS/email message
.NET Framework
System.Web
Services
Description
Discovery
Protocols
UI
HtmlControls
WebControls
Caching
Configuration
Security
SessionState
System.WinForms
Design
System.Drawing
Drawing2D
Imaging
System.Data
ADO.NET
Design
ComponentModel
Printing
Text
System.Xml
SqlClient
XmlDocument
Xslt/XPath
Serialization
Reader/Writers
System
Collections
Security
Text
Globalization
IO
Net
Reflection
Resources
Configuration
ServiceProcess
Diagnostics
Threading
Runtime
InteropServices
Remoting
Serialization
.NET Compact Framework
System.Web
Services
Description
UI
HtmlControls
Discovery
WebControls
System.WinForms
Design
ComponentModel
System.Drawing
Protocols
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
Security
Net
ServiceProcess
Runtime
InteropServices
Text
Reflection
Diagnostics
Remoting
Globalization
Resources
Threading
Serialization
Demo
Data Management
Data Management

SQL Server 2005 Mobile Edition (SQL Mobile)
 Full featured database running locally on device
 inner/outer joins, transactions, locking, much more

Visual Studio 2005 support
 Server Explorer
 Create database, tables and indices
 Modify schema and data
 Database file can be located on device or desktop
 Forms Designer
 Controls created directly from table schema
 Data view and edit forms can be auto generated
SQL Mobile Synchronization

Remote Data Access (RDA)

Merge Replication
Remote Data Access (RDA)

Loosely-coupled

Retrieve data from server and track local changes

Send local changes back to server

Very lightweight server cost

requires URL pointing to DLL to allow data access.
(i.e. http://192.168.1.100/sqlmobile/sqlcesa30.dll")
Merge Replication

Tightly-coupled device and server schema

Changes tracked on both device and server

Device and server changes reconciled on synch

Significant server cost

DB File (.SDF) stored in a folder on the mobile device.
(i.e. Data Source =" foldername + "RealEstate.sdf“)
SQL Server Everywhere

•Essential relational database functionality in a compact
footprint

•Ideal for mobile and desktop applications, including
occasionally connected

•Embeddable in applications

•Free to download, develop, deploy, and redistribute
SQL Server Everywhere

Increase Productivity: SQL Server Everywhere allows developers and
administrators to apply their existing SQL Server skills and be immediately
productive.

•Enables Deep Business Insight: SQL Server Everywhere, together with
Business Intelligence in SQL Server 2005, allows you to extend your business
insights further across the organization to distributed and mobile applications.

•Reliability For Mission-Critical Business: Originally built on SQL Mobile
technology, SQL Server Everywhere has self-healing and management
technologies built designed to handle instant off and dead battery scenarios.

•Better Value Over Time: As requirements and scale grow, SQL Server
Everywhere can easily scale up to other editions of SQL Server.
Web Services & Mobile Apps

Web services perfectly suited for mobile apps





Can communicate with any enterprise platform
Well suited for “casual” connectivity
Inexpensive way to roll-out mobile solutions
Provide internet access to enterprise resources
Accessing web services same as on desktop


Visual Studio Add Web Reference generates proxy
Proxy class handles communications details
.Net Mobile Advantages
•
•
•
•
•
•
Managed Code environment
Garbage
Collection
Type safety
Exception Handling
Threading
Organized .Net Classes
ADO.Net Integration
Platform Invoke (P/Invoke) service
Integration with Web Services
Single Vendor relationship
Tight integration with Mobile API’s
Remote Viewer
Rich Graphics UI
Faster application performance
•High Productivity with Visual Studio.Net
•Intellisense
•Remote debugging
•Common development experience
•Emulators provide accurate debug and
development experience
•Separation of code, HTML, and scripts for easier
debugging
•Multi-language support
•Reduced application development time
•Code Access Security
•Tight integration with other MS products
•Integration with SQL Server CE
•ActiveSync
Summary

Windows Mobile Development
Common development experience with desktop
 Emulators provide accurate debug and development
experience


Data Management
SQL Mobile provides reliable local data store
 RDA and Merge Replication provide server synch
 Web services give easy access to server resources


Windows Mobile 5.0

Simplifies common device tasks
Valuable Resources

Windows Mobile Developer Center
http://msdn.microsoft.com/mobility

FREE Mobile Developer Resource Kits
http://msdn.microsoft.com/mobility/windowsmobile/howto/kits/

SQL Server 2005 Mobile Edition
http://msdn.microsoft.com/mobility/sqlmobile/default.aspx

Comparing RDA and Merge Replication
http://msdn.microsoft.com/library/en-us/dnsql90/html/sql2k5mobile.asp
Additional Information
Mobile Messaging Discussion
http://www.microsoft.com/downloads/details.aspx?fa
milyid=67c06122-17b2-4268-9f71a583ff7d5e17&displaylang=en




How Microsoft IT Does Mobile Messaging (Level
300)
http://go.microsoft.com/fwlink/?LinkId=64090
Mobile Client Software Factory (Patterns and
Practices)
http://www.gotdotnet.com/codegallery/codegalle
ry.aspx?id=5bef2b5f-476a-488c-8d55-9d41666a36f3
Upcoming Events

Tuesday, August 22, 2006
TechNet (8AM-Noon) and MSDN Events (1-5PM)

Tuesday, August 29, 2006 (Noon EST)
Live From Redmond: .NET Compact Framework 2.0:
Optimizing for Performance

Tuesday, August 29, 2006
C#/VB.Net SIG (6:30 PM - 8:30 PM)