Download presentation
Presentation is loading. Please wait.
Published byRicardo César Alencastre Modified over 6 years ago
2
9/20/2018 2:13 PM Visual Studio развитие технологий доступа к данным на платформе Microsoft.NET Роман Здебский Эксперт по технологиям разработки ПО Департамент стратегических технологий Microsoft © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
Доступ к данным Содержание Sync Framework
9/20/2018 2:13 PM Содержание LINQ ADO.NET Entity Framework ADO.NET Data Services Codename ‘Astoria’ Sync Framework Общая картина подхода Microsoft к технологиям доступа к данным Демонстрации, демонстрации и еще раз демонстрации Доступ к данным ©2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
4
Краткая ретроспектива
9/20/2018 2:13 PM Краткая ретроспектива ODBC (1.0 –1992) – низкоуровневый API OLE DB – COM API ADO – объектная модель - Recordset ADO.NET – объектная модель .NET Dataset MDAC (Windows DAC) -1996 Microsoft Jet Database Engine DB-Library Data Access Objects (DAO) Remote Data Objects (RDO) © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
5
9/20/2018 2:13 PM Доступ к данным DataSet DS=new DataSet(); XQueryNavigatorCollection oXQ = new XQueryNavigatorCollection(); string strXML = ""; string fileName1="c:\\Test\\T1.xml"; string alias1 = "MyDataTest.xml"; oXQ.AddNavigator( fileName1, alias1 ); string strQuery = "<NewDataSet> { " + " let $bb := document(\"MyDataTest.xml\")/*/* " + " let $cc := document(\"MyDatattt.xml\")/*/* " + " for $c in $cc " + " for $b in $bb " + " where $c/kod = $b/kod " + " return <Table> { $b/nazv,$b/dat,$c/naim } </Table> " + " }</NewDataSet> “ ; XQueryExpression xExpression = new XQueryExpression(strQuery); strXML = xExpression.Execute(oXQ).ToXml(); StringReader strReader = new StringReader(strXML); XmlTextReader reader = new XmlTextReader(strReader); DS.ReadXml(reader); DataGrid1.DataSource = DS.Tables[0]; DataGrid1.DataBind(); SqlConnection nwindConn = new SqlConnection("Data Source=localhost;Integrated Security=SSPI;Initial Catalog=northwind"); SqlCommand catCMD = nwindConn.CreateCommand(); catCMD.CommandText = "SELECT CategoryID, CategoryName FROM Categories WHERE CategoryName LIKE ‘B%’ ORDER BY 1“; nwindConn.Open(); SqlDataReader myReader = catCMD.ExecuteReader(); while (myReader.Read()) { Console.WriteLine("\t{0}\t{1}", myReader.GetInt32(0), myReader.GetString(1)); } myReader.Close(); nwindConn.Close(); Dim xmldoc As New System.Xml.XPath.XPathDocument("c:\books.xml") Dim nav As System.Xml.XPath.XPathNavigator = xmldoc.CreateNavigator() Dim expr As System.Xml.XPath.XPathExpression = nav.Compile( "//Publisher[. = 'MSPress']/parent::node()/Title" ) © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
6
Типовые уровни при работе с данными
9/20/2018 2:13 PM Типовые уровни при работе с данными Концептуальный Бизнес сущности и логика Объекты и объектные коллекции Логический Реляционное представление Таблицы, отношения junction tables Физический физическое хранение и манипулирование страницы, экстенты, индексы ограничения (constraints) … © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
7
Сложности в работе с данными
9/20/2018 2:13 PM Сложности в работе с данными Проблема: Data != Objects Нетипизированные острова разные для каждого источника специфические знания для каждого источника отсутствие проверок на этапе компиляции сложность в поддержке … … и даже нет IntelliSence Dataset – реляционное представление в объектном виде Скрытые знания о структуре хранения и объектно–реляционном маппинге (ORM) в виде строк Data Access Layer - спасение? © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
8
Решение – основные идеи
9/20/2018 2:13 PM Решение – основные идеи LINQ Типизированные запросы Типизированные результаты Объектное представление схемы хранения Общее решение для целого ряда продуктов Использование преимуществ ADO.NET Создание концептуальной объектной модели Явное декларативное представление схемы объектно–реляционного маппинга (ORM) между концептуальной моделью и моделью хранения Entity Framework © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
9
LINQ http://www.platforma2008.ru
9/20/2018 2:13 PM LINQ Подробный вебкаст по основным возможностям LINQ в Visual Studio Интегрированные в язык запросы (LINQ) в Microsoft Visual Studio 2008 Достаточно просто зарегистрироваться на сайте, промокода не нужно. Секция – Средства разработки (DT). © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
10
Language Integrated Query
9/20/2018 2:13 PM Language Integrated Query Единообразные типизированные запросы к любому источнику данных Методы расширения интерфейса IEnumerable (Select, OrderBy, GroupBy, Join, Where) Возвращаемый результат как объектная коллекция (IEnumerable<T>) Intellisence, проверка на этапе компиляции Специальный синтаксис выражений запросов © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
11
Local variable type inference
9/20/2018 2:13 PM C# 3.0 Query expressions var contacts = from c in customers where c.State == "WA" select new { c.Name, c.Phone }; Local variable type inference Lambda expressions var contacts = customers .Where(c => c.State == "WA") .Select(c => new { c.Name, c.Phone }); Extension methods Object initializers Anonymous types © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
Local variable type inference
9/20/2018 2:13 PM VB 9 Query expressions Dim contacts = From c In customers _ Where c.State = "WA“ _ Select c.Name, c.Phone Local variable type inference Lambda expressions Dim contacts = _ customers _ .Where(Function (c) c.State = "WA")_ .Select(Function(c) New With { c.Name, c.Phone }) Extension methods Object initializers Anonymous types © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
.NET Language Integrated Query
9/20/2018 2:13 PM Проект LINQ C# 3.0 VB 9.0 Другие .NET Language Integrated Query LINQ to Objects Объекты LINQ to DataSets LINQ to SQL LINQ to Entities LINQ to XML <book> <title/> <author/> <year/> <price/> </book> XML Реляционные источники © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
14
Демонстрация LINQ Краткий обзор 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
15
9/20/2018 2:13 PM LINQ текущий статус Вышел (RTM) в ноябре 2007 года вместе с Visual Studio 2008 и .NET Framework 3.5 Поддерживает модель провайдеров, существуют реализации: LINQ to NHibernate LINQ to Amazon SharePoint, …. Развивается в направлении параллелизма (manycore) – PLINQ © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
16
Решение – основные идеи
9/20/2018 2:13 PM Решение – основные идеи LINQ Типизированные запросы Типизированные результаты Объектное представление схемы хранения Общее решение для целого ряда продуктов Использование преимуществ ADO.NET Создание концептуальной объектной модели Явное декларативное представление схемы объектно–реляционного маппинга (ORM) между концептуальной моделью и моделью хранения Entity Framework © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
17
9/20/2018 2:13 PM Entity Framework Инфраструктура формирования концептуального объектного представления данных с помощью сущностей (Entities) Реализация классических задач ORM Абстрагирование от схемы хранения Гибкий маппинг © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
18
Архитектура Entity Framework
9/20/2018 2:13 PM Архитектура Entity Framework © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
Гибкий маппинг Таблица на иерархию 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
20
Гибкий маппинг Таблица на тип 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
21
Гибкий маппинг Таблица на класс 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
Гибкий маппинг Разделение сущности 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
23
Гибкий маппинг Хранимые процедуры 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
24
Гибкий маппинг Хранимые процедуры 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
25
Гибкий маппинг Создание представлений (QueryView) 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
26
Гибкий маппинг Создание представлений (Defining Query)
9/20/2018 2:13 PM Гибкий маппинг Создание представлений (Defining Query) © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
27
ADO.NET Entity Framework
9/20/2018 2:13 PM ADO.NET Entity Framework Демонстрация Основные возможности © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
28
Entity Framework – текущий статус
9/20/2018 2:13 PM Entity Framework – текущий статус Доступен в Beta 3 Релиз (RTM) ожидается во второй половине 2008 Провайдеры третьих производителей для различных баз данных В течение 3 месяцев после выхода (RTM) Oracle, IBM DB2, MySQL, PostgreSQL, Informix, Ingres, Sybase, SQLite, SQL Anywhere, Progress … В течение 2008 года Firebird © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
29
9/20/2018 2:13 PM Роль Entity Framework Единый движок концептуального представления и ORM для ряда ключевых продуктов Microsoft © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
30
Сравнивая LINQ и Entity Framework
9/20/2018 2:13 PM Сравнивая LINQ и Entity Framework LINQ Единообразные запросы Entity Framework Гибкий маппинг Основное назначение Единообразные типизированные запросы к любому источнику Типизированные результаты LINQ to SQL -Типизированное представление логической схемы данных 1:1 ORM LINQ to SQL – возможности переименований объектов данных и поддержка TPH Создание концептуального объектного уровня, абстрагированного от логики хранения Типизированное представление концептуальной схемы с гибким маппингом – полноценный ORM Возможности маппинга © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
31
LINQ + Entity Framework
9/20/2018 2:13 PM LINQ + Entity Framework C# 3.0 VB 9.0 Другие Реляционные источники .NET Language Integrated Query LINQ to Objects LINQ to DataSets LINQ to SQL LINQ to Entities LINQ to XML Entity Framework Объекты Концептуальная схема (CSDL) <book> <title/> <author/> <year/> <price/> </book> XML Маппинг (MSL) Схема хранения (CSDL) ADO.NET Microsoft SQL Server, Oracle, DB2, MySQL… © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
32
ADO.NET Data Services Framework "Project Astoria"
9/20/2018 ADO.NET Data Services Framework "Project Astoria" © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
33
Доступ к данным для интернет приложений
9/20/2018 2:13 PM Доступ к данным для интернет приложений HTML + Javascript Данные(XML, и т.п.) DLL + XAML Данные(XML, и т.п.) Данные(XML, и т.п.) Mashup UI Потоки данных AJAX приложения Silverlight приложения Онлайн сервисы Мэшапы (Mashups) © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
34
REST и WS-* сервисы http://www.platforma2008.ru
9/20/2018 2:13 PM REST и WS-* сервисы Очень интересный вебкаст Дэвида Чеппелла с переводом на русский - SOAP/WS-* и REST – удобная организация коммуникаций Достаточно просто зарегистрироваться на сайте, промокода не нужно. Секция – Сервис-ориентированная архитектура и бизнес-процессы (SA) © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
35
REST-Интерфейс для данных
9/20/2018 2:13 PM REST-Интерфейс для данных Основа модели данных Сущности и ассоциации ресурсы и ссылки Entity Data Model Каждый ресурс адресуется через URI Гибкая схема URI для получения данных URI Данные как ресурсы, HTTP команды - манипулирование Использование кэширования, прокси, аутентификации, … HTTP AtomPub, JSON Форматы Entity Framework Источники данных на базе IQueryable Источники © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
36
Демонстрация ADO.NET Data Services Основные возможности
9/20/2018 2:13 PM ADO.NET Data Services Демонстрация Основные возможности © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
37
.NET Language Integrated Query
9/20/2018 2:13 PM ADO.NET Data Services Клиент C# 3.0 VB 9.0 Другие .NET Language Integrated Query LINQ to Objects LINQ to DataSets LINQ to SQL LINQ to Entities Client LINQ Rest Provider LINQ to XML <book> <title/> <author/> <year/> <price/> </book> XML Объекты HTTP Сервер REST API Entity Framework ADO.NET Microsoft SQL Server, Oracle, DB2, MySQL… © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
38
9/20/2018 Sync Framework © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
39
Ключевые сценарии для синхронизации
Offline Outlook Cached Mode Мобильные сотрудники Богатый интерфейс к веб-сервисам Совместная работа Мои контакты и календарь доступны везде Документы групп Groove доступны везде Моя музыка доступна везде Microsoft Sync Framework
40
Типовая структура приложения Sync Framework
Приложение Microsoft Sync Framework Sync Agent изменения Sync Provider Sync Provider Data Store Data Store изменения изменения
41
Возможности синхронизации БД
DAT306 Возможности синхронизации БД Фокус на администратора баз данных, специфично для SQL Server Богатый набор возможностей, мало программного контроля Merge Replication Фокус на разработчиков - Sync Runtime Синхронизация данных, а не замена записей БД Компонентная, SOA ориентированная инфраструктура Поддержка любого ADO.NET Provider Дополнительные возможности с SQL Server 2008 ADO.NET Provider for the Microsoft Sync Framework Sync Services for ADO.NET Доступно только с SQL Server Compact Фокус на разработчиков, простота, ограниченные сценарии (download w/incremental upload) Sync Services for ADO.NET позволяет работать с такой же простотой, но с большей масштабируемостью Remote Data Access (RDA)
42
Доступ к данным в ADO.NET
DAT306 Доступ к данным в ADO.NET Запрос к серверу DataAdapter.SelectCommand вызывается, возвращая DataSet Изменения делаются в RAM над DataSet и возвращаются назад DataAdapter преобразует изменения в Insert, Update and Delete команды DataAdapter SelectCommand Server DB InsertCommand Connection Forms UpdateCommand DeleteCommand Работа через сервисы Операции приводят к запросу к серверу Частичное использование клиента – операции в RAM Неустойчиво к проблемам в сети
43
Sync Services for ADO.NET
DAT306 Sync Services for ADO.NET Построены на DataAdapter Добавляют Commands инкрементальных обновлений Добавляют Commands обработки конфликтов Принимают и возвращают DataSets Select Incremental Inserts Select Incremental Updates SyncAdapter DataAdapter Select Incremental Deletes SelectCommand Server DB InsertCommand Connection Forms UpdateCommand DeleteCommand Select Conflict Updated Rows… Select Conflict Deleted Rows…
44
Sync Services for ADO.NET
DAT306 Sync Services for ADO.NET Локальная БД для фоновой синхронизацииoperations Синхронизация перемещает данные между локальной БД и удаленным сервисом Приложение также работает с данными, но локально Приложение теперь устойчиво к проблемам сети Select Incremental Inserts SyncAdapter Select Incremental Deletes InsertCommand UpdateCommand DeleteCommand Connection Select Incremental Updates Select Conflict Updated Rows… Select Conflict Deleted Rows… Services & Transports Server DB Forms SQL Server Compact 3.5
45
Что это: Сценарии Где используется
DAT306 Небольшая (~1MB) встроенная, in-proc БД Подмножество ключевых типов SQL Server и T-SQL Нет: Stored Procs, Views, Xquery Что это: Mobile & Embedded устройства Windows Vista, Media Center PC, MSN Client, ZUNE, Windows Media Player, … Локальная клиентская БД в VS 2008 по умолчанию Где используется Локальный online / offline кэш Локальная, независимая БД приложения Сохранение In-Memory данных в БД Структурированный формат документов для приложений Сценарии
46
Сравнение с SQL Server Express
9/20/2018 2:13 PM Сравнение с SQL Server Express SQL Server Compact SQL Server Express Для чего Ключевой функционал БД в компактном исполнении Идеален для малых серверов и desktop где нужен более богатый функционал - full text search и мощная поддержка XML в БД Идеален для мобильных устройств, когда подключение происходит периодически Легкая миграция на Workgroup, Standard и Enterprise редакции Внедряется в приложение Бесплатен Не для Работы как сервиса Когда нужно минимальное использование памяти Работы сервера для нескольких пользователей in-process решений Когда нужен более полный функционал SQL Server Работы на мобильных устройствах © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
47
Sync Services for ADO.NET
9/20/2018 2:13 PM Sync Services for ADO.NET Демонстрация Основные возможности © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
48
Sync Services for ADO.NET
9/20/2018 2:13 PM Sync Services for ADO.NET Клиент C# 3.0 VB 9.0 Другие .NET Language Integrated Query LINQ to Objects LINQ to DataSets LINQ to SQL LINQ to Entities LINQ to XML Entity Framework Объекты <book> <title/> <author/> <year/> <price/> </book> XML ADO.NET Microsoft SQL Server Compact TDS, WCF Сервер Microsoft SQL Server © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
49
Microsoft SQL Server Compact
9/20/2018 2:13 PM Полная картина Клиент Сервер LINQ Data Services EF HTTP ASP.NET App REST API LINQ Entity Framework Sync Services ADO.NET TDS, WCF Microsoft SQL Server Oracle, DB2, MySQL… Microsoft SQL Server Compact © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
50
Microsoft Express Editions
9/20/2018 2:13 PM Microsoft Express Editions Показанные примеры используют бесплатные Express версии Удобны для: прототипирования, изучения, начала разработки © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
51
9/20/2018 2:13 PM Ссылки по теме LINQ ADO.NET Entity Framework ADO.NET Data Services Sync Services for ADO.NET © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
52
Спасибо за внимание! 9/20/2018 2:13 PM
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.