.NET Compact Framework - Overview - PowerPoint PPT Presentation

About This Presentation
Title:

.NET Compact Framework - Overview

Description:

Cursor.Current = Cursors.WaitCursor; CfDemo.Service1 srv1 = new WsDemo.CfDemo.Service1 ... Cursor.Current = Cursors.Default; Demo Async Web Service ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 40
Provided by: tihomirign
Learn more at: https://www.devbg.org
Category:

less

Transcript and Presenter's Notes

Title: .NET Compact Framework - Overview


1
??????? ??????? iFD Engineering
GmbH tihomir_ignatov_at_ifd-sofia.com
?????? ????????Omegasoft Ltdr.trifonov_at_omegasoft
.bgxman892.blogspot.com
2
??????????
  1. ?????????
  2. ?????? ???????
  3. SQL Server 2005 Mobile Edition
  4. ????
  5. 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

7
Windows 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

24
Deployment
  • Active Sync
  • CAB ???????
  • Microsoft Systems Management Server (SMS)

25
SQL 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

27
Demo Xml Web Services
  • Synchronous invocation
  • Asynchronous invocation

28
Demo 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

29
Demo 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))

30
Demo Xml
  • Xml Parsing
  • Xml Deserialization

31
Demo 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
32
Demo 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

33
Demo 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)

34
Demo Xml parsing(2)
  1. while ( reader.Read() )
  2. if (reader.Name "student"
    reader.IsStartElement() )
  3. student new Student()
  4. else
  5. if (reader.Name "names"
    reader.IsStartElement() student ! null)
  6. student.Names reader.ReadInnerXml()
  7. More

35
Demo Xml parsing(3)
  1. else
  2. if (reader.Name "age" reader.IsStartElement(
    ) student ! null)
  3. Student.Age Int32.Parse(reader.ReadInnerXml(),
    CultureInfo.InvariantCulture)
  4. else
  5. if (reader.Name "student"
    !reader.IsStartElement())
  6. students.Add(student)

36
Demo Xml parsing(4)
  1. ListBox lbStudents
  2. ListltStudentgt students new ListltStudentgt()
  3. // xml parsing
  4. lbStudents.DataSource students

37
Demo Xml Deserialization
  1. // create serializer instance
  2. XmlSerializer serializer new XmlSerializer(
    typeof(ListltStudentgt) , new XmlRootAttribute("s
    tudents") )
  3. // perform deserialization
  4. 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

39
  • QA

tihomir_ignatov_at_ifd-sofia.com r.trifonov_at_omegasof
t.bg
Write a Comment
User Comments (0)
About PowerShow.com