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/.

bmw rental chicago Bath .. Lockport Chicago limo O’Hare
In The News:

Spambots, data thieves, and other bad actors run rampant online — more so now than ever before. Here's what to do if one gets ahold of you.
Tech expert Kurt “CyberGuy" Knutsson says the Super Bowl's huge audience makes it a prime target for many types of cybersecurity scams.
It's not just about freeing up space on your computer, Kurt “CyberGuy" Knutsson says. It's about protecting your digital memories and important documents.
From proofreading and research to brainstorming and data analysis, you can use generative AI as a sidekick for just about any task you can dream of.
Tech expert Kurt “CyberGuy" Knutsson says Super Bowl 2025 ads promise star power and laughs, featuring Beckham's twin reveal.
First driverless semi delivers 100 loads in Texas, transforming logistics with AI. Tech expert Kurt “CyberGuy" Knutsson gives his takeaways.
A new scam using Elon Musk's name is making the rounds, promoting "energy-saving" devices and falsely linking the Tesla and SpaceX leader to the products.
China recently unveiled a new bullet train prototype with a test speed of 280 mph that is poised to break records and set new standards.
Hackers sometimes find ways to exploit iPhones, and Apple recently discovered a vulnerability in iOS that may have been exploited for over a year.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
Lynx the robot dog from China is pushing boundaries of what autonomous mobile robots can achieve with a groundbreaking design and unique mobility.
A startup claims to have developed the world's first entirely artificial intelligence-designed and 3D-printed shoe, the brainchild of a 25-year-old.
Creating an email alias can help clean up your inbox by organizing emails based on purpose, like creating different aliases for shopping, newsletters and work.
A multipurpose robotic system promises to transform how items are stacked onto pallets, aiming to maximize space utilization and reduce shipping costs.
Stay up to date on the latest AI technology advancements and learn about the challenges and opportunities AI presents now and for the future.
The number of people affected by a UnitedHealth data breach in February 2024 was actually higher than previously reported and was the largest medical data breach in U.S. history.
A phishing campaign uses Google Calendar to schedule fake meeting invitations that appear legitimate, redirecting targets to phishing sites.
Toll road text scam: Fake messages claim unpaid fees, seek payment via fraudulent links. Kurt “CyberGuy" Knutsson says this scam is becoming increasingly sophisticated and widespread.
Kurt “CyberGuy" Knutsson says these steps ensure that your friends and family get to the exact moment you want them to see. Try it out and streamline your sharing experience.
Tech expert Kurt “CyberGuy" Knutsson offers tips on how to protect your identity: Be vigilant, monitor accounts, use smart security, know theft response.
Tech expert Kurt “CyberGuy" Knutsson says cybercriminals are exploiting iMessage phishing protection, tricking users to reactivate links.
It's hard to imagine life without in-flight Wi-Fi these days – but sky-high web surfing comes with its own set of privacy concerns. Here's how to protect yourself.
Over 400,000 cases of credit card fraud were reported in 2024 to the Federal Trade Commission. The CyberGuy explains how to protect against becoming another victim.
A nondescript metal box transforms into a fully functional electric motorcycle that blurs the line between vehicle and urban infrastructure.
Many apps unrelated to location still ask users for tracking permission, and Texas Attorney General Ken Paxton has filed a lawsuit seeking to end this alleged practice by Allstate.

Begun, The Browser Wars Have

As Mozilla Firefox nears 10% market share, with well over... Read More

Anti-Virus Software

Anti-virus software is used to find, remove or fix files... Read More

ERP Remote Support: Microsoft Great Plains Analysis ? Pluses & Minuses

Former Great Plains Software Dynamics/eEnterprise and currently Microsoft Business Solutions... Read More

Healthcare Preventive Maintenance Software

Healthcare facilities such as clinics, hospitals, and biomedical laboratories can... Read More

How To Choose A Fire Wall Software Program

In the real world a "fire wall" is a fireproof... Read More

Microsoft Great Plains in Metal Distribution: Implementation & Customization ? Consultant Overview

Microsoft Business Solutions Great Plains serves to the wide spectrum... Read More

Microsoft Great Plains Reporting ? Overview for Developer

Looks like Microsoft Great Plains becomes more and more... Read More

Not All Project Management Software is Created Equal

The purpose of Project Management Software is to provide an... Read More

Great Plains Dexterity Programming ? Overview For Developer

Looks like Microsoft Great Plains becomes more and more popular,... Read More

.Net Charts and Graphs Interact with Businesses and Customers

Bar charts, bar graphs, and any other chart or graph... Read More

Put Some Pizazz in Your Software Arsenal

The software giants don't do everything and don't always produce... Read More

Spyware Protection: A Must for Any Home Computer

Now that spyware is the single most dangerous threat to... Read More

Microsoft CRM Customization

Microsoft CRM customization techniques are very diversified and based on... Read More

Crystal Reports For Microsoft RMS ? Overview For Developer/Report Designer

If you are software developer or database administrator - we... Read More

eStore Advantage ? Extending Microsoft eConnect for MBS Great Plains

eStore Advantage allows front-office applications to communicate with back-office business... Read More

Microsoft Great Plains eCommerce ? Stored Procedures Approach

Since Version 8.0 Microsoft Business Solutions Great Plains & Great... Read More

Navision Attain Database access via C/ODBC in ASP.NET Application

Navision Software was purchased by Microsoft and now it is... Read More

Two Reasons to Use Timesheet Software

This short paper will expand on two key reasons to... Read More

Microsoft Great Plains Partner Selection: Overview

Microsoft Great Plains, Navision, Solomon and Axapta are Microsoft Business... Read More

Running a Program on a Remote Server Using SSH

How do you run a program on a remote server... Read More

Simple Solution for Php Includes - IFrames

I have recently created my first Php program. I wanted... Read More

The Tools and Features of Adobe Photoshop

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

10 Programming Tips

(1) Avoid using the same variable again and again for... Read More

Assertion in Java

Assertion facility is added in J2SE 1.4. In order to... Read More

Microsoft Great Plains Integration Manager ? Working With Text File

Microsoft Business Solutions main middle market ERP application - Microsoft... Read More

limousine service Ava ..