Cool New APIs And Controls In Windows Mobile 5 Marcus Perryman Microsoft

download Cool New APIs And Controls In Windows Mobile 5 Marcus Perryman Microsoft

If you can't read please download the document

description

Agenda Using Visual Studio 2005 for managed code development Migration Tools and debugging Compact Framework 2 New Managed class libraries: Contact picker Camera control Sending Mail

Transcript of Cool New APIs And Controls In Windows Mobile 5 Marcus Perryman Microsoft

Cool New APIs And Controls In Windows Mobile 5 Marcus Perryman Microsoft e.g. Whats new in Windows Mobile 5 (and CF 2.0) for managed code developers Marcus Perryman Microsoft PART 1 Agenda Using Visual Studio 2005 for managed code development Migration Tools and debugging Compact Framework 2 New Managed class libraries: Contact picker Camera control Sending Mail Visual Studio 2003 Features In our first version toolset we have Visual Basic and C# Project types Application Class Library Cross-language debugging Forms Designer X86-based emulator SQLCE 2.0 for PPC Build CAB for PPC Customer Feedback Visual Studio 2003 was a great start, but we need more Better emulator Forms Designer improvements Custom Controls support Data Designer support Customized CAB creation App/CAB Signing COM Interop Remote tools Accurate Intellisense NetCF V1 Project Support Porting from VS 2003 SDK Extensibility Upgrading Apps, Design-Time and The Device Emulator Compatibility Applications written using prior versions of the.NET Compact Framework just work on new versions Goal is full backward compatibility New versions of.NET Compact Framework run on previous versions of Windows CE and Windows Mobile Windows Mobile support policy: n-2 Windows CE support policy: n-1 Supported Devices V1V2 PocketPC 2000 PocletPC 2002 PocketPC 2003, SE SmartPhone 2003 WinCE 4.1 WinCE 4.2 WinCE 5.0 Pocket PC 2003 SE Pocket PC 2005 Smart Phone 2005 WinCE 5.0 Release Roadmap Pocket PC Smartphone PPC 2002 SP 2002 WM 2003 WM 2003 SE WM 5.0 Visual Studio Visual Studio 2003 Visual Studio 2005 Windows CE NET Compact Framework Size Size Portability Portability Compatibility Compatibility (redist) 1.0 SP1 Smartphone Smartphone 1.0 SP2 Perf update Perf update Landscape Landscape Autoscroll Autoscroll Bug fixes Bug fixes 2.0 Generics Generics COM interop COM interop Controls Controls MD3DM MD3DM Performance Performance (redist) 1.0 SP3 Bug fixes Bug fixes Release Vehicles OEMs Adaptation Kits (and AKUs) Platform Builder (and PB Updates) Developers Microsoft Visual Studio (and SPs) Developer Redistributable on microsoft.com.NET Developer Platform SDK (New!) End Users In ROM on their device In the setup of their applications End User Redistributable on microsoft.com V2 Drivers Customer feedback New devices New operating system features New.NET features Continuous improvement Improvements In V2 Language & Tools GUI Class Libraries Native Code Interop SecurityPerformance While maintaining application compatibility Generics Classes and methods that work similarly on values of different types Variables are specific types, not objects No casting required Benefits Re-use common code Find bugs at compile time class Stack { private T[] store; private int size; public Stack() { store = new T[10]; size = 0; } public void Push(T x) { // push code goes here } public T Pop() { return store[--size]; } } void Add(Stack s) { int x = s.Pop(); int y = s.Pop(); s.Push(x+y); } More New C# Language Features Anonymous Methods Code blocks encapsulated in a delegate // in constructor button.Click += new EventHandler(sender,args) { // increment a counter or other action }; // in constructor button.Click += new EventHandler(ProcessClick); // separate method void ProcessClick(object sender,EventArgs e) { // increment a counter or other action } Before After public partial class Foo { public void CodeGenFunc() { // emitted by tool } } public partial class Foo { public void UserFunc() { // user code } } Foo-Part1.cs Foo-Part2.cs Partial Types Split definitions for types and class members across multiple files C# compiler combines all definitions to make a single class VB.NET Easiest and most productive way to develop.NET applications.NET Compact Framework continues to support VB.NET New support for a subset of VB.NET My namespace My.ResourcesMy.WebServicesMy.Forms More Controls MonthCalendarLinkLabelHelpWebBrowserDataContainer New on Smartphone Datagrid Textbox IME switching Enable multiple menu items on left softkey UserControl Easily build and reuse your own custom controls Well integrated into design time experience Forms And Drawing More Keyboard Support EventsForm.KeyPreviewTabs Clipboard support Drawing Bitmaps (including save as) Rotatable fonts Custom Pens Control.Handle retrieve window handle Lots of additional properties, methods, events HP4300 Integrated keyboards Rotated text using LOGFONT Displays And Layout Support for new and future devices Orientation Support ChangeOrientation method Docking and Anchoring AutoScroll property forms, panels Suspend/Resume Layout methods Resolution Support Automatic scaling Graphics DpiX/DpiY Managed D3D Mobile Included in WinCE 5.0 and future versions of Windows Mobile Native API is DX8 inspired Managed APIs are DX9 inspired Features Complete access to the underlying native D3DM API Fixed point support (Vertex Data, Matrices, Lights, and Materials) SpriteFontMeshTextureLoader Tutorials and Samples Native Code Interop Enhancements Enhanced P/Invoke Type Marshalling Marshal delegates as function pointers Additional types arrays, strings, structures Embedded arrays structs with char[], array[] MarshalAs type hinting Use COM objects in your managed code RCW support enables calling from managed applications into COM objects CCW support enables callbacks from native to managed code Support for late-bound and early-bound calls (IDispatch & vtable) Integrated into Visual Studio shell cool!! Integrated into Visual Studio shell cool!! Subset of the InteropServices namespace Cannot activate managed objects through COM (regasm) Multi-threaded apartments (MTA) only No custom marshalers or auto-generated Class Interfaces Base Class Libs, Networking, Web Services Serial Port Four ports Supported in the emulator IPv6 Generic-based collections classes Leverage the power of new Generics language feature Web services Faster XmlSerializer Support for SOAP 1.2 System.Messaging (MSMQ) Use for bi-directional communications over intermittent (unreliable) connections Server Application Data transferred when connection available. Device application does not need to be running. Operating System Message Queue.NET Compact FrameworkApplication SmartDevice Note: Can be used for Inter-Process communications also Security Managed apps have identical security experience as native apps Mobile Operators can restrict app install/start to signed apps only Operators can control cert chain of trust, and/or rely on Mobile2Market Malicious applications can be revoked if device is restricted Security features added: V1 V1 SP1 V2 Permissions Integration with WM load- time infrastructure for run/no-run decision Cryptography Certificates Certificates ASN1/X.509 ASN1/X.509Hashing MD5, SHA1 MD5, SHA1 Symmetric key encryption RC2, RC4, 3DES, DES RC2, RC4, 3DES, DES Asymmetric key encryption RSA, DSA RSA, DSA Network Protocols Authentication Authentication Digest Digest HTTPS (Server auth only) HTTPS (Server auth only) Authentication Authentication Negotiate Negotiate NTLM NTLM Kerberos Kerberos Performance Improvements Since V1 Pocket PC 2003, XScale 400MHz V1 V1 SP2 V2Beta1V2Beta2+ Method Calls ( Calls/sec) 3.7M7.1M8.1M Virtual Calls ( Calls/sec) 2.4M2.7M5.6M Simple P/Invoke ( Calls/sec) 733K1.7M Primes (to 1500) (iterations/sec) GC Small (8 bytes) (Bytes/sec) 1M7M7.5M GC Array (100 ints) ( Bytes/sec) 25M43M112M XML Text Reader 200KB (seconds) DataSet (static data) 4 tables, 1000 records (seconds) DataSet (ReadXml) 3 tables, 100 records (seconds) Bigger is better Smaller is better Data Performance Using Some of the new Windows Mobile 5 APIs Application Spec: Capture an image Allow the user to pick recipient from contacts list Enter a message body Send an Exchange mail Cool APIs V.Next Plans Maintain binary compatibility with prior versions Maintain compatibility with full.NET Framework Additional Scalability and Performance SecurityTools Performance analysis Profiling tools WinFX Consistency with Longhorn Rich XAML-based UI markup (Avalon) Writing applications for intermittent connectivity Better configuration & deployment NETCF V2 Delivers next generation features and productivity enhancers Retains compatibility with V1 and the full.NET Framework Can support industrial strength applications Is Customer Driven were listening Tools & Resources msdn.microsoft.com/ embedded microsoft.public. windowsxp.embedded windowsce.platbuilder windowsce.platbuilder windowsce.embedded.vc windowsce.embedded.vc blogs.msdn.com/ mikehall Windows CE 5.0 Eval Kit Windows XP Embedded Eval Kit msdn.microsoft.com/ mobility microsoft.public. pocketpc.developer smartphone.developer dotnet.framework.compactframework blogs.msdn.com/ windowsmobile vsdteam netcfteam Windows Mobile 5.0 Eval Kit Websites Newsgroups Blogs Tools Build Develop 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.