Visual Studio NET and NET Compact Framework Application

  • Slides: 29
Download presentation

Visual Studio. NET and. NET Compact Framework Application Development Mike D. Smith Group Program

Visual Studio. NET and. NET Compact Framework Application Development Mike D. Smith Group Program Manager Developer Division Microsoft Corporation

Agenda v v v Design Goals Profiles and Extensions Class Library Architecture u u

Agenda v v v Design Goals Profiles and Extensions Class Library Architecture u u v Base Class Libraries Networking and Web Services Creating a simple Web Service

Design Goals v Compatibility u u v Strict compatibility with. NET Framework Subset functionality

Design Goals v Compatibility u u v Strict compatibility with. NET Framework Subset functionality Appropriateness u Give the developer a known target w w u v Size / Functionality Support for Innovation u v Minimize arbitrary division Balance cross device with device specific Feature set evolution Device differentiation Security Standardization

Library Groupings v Libraries are grouped in two ways… u u Platform Extensions Core

Library Groupings v Libraries are grouped in two ways… u u Platform Extensions Core Profiles Platform Extension Core Profile

Two Ways to Target. NET CF Your App Platform Extension Core Profile

Two Ways to Target. NET CF Your App Platform Extension Core Profile

Core Profiles Platform Extensions Core Profiles v v Coherent collection of class libraries and

Core Profiles Platform Extensions Core Profiles v v Coherent collection of class libraries and underlying EE support Offered for any device, OS, CPU u u v v v By Microsoft By Implementers from standards specs Basic foundation / reference starting point for building devices Enables broad range of scenarios and VS Project types “Broadest Reach / Lowest-Common Denominator” platform target for apps

Core Profiles v Kernel Profile u v Core Profiles Minimal language support Compact Profile

Core Profiles v Kernel Profile u v Core Profiles Minimal language support Compact Profile u v Platform Extensions Foundation profile for all connected devices Others to come u u u TV Automotive …

Platform Extensions Core Profiles v v v Coherent collection of class libraries Vendor and/or

Platform Extensions Core Profiles v v v Coherent collection of class libraries Vendor and/or Device-specific Relies on one or more Core Profiles Value-add building block for devices (added atop Profiles) Enables more specialized range of scenarios and VS Project types “Targeted Reach / Deep Integration” platform target for apps

Class Library Organization v Namespace scoping mechanism u System. IO. File. Stream. Open() Namespace

Class Library Organization v Namespace scoping mechanism u System. IO. File. Stream. Open() Namespace v v Class Method Profiles – System namespace only Extensions – Vendor namespace

Platform Extensions Core Profiles Details: the Compact Profile

Platform Extensions Core Profiles Details: the Compact Profile

Compact Profile v Contents u u v v Minimal set of classes for device

Compact Profile v Contents u u v v Minimal set of classes for device scenarios Support for. NET CF execution engine Effective functionality for resourceconstrained devices Appropriate subset of. NET Framework System classes

Class Library Architecture Application Vendor Extensions Application Compact Profile Class Libraries Execution Engine PAL

Class Library Architecture Application Vendor Extensions Application Compact Profile Class Libraries Execution Engine PAL Host operating system Managed Code Native Code

. NET Framework Namespace System. Web Services Description UI Html. Controls Discovery Web. Controls

. NET Framework Namespace System. Web Services Description UI Html. Controls Discovery Web. Controls System. Win. Forms Design Protocols Component. Model System. Drawing Caching Security Drawing 2 D Printing Configuration Session. State Imaging Text System. Data System. Xml ADO SQL XSLT Serialization Design SQLTypes XPath Reader/Writers System Collections IO Configuration Security Net Service. Process Runtime Interop. Services Text Reflection Diagnostics Remoting Globalization Resources Threading Serialization

Base Data Types v Signed and unsigned 8, 16, 32, and 64 bit integers

Base Data Types v Signed and unsigned 8, 16, 32, and 64 bit integers u v Optional floating point u v System. String, System. Text. String. Builder Arrays u v Included in richer profiles, used appropriately Strings u v System. Int 16, System. UInt 32, … System. Array Additional value types supported u u System. Date. Time System. Time. Span System. URI …

Input / Output v Stream based I/O model u Synchronous and Asynchronous w u

Input / Output v Stream based I/O model u Synchronous and Asynchronous w u Included Streams w w w u Files (System. IO. File. Stream, …) Memory (System. IO. Memory. Stream, …) Network (System. Network. Stream, …) Readers and Writers w w v <stream>. Read(), …, <stream>. Begin. Read(), … High level stream processing Multiple / complex formats Helper classes u Regular Expressions System. Text. Regular. Expressions, …

Collections v Mutable Arrays u v Key-value pair data structures u v System. Array.

Collections v Mutable Arrays u v Key-value pair data structures u v System. Array. List System. Hashtable All collections may be made strongly typed by following a well defined design pattern

Globalization v v Unicode implementation throughout Culture u u v String based resources for

Globalization v v Unicode implementation throughout Culture u u v String based resources for simple localization u v Globally selectable at runtime System. Globalization. Culture. Info System. Resources Support for u Retrieving Unicode information about a character w u u System. Globalization. Character. Info. * Sorting strings based on specified culture Formatting of dates, currency and other data types w w Determined by current culture Overridable by System. Globalization. Date. Time. Format. Info

Networking v Socket level support has full parity with. NET Framework u u v

Networking v Socket level support has full parity with. NET Framework u u v High level Request / Response model u v v Multi-protocol sockets HTTP client & server Web services client Connection management System. Net. {Web. Request, Web. Response} SSL Secure code download support

Reflection v Convenient access to class/method meta-data u v System. Reflection. * Allows for

Reflection v Convenient access to class/method meta-data u v System. Reflection. * Allows for late-binding and activation

Security v Permission classes u Control access to system resources w w w u

Security v Permission classes u Control access to system resources w w w u v File System Network Other resources Method level granularity Configurable Policy

XML v v Includes pull model XML parser Easy but powerful XML access u

XML v v Includes pull model XML parser Easy but powerful XML access u u System. XMLText. Reader System. XMLText. Writer

Web Services v v Supports web services as defined by. NET Framework Remote stateless

Web Services v v Supports web services as defined by. NET Framework Remote stateless method calls with SOAP formatted XML over HTTP Allows for rich object based interoperability between all. NET platforms and SOAP compliant environments Seamless to use u v Uses client proxy code generated by Visual Studio. NET Based on open standards

Language access to Libraries v The. NET Platform is Language Neutral u u u

Language access to Libraries v The. NET Platform is Language Neutral u u u v All. NET languages are first class players Leverage your existing skills and code Access largest community of developers API access example u u u [Generic] public virtual Int 32 Read(Char[] buffer, Int 32 index, Int 32 count) [C#] public virtual int Read(Char[] buffer, int index, int count); [VB] Public Overridable Function Read(By. Val buffer() As char, By. Val index As Char, By. Val count as Char) As Integer [ECMAScript] public override function Read(buffer : char[], index : int, count : int) : int [Managed C] … [COBOL] …

Demo v v v Multiple languages (VB, C#) Regular Expression handling Simple web service

Demo v v v Multiple languages (VB, C#) Regular Expression handling Simple web service access System. Net. HTTPWeb. Request Easy Deployment to the device

Platform Extensions Core Profiles Details: Platform Extensions

Platform Extensions Core Profiles Details: Platform Extensions

Platform Extension Examples v OS-specific or Device/Model-specific u u v . NET Extensions for

Platform Extension Examples v OS-specific or Device/Model-specific u u v . NET Extensions for My. Company OS. NET Extensions for My. Company Device Tradeoffs to consider: u u Pro: Increased depth of integration Pro: Increased amount of specialization Con: Reduced reach for apps Con: Reduce reach for Developers

Summary v v Class library design goals Developer and Tool Oriented View Profiles and

Summary v v Class library design goals Developer and Tool Oriented View Profiles and Extensions Compact Profile overview u u v Class library details Web services & demonstrations Platform Extension examples