mobile devolpment slides

39
Windows Mobile 6 Development Geoffrey Emery Inventor [email protected]

Upload: geoffrey-emery

Post on 07-Nov-2014

2.652 views

Category:

Self Improvement


1 download

DESCRIPTION

These are the slides from the msdn event

TRANSCRIPT

Page 1: Mobile Devolpment Slides

Windows Mobile 6 Development

Geoffrey Emery

Inventor

[email protected]

Page 2: Mobile Devolpment Slides

Live Fun

LiveFun.flv

Page 3: Mobile Devolpment Slides

Tagging For Mobile

http://gettag.mobiDownload App now Demo To follow

Page 4: Mobile Devolpment Slides

Warning….

• Warning I am not a Microsoft Employee

Page 5: Mobile Devolpment Slides

Congratulations

• I am not a MicroSoft Employee• This a true life recount of My Dev Experiences over the

last two weeks

Page 6: Mobile Devolpment Slides

Market Overview

• Mobile software is one of the fastest-growing development arenas.

• Windows Mobile is among the top players– Over 28 million devices

shipped in 2008!

• Apple shipped 13 million phones last year - forbes

Page 7: Mobile Devolpment Slides

Windows Mobile 6 DevicesWindows Mobile 6 Standard (non Touch)

Windows Mobile 6 Professional (touch)

Windows Mobile 6 Classic (non Phone)

Page 8: Mobile Devolpment Slides

The Future Is Touch

Page 9: Mobile Devolpment Slides

The Next Level Of Touch

Page 10: Mobile Devolpment Slides

Still not convinced?

Page 11: Mobile Devolpment Slides
Page 12: Mobile Devolpment Slides

Understanding Your Devolopment Choices and making the right decision

• .NET Compact Framework – RUNS ON YOUR PHONE– You are building a mobile application that must support occasionally connected or offline scenarios.– You are building a mobile application that will run on the client to maximize performance and

responsiveness.

• ASP.NET for Mobile – IT’S A WEBSITE– You are building an application that can rely on 100-percent network connectivity.– Your team has ASP.NET expertise and you want to target a wide range of mobile devices.– You are building an application that must have no client-side installation or plug-independencies.– You want to support the widest possible range of devices.– You want to use as few device resources as possible.

• Silverlight for Mobile – WINNER – RUNS ON YOUR PHONE AND WEBSITE– You are building a Web application and want to leverage the rich visualization and UI– capabilities of Silverlight.– The devices you are targeting have easy access to or already have the Silverlight plug-ininstalled.

Page 13: Mobile Devolpment Slides
Page 14: Mobile Devolpment Slides

NET Compact Framework

OEM Applications

OEM Extensions Application

Compact Framework Class Libraries

Execution Engine

PAL

Host operating system

Native Code

Managed Code

• Managed-code stack (.NET Compact Framework 3.5) sits on top of native architecture

• Cellular, GPS, and other device services wrapped with .NET

Page 15: Mobile Devolpment Slides

.NET Compact Framework and SQL Compact

• Language support– Create solutions in C# or VB.NET

• Broad feature inclusion:– LINQ (to dataset and objects) – Windows Communication Foundation

• SQL Server Compact 3.5– Royalty-free redist

Page 16: Mobile Devolpment Slides

Windows Mobile 6 SDK Emulator Images

Page 17: Mobile Devolpment Slides
Page 18: Mobile Devolpment Slides

Cellular Emulator and Hopper

• Cellular Emulator allows you to– Target both voice and data connectivity

scenarios.– Explore different wireless network conditions in

GSM/GPRS and UMTS networks.

• Hopper Test Tool– Stresses all applications available through menu

with random keystrokes, or only your application.

Page 19: Mobile Devolpment Slides

GPS Support

• Fake GPS: an NMEA .txt file simulates the movement of the device in space. – Configure it to test location-targeted functions.– Dixies.txt– Fakegpsdata.txt

• Note that for Windows Mobile Standard, you can configure GPS using the SDK’s GPSSettings.exe program – Professional and Classic have this utility built in.

Page 20: Mobile Devolpment Slides

Data Access Technologies Summary

ADO.NET provides general retrieval, update, and management of data. On– Windows Mobile, ADO.NET includes providers for Microsoft® SQL Server®, and Microsoft®– SQL Server® Compact Edition.

ADO.NET Sync Services. ADO.NET Sync Services is a provider included in the Microsoft Sync

– Framework synchronization for ADO.NET-enabled databases. It enables data synchronization to be built in occasionally connected applications. It periodically gathers information from the client database and synchronizes it with the server database.

Language-Integrated Query (LINQ). LINQ provides class libraries that extend C# and

– Microsoft Visual Basic® with native language syntax for queries. Queries can be performed against a variety of data formats, including DataSet (LINQ to DataSet), XML (LINQ to XML), in-memory objects (LINQ to Objects),.Understand that LINQ is primarily a query technology supported by different assemblies throughout the .NET Framework. For example, LINQ to Entities/ LINQ TO SQL is included with the ADO.NET Entity Framework assemblies; LINQ to XML is included with the System.Xml assemblies; and LINQ to Objects is included with the .NET core system assemblies.

Page 21: Mobile Devolpment Slides

DAL Best Practices

• ADO.NET– Are on a mobile device and want to access data through SQL Server Compact Edition.– Need to use low-level APIs for full control over data access in your application.– Are building an application that needs to support a disconnected data-access experience.

• ADO.NET Sync Services– Consider using ADO.NET Sync Services if you:– Need to build an application that supports occasionally connected scenarios.– Need collaboration between databases.– Are using Windows Mobile and want to sync with a central database server.

• LINQ to DataSets– Want to execute queries against a Dataset, including queries that join tables.– Want to use a common query language instead of writing iterative code.

• LINQ to Objects– • Need to execute queries against a collection.– • Want to execute queries against file directories.– • Want to execute queries against in-memory objects using the LINQ syntax.

• LINQ to XML– • Are using XML data in your application.– • Want to execute queries against XML data using the LINQ syntax.

Page 22: Mobile Devolpment Slides

.Net Tips

• Remember to install Mobile Center (or ActiveSync)

and Virtual PC– You don’t need them to deploy projects– But you do need them for internet connectivity

• When you create a new Smart Device project, ignore the dropdown above the templates frame that lets you choose a target framework version.

• You can always choose another mobile device template by changing the Form Factor property.

Page 23: Mobile Devolpment Slides

Vista Issues

• Do NOT install ActiveSync.– You need Windows Mobile Device Center for device

synchronization.

• Install Visual Studio 2008 SP1.• If the SDK samples do not build, copy them to a

different location.

Page 24: Mobile Devolpment Slides

ASP.NET for Mobile

Page 25: Mobile Devolpment Slides

Bad Designs For Touch

Page 26: Mobile Devolpment Slides

Good Designs For Touch

Page 27: Mobile Devolpment Slides

My Space Redesigned For Touch

Page 28: Mobile Devolpment Slides

Internet Explorer 6 Mobile

• Jscript v5.7, ported from Internet Explorer 8 for the desktop. – Much better support for AJAX applications.

• Improved fidelity, text wrap, touch-and-gesture pan support– WML, Adobe Flash Lite 3.1 for Flash applications.

• Easy switch between Mobile and Desktop modes– Both can be targeted with User Agent strings.

Page 29: Mobile Devolpment Slides
Page 30: Mobile Devolpment Slides

Request Header

• Mobile Mode says...– User-Agenet: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 8.12; MSIEMobile 6.0)

• Used to say...– User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile 7.11)

• Desktop Mode says...– User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)

(Same as Internet Explorer 6 for PC.)

Page 31: Mobile Devolpment Slides

Coding Best Practices

• Use separate HTML, CSS, and JScript files.• Load JScript at the end of the page that’s not

needed for layout.• Do not ask the browser to resize via <img>.• Streaming video should not be larger than the

screen resolution.• Choose the right bit rate

– EDGE and 3G networks.

Page 32: Mobile Devolpment Slides

New Offerings Here Today

• My Phone - a backup and storage service for your phone.

• Recite Tag - a note taking and search application for Windows Mobile phones

• Mesh For Mobile – almost• Tag – 2d color bar code• Live Sync

Page 33: Mobile Devolpment Slides

Windows Mobile 7

• Windows 7– A Focus On Touch...– ... And Gestures– A New Media

Interface

Page 34: Mobile Devolpment Slides

Final Thoughts

• Writing apps for your phone is fun!• Writing mobile web pages is challenging but well worth

it..

Page 35: Mobile Devolpment Slides

Contact Information

• @- [email protected]• Blog - blog.geoffreyemery.com

Page 36: Mobile Devolpment Slides

Last Fun

Cap.flv

Page 37: Mobile Devolpment Slides

What You Need

• Visual Studio 2008 Professional SP1– Alternative: Visual Studio 2005 SP1.

• Windows Vista – Windows XP SP2, Windows Server 2003, or Windows

Server 2008 will also work.

• Windows Mobile Device Center for Vista– ActiveSync 4.5 for Windows XP or Windows Server 2003

Page 38: Mobile Devolpment Slides

What You Need (cont.)

• Two separate Windows Mobile 6 SDKs– Windows Mobile 6 Standard SDK for smartphones– Windows Mobile 6 Professional SDK for all Pocket

PCs

• Windows Mobile 6.1.4 Device Emulator Images

Page 39: Mobile Devolpment Slides

Install and Configuration

• Install Visual Studio 2008 SP1 First.– Be sure to include support for Mobile Development– And SQL Compact

• Then Windows Mobile 6 Refresh.• Finally, the new 6.1.4 Emulators• You’ll need to install Virtual PC 2007 for

networking support– Even within a virtual image– Don’t forget to set the connection type as DMA instead of

Bluetooth