visual studio ®.net data with xml carlotta eaton ( associate professor of ist new river community...
TRANSCRIPT
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
AgendaAgenda
ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer
Session PrerequisitesSession Prerequisites
XML KnowledgeXML Knowledge Development Knowledge Development Knowledge
(Web or Client Server)(Web or Client Server)
Level 200Level 200
AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer
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
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
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
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
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
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”
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
AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer
Visual Studio .NET ToolsVisual Studio .NET Tools Component DesignerComponent Designer XML DesignerXML Designer Schema DesignerSchema Designer Web Services/Web References Web Services/Web References
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
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
AgendaAgenda ADO.NETADO.NET Visual Studio .NET ToolsVisual Studio .NET Tools XML DesignerXML Designer
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
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
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
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#
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
WindowsWindows®® Forms with Forms withWeb ServicesWeb Services Demonstration #2Demonstration #2
Questions And AnswersQuestions And Answers