Upload
arline-smith
View
213
Download
0
Tags:
Embed Size (px)
Citation preview
Visual Studio.NET Visual Studio.NET and .NET Compact and .NET Compact Framework Application Framework Application DevelopmentDevelopment
Mike D. SmithMike D. SmithGroup Program ManagerGroup Program ManagerDeveloper DivisionDeveloper Division
Microsoft CorporationMicrosoft Corporation
AgendaAgenda
Design GoalsDesign Goals Profiles and ExtensionsProfiles and Extensions Class Library ArchitectureClass Library Architecture
Base Class LibrariesBase Class Libraries Networking and Web ServicesNetworking and Web Services
Creating a simple Web ServiceCreating a simple Web Service
Design GoalsDesign Goals CompatibilityCompatibility
Strict compatibility with .NET FrameworkStrict compatibility with .NET Framework Subset functionalitySubset functionality
AppropriatenessAppropriateness Give the developer a known targetGive the developer a known target
Minimize arbitrary divisionMinimize arbitrary division Balance cross device with device specificBalance cross device with device specific
Size / FunctionalitySize / Functionality Support for InnovationSupport for Innovation
Feature set evolutionFeature set evolution Device differentiationDevice differentiation
SecuritySecurity StandardizationStandardization
Library GroupingsLibrary Groupings
Core ProfileCore Profile
PlatformPlatformExtensionExtension
Libraries are grouped in two ways…Libraries are grouped in two ways… Platform ExtensionsPlatform Extensions Core ProfilesCore Profiles
Two Ways to Target .NET CFTwo Ways to Target .NET CF
Core ProfileCore Profile
PlatformPlatformExtensionExtension
Your Your AppApp
Core ProfilesCore Profiles
Coherent collection of class libraries Coherent collection of class libraries and underlying EE supportand underlying EE support
Offered for any device, OS, CPUOffered for any device, OS, CPU By MicrosoftBy Microsoft By Implementers from standards specsBy Implementers from standards specs
Basic foundation / reference starting Basic foundation / reference starting point for building devicespoint for building devices
Enables broad range of scenarios and Enables broad range of scenarios and VS Project typesVS Project types
““Broadest Reach / Lowest-Common Broadest Reach / Lowest-Common Denominator” platform target for appsDenominator” platform target for apps
PlatformPlatformExtensionsExtensions
Core ProfilesCore Profiles
Core ProfilesCore Profiles Kernel ProfileKernel Profile
Minimal language supportMinimal language support
Compact ProfileCompact Profile Foundation profile for all connected Foundation profile for all connected
devicesdevices
Others to comeOthers to come TVTV AutomotiveAutomotive ……
Core ProfilesCore Profiles
PlatformPlatformExtensionsExtensions
Platform ExtensionsPlatform Extensions
Coherent collection of class libraries Coherent collection of class libraries Vendor and/or Device-specificVendor and/or Device-specific Relies on one or more Core ProfilesRelies on one or more Core Profiles Value-add building block for devices Value-add building block for devices
(added atop Profiles)(added atop Profiles) Enables more specialized range of Enables more specialized range of
scenarios and VS Project typesscenarios and VS Project types ““Targeted Reach / Deep Integration” Targeted Reach / Deep Integration”
platform target for appsplatform target for apps
Core ProfilesCore Profiles
PlatformPlatformExtensionsExtensions
Class Library OrganizationClass Library Organization
Namespace scoping mechanismNamespace scoping mechanism
System.IO.FileStream.Open()System.IO.FileStream.Open()
Profiles – System namespace onlyProfiles – System namespace only Extensions – Vendor namespaceExtensions – Vendor namespace
NamespaceNamespace ClassClass MethodMethod
Details: the Compact ProfileDetails: the Compact Profile
Core ProfilesCore Profiles
PlatformPlatformExtensionsExtensions
Compact ProfileCompact Profile
ContentsContents Minimal set of classes for device scenariosMinimal set of classes for device scenarios Support for .NET CF execution engineSupport for .NET CF execution engine
Effective functionality for resource- Effective functionality for resource- constrained devicesconstrained devices
Appropriate subset of .NET Framework Appropriate subset of .NET Framework System classesSystem classes
Class Library ArchitectureClass Library Architecture
Host operating system
PAL
Execution Engine
Compact Profile Class Libraries
Vendor Extensions Application
Native Code
Managed Code
Application
System
System.Data System.Xml
System.Web
Globalization
Text
Security
Collections
Resources
Reflection
Net
IO
Threading
Diagnostics
ServiceProcess
Configuration
Design
ADO
SQLTypes
SQL
XPath
XSLT
RuntimeInteropServices
Remoting
Serialization
Serialization
Configuration SessionState
Caching Security
ServicesDescription
Discovery
Protocols
UIHtmlControls
WebControls
System.Drawing
Imaging
Drawing2D
Text
Printing
System.WinForms
Design ComponentModel
.NET Framework Namespace.NET Framework Namespace
Reader/Writers
Base Data TypesBase Data Types Signed and unsigned 8, 16, 32, and 64 bit Signed and unsigned 8, 16, 32, and 64 bit
integersintegers System.Int16, System.UInt32,…System.Int16, System.UInt32,…
Optional floating pointOptional floating point Included in richer profiles, used appropriatelyIncluded in richer profiles, used appropriately
StringsStrings System.String, System.Text.StringBuilderSystem.String, System.Text.StringBuilder
ArraysArrays System.ArraySystem.Array
Additional value types supportedAdditional value types supported System.DateTimeSystem.DateTime System.TimeSpanSystem.TimeSpan System.URISystem.URI ……
Input / OutputInput / Output Stream based I/O modelStream based I/O model
Synchronous and AsynchronousSynchronous and Asynchronous <stream>.Read(), …, <stream>.BeginRead(), …<stream>.Read(), …, <stream>.BeginRead(), …
Included StreamsIncluded Streams Files Files (System.IO.FileStream, …)(System.IO.FileStream, …) Memory Memory (System.IO.MemoryStream, …)(System.IO.MemoryStream, …) Network Network (System.Net.NetworkStream, …)(System.Net.NetworkStream, …)
Readers and WritersReaders and Writers High level stream processingHigh level stream processing Multiple / complex formatsMultiple / complex formats
Helper classesHelper classes Regular ExpressionsRegular Expressions
System.Text.RegularExpressions, …System.Text.RegularExpressions, …
CollectionsCollections
Mutable ArraysMutable Arrays System.ArrayListSystem.ArrayList
Key-value pair data structuresKey-value pair data structures System.HashtableSystem.Hashtable
All collections may be made strongly typed All collections may be made strongly typed by following a well defined design patternby following a well defined design pattern
GlobalizationGlobalization Unicode implementation throughoutUnicode implementation throughout CultureCulture
Globally selectable at runtimeGlobally selectable at runtime System.Globalization.CultureInfoSystem.Globalization.CultureInfo
String based resources for simple localizationString based resources for simple localization System.ResourcesSystem.Resources
Support forSupport for Retrieving Unicode information about a characterRetrieving Unicode information about a character
System.Globalization.CharacterInfo.*System.Globalization.CharacterInfo.*
Sorting strings based on specified cultureSorting strings based on specified culture Formatting of dates, currency and other data typesFormatting of dates, currency and other data types
Determined by current cultureDetermined by current culture Overridable by System.Globalization.DateTimeFormatInfoOverridable by System.Globalization.DateTimeFormatInfo
NetworkingNetworking Socket level support has full parity with .NET Socket level support has full parity with .NET
FrameworkFramework Multi-protocol socketsMulti-protocol sockets HTTP client & serverHTTP client & server Web services clientWeb services client Connection managementConnection management
High level Request / Response modelHigh level Request / Response model System.Net.{WebRequest,WebResponse} System.Net.{WebRequest,WebResponse}
SSLSSL Secure code download supportSecure code download support
ReflectionReflection
Convenient access to class/method Convenient access to class/method meta-datameta-data System.Reflection.*System.Reflection.*
Allows for late-binding and activationAllows for late-binding and activation
SecuritySecurity
Permission classesPermission classes Control access to system resourcesControl access to system resources
File SystemFile System NetworkNetwork Other resourcesOther resources
Method level granularityMethod level granularity
Configurable PolicyConfigurable Policy
XMLXML
Includes pull model XML parserIncludes pull model XML parser Easy but powerful XML accessEasy but powerful XML access
System.XML.XMLTextReaderSystem.XML.XMLTextReader System.XML.XMLTextWriterSystem.XML.XMLTextWriter
Web ServicesWeb Services
Supports web services as defined by .NET Supports web services as defined by .NET FrameworkFramework
Remote stateless method calls with SOAP Remote stateless method calls with SOAP formatted XML over HTTPformatted XML over HTTP
Allows for rich object based interoperability Allows for rich object based interoperability between all .NET platforms and SOAP between all .NET platforms and SOAP compliant environmentscompliant environments
Seamless to useSeamless to use Uses client proxy code generated by Visual Uses client proxy code generated by Visual
Studio.NETStudio.NET
Based on open standardsBased on open standards
Language access to LibrariesLanguage access to Libraries
The .NET Platform is Language NeutralThe .NET Platform is Language Neutral All .NET languages are first class playersAll .NET languages are first class players Leverage your existing skills and codeLeverage your existing skills and code Access largest community of developersAccess largest community of developers
API access exampleAPI access example [Generic] public virtual Int32 Read(Char[] buffer, Int32 index, Int32 count) [Generic] public virtual Int32 Read(Char[] buffer, Int32 index, Int32 count) [C#] public virtual int Read(Char[] buffer, int index, int count);[C#] public virtual int Read(Char[] buffer, int index, int count); [VB] Public Overridable Function Read(ByVal buffer() As char, ByVal index As [VB] Public Overridable Function Read(ByVal buffer() As char, ByVal index As
Char, ByVal count as Char) As IntegerChar, ByVal count as Char) As Integer [ECMAScript] public override function Read(buffer : char[], index : int, count : [ECMAScript] public override function Read(buffer : char[], index : int, count :
int) : intint) : int [Managed C] …[Managed C] … [COBOL] …[COBOL] …
DemoDemo
Multiple languages (VB, C#)Multiple languages (VB, C#) Regular Expression handlingRegular Expression handling Simple web service accessSimple web service access System.Net.HTTPWebRequestSystem.Net.HTTPWebRequest Easy Deployment to the deviceEasy Deployment to the device
Details: Platform ExtensionsDetails: Platform Extensions
Core ProfilesCore Profiles
PlatformPlatformExtensionsExtensions
Platform Extension ExamplesPlatform Extension Examples
OS-specific or Device/Model-specificOS-specific or Device/Model-specific .NET Extensions for MyCompany OS.NET Extensions for MyCompany OS .NET Extensions for MyCompany Device.NET Extensions for MyCompany Device
Tradeoffs to consider:Tradeoffs to consider: Pro: Increased depth of integrationPro: Increased depth of integration Pro: Increased amount of specializationPro: Increased amount of specialization Con: Reduced reach for appsCon: Reduced reach for apps Con: Reduce reach for DevelopersCon: Reduce reach for Developers
SummarySummary
Class library design goalsClass library design goals Developer and Tool Oriented ViewDeveloper and Tool Oriented View Profiles and ExtensionsProfiles and Extensions Compact Profile overviewCompact Profile overview
Class library detailsClass library details Web services & demonstrationsWeb services & demonstrations
Platform Extension examplesPlatform Extension examples