Download presentation
Presentation is loading. Please wait.
1
Mobile.Net & Mappoint Service
2
.NET Mobile Overview Imran Muhammad CS 898T Mobile and Wireless Networks Summer 2005 Wichita State University
3
Mobile Solution Scenarios Mobile Office: Email, PIM, IM etc SFA (Sales Force Automation): Mobile CRM, Order Entry etc Delivery Automation : Route Drivers, Taxis etc FFA (Field Force Automation): Service Technicians, Installers etc Warehouse Automation : Inventory Control etc Asset Tracking : Asset Mgmt, Bag Tracking etc Mobile Government : Inspections, Law Enforcement, Activity Reporting etc Consumer : Games, Find Services etc
4
Windows Mobile Device Options Pocket PC Phone Edition SmartphoneUsage Data first, with phone functionality Phone first with data functionality Target Market Consumer and LOB Consumer and Mobile Professional Form Factor Larger 240x320 176x220 hi-res color screen Input Two-handed use Touch screen and stylus One-handed navigation Keypad and joystick Applications Full application suite No Microsoft Portrait Key Scenarios Mobile Outlook LOB Applications Mobile Outlook Consumer Applications Embedded Development .NET CF and eVC eVC and.NET CF 2.0
5
Mobile Application Development
6
The Application Universe Tools XML Web Services Clients User Experiences & Solutions AuthenticationCRMVoice Calls Enterprise DatabasesEmailData Calls Location ServicesBillingetc…
7
.NET Framework Architecture WindowsCOM+ Services Common Language Runtime Base Class Library ADO.NET and XML ASP.NETWindows Forms Common Language Specification VBC++C#J#…
8
What is the.NET Mobile Framework ?
9
Smart Device Programmability ASP.NET Mobile Controls Mobile Web Browser.NET Device Programming Two approaches – one model, one tool.NET Compact Framework Local Code Remote Web Pages Device Operating System ASP.NET Mobile Controls Mobile Web Browser Remote Web Pages Device Operating System
10
.NET Device Programming Smart Device Programmability ASP.NET Mobile Controls Mobile Web Browser Remote Web Pages Device Operating System Smart Device Programmability.NET Compact Framework Local Code Smart client Smart Devices
11
.NET CF Design Goals Compatibility Strict compatibility with.NET Framework Subset functionality Subset for devices Give the developer a known target Enable skills and code transfer Size/functionality.NET Compact Framework.NET Framework
12
.NET Mobile Framework Lightweight version of.NET Framework Designed for resource-constrained devices Compatible with VS.NET, C#, VB.NET Runs applications securely on-device High performance JIT compiler Guarantees robustness and security Highly interactive, offline, and networked experiences Makes it easy to consume web services Tunable size and performance
13
Desktop.NET Framework System System.DataSystem.Xml System.Web Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NETSqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.WinForms DesignComponentModel Reader/Writers
14
. NET Compact Framework System System.DataSystem.Xml System.Web Globalization Text Security Collections Resources Reflection Net IO Threading Diagnostics ServiceProcess Configuration Design ADO.NET SqlServerCe SqlClient Xslt/XPath XmlDocument Runtime InteropServices Remoting Serialization Serialization ConfigurationSessionState CachingSecurity Services Description Discovery Protocols UI HtmlControls WebControls System.Drawing Imaging Drawing2D Text Printing System.WinForms DesignComponentModel Reader/Writers
15
Framework Size Framework size (RAM or ROM) ~1.5 MB Running RAM needs 1 MB+ (depends on app) Typical application sizes 50 - 500 KB Apps often smaller due to use of platform features in the framework
16
What’s going on
17
.NET CLR Common Features Verifiable type safe execution No uninitialized variables, unsafe casts, bad array indexing, bad pointer math Garbage Collection ref-counting, reduced leaks JIT compilation Error handling with exceptions Common type system Call, inherit, and source-level debug across different languages
18
Compact CLR Differences Limited COM Interop Good support for calling native DLLs Support for calling a COM object through DLL wrappers No support for writing a COM / ActiveX object in C# or Visual Basic No Install-time JIT (nGen) No Reflection Emit No Remoting Client web services is fully supported No Generic Serialization Datasets can be serialized to XML Subsets of other areas of functionality
19
Features not supported in.Net Mobile Framework ASP.Net: Primarily being a rich client platform, it doesn’t provide any ASP.Net support. Assemblies and GAC: There is no support for multimodule assemblies. COM Interoperability: Even though interoperability with COM objects is not supported, there are other ways of accessing a COM object. Platform Invoke method can be used to call native DLLs which in turn can access COM DLLs. Asynchronous Delegates: Not supported.
20
Reflection: No support for System.Reflection.Emit namespace. XML Web Services: Developers cannot host web services under.Net Mobile Framework. Remoting: Cannot develop Remoting applications. Printing: No support for printing functionalities. GDI+: Advance GDI support is missing in Compact Framework. XML: XML Schema validations and XPath are not supported.
21
The Development Environment
23
Windows Forms Support Layout Manual positioning Drawing Polygons, lines, arcs, ellipses, rectangles JPEG, BMP images Text and images TrueType bitmap fonts on Mobile Most desktop controls Designer support
24
Supported Controls ButtonCheckBoxComboBoxContextMenuDataGridDomainUpDownFileOpenDialog Supported controls HScrollBarImageListLabelListBoxListViewFileSaveDialog MainMenuNumericUpDownPanelPictureBoxProgressBarRadioButton GroupBoxRichTextBox NotificationBubble Print Controls StatusBarTabControlTextBoxTimerToolBarTreeViewVScrollBar Unsupported controls Unsupported controls – not available in CE CheckedListBoxColorDialogErrorProvider HelpProviderLinkLabelNotifyIcon ToolTipSplitterFontDialog
25
Working with resolution and rotation …
26
Fit Content to Window Portrait Landscape
27
Change the Content Content may need to change when orientation changes Portrait Landscape
28
Change the Layout Portrait Landscape
29
Design for Square Portrait Landscape
30
Networking Sockets Synchronous and asynchronous Multiple protocols Streams Built on top of sockets Synchronous and asynchronous HTTP request and response Use stream model Requires no user knowledge of HTTP Common Language Runtime.NET Compact Framework Web Services HTTP Request/Response, Network Stream Sockets Applications
31
Data Characteristics Amount of data to be stored <100 kb: XML > SQL Server CE Amount of data to be exchanged < 1MB web services Small chunks more frequently > Remote data access or merge replication Larger chunks less frequently
32
XML XmlTextReader and XmlTextWriter Forward-only parsers of XML data Better performance, no in-memory caching Low memory requirements XmlDocument Parse entire document In memory traversal Higher memory requirements; more functionality
33
Unsupported XML Classes XmlDataDocument Relational and hierarchical views of XML XPath Query over unstructured XML data XSL/T Transform XML data to other forms XML Validation Verifies correctness of XML document
34
ADO.NET Support Handling data offline with DataSet Communicating DataSet with XML Common data model from server to PC to device Extensible ADO.NET provider model Included data providers SQL Server (System.Data.SqlClient) SQL Server CE (System.Data.SqlServerCe)
35
Web Services Support Calling XML Web Services Synchronous and asynchronous invocation Basic and Digest authentication Secure Sockets Layer support for encryption (SSL) Custom SOAP headers SOAP Extension Framework
36
Data Access in.NET Mobile Active Data Object (ADO).NET Mobile applications can access Microsoft SQL Server 2000 on remote servers or access a SQL Server CE locally on the device Disconnected mode support SQL Server CE lets applications cache large volumes of data (tens of megabytes), read, and update in disconnected mode SQL Server CE provides synchronization mechanisms for changes made upon reconnection SQL Server Internet Information Server (IIS) Internet SQL Server CE Caching Synch
37
SQLCE SQL Server CE Supports large datasets, rich queries, transactions Small footprint, DBMS can live on memory card Some limitations (no stored procedures, triggers) Synchronization through: Replication (RDA or Merge) XML Web Service Synchronization
38
2 Service SQL Demonstration :.Net & services MapPoint WebService FedEx WebService Google WebService 3 3 3 3 1 XML 4 5
39
MapPoint Web Service Microsoft MapPoint Web Service is an XML Web service with a SOAP API that allows you to add location-based functionality to your application that calls on the high-quality maps, as well as the location-finding and routing capabilities of MapPoint Web Service. MapPoint Web Service is comprised of four constituent services: Common, Find, Render, and Route.
40
Introduction to the MapPoint Web Services Web Services providing location-based services Maps Driving Directions Proximity Searches Current Version 3.5 Can integrate your own, custom, data with the data provided Store locations Custom Icons
41
MapPoint Web Service 3.5 Enriches your application by making mapping a simple “ingredient” .NET Web Service API Find, Render, Route services Developed and hosted by Microsoft 20M+ transactions per day Extensive Geographic Data Coverage in 38 countries worldwide More than 15 million Points of Interest
42
Web Service API Staging WSDL File at http://staging.mappoint.net/standard-30/mappoint.wsdl Production environment also available Sign up for Eval Account http://msdn.microsoft.com/mappoint MSDN Subscribers get 12 months or 50,000 hits
43
Web Service API Common Service Find Service Render Service Route Service Customer Data Service
44
Web Service API Common Service utility classes, methods and properties that are common to the find, route, and render services, or are basic utility functions used by the other services Address class contains the constituent parts of an address: street, city, other city, region, country, and postal code.
45
Web Service API Find Service Locate addresses and points of interest Get information about specific Lat/Long Find locations near a specific point or along a route Find addresses and geographic entities Find POI spatially or along routes Parse addresses
46
Find Service The Find service allows you to locate addresses, geographic entities, latitude and longitude coordinates, and points of interest from MapPoint Web Service data, as well as parse addresses and return location information for a specified latitude and longitude coordinate. FindServiceSoap class contains the methods and properties related to calling the Find service. FindAddress method returns a list of found addresses based on an input address, in order of how well the results match the search criteria. FindAddressSpecification class contains the search specification used in the FindServiceSoap.FindAddress method. Specifies the address to find, the search options to use, and the data source from which to get results. FindServiceSoap class contains the methods and properties related to calling the Find service. FindAddress method returns a list of found addresses based on an input address, in order of how well the results match the search criteria. FindAddressSpecification class contains the search specification used in the FindServiceSoap.FindAddress method. Specifies the address to find, the search options to use, and the data source from which to get results.
47
Web Service API (cont) Render Service Render maps showing routes and locations Set map size, view and controls Add pushpins (including custom icons) Select points on a map, get location information about points on a map, pan and zoom a rendered map, and create clickable maps. 30 map styles available 4 designed specifically for devices
48
Render Service RenderServiceSoap class contains the methods and properties related to calling the Render service. MapSpecification class contains the specifications for rendering a map. Includes the data source to use, map views, pushpins, route, selected entities, and map options. GetMap method returns map images, map views, and hot area definitions based on map options. GetBestMapView method returns the best map view for a selected location or set of locations. The best map view is the largest scale map that contains all the desired locations. MapOptions class contains the map rendering options used in the RenderServiceSoap.GetMap method. Specifies the the data source, the image format, panning and zooming factors, and identification of the requested map as an overview map. Pushpin class contains the icon, label, location, and user-defined identification number of a pushpin. A Pushpin object is used to mark a location on a map image, and the location can be a place, address, or latitude and longitude coordinate. RenderServiceSoap class contains the methods and properties related to calling the Render service. MapSpecification class contains the specifications for rendering a map. Includes the data source to use, map views, pushpins, route, selected entities, and map options. GetMap method returns map images, map views, and hot area definitions based on map options. GetBestMapView method returns the best map view for a selected location or set of locations. The best map view is the largest scale map that contains all the desired locations. MapOptions class contains the map rendering options used in the RenderServiceSoap.GetMap method. Specifies the the data source, the image format, panning and zooming factors, and identification of the requested map as an overview map. Pushpin class contains the icon, label, location, and user-defined identification number of a pushpin. A Pushpin object is used to mark a location on a map image, and the location can be a place, address, or latitude and longitude coordinate.
49
MapView class is an abstract class representing a requested map view. Each of the derived classes defines A map view using a different measure: a set of location points, a bounding rectangle, height and width, or scale. MapImage class contains a map returned from the RenderServiceSoap.GetMap method. Includes the image or a URL to get the image, map view representations, and the hot areas associated with pushpins. MapSpecification mapSpec = new MapSpecification(); mapSpec.DataSourceName = “MapPoint.AP”; mapSpec.Options… desired size and style mapSpec.Views = my MapViewRepresentation object MapImage[ ] maps = RenderService.GetMap(mapSpec); Image mapImage = new Bitmap(MemoryStream(maps[0].MimeData.Bits)); Render Service MapView class is an abstract class representing a requested map view. Each of the derived classes defines A map view using a different measure: a set of location points, a bounding rectangle, height and width, or scale. MapImage class contains a map returned from the RenderServiceSoap.GetMap method. Includes the image or a URL to get the image, map view representations, and the hot areas associated with pushpins. MapSpecification mapSpec = new MapSpecification(); mapSpec.DataSourceName = “MapPoint.AP”; mapSpec.Options… desired size and style mapSpec.Views = my MapViewRepresentation object MapImage[ ] maps = RenderService.GetMap(mapSpec); Image mapImage = new Bitmap(MemoryStream(maps[0].MimeData.Bits)); Render Service Render Service
50
Web Service API Route Service Generate driving directions and routes including setting waypoints Calculates routes and itinerary Shortest or Quickest route options Use CalculateSimpleRoute for LatLong point based routes
51
Route Service RouteServiceSoap class contains the methods and properties related to calling the Route service. Route class contains a route of two waypoints (start and end points). A Route can include a specification, a set of directions, and/or a calculated route representation. CalculateSimpleRoute method returns a route based on specified latitude and longitude coordinates. Getting MapPoint Route myRoute = RouteService.CalculateSimpleRoute( LatLong[], "MapPoint.AP", SegmentPreference.Quickest); Segment tripSegment = myRoute.Itinerary.Segments[0]; foreach (Direction step tripSegment.Directions) Console.WriteLine(step.Instruction); RouteServiceSoap class contains the methods and properties related to calling the Route service. Route class contains a route of two waypoints (start and end points). A Route can include a specification, a set of directions, and/or a calculated route representation. CalculateSimpleRoute method returns a route based on specified latitude and longitude coordinates. Getting MapPoint Route myRoute = RouteService.CalculateSimpleRoute( LatLong[], "MapPoint.AP", SegmentPreference.Quickest); Segment tripSegment = myRoute.Itinerary.Segments[0]; foreach (Direction step tripSegment.Directions) Console.WriteLine(step.Instruction);
52
Route ServiceDirectionskmStart Depart 1 Epping Rd, North Ryde, NSW 2113 on Epping Rd (West) 0.6 1 Turn LEFT (North) onto M2 [M2 Motorway] 3.9 2 *Toll road* Stay on M2 [M2 Motorway] (North) 0.1 3 Stay on M2 [M2 Motorway] (North-West) 6.6 4 Turn LEFT (South) onto 7 [Cumberland Hwy] 6.6 5 Turn RIGHT (North) onto Ramp [Cumberland Highway Exit] 0.2 6 Bear LEFT (North-West) onto 7 [Cumberland Hwy] 1.2 7 Road name changes to Cumberland Hwy [James Ruse Dr] 0.2 8 Road name changes to 7 [Cumberland Hwy] 1.8 9 Turn LEFT to stay on 7 [Cumberland Hwy] 0.5 10…
53
Web Service API Customer Data API Programmatic upload of custom data
54
Resources http://msdn.microsoft.com/mobility http://msdn.microsoft.com/mobility http://www.microsoft.com/mobile http://www.microsoft.com/mobile http://microsoft.public.dotnet.framework.compactfr amework.com http://microsoft.public.smartphone.developer.com http://microsoft.public.pocketpc.developer.com http://www.microsoft.com/mappoint/webservice/d efault.msp http://www.microsoft.com/mappoint/webservice/d efault.msp http://www.microsoft.com/mappoint/webservice/d efault.msp http://msdn.microsoft.com/mappoint http://msdn.microsoft.com/mappoint http://blogs.msdn.com/cthota/
55
Q&A
56
Thank you… Imran Muhammad ixmuhamm@cs.wichita.edu
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.