24
Visual Studio Visual Studio ® ® .NET .NET Data with XML Data with XML Carlotta Eaton Carlotta Eaton (www.nr.vccs.edu/eaton) (www.nr.vccs.edu/eaton) Associate Professor of IST Associate Professor of IST New River Community College New River Community College Slides by Microsoft Slides by Microsoft Modified by Carlotta Eaton Modified by Carlotta Eaton

Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Embed Size (px)

Citation preview

Page 1: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Visual StudioVisual Studio®® .NET .NET Data with XMLData with XML

Carlotta Eaton (www.nr.vccs.edu/eaton)Carlotta Eaton (www.nr.vccs.edu/eaton)

Associate Professor of ISTAssociate Professor of IST

New River Community CollegeNew River Community College

Slides by MicrosoftSlides by MicrosoftModified by Carlotta EatonModified by Carlotta Eaton

Page 2: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

AgendaAgenda

ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer

Page 3: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Session PrerequisitesSession Prerequisites

XML KnowledgeXML Knowledge Development Knowledge Development Knowledge

(Web or Client Server)(Web or Client Server)

Level 200Level 200

Page 4: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer

Page 5: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETKey ConceptsKey Concepts Native Support For XMLNative Support For XML Focuses on Most FrequentFocuses on Most Frequent

Streaming dataStreaming data Large result setsLarge result sets Maximum throughput and performanceMaximum throughput and performance

Client side static dataClient side static data In-memory relational viewIn-memory relational view Separation of data, view, and database implementation Separation of data, view, and database implementation

specificsspecifics

Minimize Possibility For MistakesMinimize Possibility For Mistakes Server-side static cursorsServer-side static cursors Forget to MoveNextForget to MoveNext

Page 6: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NET ADO.NET Versus ADOVersus ADO

Explicit Model for UpdatesExplicit Model for Updates XML: built-in serialization and XML: built-in serialization and

relational mappingrelational mapping Relational object modelRelational object model ForEach rather than MoveNextForEach rather than MoveNext Extend schema at runtimeExtend schema at runtime

Page 7: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETBackgroundBackgroundEvolve ADO to multi-tier architectureEvolve ADO to multi-tier architecture InteroperabilityInteroperability

Based on standards like XML, XSDBased on standards like XML, XSD

Scalability Scalability Targets distributed, disconnected web Targets distributed, disconnected web

scenariosscenarios

ProductivityProductivity Common programming model over Common programming model over

heterogeneous dataheterogeneous data

Page 8: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETADO.NET ArchitectureADO.NET Architecture

Presentation TierPresentation Tier

Business TierBusiness TierData TierData Tier

Business to Business to BusinessBusiness

(BizTalk, for (BizTalk, for example)example)

Web FormsWeb Forms

Windows FormsWindows Forms

XML

InternetInternetIntranetIntranet Data Object (Class)Data Object (Class)

Data Set

Data Set

Data SetSqlDataAdapterSqlDataAdapter

SqlDataAdapterSqlDataAdapterdd

dd

IEIE

MyApp.exeMyApp.exe

Page 9: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETDataSetDataSet In memory store for client,In memory store for client,

middle-tier datamiddle-tier data Relational view of dataRelational view of data XML to the coreXML to the core

Loads/saves data as XML Loads/saves data as XML Loads/saves relational Loads/saves relational

schema as XSDschema as XSD Disconnected, remotable objectDisconnected, remotable object No knowledge of data sourceNo knowledge of data source

RelationRelation

RowRow

ConstraintConstraint

ColumnColumn

TableTable

DataSetDataSet

TablesTables

ColumnsColumns

ConstraintsConstraints

RowsRows

RelationsRelations

Page 10: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETTyped DataSetTyped DataSet Class generated by the designerClass generated by the designer Inherits from DataSetInherits from DataSet Schema coded into the classSchema coded into the class Concise, readable codeConcise, readable code Compile time type checkingCompile time type checking

ds.Tables(“Customers”).Rows(0).Columns(“Name”) = _ds.Tables(“Customers”).Rows(0).Columns(“Name”) = _““Steve Ballmer”Steve Ballmer”

ds.Customers(0).Name = “Steve Ballmer”ds.Customers(0).Name = “Steve Ballmer”

Page 11: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

ADO.NETADO.NETDataAdapterDataAdapter

Manages exchange Manages exchange

between DataSet and between DataSet and

data sourcedata source ADO-like connections andADO-like connections and

commandscommands Interacts with DataSet to Interacts with DataSet to

provide disconnected provide disconnected functionalityfunctionality

Managed Provider SDKManaged Provider SDK

DataSetCommandDataSetCommand

ConnectionConnection

SelectCommandSelectCommand

UpdateCommandUpdateCommand

InsertCommandInsertCommand

DeleteCommandDeleteCommand

TableMappingsTableMappings

Page 12: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer

Page 13: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Visual Studio .NET ToolsVisual Studio .NET Tools Component DesignerComponent Designer XML DesignerXML Designer Schema DesignerSchema Designer Web Services/Web References Web Services/Web References

Page 14: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Visual Studio .NET ToolsVisual Studio .NET ToolsComponent DesignerComponent Designer DataAdapter WizardDataAdapter Wizard

Auto-generate Update/Delete/Insert Auto-generate Update/Delete/Insert statementsstatements

Auto-config parameters collection for SQL Auto-config parameters collection for SQL statements and stored proceduresstatements and stored procedures

Generate Typed Datasets Generate Typed Datasets Table Mappings DialogTable Mappings Dialog

Map database tables/columns to new or Map database tables/columns to new or existing Typed DataSetsexisting Typed DataSets

Page 15: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Visual Studio .NET ToolsVisual Studio .NET ToolsWeb Services / Web ReferencesWeb Services / Web References

Web ServicesWeb ServicesStream DataSets over the wire as XMLStream DataSets over the wire as XMLPublish schemas to client applicationsPublish schemas to client applications

Web ReferencesWeb ReferencesDiscover and consume methods, schemasDiscover and consume methods, schemasProgram against Web Services as objectsProgram against Web Services as objects

Page 16: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer

Page 17: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

XML DesignerXML DesignerXML Documents and SchemasXML Documents and Schemas

XML Documents/DataXML Documents/Data XSD Schemas XSD Schemas

W3C recommended XML schema language W3C recommended XML schema language Replaces DTDsReplaces DTDsDescribes shape/structure of XML dataDescribes shape/structure of XML dataValidation of XML dataValidation of XML dataContracts for data exchangeContracts for data exchangeMap to relational schemas Map to relational schemas

Page 18: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

XML DesignerXML DesignerXML Documents and SchemasXML Documents and Schemas

Visually design XML Data and Visually design XML Data and XSD SchemasXSD Schemas

Rich XML source editingRich XML source editing Drag/drop creation of schemas from Drag/drop creation of schemas from

databasedatabase Infer schemas from XML data Infer schemas from XML data Generate typed DataSetsGenerate typed DataSets

Page 19: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

SummarySummary

Data = XML = DataData = XML = Data ADO.NET = distributed, disconnected, ADO.NET = distributed, disconnected,

scalable, XML-based data architecture scalable, XML-based data architecture Visual Studio .NET = RAD for multi-tier Visual Studio .NET = RAD for multi-tier

data appsdata apps

Page 20: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

For More Information…For More Information… MSDN Web site at MSDN Web site at

msdn.microsoft.commsdn.microsoft.com

MicrosoftMicrosoft®® Official Curricula (MOC) Official Curricula (MOC) MOC 2063MOC 2063

Building ASP .NET ApplicationsBuilding ASP .NET Applications

MOC 2145MOC 2145 Programming the Microsoft .NET Framework Programming the Microsoft .NET Framework

with Visual Basicwith Visual Basic®® .NET .NET

MOC 2349MOC 2349 Programming the Microsoft .NET Framework Programming the Microsoft .NET Framework

with C#with C#

Page 21: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

MSDNMSDNEssential Resources for DevelopersEssential Resources for Developers

Training & Training & EventsEvents

MSDN Training, Tech-Ed, PDC, MSDN Training, Tech-Ed, PDC, Developer Days, MSDN/Onsite EventsDeveloper Days, MSDN/Onsite Events

Subscription Subscription ServicesServices

OnlineOnlineInformationInformation

MembershipMembershipProgramsPrograms

Print Print PublicationsPublications

Library, Professional, UniversalLibrary, Professional, UniversalDelivered via CD-ROM, DVD, WebDelivered via CD-ROM, DVD, Web

MSDN Online, MSDN FlashMSDN Online, MSDN Flash

MSDN User GroupsMSDN User Groups

MSDN MagazineMSDN MagazineMSDN NewsMSDN News

Page 22: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

WindowsWindows®® Forms with Forms withWeb ServicesWeb Services Demonstration #2Demonstration #2

Page 23: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified

Questions And AnswersQuestions And Answers

Page 24: Visual Studio ®.NET Data with XML Carlotta Eaton ( Associate Professor of IST New River Community College Slides by Microsoft Modified