Building Data-Centric Smart Client Applications Rajiv Sodhi Microsoft India.

Slides:



Advertisements
Similar presentations
17. Data Access ADO.Net Architecture New Features of ADO.NET
Advertisements

ADO.NET: Working in Disconnected Environment Sergey Baidachni MCT, MCSD, MCDBA.
1 Introducing SQL Server  A Relational DBMS  A Powerful Client/Server DBMS Utilities range from:  Simple Database Creation/Maintenance To  Datawarehousing,
Introduction to Database Processing with ADO.NET.
What’s New for Smart Client Developers in Visual Studio 2005? Mike Pelton Systems Engineer Microsoft Ltd
ADO. NET. What is “ADO.Net”? ADO.Net is a new object model for dealing with databases in.Net. Although some of the concepts are similar to the classical.
What’s New for Smart Client Developers in Visual Studio 2005? Mike Pelton Systems Engineer Microsoft Ltd
ASP.NET Programming with C# and SQL Server First Edition Chapter 8 Manipulating SQL Server Databases with ASP.NET.
Chapter 12 Database Connectivity with ASP.NET JavaScript, Third Edition.
Microsoft Office SharePoint Server Business Intelligence Tom Rizzo Director, Microsoft Office SharePoint Server
The Microsoft Office System A Platform for Organizational Productivity Solutions Mark Quirk Head of Technology Developer & Platform Group Microsoft UK.
Copyright © 2014, 2015 William R. Vaughn All rights reserved William R. Vaughn.
Programming with Visual Basic.NET An Object-Oriented Approach  Chapter 8 Introduction to Database Processing.
ADO.NET Tools and Wizards. Slide 2 Data Sources Window (Introduction) Use the Data Sources window to Establish a connection Create bound control instances.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
1 ASP.NET ASP.NET Rina Zviel-Girshin Lecture 4. 2 Overview Data Binding Data Providers Data Connection Data Manipulations.
Developing Web Applications Using Microsoft ® Visual Studio ® 2008.
 Evolution of Smart Client  What is Smart client?  Types of Smart client  Architectural challenges  Smart Client Architecture  Demo application.
CIS 375—Web App Dev II ASP.NET 10 Database 2. 2 Introduction to Server-Side Data Server-side data access is unique in that Web pages are basically ___________.
Neal Stublen Populating a Database  SQLExpress should be installed with Visual Studio  The book provides a.sql file for populating.
Databases and Data Access  Introduction to ADO.NET  ADO.NET objects  ADP.NET namespaces  Differences between ADO and ADO.NET.
.NET Data Access and Manipulation ADO.NET. Overview What is ADO.NET? Disconnected vs. connected data access models ADO.NET Architecture ADO.NET Core Objects.
CHAPTER EIGHT Accessing Data Processing Databases.
Introduction to Database Development Using Borland Data Providers 2128 Martin Rudy.
1 Introduction to ADO.NET Microsoft ADO.NET 2.0 Step by Step Rebecca M Riordan Microsoft Press, 2006.
Chapter 3 Introduction to ADO.NET 3.1 The ADO and ADO.NET ActiveX Data Object (ADO) is developed based on Object Linking and Embedding (OLE) and Component.
Objectives In this lesson, you will learn to: *Identify the need for ADO.NET *Identify the features of ADO.NET *Identify the components of the ADO.NET.
The Ultimate Web Service Client: Making the Most of Your SOA Investment Mike Pelton Developer & Platform Group Microsoft Ltd
ASP.NET Rina Zviel-Girshin Lecture 5
Session 8: ADO.NET. Overview Overview of ADO.NET What is ADO.NET? Using Namespaces The ADO.NET Object Model What is a DataSet? Accessing Data with ADO.NET.
Module 7: Accessing Data by Using ADO.NET
Windows Forms in Visual Studio 2005 Mike Pelton Systems Engineer Microsoft Ltd
Presented by Joseph J. Sarna Jr. JJS Systems, LLC
An Introduction to ADO.Net Marmagna Desai.NET Seminar, Fall-2003.
Module 3: Performing Connected Database Operations.
 It is the primary data access model for.Net applications  Next version of ADO  Can be divided into two parts ◦ Providers ◦ DataSets  Resides in System.Data.
1 Data Classes- DataView DataGridView Control. Objectives 2  Data Class  DataAdapter  DataReader  DataSet  DataTable  DataView  DataGridView Control.
C# Programming in Depth Prof. Dr. Bertrand Meyer March 2007 – May 2007 Chair of Software Engineering Lecture 10: Database Lisa (Ling) Liu.
1 11/10/05CS360 Windows Programming ADO.NET. 2 11/10/05CS360 Windows Programming ADO.NET  Behind every great application is a database manager o Amazon.
Mauricio Featherman, Ph.D. Washington St. University
Smart Clients in Action Rob Barker Technical Evangelist Developer & Platform Evangelism Microsoft Corporation Rob Barker Technical.
Accessing Data with Microsoft Visual C# Applications.
Module 3: Working with Local Data. Overview Using DataSets Using XML Using SQL Server CE.
1 11/15/05CS360 Windows Programming ADO.NET Continued.
HNDIT Rapid Application Development
ADO.NET FUNDAMENTALS BEGINNING ASP.NET 3.5 IN C#.
Microsoft Visual Studio 2005 Tools for the Office System: Building Office Solutions Using Visual Studio 2005 Tools for Office Andrew Coates Developer Evangelist.
C# .NET Software Development
Active Data Objects Using.Net ADO.Net Farooq Ahmed Amna Umber Summayya Shehzad.
Module 5 Data Classes DataView – DataGridView Control 1.
The Office Development Platform & Visual Studio Tools for Office Mike Hernandez Product Manager Microsoft Corporation Steven Goulet Group Program Manager.
Module 2: Using ADO.NET to Access Data. Overview ADO.NET Architecture Creating an Application That Uses ADO.NET to Access Data Changing Database Records.
Data Access. ADO.NET ADO.NET is the primary library for building database solutions within the.NET Framework. ADO.NET does not replace ADO. ADO and OLEDB.
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.
.NET Data Access and Manipulation
ASP.NET Programming with C# and SQL Server First Edition
Introduction to Database Processing with ADO.NET
Introduction to Database Processing with ADO.NET
ADO.NET Framework.
Programming the Web Using ASP.Net
Lecture 6 VB.Net SQL Server.
Active Data Objects Binding ASP.NET Controls to Data
Visual Studio Tools for Office 2005
Microsoft Dynamics.
PROG Advanced Web Apps 4/13/2019 Programming Data Pages Wendi Jollymore, ACES.
Active Data Objects Binding ASP.NET Controls to Data
M S COLLEGE OF ART’S, COMM., SCI. & BMS Advance Web Programming
Introduction to Database Programming through ADO. NET
Windows Forms in Visual Studio 2005: An Overview
Mark Quirk Head of Technology Developer & Platform Group
Presentation transcript:

Building Data-Centric Smart Client Applications Rajiv Sodhi Microsoft India

Agenda Introduction To Smart Clients Performing Connected Operations Performing Client-Side Operations Creating an Offline Application

Smart clients are easily deployed and managed client applications that provide an adaptive and interactive experience by leveraging local resources and intelligently connecting to distributed data sources. Web Services & Offline/Online support Device Adaptability Tough to Deploy Heavy Footprint DLL Hell Network Dependency Poor User Experience Rich UI Complex To Develop Rich User Experience Developer Productivity Responsive Broad Reach Easy Change Management Ease of Deployment

Microsoft Smart Client Platforms Mobile Field Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Office System 2003Windows Mobile Windows Forms Version 1.1 Version 2.0 CurrentGeneration NextGeneration Version 1.0 Version 1.1 “Whidbey” Integrating Office XML with Enterprise Data E-Government Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Mobile Field Web site Smart Client Experiences

Mobile Field Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Windows Forms Version 1.1 Version 2.0 CurrentGeneration NextGeneration “Whidbey” Radically simplified application deployment ClickOnce deployment, update, rollback Visually Appealing UI New Data Controls Office Look and Feel Developer productivity Simplify working with data Fewer lines of code Few clicks.NET Framework distribution 120 million deployments Preinstalled on 60% of new machines and growing Included on SP2 CD Consumer 55% installed by end of ’04 75% installed by end of ’05 Enterprise 50% installed by end of ’04 68% installed by end of ‘05 Office System 2003Windows Mobile Version 1.0 Version 2.0 Integrating Office XML with Enterprise Data E-Government Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Mobile Field Web site Smart Client Experiences Microsoft Smart Client Platforms

Office System 2003 Version 1.0 Version 2.0 Integrating Office XML with Enterprise Data E-Government Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Connect live business data to your documents & access them off-line Increase velocity and accuracy of decision making Increase worker productivity Reduce error caused by data re-entry & copy/paste Leverage existing Office experience of end users Reach 400+ million practiced Office users Eliminate training and ramp up time on new applications Reduce new application burn-in errors Leverage rich and robust Office functionality High developer productivity = reduced time to develop Greatly improved maintainability & deployment options Optimize use of PC & central resources Mobile Field Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Windows Forms Version 1.1 Version 2.0 CurrentGeneration NextGeneration “Whidbey” Windows Mobile Mobile Field Web site Smart Client Experiences Microsoft Smart Client Platforms

Office System 2003 Version 1.0 Version 2.0 Integrating Office XML with Enterprise Data E-Government Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Mobile Field Smart Client Front-end to Enterprise LOB Systems Web site Smart Client Experiences Windows Forms Version 1.1 Version 2.0 CurrentGeneration NextGeneration “Whidbey” Windows Mobile Mobile Field Instant access to data anywhere, anytime Form factor and instant-on more appropriate for most field work Access existing Web services in SOAs Leverage.NET development skills and code on devices with.NET Compact Framework Web site Smart Client Experiences Microsoft Smart Client Platforms

Agenda Introduction To Smart Clients Performing Connected Operations Performing Client-Side Operations Creating an Offline Application

Performing Connected Operations Connection Class Represents a connection to a database SqlConnection, OracleConnection, etc. Requires a connection string Ex: “server=(local);database=Northwind;integrated security=true” Common methods Open Creates a connection to the database Close Closes the connection to the database BeginTransaction Starts a transaction and returns a Transaction object

Performing Connected Operations Command Executes SQL statements in the database CommandText DML, DDL, and DCL Contains a collection of parameters Common methods ExecuteReader Executes a Select statement and returns a DataReader ExecuteNonQuery Executes SQL statement, except Select Returns number of rows affected ExecuteScalar Executes a Select statement and returns a single value

Performing Connected Operations DataReader Server-Side, forward-only, read-only cursor Contains a collection of columns Ex: dr[“CustomerID”].ToString(); Common methods Read Advances to the next row Returns True if row exists Close Closes the DataReader and releases rowset GetX Returns a specific data type for the column value GetString, GetInt32, GetDateTime, etc.

Performing Connected Operations Populating an SqlDataReader using System.Data.SqlClient … SqlCommand cmd = new SqlCommand("SELECT * FROM Customers,cn); cn.Open(); SqlDataReader dr = cmd.ExecuteReader( CommandBehavior.CloseConnection); if(dr.Read()) { txtCustomerID.Text = dr["CustomerID"].ToString(); txtCompanyName.Text = dr["CompanyName"].ToString(); txtContactName.Text = dr["ContactName"].ToString(); } dr.Close();

Performing Connected Operations Executing an SqlCommand using System.Data.SqlClient … SqlConnection cn = new SqlConnection(“server=localhost;database=Northwind;integrated security=yes”); SqlCommand cmdDeleteProduct = new SqlCommand("DELETE FROM Products WHERE ProductID cmdDeleteProduct.Parameters.Add(new System.Data.SqlDbType.Int, 4)); = ProductID; cn.Open(); cmdDeleteProduct.ExecuteNonQuery(); cn.Close();

Performing Database Operations Directly

Agenda Introduction To Smart Clients Performing Connected Operations Performing Client-Side Operations Creating an Offline Application

Performing Client-Side Operations DataSet Set of DataTables and DataRelations Tightly integrated with XML Population Add DataTables Load XML Common Methods WriteXML/ReadXML WriteXMLSchema/ReadXMLSchema HasChanges GetChanges, AcceptChanges and RejectChanges Merge

Performing Client-Side Operations DataAdapter Bridge between a database and a DataTable Represents a set of Command objects SelectCommand, InsertCommand, UpdateCommand and DeleteCommand Common methods Fill Executes SelectCommand and populates DataTable Update Executes appropriate Command for each changed row Open and close connection if necessary

Performing Client-Side Operations Populating a DataSet using System.Data; using System.Data.SqlClient; … SqlConnection cn = new SqlConnection(“server=localhost;database=Northwind;inte grated security=yes”); daOrderDetails = new SqlDataAdapter("SELECT OrderID, ProductID, UnitPrice, Quantity, Discount FROM [Order Details]",cn); daOrderDetails.MissingSchemaAction = MissingSchemaAction.AddWithKey; DataSet dsNorthwind = new DataSet(); daOrderDetails.Fill(dsNorthwind, “Order Details”);

Performing Client-Side Operations Updating the Database DataRow tracks changes RowState property Row version GetChanges DataSet/DataTable Returns DataSet/DataTable of changed rows

Performing Client-Side Operations Updating the Database DataAdapter.Update Updates the database Executes appropriate command DataSet.Merge Merges contents into DataSet DataSet, DataTable or DataRow Matches data on primary key AcceptChanges Sets original value equal to current value Sets RowState property to DataRowState.Unchanged

Performing Client-Side Operations Updating the Database … DataTable dtChanges; dtChanges = ds.Tables["Employees"].GetChanges(DataRowState.Added); if(dtChanges != null) { daEmployees.Update(dtChanges); ds.Merge(dtChanges); } dtChanges = ds.Tables[“Orders"].GetChanges(DataRowState.Added); if(dtChanges != null) { daOrders.Update(dtChanges); ds.Merge(dtChanges); } … ds.AcceptChanges();

Performing Client- Side Database Operations

Agenda Introduction To Smart Clients Performing Connected Operations Performing Client-Side Operations Creating an Offline Application

Creating an Offline Application Persisting a DataSet Populate DataSet DataAdapter.Fill WriteXml Can write data, schema, and changes Output determined by XmlWriteMode Use instead of DataAdapter.Update XmlWriteMode.DiffGram XML format Original and values of DataSet

Creating an Offline Application DiffGram Current Value … ALFKI T00:00: : T00:00: : T00:00: : …

Creating an Offline Application DiffGram Original Value … ALFKI T00:00: : T00:00: :

Creating an Offline Application Restoring a DataSet ReadXml Can read data, schema, and changes Input determined by XmlReadMode Use instead of DataAdapter.Fill XmlReadMode.DiffGram Reads DiffGram Adds current and original values to DataSet Update the database DataAdapter.Update

Creating an Offline Application

© 2003 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY. Content created by 3 Leaf Solutions