270 likes | 514 Views
IDS and .NET. Rajesh Nair & Chris Golledge. Kansas City, MO January 30, 2004. Agenda. Overview of .NET .NET Framework Architecture ADO.NET Architecture Features of the IDS .NET Provider Roadmap of IDS .NET Support. Overview of .NET.
E N D
IDS and .NET Rajesh Nair & Chris Golledge Kansas City, MO January 30, 2004
Agenda • Overview of .NET • .NET Framework Architecture • ADO.NET Architecture • Features of the IDS .NET Provider • Roadmap of IDS .NET Support
Overview of .NET • .NET is a new framework for developing enterprise applications • Actively in use on Microsoft Windows platforms • No single language required for development • .NET is a response to industry trends: • Distributed Computing • Componentization • Enterprise Services • Web paradigm shifts • Maturity
Overview of .NET • Requires a new API (provider) for access to data sources • API is exposed as a set of .NET interfaces • Object-Oriented Architecture • “Namespaces” used to organize classes into related groups • Managed vs. Unmanaged code
.NET Framework Architecture Web Services ASP.NET Win Forms VS. N E T ADO.NET / XML Classes Framework Base Classes CLR
.NET Framework Architecture • Common Language Runtime (CLR) • runtime environment that manages memory, garbage collection, code access security • managed code • Framework Base Classes • provide I/O, collections, and threading functionality • ADO.NET • provides data access API • ASP.NET, Web Services & Forms • focuses on specific aspects of application development
ADO .NET Architecture • .NET framework’s data management capabilities are encapsulated into a single component : ADO.NET • ADO.NET contains: • Data Provider API which interacts with the actual data source • Content class, DataSet, which provides application program level abstraction for the data to/from the data source
What is a .NET Provider? • Runtime class library that encapsulates a data access API for use by Microsoft .NET applications • Set of specialized classes that implement standard ADO.NET interfaces and serve as a bridge between a data source and .NET applications
ADO .NET Architecture Client Application DataSet DataRelation DataTable DataColumn DataColumn DataColumn DataColumn .NET Provider Classes DataReader DataAdapter Command Transaction Connection
ADO .NET Architecture • System.Data namespace – Microsoft class library for general data access functionality • Default “bridge” providers for use with System.Data class and either an OLEDB provider or an ODBC driver • Provide IDS connectivity via Informix OLEDB or ODBC driver • IBM.Data.Informix – Informix namespace which defines a class library implementing .NET interfaces for IBM Informix data access
ADO .NET Data Retrieval • Two Models • Connected • similar to typical client/server model • obtains and maintains a connection with which to work • Disconnected • by default, data is disconnected in .NET • DataSet supports this model by presenting an in-memory view of a data source • after data is retrieved, connection can be discarded • changes performed on DataSet can be applied to the database with a new connection
Classes defined by the IDS .NET Provider • IfxConnection – manages a connection to an Informix database • IfxTransaction – represents a database transaction • IfxCommand – manages execution of SQL commands • IfxCommandBuilder – automatically generates commands, given a SELECT statement • IfxParameter – represents a parameter to a Command object • IfxParameterCollection – represents a collection of all parameters relevant to a Command object
Classes defined by the IDS .NET Provider • IfxDataReader – provides forward-only, read-only access to data • IfxDataAdapter • boundary between .NET provider and non-provider content classes • builds the DataSet objects (DataTable, DataColumn, DataRow etc), given a query and a DataSet instance • IfxError, IfxException, IfxErrorCollection - for error and exception processing
IfxConnection Details • Can be established: • programmatically using ConnectionString property of IfxConnection class • user environment • using SetNet to update the system registry database • Order of precedence is ConnectionString, user environment, and then SetNet
User and Password INFORMIXSERVER Database Name Service CLIENT_LOCALE DB_LOCALE Fetch Buffer Size Enlist (in a distributed transaction) Connection Pooling Connection Time Out Connection Lifetime Minimum Pool Size Maximum Pool Size Persist Security Info Connection Attributes
Classes for Informix Data Types • IfxDecimal • IfxDateTime • IfxTimeSpan • IfxMonthSpan • IfxRow • IfxComplexLiteral • IfxBlob • IfxClob
Using MTS with the IDS .Net Provider • Using CLR to implement COM+ configured classes is easier than implementing them with COM • System.EnterpriseServices Namespace • provides the .NET classes, interfaces, structures, delegates, and enumerations with access to COM+ services • ServicedComponent Class • base class for all COM+ services • ContextUtil Class • wraps the CoGetObjectContext, the COM+ API for retrieving object context
Using MTS with the IDS .Net Provider • Connection can be enlisted in distributed transaction • manually • Set IfxConnection class Enlist property to false • Application calls EnlistDistributedTransaction() method to enlist into the distributed transaction • automatically • Set IfxConnection class Enlist property to true • Application sets TransactionOption attribute to Required or RequiresNew • MS DTC is still unmanaged code • New “plumbing” minimizes some data type conversions • Explicit resource deallocation may be required
API Tracing with the IDS .Net Provider • IFXDOTNETTRACE – sets the level of tracing to be reported • Trace levels • 0 = no tracing • 1 = reports API calls entry & exit • 2 = level 1 + function parameter values • IFXDOTNETTRACEFILE- sets the log file where trace information is to be written
Integration with Microsoft Visual Studio.Net • Emphasis on improving Visual Studio.NET development experience when using IBM (DB2 and IDS) DBMS • IBM connections and database projects are depicted within Visual Studio: • Data Connections folder • Server Explorer tab • Solution Explorer shows IBM database projects • Future release will add support for: • IDS SQL Editor • IDS Query Builder • Content and dynamic help
Installation and Deployment • IDS .Net Provider requires .NET framework version 1.1 • IDS .Net Provider will be included with CSDK (development) and I-Connect (runtime) distributions • Requires a stored procedure to be installed in sysmaster database of each server instance
Roadmap of IDS .NET Support • IDS .NET Provider completed technology preview in Q4 ‘03 • IDS .NET Provider is currently available in the CSDK 2.81.TC3 release • Subsequent releases of the provider will add additional functionality • Release mechanism will remain via CSDK and I-Connect products
Where to Get More Information • IBM developerWorks Informix zone page: (www7b.boulder.ibm.com/dmdd/zones/informix/) • Microsoft .NET Framework home page: http://msdn.microsoft.com/netframework • IBM Informix .NET Provider product documentation • Contact us! • kolli@us.ibm.com • smoe@us.ibm.com