1 Programming ADO.NET in Whidbey Pablo Castro/Brad Rhodes ADO.NET Team Microsoft Corporation Pablo Castro/Brad Rhodes.

Slides:



Advertisements
Similar presentations
DEV351 ADO.NET Performance Pablo Castro Program Manager – ADO.NET Team Microsoft Corporation.
Advertisements

DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
The Ins and Outs of Secure Data Access Jørgen Thyme Developer & Platform Strategy Group, Microsoft
1 Federating Identity and Authorization Across Organizations and Platforms Matthew Hur Lead Program Manager Microsoft Corporation
Thursday Evening 6.30VB.NET Introduction 7.30Break for food 8.00VB.NET Migration 8.45Q & A 9.00Done.
Module 1: Overview of the Microsoft.NET Framework.
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
SQL Server 2005 CLR Integration ADO.NET 2.0 Mike Taulty
1 Introducing ClickOnce: The New Application Deployment Model for Windows Forms and “Avalon” Jamie Cool Program Manager Microsoft.
1 Building Management Applications with SQL Server “Yukon” SQL Management Objects (SMO): Overview Bruce Prang Development Manager Microsoft Corporation.
Building Rights Management Enabled Applications For Windows "Longhorn" Steve Bourne Chandramouli Venkatesh Microsoft Corporation Steve Bourne Chandramouli.
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
1 Programming Windows Help Shane McRoberts Group Program Manager Microsoft Corporation Shane McRoberts Group Program Manager Microsoft.
DAT304 Leveraging XML and HTTP with Sql Server Irwin Dolobowsky Program Manager Webdata Group.
CIS 764 – Presentation Somil Chandwani.  With Microsoft Data Access Components (MDAC), developers can connect to and use data from a wide variety of.
DBA230 Introducing SQL Server 2000 Reporting Services Jason Carlson Product Unit Manager SQL Server Microsoft Corporation.
Plataformas.NET para desenvolvimento de aplicações web José António Silva
Introduction to the Enterprise Library. Sounds familiar? Writing a component to encapsulate data access Building a component that allows you to log errors.
Overview of ADO.NET Whidbey  Wallace B. McClure  Scalable Development, Inc. Scalable Development, Inc. Building systems today that perform tomorrow.
Data Access Design Patterns: Navigating the Data Access Maze Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software Architect Microsoft.
1 Using XSD, CLR Types, And Serialization In Web Services Doug Purdy Program Manager Microsoft Corporation Doug Purdy Program Manager.
1 Keyboard, Speech, and Pen Input in Your Controls Kevin Gjerstad Lead Program Manager Kevin Gjerstad Lead Program Manager
Assemblies & Namespaces1. 2 Assemblies (1).NET applications are represented by an assembly An assembly is a collection of all software of which the application.
DAT336 Connected vs Disconnected Data Access in ADO.NET Pablo Castro Program Manager – ADO.NET Team Microsoft Corporation.
Developing Reporting Solutions with SQL Server
Module 1: Overview of the Microsoft.NET Platform.
“Indigo”: Building Peer-To-Peer Applications Todd R. Manion Program Manager Microsoft Corporation Todd R. Manion Program Manager.
Distributed Communication via ASP.Net Web Services and.Net Remoting By Richard King.
Exploiting New Capabilities for Search And Organization Kerem Karatal DAT307 Lead Program Manager Microsoft Corporation.
DAT 379 XML Today And Tomorrow Mark Fussell Lead Program Manager Microsoft Corporation.
1.NET Framework Overview: A Road Map Brad Abrams.NET Framework Team Microsoft Corporation Brad Abrams.NET Framework.
DotNet Michelle Johnston, Firebird Services Ltd. What is Dot Net Aims to simplify web development Language independent – CLR (Common Language Runtime)
.NET Enterprise Services COM+ 1.5 麥超俊 Bobby Mak 架構技術推廣經理開發工具暨平台推廣處台灣微軟股份有限公司.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 Introduction to ADO.NET ADO.NET - Lesson 01  Training time: 10 minutes  Author:
1 Application Model Fundamentals Chris Anderson Software Architect Microsoft Corporation Chris Anderson Software Architect Microsoft.
Windows Forms in Visual Studio 2005 Mike Pelton Systems Engineer Microsoft Ltd
Microsoft.Net Sven Groot. Common Language Runtime Superset of ECMA Common Language Infrastructure Defines  Language-neutral platform  Intermediate Language.
ADO.NET 2.0: Advanced Data Access Patterns Pablo Castro DAT408 ADO.NET Technical Lead Microsoft Corporation.
“Avalon”: Using UI Automation to Improve Application Testability Robert Sinclair Group Manager Microsoft Corporation Robert Sinclair.
DAT325 SQL Server 2005 (Codenamed “Yukon”): Using the Service Broker To Build Asynchronous, Queued Database Applications Roger Wolter Program Manager.
1 Integrating Real-time Collaboration into your Applications Stephanie Lindsey Program Manager Microsoft Corporation Stephanie.
1 Interop Best Practices and Common Pitfalls (That We Learned the Hard Way) Please write your name on a card in the back and place it in the box… Please.
DEV332 Programming for the Middle Tier in Visual Basic.NET Billy Hollis Author / Consultant.
DAT 405 Extreme SqlXml Irwin Dolobowsky Program Manager – SqlXml Microsoft Corporation.
SQL Server Notifications: Invalidating Cached Results Michael Pizzo Software Architect Microsoft Corporation Michael Pizzo Software.
Introduction to.NET Building.NET Applications Mike Taulty Developer & Platform Group Microsoft Ltd
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
Extending Workflow With Custom Activities Dennis Pilarinos COM328 Program Manager Microsoft Corporation.
Introduction to SQL Server 2000 Reporting Services Jeff Dumas Technical Specialist Microsoft Corporation
ADO .NET from. ADO .NET from “ADO .Net” Evolution/History of ADO.NET MICROSOFT .NET “ADO .Net” Evolution/History of ADO.NET History: Most applications.
Introducing the Microsoft® .NET Framework
ASP.NET Programming with C# and SQL Server First Edition
Using Audio, Video, and Imaging in your Longhorn Applications
System.Search, aka “Find My Stuff”
Chris Menegay Sr. Consultant TECHSYS Business Solutions
Avalon – Using Data In Your Applications
Transactional Programming In A Windows World
Michael Wallent General Manager Windows Client Platform
Searching Business Data with MOSS 2007 Enterprise Search
“Whidbey” CLR Internals
11/17/2018 9:30 PM Session Code: ARC 420
Building Rich, Interactive Controls for Windows “Longhorn”
New User Interface Possibilities in Longhorn
"Avalon": Building Applications With Controls And Dialogs
Chapter 10 ADO.
People And Groups Controls In Windows "Longhorn"
NAMESPACE.
Session Code: CLI391 Windows Forms: Exploiting Windows “Longhorn” Features from Within Your Application Mark Boulter .NET Client Team Microsoft Corporation.
Mark Quirk Head of Technology Developer & Platform Group
9/8/ :03 PM © 2006 Microsoft Corporation. All rights reserved.
Presentation transcript:

1 Programming ADO.NET in Whidbey Pablo Castro/Brad Rhodes ADO.NET Team Microsoft Corporation Pablo Castro/Brad Rhodes ADO.NET Team Microsoft Corporation Session Code: ARC403

2 Tools Client Application Model AvalonWindows Forms Web & Service Application Model ASP.NET / Indigo Win FS Compact Framework Yukon Mobile PC Optimized System.Help System.Drawing System.NaturalLanguageServices Data Systems Application Model Presentation Data Mobile PC & Devices Application Model Communication Command Line NT Service DataSet Mapping ObjectSpaces ObjectSpace Query Schema Item Relationship Media Audio Video Images System.Messaging System. Discovery System.DirectoryServices System.Remoting System.Runtime.Remoting Active Directory Uddi System.Web.Services Web.Service Description Discovery Protocols System.MessageBus Transport Port Channel Service Queue PubSub Router System.Timers System.Globalization System.Serialization System.Threading System.Text System.Design Base & Application Services Fundamentals System.ComponentModel System.CodeDom System.Reflection System.EnterpriseServices System.Transactions Security System.Windows. TrustManagement System.Web. Security System.Message Bus.Security Authorization AccessControl Credentials Cryptography System.Web.Configuration System.MessageBus.Configuration System.Configuration System.Resources System.Management System.Deployment System.Diagnostics ConfigurationDeployment/Management System.Windows System.Windows.Forms System.Console System.ServiceProcess System.Windows.Forms System.Web System.Storage System.Data.SqlServer Animation Controls Control Design Panel Controls Dialogs SideBar Notification System.Windows Documents Text Element Shapes Shape Ink UI Element Explorer Media System.Windows.Forms Forms Control Print Dialog Design System.Web.UI Page Control HtmlControls MobileControls WebControls Adaptors Design Ports InteropServices System.Runtime System.IO System.Collections Generic System.Search Annotations Monitoring Logging Relevance System.Data SqlClient SqlTypes SqlXML OdbcClient OleDbClient OracleClient Core Contact Location Message Document Event System.Storage System.Web Personalization Caching SessionState System.Xml Schema Serialization Xpath Query Permissions Policy Principal Token System.Security System.Collaboration RealTimeEndpoint TransientDataSession SignalingSession Media Activities HttpWebRequest FtpWebListener SslClientStream WebClient System.Net NetworkInformation Sockets Cache System.Web Administration Management Navigation Peer Group Policy Serialization CompilerServices Recognition System.Speech Synthesis

3 Agenda Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes

4 ADO.NET Whidbey Themes Strictly incremental No revolutions Address customer requests Lots of new customer-driven features More power for power users Performance, Performance, Performance First-class support for SQL Server “Yukon” Strictly incremental No revolutions Address customer requests Lots of new customer-driven features More power for power users Performance, Performance, Performance First-class support for SQL Server “Yukon” No Model Changes. If it works now, will work in Whidbey :)

5 Agenda Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes

6 Asynchronous Data Access Great for: Client apps: avoid blocking the UI Server apps: avoid blocking threads Consistent with the.NET async pattern BeginOpen, EndOpen, BeginExecute, … API available for 3 rd party providers We ship async support in SqlClient Works with SQL Server 7, 2000, “Yukon” True asynchronous data access Great for: Client apps: avoid blocking the UI Server apps: avoid blocking threads Consistent with the.NET async pattern BeginOpen, EndOpen, BeginExecute, … API available for 3 rd party providers We ship async support in SqlClient Works with SQL Server 7, 2000, “Yukon” True asynchronous data access

7 Waiting for the DB (not)

8 Batch Updates Currently DataAdapter.Update does a round-trip per row New support for batching in Whidbey adapter.UpdateBatchSize = your_batch_size em…That’s it :) Available for SqlClient and OracleClient Batches can execute inside a transaction The transaction has to be set in the command objects in the adapter Currently DataAdapter.Update does a round-trip per row New support for batching in Whidbey adapter.UpdateBatchSize = your_batch_size em…That’s it :) Available for SqlClient and OracleClient Batches can execute inside a transaction The transaction has to be set in the command objects in the adapter

9 Fast Updates

10 DataSet Performance Remoting One of the most common requests: “datasets are slow when used in remoting” We tweaked here and there Support for binary serialization Needs to be enabled on the DataSet instance Very fast serialize/deserialize Critical reduction of memory usage New, much faster index engine Great improvement on insert performance Remoting One of the most common requests: “datasets are slow when used in remoting” We tweaked here and there Support for binary serialization Needs to be enabled on the DataSet instance Very fast serialize/deserialize Critical reduction of memory usage New, much faster index engine Great improvement on insert performance

11 Binary DataSet Remoting (scale is logarithmic) Up to ~80 times faster

12 Agenda Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes

13 Simplified Deployment No MDAC requirement at all ADO.NET base, common and disconnected classes.NET managed providers for SQL Server & Oracle Use MDAC, but no new requirements OLEDB and ODBC managed providers 2.6, 2.7, 2.8 or 9.0 will do :) !!! (the PDC build still requires MDAC) No MDAC requirement at all ADO.NET base, common and disconnected classes.NET managed providers for SQL Server & Oracle Use MDAC, but no new requirements OLEDB and ODBC managed providers 2.6, 2.7, 2.8 or 9.0 will do :) !!! (the PDC build still requires MDAC)

14 Paging Straightforward API: ExecutePageReader Provide starting row and number of rows No consistency guarantees Outside a transaction, rows can be skipped or repeated Way faster than skipping rows in a large table Straightforward API: ExecutePageReader Provide starting row and number of rows No consistency guarantees Outside a transaction, rows can be skipped or repeated Way faster than skipping rows in a large table

15 One page at a time

16 Agenda Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes

17 User-Defined Types UDTs are CLR types that live in the DB Extend the database scalar type-system Instances ‘travel’ between server and client Seamless integration with ADO.NET You “just use objects” in the API i.e. datareader.GetValue or Parameter.Value=… Maintains encapsulation of the UDTs Same methods can be called inside and outside the server State representation remains private UDTs are CLR types that live in the DB Extend the database scalar type-system Instances ‘travel’ between server and client Seamless integration with ADO.NET You “just use objects” in the API i.e. datareader.GetValue or Parameter.Value=… Maintains encapsulation of the UDTs Same methods can be called inside and outside the server State representation remains private

18 Exchanging Objects with the Database

19 Multiple Active Result-Sets More than one simultaneous pending request per connection Multiple active data-readers Execute batches between Read() and Read() One active data-reader per command Built on top of SQL Server “Yukon” MARS More than one simultaneous pending request per connection Multiple active data-readers Execute batches between Read() and Read() One active data-reader per command Built on top of SQL Server “Yukon” MARS System.InvalidOperationException: There is already an open DataReader associated with this Connection which must be closed first.

20 SQL Server XML Data Type Seamless integration “It’s just a type” Data-reader Use SqlDataReader.GetSqlXmlReader Parameters Provide an XmlReader or a string as the value DataSet Surfaced as a XPathDocument For PDC build, DataSet will contain a XmlReader Seamless integration “It’s just a type” Data-reader Use SqlDataReader.GetSqlXmlReader Parameters Provide an XmlReader or a string as the value DataSet Surfaced as a XPathDocument For PDC build, DataSet will contain a XmlReader

21 Agenda Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes Key ADO.NET Whidbey Themes Faster Easier Yukon-enabled Common base classes

22 Common Provider Model ADO.NET v1.0/1.1 was based on interfaces Not enough to write provider-agnostic code Hard to evolve We’re introducing a common model Abstract base classes instead of interfaces Better versioning story 3 rd party providers can reuse our common code They can even re-use our connection pooler Provider-independent apps fully enabled at the API level This is an extension, no breaking changes ADO.NET v1.0/1.1 was based on interfaces Not enough to write provider-agnostic code Hard to evolve We’re introducing a common model Abstract base classes instead of interfaces Better versioning story 3 rd party providers can reuse our common code They can even re-use our connection pooler Provider-independent apps fully enabled at the API level This is an extension, no breaking changes

23 A set of classes to program to DbConnection, DbCommand, etc. This provides API independence SQL syntax is still database-specific Factory model to create provider objects Enables both connected and disconnected scenarios Can enumerate the installed providers Each provider has an invariant name ie. System.Data.SqlClient, System.Data.OracleClient A set of classes to program to DbConnection, DbCommand, etc. This provides API independence SQL syntax is still database-specific Factory model to create provider objects Enables both connected and disconnected scenarios Can enumerate the installed providers Each provider has an invariant name ie. System.Data.SqlClient, System.Data.OracleClient Db* Base Classes

24 Provider-agnostic

25 More features General connected stack Database schema retrieval Provider enumeration Integration with System.Transactions Tracing Connection pool reset API DataSet DataTable more stand-alone Full namespaces for tables DataSet.Load DataTableReader Flexibility on relationships DataTable from DataView with projection and unique rows General connected stack Database schema retrieval Provider enumeration Integration with System.Transactions Tracing Connection pool reset API DataSet DataTable more stand-alone Full namespaces for tables DataSet.Load DataTableReader Flexibility on relationships DataTable from DataView with projection and unique rows SqlClient Notifications SQL Server ‘Yukon’ types varchar/varbinary(max) Bulk-copy Server enumeration Change password on login Transparent failover Promotable transactions More to come… OleDb Managed pooling option OracleClient Batching for updates

26 ADO.NET Data Access Support DataReader and DataSet ObjectSpaces in ADO.NET Technology Strengths Use if… SQLXML in ADO.NET Business level objectsBusiness level objects Relational mapping via metadataRelational mapping via metadata Decoupled from database schemaDecoupled from database schema Smaller working set than other object abstractionsSmaller working set than other object abstractions Interoperability. Format for the Web – B2B, A2AInteroperability. Format for the Web – B2B, A2A Sparse (semi-structured) dataSparse (semi-structured) data XML Services e.g. XQuery, XSDXML Services e.g. XQuery, XSD Relational mapping via metadataRelational mapping via metadata Decoupled from database schemaDecoupled from database schema Relational (tabular) modelRelational (tabular) model Highest performanceHighest performance Explicit controlExplicit control Fully exposes database functionalityFully exposes database functionality You need a strong business object layerYou need a strong business object layer You need to query data from XML data sources e.g. XML Web ServicesYou need to query data from XML data sources e.g. XML Web Services You use vertical industry XML schemas for content publishing e.g. XBRL, RIXML, FinXMLYou use vertical industry XML schemas for content publishing e.g. XBRL, RIXML, FinXML You need to load XML documents into database tablesYou need to load XML documents into database tables You are using UI bound controls with XMLYou are using UI bound controls with XML You are comfortable with the relational modelYou are comfortable with the relational model You require maximum control/performance/functionalityYou require maximum control/performance/functionality You are using UI bound controlsYou are using UI bound controls Data is relational is objects is XML is Data

27 Related Sessions DAT400 - Programming SQL Server "Yukon" Using Managed Code ARC404 - Data Access Design Patterns: Navigating the Data Access Maze DAT402 - Building Database Applications with SQL Server "Yukon": XQuery, XML Datatype DAT405 - Caching Techniques for Scalable Enterprise Applications DAT410 -.NET Framework: Developing Applications Using the New Object-Relational Technologies in "Whidbey“ ARC380 -.NET Framework: What's New in System.Xml for "Whidbey" PNL05 - Client Architecture: The Zen of Data-Driven Applications DAT400 - Programming SQL Server "Yukon" Using Managed Code ARC404 - Data Access Design Patterns: Navigating the Data Access Maze DAT402 - Building Database Applications with SQL Server "Yukon": XQuery, XML Datatype DAT405 - Caching Techniques for Scalable Enterprise Applications DAT410 -.NET Framework: Developing Applications Using the New Object-Relational Technologies in "Whidbey“ ARC380 -.NET Framework: What's New in System.Xml for "Whidbey" PNL05 - Client Architecture: The Zen of Data-Driven Applications

28 Summary Whidbey: customer-driven ADO.NET Addressing customer requests Features, performance, usability Integration Great support for SQL Server “Yukon” ADO.NET continues to evolve No revolutions, no compatibility issues We’d love to hear your feedback! Ask The Experts, SQL Lounge and Booths Members of the dev team will be there! Whidbey: customer-driven ADO.NET Addressing customer requests Features, performance, usability Integration Great support for SQL Server “Yukon” ADO.NET continues to evolve No revolutions, no compatibility issues We’d love to hear your feedback! Ask The Experts, SQL Lounge and Booths Members of the dev team will be there!

29 SQL Server Resources Week long SQL Server “Ask the Experts” lounge in: Foyer outside Room 309 Support for SQL Server “Yukon” PDC Preview at SQLJunkies SQL Server “Yukon” FAQ Blog at SQLTeam Other Key Resources world wide user groups, Our most active SQL Server newsgroups, Microsoft.public.sqlserver.programming Microsoft.public.sqlserver.server Microsoft.public.sqlserver.dts Microsoft.public.sqlserver.olap Microsoft.public.sqlserver.setup Microsoft.public.sqlserver.replication Microsoft.public.sqlserver.msde Week long SQL Server “Ask the Experts” lounge in: Foyer outside Room 309 Support for SQL Server “Yukon” PDC Preview at SQLJunkies SQL Server “Yukon” FAQ Blog at SQLTeam Other Key Resources world wide user groups, Our most active SQL Server newsgroups, Microsoft.public.sqlserver.programming Microsoft.public.sqlserver.server Microsoft.public.sqlserver.dts Microsoft.public.sqlserver.olap Microsoft.public.sqlserver.setup Microsoft.public.sqlserver.replication Microsoft.public.sqlserver.msde

30 © Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.