Title: .NET Compact Framework - Overview
1??????? ??????? iFD Engineering
GmbH tihomir_ignatov_at_ifd-sofia.com
?????? ????????Omegasoft Ltdr.trifonov_at_omegasoft
.bgxman892.blogspot.com
2??????????
- ?????????
- ?????? ???????
- SQL Server 2005 Mobile Edition
- ????
- QA
3- ????? ?
- .NET Compact Framework?
4??? ?? .NET Compact Framework
- ????? ?????????? ?? ?????????? ?? ??????? ?-??
- ??????????? ?? ????
- C ? VB.NET
- ?????????? ? Visual Studio compile, debug
- Retargeting - ???? ??????? compact namespace
5??????
- .NET Compact Framework 1.0
- .NET Compact Framework 2.0
6.NET CF ?????????? ??????????
- Pocket PC 2000
- Pocket PC 2002
- Windows Mobile 2003
- Windows Mobile 2003 SE
- Windows Mobile based smart phones
- Windows CE 4.1
- Windows CE 4.2
- Windows CE 5.0
7Windows CE Embedded OS
Mobile devices
Gambling Machines
Digital Video Recorders, Media Devices, Appliances
Industrial Automation
8?????? ???????
.NET Compact Framework
Applications
App Domain Host
Execution Engine (MSCOREE.DLL)
9??????????
- ?????????????? ?? ????? ?? ?????????? ?? ????
- ??????????? ??????
- Garbage Collection
- JIT ??????????
- Exceptions
- Common type system
10?????? ??????
- ??????? ??????
- ?????????? ??????
- ??????
- ????????
- ?????? ??? ?????????
- Exceptions
11??? ??????????????
- Generics
- Partial classes
- Threading
- GUI Designer
12??? ??????????????
- Platform Invoke
- COM Interoperability
- IPv6 support
- Cryptographic support
- Reflection
13???????????? API
- Direct3D and DirectDraw
- Pocket Outlook
- Telephony
- Location Services
- Messaging
14?????? ? ?????
- ?????? ? ?????????? ?????
- XML Web Services
- ADO.NET
- Networking
- ?????? ? ??????? ?????
- Xml, DataSet
- SQL CE ? ADO.NET
- ?????????????? ?? ?????
- COM Interoperability
15?????? ? ????? Xml Web Services
- ????????? ?? Web Services
- SOAP 1.2
- ????????? ? ?????????? ??????????
- ????????????
- Basic, Digest, NTLM, Negotiate
- ????????? ?? SSL
- Custom SOAP headers
- SOAP Extension Framework
16?????? ? ?????
- ?????? ? ?????????? ?????
- XML Web Services
- ADO.NET
- Networking
- ?????? ? ??????? ?????
- Xml, DataSet
- SQL CE ? ADO.NET
- ?????????????? ?? ?????
- COM Interoperability
17?????? ? ????? ADO.NET
- DataSet
- ????????? ADO.NET Provider ?????
- Supported Providers
- SQL Server (System.Data.SqlClient)
- SQL Server CE(System.Data.SqlServerCE)
18?????? ? ?????
- ?????? ? ?????????? ?????
- XML Web Services
- ADO.NET
- Networking
- ?????? ? ??????? ?????
- Xml, DataSet
- SQL CE ? ADO.NET
- ?????????????? ?? ?????
- COM Interoperability
19?????? ? ?????
- Sockets
- ????????? ? ??????????
- ?????????
- Streams
- ????????? ?
- ??????????
- HTTP
- Request, Response
- classes
- Stream based model
Applications
.NET Compact Framework
Web Services
HTTP Request/Response, Network Stream
Sockets
Common Language Runtime
20?????? ? ?????
- ?????? ? ?????????? ?????
- XML Web Services
- ADO.NET
- Networking
- ?????? ? ??????? ?????
- Xml, DataSet
- SQL CE ? ADO.NET
- ?????????????? ?? ?????
- COM Interoperability
21?????? ? ????? XML
- Document Object Model (DOM)
- XmlDocument
- Simple API for XML (SAX)
- XmlTextReader, XmlTextWriter
- XPath support
- Xml validation
- Xml Serialization
22?????? ? ?????
- ?????? ? ?????????? ?????
- XML Web Services
- ADO.NET
- Networking
- ?????? ? ??????? ?????
- Xml, DataSet
- SQL CE ? ADO.NET
- ?????????????? ?? ?????
- COM Interoperability
23?????? ? ????? ??????????????
- Active Sync
- Remote Data Access RDA
- Merge Replication
24Deployment
- Active Sync
- CAB ???????
- Microsoft Systems Management Server (SMS)
25SQL Server 2005 Mobile
- ?????????? ???? ?????, ???????? ?? ????????????
- ?????? ???? ????? ? ???? ????
- ???????????
- SQLCE Query
- SQL Server Management Studio
- Visual Studio 2005
- ??????????? ??????, ACID ??????????
- Cost-based optimization/statistics
- Execution plan and query hints
- ????????????? ? SQL Server 2000/2005
26??????????? ?? ??????????
- Visual Studio .NET 2003/2005
- Windows Mobile Developer Power Toys
- Emulator ActiveSync Connection Tool ?????????
?????????? ?? ?????? ????? ????????? ? ActiveSync - ActiveSync Remote Display ??????? ?????? ??
???????????? ????? ??????? ???????? ??? ????? ??
???????????? ?? ???????????? - CECopy Command-line ?????????? ?? ???????? ??
??????? ?/? ???????????? ???? ActiveSync
27Demo Xml Web Services
- Synchronous invocation
- Asynchronous invocation
28Demo Sync Web Service
- Cursor.Current Cursors.WaitCursor
- CfDemo.Service1 srv1
- new WsDemo.CfDemo.Service1()
- time srv1.GetServerTime()
- this.Invoke(new EventHandler(ShowTime))
- Cursor.Current Cursors.Default
29Demo Async Web Service
- // start async xml web services request
- CfDemo.Service1 srv1 new WsDemo.CfDemo.Service1(
) - AsyncCallback ac newAsyncCallback(Callback)
- srv1.BeginGetServerTime(ac, srv1)
- // complete async xml web services request
- private void Callback(IAsyncResult ar)
-
- CfDemo.Service1 srv (CfDemo.Service1)ar.Asyn
cState - time srv.EndGetServerTime(ar)
- this.Invoke(new EventHandler(ShowTime))
30Demo Xml
- Xml Parsing
- Xml Deserialization
31Demo Xml
Rendered content
Xml content
lt?xml version"1.0" encoding"utf-8"
?gt ltstudentsgt ltstudentgt ltnamesgt?????
?????lt/namesgt ltagegt25lt/agegt lt/studentgt
ltstudentgt ltnamesgt???? ??????lt/namesgt
ltagegt21lt/agegt ...
Xml Processing
32Demo Xml
- lt?xml version"1.0" encoding"utf-8" ?gt
- ltstudentsgt
- ltstudentgt
- ltnamesgt????? ?????lt/namesgt
- ltagegt25lt/agegt
- lt/studentgt
- ltstudentgt
- ltnamesgt???? ??????lt/namesgt
- ltagegt21lt/agegt
33Demo Xml parsing(1)
- 1. // prepare xml parsing settings
- XmlReaderSettings xmlSettings new
- XmlReaderSettings()
- xmlSettings.IgnoreComments true
- xmlSettings.IgnoreProcessingInstructions true
- xmlSettings.IgnoreWhitespace true
- xmlSettings.CloseInput true
- // create OPTIMIZED reader
- XmlReader reader XmlTextReader.Create(
File.OpenRead(xmlPath), xmlSettings)
34Demo Xml parsing(2)
- while ( reader.Read() )
-
- if (reader.Name "student"
reader.IsStartElement() ) -
- student new Student()
-
- else
- if (reader.Name "names"
reader.IsStartElement() student ! null) -
- student.Names reader.ReadInnerXml()
- More
35Demo Xml parsing(3)
- else
- if (reader.Name "age" reader.IsStartElement(
) student ! null) -
- Student.Age Int32.Parse(reader.ReadInnerXml(),
CultureInfo.InvariantCulture) -
- else
- if (reader.Name "student"
!reader.IsStartElement()) - students.Add(student)
-
36Demo Xml parsing(4)
- ListBox lbStudents
-
- ListltStudentgt students new ListltStudentgt()
- // xml parsing
-
- lbStudents.DataSource students
37Demo Xml Deserialization
- // create serializer instance
- XmlSerializer serializer new XmlSerializer(
typeof(ListltStudentgt) , new XmlRootAttribute("s
tudents") ) - // perform deserialization
- lbStudents.DataSource serializer.Deserialize(
File.OpenRead(xmlPath) )
38???????
- Mobile Developer Centermsdn.microsoft.com/mobilit
y - OpenNETCF.orgwww.opennetcf.org
- .NET Compact Framework Teamblogs.msdn.com/netcfte
am - Newsgroupsmicrosoft.public.dotnet.framework.compa
ctframework - Ruslan Trifonovs blog
- xman892.blogspot.com
39tihomir_ignatov_at_ifd-sofia.com r.trifonov_at_omegasof
t.bg