65872 members! Sign up to stay informed.

Sponsored Links


Resources

.NET Research Library
Get .NET related white papers, case studies and webcasts

News News News Messages: 0 Messages: 0 Messages: 0 Printer friendly Printer friendly Printer friendly Post reply Post reply Post reply XML XML XML

iBATIS.NET 1.0.0 Data Mapping Tool Released

Posted by: Paul Ballard on October 07, 2004 DIGG
iBATIS.NET is a tool that maps .NET objects to data access providers using external XML configuration files. The data access is externalized in XML and can include both SQL queries and stored procedure calls. An API is provided to then dynamically store and retrieve .NET objects using the mapping definitions.
iBATIS is not an OR/M tool. iBATIS helps you map objects to stored procedures or SQL statements. The underlying schema is irrelevant. An OR/M tool is great if you can map your objects to tables. But they are not so great if your objects are stored as a relational view rather than as a table. If you can write a statement or procedure that exposes the columns for your object, regardless of how they are stored, iBATIS can do the rest.
iBATIS uses an XML element called a SqlMap to define a given interaction with a database provider. This can be any CRUD statement or stored procedure. The SqlMap allows for the definition of parameters, caching mechanisms, and result types. These SqlMaps are then placed in a SqlMap.xml file for use by the iBATIS SqlMapper .NET class.

In addition to the SqlMap definitions there is also an XML based DataMapper configuration file which define the actual database connections. These definitions include the fairly standard <providers> element to define the type of the database and the connectionstring. While any ADO.NET compliant provider can be used, the product ships with provider definitions that include the following providers:

  • SqlServer
  • OleDb 1.1 (Access)
  • Oracle 9.2
  • ByteFx (MySQL)
The programming model is straightforward with following methods.
<!-- Query API -- see Sections 5.3.2.1 through 5.3.2.5 -->
public object Insert(string statementName, object parameterObject);
public int Update(string statementName, object parameterObject);
public int Delete(string statementName, object parameterObject);

public object QueryForObject(string statementName, object parameterObject);
public object QueryForObject(string statementName, object parameterObject, object resultObject);

public IList QueryForList(string statementName, object parameterObject);
public void QueryForList(string statementName, object parameterObject, IList resultObject);
public IList QueryForList(string statementName, object parameterObject, int skipResults, int maxResults);

public IList QueryWithRowDelegate(string statementName, object parameterObject, RowDelegate rowDelegate);

public PaginatedList QueryForPaginatedList(String statementName, object parameterObject, int pageSize);

public IDictionary QueryForDictionary(string statementName, object parameterObject, string keyProperty)
public IDictionary QueryForDictionary(string statementName, object parameterObject, string keyProperty, string valueProperty)
public IDictionary QueryForMap(string statementName, object parameterObject, string keyProperty)
public IDictionary QueryForMap(string statementName, object parameterObject, string keyProperty, string valueProperty)

<!-- Transaction API -- see Section 5.3.3 -->
public void BeginTransaction()
public BeginTransaction(IsolationLevel isolationLevel)
public void CommitTransaction()
public void RollBackTransaction()
To read more about this product go to Team iBATIS releases iBATIS.NET 1.0.0.
 
New content on TheServerSide.NETNew content on TheServerSide.NETNew content on TheServerSide.NET

DSLs and language interop

Language "mashups" will become more prominent, and developers will become polyglots, one programmer suggests.

VS 2008 Resources

SearchWinDevelopment.com offers an introduction to the language, performance, testing and data management improvements in VS 2008.

VB code downloads home

VBCode.com code snippets cover all aspects of application development, from data binding to security to the user interface.

XAML Learning Guide

Get up to date on XAML best practices with a variety of articles, tutorials and webcasts. [SearchWinDevelopment.com]

Company uses VSTS DB edition to tame workflow

One team's experience with the VSTS DB edition suggests that it can improve workflow for dev teams. It also enhanced Agile efforts. (June 24, Article)

Book: Intro to DSL Tools

Microsoft has begun to include DSL tools in the VSTS kit. A new book by Steve Cook and other VSTS team members helps set the stage. (June 24, Article)

I See the Silverlight Shining!

Cartoon: Be it ever so humble there is no place like your home after you get a Microsoft Home Server . (June 18, Cartoon)

A look at .NET 3.5

Microsoft's Thom Robbins says new technology to highlight in NET 3.5 includes AJAX, LINQ for both C# and VB, as well as tooling enhancements intended to ease the task of building WPF, WF and WCF apps. (June 29, Podcast)

Venkat Subramaniam on AJAX

Venkat Subramaniam discusses AJAX bottlenecks, the tenets of Agile development and more. He spoke at the Ajax Experience. (June 25, Tech Talk)

Building a Claims-Based Security Model in WCF - Part 2

In the second of a two-part series, Michele Leroux Bustamente discusses design decisions related to the claims-based security model. Read the story and walk through the process for creating a set of claims-based utilities to encapsulate claims authorization at the service tier. (May 24, Article)

Introducing the Entity Framework

Understanding why the Entity Framework exists and learning where it can fit into your projects can get you prepared for the eventual release early next year. (May 10, Article)

WCF Security Learning Guide

Resource: This learning guide gives you quick access to useful links on Windows Communication Foundation security information. (April 24, Article)

Brad Abrams: Patterns for successful ASP.NET AJAX development

TSS.NET's Jack Vaughan spoke recently spoke with Microsoft's Brad Abrams to find out what he is seeing in the field and what the chefs in Redmond are cooking. Along the way he discusses patterns of AJAX frameworks. (April 11, Article)

Building a Claims-Based Security Model in WCF

In a two-part series, Michele Leroux Bustamente explains how claims-based security is supported by WCF, and how you can implement a claims-based security model for your services. (March 29, Article)

Authoring workflow using XAML

Windows Workflow Foundation is a new technology that many developers will need to get their heads around. In a brief excerpt adapted from Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C#, K.Scott Allen considers aspects of workflow definition. (March 22, Chapter Excerpt)

News | Blogs | Discussions | Tech talks | Patterns | Reviews | White Papers | Downloads | Articles | Media kit | About
All Content Copyright ©2007 TheServerSide Privacy Policy
Site Map