web services november 2001. interoperability “the ability to freely exchange all kinds of spatial...

15
Web Services November 2001

Upload: hillary-lamb

Post on 01-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Web ServicesNovember 2001

Page 2: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Interoperability

“the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena on, above, and below the Earth’s surface; and to cooperatively, over networks, run software capable of manipulating such information.” (Buehler & McKee, 1996)

Such a system has two key elements:

• Exchange of meaningful information

• Cooperative and distributed data management

One requirement for an effective distributed environmental data system is interoperability, defined as,

Page 3: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Web Services as Program Components

• A Web Service is a URL addressable resource that returns requested data. The ‘service provider’ resides on the Internet.

• Web Services allow computer to computer communication, regardless of their language or platform.

• Web Services are reusable components, as ‘LEGO blocks’, that can be integrated to create larger, richer applications.

• Example web services are: current weather server, currency converter, map server.

• Web Services use standard web protocols: SOAP, XML, HTTP.

• (Need a picture here: service provider-clients architecture)

• WS transform the web from a medium for viewing and downloading to a distributed computing and data/knowledge-exchange platform.

Page 4: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Web Services

• Current distributed application methodologies, DCOM, CORBA, RMI, are for homogeneous environments, not for suitable integration across the heterogeneous Internet.

• Web Services provide simple, flexible Web-standards-based model for integrating applications from reusable, interoperable components.

• This allows agile application development by making it simple to integrate resources within and outside the organization.

3-Tier Architecture:Presentation, Business Logic and Data Access

Page 5: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Web Services: Connect, Communicate, Describe, Discover

Enabling Protocols of the Web Services architecture:

• Connect: Extensible Markup Language (XML) is the universal data format that makes connection and data sharing possible.

• Communicate. Simple Object Access Protocol (SOAP) is the new W3C protocol for data communication, e.g. making requests.

• Describe. Web Service Description Language (WSDL) describes the functions, parameters and the returned results from a service

• Discover. Universal Description, Discovery and Integration (UDDI) is a broad W3C effort for locating and understanding web services.

Page 6: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Web Services Enabled by Standards

Web Services operate ‘on top’ of many layers of Internet standards, TCP/IP, HTTP…

Web services also the use an array of its own standards - some still in development.

The data sharing standards for are to facilitate discovery, description and invocation

Discovery

UDDI

Disco

Description

WSDL, XSchema

XSD, XSI

Invocation

SOAP

XML

On top of these Internet and Web Service Standards, we will need to develop our own:

Naming conventions

Metadata standards

Uniform database schemata, etc

Page 7: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Protocols for Web Services

• The industry standard protocols for Web Services are defined by the W3C Consortium. – Data are described by the Simple Object Access Protocol (SOAP) – Data are expressed using Extensible Mark-up Language (XML)– Transmitted using Hyper Text Transport Protocol (HTTP).

• SOAP is an XML-based protocol for distributed data exchange consisting of :

– Envelope describing what is in a message and how to process it

– A set of encoding rules for expressing data types

– A convention for representing remote procedure calls and responses

– A binding convention for exchanging messages

• Middle-tier-to-middle-tier method invocation

• Technology: Serialization of calls into XML packages HTTP Get/Post or SOAP

• The XML transport for Web Services is plain text, so it can make it across firewalls

Page 8: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Windows Forms for User Interface

• Windows Forms framework for User Interface building , has VB6’s ease of development: drag and drop of controls to a form layout.

• Event handlers are the .NET way: mapped to a .NET delegate.

• The code binding controls to methods is more exposed, as in MFC.

• Has new development service Visual Inheritance.

Page 9: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

ASP.NET: Dynamic Web pages

• Easy WebApp development – drag-drop of controls on a WebForm

– Binding control properties to class members and event handlers

• Controls execute on serve but render themselves in HTML

• User input at browser is posted to the server as class data and as properties

• No need to know HTML – rendering is done by the controls

• Clear separation of UI (form layout) and ‘business logic’ behind the form

• ASP.Net is compiled for high performance

• Automatic Validation Controls on the client makes input more robust

• Automatic data biding of data source to controls – i.e Data Grid

Page 10: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

ADO.NET: Remote Database AccessMicrosoft ADO.NET PPT

• ADO.Net is a set of classes (DataSet and DataAdapter) to access remote data sources; it decouples data source from data consumer through indirection

• DataSet is a data container object of structured information on a set of tables; it can can locally cash portions of the database and synchronize changes

• Each DataSet object is associated with a subclass of DataAdapter tailored to interact with a particular data source, e.g. SQLAdopter

• To change the data source, the consumer need only to change the DataAdapter

• User can access tables as properties of DataSet – no need to know SQL

• While in transit, XML data can pass through firewalls over regular HTTP port.

Page 11: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

ADO.NET: DataSet and DataAdapter, another

• The DataSet is a container object for one or more DataTables, DataRelations and Constraints. To draw a comparison to classic ASP/ADO, the DataTable is analogous to a RecordSet, and the DataSet is a container for one or more DataTables. DataSet knows nothing about particular data access interfaces like OLEDB or ODBC

• The DataAdapter is the bridge between a DataSet and the data source, such as a Microsoft SQL Server database. The DataAdapter manages creating and opening a Connection, executing a Command, returning a DataReader, populating a DataTable and closing the DataReader and Connection. This can be done multiple times to populate multiple DataTables in the same DataSet.

• Using a DataSet and DataAdapter is more memory intensive than using a DataReader, since all of the records returned are populated into a DataTable (taking up valuable system resources). The DataReader streams data, using up the memory required for only one record at a time. With that said, there are instances when you would want to use a DataSet and DataAdapter, such as when you need to manipulate the data, iterate through it, or alter it and update it.

Page 12: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

DataSet: a Small Relational Database

DataRelation objects link related DataTable objects in the DataSet, providing referential integrity features similar to a database.

The DataTable objects can be nested to whatever depth is necessary to replicate the structure of a hierarchical XML document or a relational database.

A DataTable can access its relevant linkages using its child and parent Data Relation collections.

DataRows make the navigation in a hierarchy even simpler using the GetChildRows() command with the DataRelation name as a parameter.

The DataTable fulfills the role of a database table

The DataColumn determines the data type and name of the column

The DataConstraint adds extended information such as primary key,…

A collection of DataRow objects holds the data in the DataTable

The DataRow also plays the part of an updateable cache ( a cursor???)

Page 13: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

DataAdapter: Accessing the Data

• Each .NET data provider has a DataAdapter object: OleDbDataAdapter, SqlDataAdapter (can we make DataAdapters to legacy data servers?)

• The SelectCommand property of the DataAdapter retrieves data from the data source.

• The InsertCommand, UpdateCommand, and DeleteCommand properties manage updates to the data in the data source.

• The Fill method populates a DataTable object in a DataSet with the results of the SelectCommand

Page 14: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

Distributed Data Browser Architecture

XML WebServices

Satellite

Vector

GIS Data

XDim Data

OLAPCube

SQLTable

HTTPServices

Text Data

WebPage

TextData

Time Chart

Scatter Chart

Text, Table

Data ViewsLayered Map

Cursor

Session Manager (Broker)

Data View

Manager

Connection

Manager

Data Access

Manager

Cursor-Query

Manager

OpenGISServices

Data are rendered by linked Data Views (map, time, text)

Distributed data of multiple types (spatial, temporal text)

The Broker handles the views, connections, data access, cursor

Page 15: Web Services November 2001. Interoperability “the ability to freely exchange all kinds of spatial information about the Earth and about objects and phenomena

.NET Data Providers - A Basic Tutorial

• Now, the .NET Data provider can be manifested as SQL Server data provider, OLEDB data provider or the ODBC Data Provider. For the time being I'll be taking you through this article in the context of the first two Data providers.

SQL Server Data provider is the most efficient way to connect to an SQL Server Database(version 7.0 onwards). It uses a proprietary protocol for connecting to the Database which results in optimized usage of the SQL Server database along with faster data transactions.The System.Data.Sqlclient namespace contains classes for the SQL Server data provider.

• OLEDB Data Provider is used with databases that support the OLE DB interfaces. ADO.NET supports the following OLE DB Providers

• SQLOLEDB - Microsoft OLE DB Provider for SQL ServerMSDAORA - Microsoft OLE DB Provider for OracleMicrosoft.Jet.OLEDB.4.0 - OLE DB Provider for Microsoft Jet