Click here to Skip to main content
Click here to Skip to main content

DataQuicker 0.9.0

By , 27 Sep 2005
Rate this:
Please Sign up or sign in to vote.

In a database application, the Data Access Layer acts as a bridge between the Data Tables (Relational Universe) and Business Objects (Business Domains); and in the .NET world, more often than not, these are built as an extension to ADO/.NET datasets/data tables.

DataQuicker extends the function and simplifies the development for building Data Access Layer, and provides the efficient and simple framework to construct your application. But it also bases on ADO.NET. I think there is nothing wrong in this approach, in fact, it will work very well for medium-sized and small database applications. It’s an Object Relational Mapper, as the name suggests, provides framework which maps Relational Data to Business Objects. As many of the OR Frameworks generate (or require you to create manually) classes (objects) based on domain models, their framework classes take care of mapping and formatting the data, so that it persists safely and accurately.

The difference from other O/R Mappings DataQuicker provides the model wraps Data Columns. Class FieldMapping is the abstract wrapper of different special columns type. It integrates (caches) the detailed information of the columns, such as Max Length, Regular Expressions (We should specify the Regex on class at the beginning), nullable, default value and so on. With the information, DataQuicker can check the validation of column data automatically without connecting the database. That means it is not necessary to validate the data manually and it will also speed up the application. In the way, the application completely replies on the design of database. The database changes, the validation will be changed simultaneously.

Additional, DataQuicker provides the accessory tools to analyze the database and generate the mapping classes for different database. It’s an efficient way to build high-performance database application.

As we know, usually, the project development is composed of three levels, UI, Business and DAL. And based on my past experience, DAL will cost us about 30% effort. And Business is 40%. Now, with DataQuicker, I'm sure it can cut down all the effort of DAL design and coding, additionally, it can also reduce some efforts on business coding.

Now, DataQuicker only supports SQL Server and Access, but I will do more soon.

Brief Code Samples

We assume that we have configured the DataQuicker correctly.

Insert a Record

Employees employee = Employees.CreateInstrance();
employee.LastName += "Jian";
employee.FirstName += "Liu";
employee.Title += "Software Engineer";
employee.TitleOfCourtesy += "Mr.";
employee.BirthDate += new DateTime(1982, 2, 7);
employee.HireDate += new DateTime(2005, 6, 28);

new SqlProvider().Insert(employee);

Update Orders

Employees employee = Employees.CreateInstrance(5);
Customers customer = Customers.CreateInstrance("HANAR");
Orders order = Orders.CreateInstrance(10248);
order.Employees = employee;
order.Customers = customer;
new SqlProvider().Update(employee);

Transaction

//Our purpose: insert a employee first, then update the order
Employees employee = Employees.CreateInstrance();
employee.LastName += "Jian";
employee.FirstName += "Liu";
Orders order = Orders.CreateInstrance(10248);
order.Employees = employee;
SqlProvider provider = new SqlProvider();
provider.BeginTrans(); //Begin transaction
try
{
    provider.Insert(employee);
    provider.Update(order);
}
finally
{
    provider.Commit();
}

Indeed, there are several articles included in the DataQuicker help document. We can also refer to NUnit project's source code for more code samples. So, if you're interested, why not download to try it immediately?

New Upgrade in the Next Version

Now I'm upgrading version 0.9.2 tensely. The changes obviously refer to:

  1. Remove query conditions setting on FieldMapping/EntityMapping, but create a class Query instead of them. So, in 0.9.2, when we're thirsty for data collection, we have to refer to the Query object. The query can support aggregate function, group by clauses better than now.
  2. Improvement on provider and analyzer components, using IDbCommand and IDataParameter instead of combining SQL. That's more secure and efficient.
  3. Separate entities when designing. Basically, if we only CRUD, it is not necessary to care about association of tables/view. Only query, so, if we want to get the association result, we have to set the association between tables/views dynamically when querying.
  4. Support multi-primarykey, but unfortunately, DataQuicker cannot manage multi-primarykey automatically. We have to set its value manually. For single primarykey, we also can set management way of DQIncrease/Guid.

I wish you are satisfied with DataQuicker. If yes, please rate this article for us! Thank you.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Eunge
President TCWH
China China
I've worked as a software architect and developer based on Microsoft .NET framework and web technology since 2002, having rich experience on SaaS, multiple-tier web system and website development. I've devoted into open source project development since 2003, and have created 3 main projects including DataQuicker (ORM), ExcelQuicker (Excel Report Generator), and RapidWebDev (Enterprise-level CMS)
 
I worked in BenQ (8 mo), Bleum (4 mo), Newegg (1 mo), Microsoft (3 yr) and Autodesk (5 yr) before 2012. Now I own a startup company in Shanghai China to deliver the exceptional results to global internet users by leveraging the power of Internet and the local excellence.

Comments and Discussions

 
GeneralI have released full source code. PinmemberEunge1-Sep-05 18:37 
GeneralSource code PinmemberPavel Opicka29-Aug-05 22:47 
GeneralRe: Source code PinmemberEunge29-Aug-05 23:47 
GeneralRe: Source code PinmemberHoward Birkett30-Aug-05 2:16 
GeneralRe: Source code PinmemberEunge30-Aug-05 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web01 | 2.8.140415.2 | Last Updated 28 Sep 2005
Article Copyright 2005 by Eunge
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid