1 / 39

Руслан Трифонов Omegasoft Ltd r.trifonov@omegasoft.bg xman892.blogspot

Тихомир Игнатов iFD Engineering GmbH tihomir_ignatov@ifd-sofia.com. Руслан Трифонов Omegasoft Ltd r.trifonov@omegasoft.bg xman892.blogspot.com. Съдържание. Въведение Поглед отвътре SQL Server 2005 Mobile Edition Демо Q&A. Какво е .NET Compact Framework?.

minty
Download Presentation

Руслан Трифонов Omegasoft Ltd r.trifonov@omegasoft.bg xman892.blogspot

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Тихомир Игнатов iFD Engineering GmbH tihomir_ignatov@ifd-sofia.com Руслан ТрифоновOmegasoft Ltdr.trifonov@omegasoft.bgxman892.blogspot.com

  2. Съдържание • Въведение • Поглед отвътре • SQL Server 2005 Mobile Edition • Демо • Q&A

  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. Retail, Banking, Ticketing, Lottery Image + Printing Devices Measurement Devices Medical Systems Windows CE – Embedded OS Mobile devices Gambling Machines Digital Video Recorders, Media Devices, Appliances Industrial Automation

  8. Platform Specific Class Libs Launch Base Class Libs Managed Native Platform Adaptation Layer Host Operating System Поглед отвътре .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 • SQLCE и 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 • SQLCE и 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 • SQLCE и 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 • SQLCE и 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 • SQLCE и ADO.NET • Синхронизиране на данни • COM Interoperability

  23. Работа с данни–синхронизиране • ActiveSync • 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Показва екрана на устройството върху десктоп машината без нужда от конфигурация на устройството • CECopyCommand-line инструмент за копиране на файлове в/у устройството през ActiveSync

  27. Demo – Xml Web Services • Synchronous invocation • Asynchronous invocation

  28. Demo – Sync Web Service • Cursor.Current = Cursors.WaitCursor; • CfDemo.Service1 srv1 = • newWsDemo.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 = newWsDemo.CfDemo.Service1(); • AsyncCallback ac = newAsyncCallback(Callback); • srv1.BeginGetServerTime(ac, srv1); • // complete async xml web services request • privatevoid Callback(IAsyncResult ar) • { • CfDemo.Service1 srv = (CfDemo.Service1)ar.AsyncState; • time = srv.EndGetServerTime(ar); • this.Invoke(new EventHandler(ShowTime)); • }

  30. Demo – Xml • Xml Parsing • Xml Deserialization

  31. Demo – Xml Rendered content Xml content <?xmlversion="1.0" encoding="utf-8" ?> <students> <student> <names>Петър Панов</names> <age>25</age> </student> <student> <names>Иван Иванов</names> <age>21</age> ... Xml Processing

  32. Demo – Xml <?xmlversion="1.0" encoding="utf-8" ?> <students> <student> <names>Петър Панов</names> <age>25</age> </student> <student> <names>Иван Иванов</names> <age>21</age>

  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 • XmlReaderreader = XmlTextReader.Create(File.OpenRead(xmlPath), xmlSettings);

  34. Demo – Xml parsing(2) • while (reader.Read()) • { • if (reader.Name == "student" &&reader.IsStartElement()) • { • student = newStudent(); • } • else • if (reader.Name == "names" && reader.IsStartElement() && student != null) • { • student.Names = reader.ReadInnerXml(); • }More…

  35. Demo – 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); • }

  36. Demo – Xml parsing(4) • ListBox lbStudents; • … • List<Student> students = newList<Student>(); • // xml parsing • … • lbStudents.DataSource = students;

  37. Demo – Xml Deserialization • // create serializer instance • XmlSerializer serializer = newXmlSerializer(typeof(List<Student>),newXmlRootAttribute("students")); • // perform deserialization • lbStudents.DataSource = serializer.Deserialize(File.OpenRead(xmlPath) );

  38. Ресурси Mobile Developer Centermsdn.microsoft.com/mobility OpenNETCF.orgwww.opennetcf.org .NET Compact Framework Teamblogs.msdn.com/netcfteam Newsgroupsmicrosoft.public.dotnet.framework.compactframework Ruslan Trifonov’s blog xman892.blogspot.com

  39. Q&A tihomir_ignatov@ifd-sofia.comr.trifonov@omegasoft.bg

More Related