Five Reasons for Using an O/R Mapping Tool

So, why should you use any O/R mapping tool? I am not talking about a specific tool but rather all O/R mapping tools in general. There are a number of reasons for using an O/R mapping tool but before I dive into that, let me give you a brief overview of what an O/R mapping tool really is.

An O/R mapping tool generates persistence objects for your .NET application. It is a modeling and code generation tool that connects to your database and reads its schema, then lets you map objects to database tables and views, specify single-row insert, update, load, and delete operations, queries and stored procedure calls, as methods to these objects. And, it also lets you define one-to-one, one-to-many, many-to-one, and many-to-many relationships between objects based on relationships between tables in the database. It then generates fully working persistence objects code for you.

There are many other features that a good O/R mapping tool provides but I'm keeping my description brief so I can talk more about the benefits.

Reason 1: Cuts down your development time

First benefit of an O/R mapping tool is that it saves you a ton of development time (20% to 50% time depending on your situation). Now, O/R mapping tool is not generating any "rocket science" code for you and you could definitely do it manually if you wanted. But, this is a lot of tedious work and you would definitely be happier if you didn't have to do it yourself. Let's do some simple math.

A typical application with 15-20 database tables has 30-50 objects (including domain and factory objects) and this is roughly 5000 to 10,000 lines of code. It is likely to take you a few weeks to a couple of months to develop and test this code. And, if your application has more tables than this (which many do), then just multiple the above numbers by that much.

On the other hand, an O/R Mapping tool would generate this code for you in a day or two. Even here, you need these 1-2 days primarily to determine your object mappings to the database. The actual code generation is instantaneous. So, your time saving is tremendous.

Reason 2: Produces better designed code

Second benefit of an O/R mapping tool is that it lets you produce better designed code than doing it yourself by-hand. I know what you're thinking. You think you can do a better job than an O/R mapping tool because you write every aspect of your code. Some of you definitely can but not everyone. Consider this. An average development team has different levels of expertise and experience and not everybody is a good designer. As a result, they may not follow design patterns in their code and end up with a lesser quality code. And, if multiple developers are writing code, their code is very likely going to be inconsistent with each other. And, inconsistency itself is a big source of poor quality in an application's code.

On the other hand, a good O/R mapping tool uses code templates that have excellent design because they are very likely designed and created by very senior (architect level) engineers. And, these code templates almost always follow known design patterns. So, the code that you'll generate from an O/R mapping tool is very likely going to be better designed than code designed by your own development team.

Reason 3: You don't have to be a .NET expert

Third benefit of using an O/R mapping tool is that you don't have to be a .NET expert to develop your persistence code. As you know, data access code is critical for the overall performance of your application. If this code is designed and developed poorly, it can severely affect your application. So, if you developed this code by hand, you need to be an export of .NET, COM+, stateless components, and MTS.

However, if you use an O/R mapping tool, you can focus primarily on the "logical design" of your persistence objects including object mapping and the different types of interactions with the database including insert, update, load, delete, queries, stored procedure calls, relationships, and more. And, the O/R mapping tool would do the rest for it. It would ensure that the generated code follows all the best practices of writing stateless .NET components to run in COM+ and MTS.

Reason 4: Saves you testing time

Fourth benefit of an O/R mapping tool is that it reduces your testing effort dramatically. If you developed all the persistence code by hand, you would also be responsible for testing it yourself. And, as you know, testing is as much effort as development in any project.

On the other hand, if you generated code from an O/R mapping tool, it is coming from code templates that are very likely thoroughly tested by the software vendor itself (more so than you because it is their primary focus). And, on top of it, most likely hundreds or perhaps thousands of other customers are using this tool and have tested the code generated from this O/R mapping tool. As a result, many of the bugs that you might not find in your own testing have already been found and fixed in the generated code of an O/R mapping tool.

Reason 5: Simplifies your .NET development

If you have to write all the persistence code yourself, you're bogged down into the details of ADO.NET, COM+, MTS, stateless .NET components, and more. And, you end up spending a lot of time in details that you really don't need to. On the other hand, if you generate code from an O/R mapping tool, you get well design objects and you only need to deal with their public interface.

Below is an example of code you'll write if you used an O/R mapping tool.

try {

Employees objInfo = new Employees();

EmployeesFactory objFactory = new EmployeesFactory();

objInfo.EmployeeID = EmployeeID;

objFactory.Load(objInfo);

// code here to use the "objInfo" object } catch(Exception ex) {

// code here to handle the exception

return; }

As you can see, the generated code is very simple to use than actually writing the .NET components yourself.

Many people have never heard of O/R mapping tools and many more have heard of them but are afraid to use them. I hope I have made a strong enough case here for you to give a serious consideration to O/R mapping for your project.

Iqbal Khan is the Director of Sales & Marketing at AlachiSoft (http://www.alachisoft.com/), a leading provider of O/R Mapping tool called TierDeveloper. You can reach him at http://www.alachisoft.com/.

Riverside Chicago charter limousine .. Lockport Chicago limo O’Hare
In The News:

NASA's Ingenuity helicopter, which flew on Mars in April 2021, became the first aircraft to achieve powered, controlled flight on a planet other than Earth.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Thieves who have iPhones can usually detect a hidden AirTag in vehicles they are attempting to steal, and an RFID wallet may not help you.
Genmoji, the latest addition to Apple's Apple Intelligence suite, uses artificial intelligence to generate customized emoji based on text descriptions.
It's easy to find yourself swamped in unread emails. Here are a few simple steps to archiving them and clearing out some of your digital clutter.
Keep your retirement plan safe from data brokers selling your personal information. Kurt the CyberGuy explains how to protect yourself and your retirement.
Turo faces scrutiny after tragic incidents involving rented vehicles, raising questions about security measures and regulatory frameworks.
A Chinese company has developed a spherical, 276-pound law enforcement robot that has been chasing down criminals at impressive speeds.
Here are some powerful online sleuthing tricks you can use to check the credibility of a website, see old pictures of places you've lived and even learn more about your neighbors.
Beware scam calls: Avoid unknown numbers and protect your personal information. Tech expert Kurt “CyberGuy" Knutsson talks about the increasingly common scam.
Tech expert Kurt “CyberGuy" Knutsson helps you crush your New Year's goals with these 12 apps to help you stay on track and succeed.
There are many untapped safeguards and tips you can learn to take your Wi-Fi knowledge to the next level, technology expert Kim Komando shares her tricks.
VPNs ensure privacy; antivirus stops malware. Tech expert Kurt “CyberGuy" Knutsson says both are essential for online security.
Tech expert Kurt “CyberGuy" Knutsson cites a new report that says many people still use weak passwords like "123456," risking their accounts.
Tech expert Kurt “CyberGuy" Knutsson says a tech support scam used a fake Windows Defender pop-up, tricking the victim to call and download software.
Tech expert Kurt “CyberGuy" Knutsson reveals ways to restore accidentally deleted text messages on your Android phone.
A new study says outdoor security camera apps are among the biggest collectors of user data, including phone numbers, payment details and precise location.
In iOS 18.2 and later, Apple's Mail app enhances email management by automatically sorting messages into distinct categories to help find emails faster.
A virtual private network (VPN) allows computer and smartphone users to mask an IP and create a secure, encrypted connection between a device and the internet.
Android 15's latest feature, Private Space, is like a private vault helping to keep your personal or sensitive apps away from prying eyes.
Cybercriminals have more ways than ever to target teenagers; here are some of the most widespread scams and tricks to watch in order to keep your loved ones safe.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
A humanoid robot named CUE6 has got game. The basketball-playing robot, produced by Toyota, claimed a Guinness World Record for longest shot.
With electronic signatures becoming more common, Kurt the CyberGuy explains how to produce your digital John Hancock for online documents.
Kurt the CyberGuy walks through steps he recommends immediately taking after getting new electronics — like phones or TVs — as gifts this holiday season.

Bridging the Gap between Paper and Data

The cornerstone of successful automated office systems is the ability... Read More

Cross-Platform Custom Software Development & Integration ? IT Strategy for Large Corporation

Microsoft Business Solutions products: Great Plains, MS CRM, Navision, Axapta,... Read More

Performance Tuning of a Daffodil DB / One$DB -JDBC Application

This article illustrates the best practices to improve the performance... Read More

Microsoft Great Plains Integration Manager ? Advanced Techniques

Great Plains Integration Manager scripting and translation - overview for... Read More

Who Is Minding Your Sensitive Data?

Stealing company information used to be the specialty of spies... Read More

Great Plains Customization ? Programming Auto-apply in Accounts Receivable

Microsoft Great Plains is one of three Microsoft Business Solutions... Read More

It?s Back!! WordPerfect?s Amazing Comeback

Have you noticed WordPerfect is gearing up for a comeback... Read More

Constructionalist Parsing - Deciphering Natural Language

The research in the field of Natural Language Processing usually... Read More

Microsoft Navision Database Selection: C/SIDE or MS SQL Server - Overview For IT Specialist

There are certain pluses and minuses in both cases and... Read More

25 Things Mapping Software Can Do For You

1. With mapping software you can create a report that... Read More

Artificial Intelligence And Intuition

The intuitive algorithm.Roger Penrose considered it impossible. Thinking could never... Read More

OEComplete ? A Personal Information Manager

OEComplete is a utility for managing the personal information of... Read More

ERP System of the Future: Database, Business Logic and Interface

We will base our prognosis on our Microsoft Business Solutions... Read More

CRM 101: Customer Relationship Management for Beginners

Customer Relationship Management, abbreviated "CRM," is the term for a... Read More

Online PowerPoint Presentation ? Convert PowerPoint to Flash

Although we don't know whether Microsoft ever envisioned such a... Read More

Microsoft CRM Lotus Notes Domino Connector FAQ

Microsoft Business Solutions CRM and IBM Lotus Notes Domino, being... Read More

Microsoft Great Plains Implementation ? Overview for IT Director/Controller

What is installation in the language of technology? Installation... Read More

Microsoft CRM Customization ? Programming Closed Email Activity

Microsoft CRM is CRM answer from Microsoft and attempt to... Read More

Photoshop Files and Formats

People often ask me: What image file formats will Photoshop... Read More

Microsoft Great Plains Furniture & Fixtures ? Implementation & Customization Highlights

Microsoft Great Plains, former Great Plains Software Dynamics / eEnterprise... Read More

Lotus Domino: Application Integration ? A Programmer View

There are two approaches for application integration:? Programmer's approach ?... Read More

The Tools and Features of Adobe Photoshop

Adobe Photoshop is one of the world's leading graphics editing... Read More

Microsoft Axapta, Navision or Great Plains: ERP Selection for Large Corporation

If you would like to pick something from Microsoft, or... Read More

Software Piracy

SOFTWARE PIRACY We regularly hear reports... Read More

The Software 2005 Conference - A Review

The Software 2005 conference is now a wrap. This conference,... Read More

Lincoln Stretch rentals Lake Villa ..