Software informational articles

Five reasons for using an o/r mapping tool - software


So, why ought to you use any O/R mapping tool? I am not discussion about a definite tool but instead all O/R mapping tools in general. There are a amount of reasons for using an O/R mapping tool but ahead of I dive into that, let me give you a brief overview of what an O/R mapping tool especially is.

An O/R mapping tool generates doggedness stuff for your . NET application. It is a modeling and code age bracket tool that connects to your folder and reads its schema, then lets you map stuff to folder tables and views, denote single-row insert, update, load, and cancel operations, queries and stored method calls, as methods to these objects. And, it also lets you delimit one-to-one, one-to-many, many-to-one, and many-to-many relationships concerning stuff based on relationships amid tables in the database. It then generates fully operational doggedness items code for you.

There are many other facial appearance that a good O/R mapping tool provides but I'm maintenance my account brief so I can talk more about the benefits.

Reason 1: Cuts down your education time

First allowance of an O/R mapping tool is that it saves you a ton of advancement 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 categorically do it manually if you wanted. But, this is a lot of deadly work and you would categorically be happier if you didn't have to do it yourself. Let's do some austere math.

A average claim with 15-20 folder tables has 30-50 items (including province and factory objects) and this is almost 5000 to 10,000 lines of code. It is liable to take you a few weeks to a combine of months to advance and test this code. And, if your appliance has more tables than this (which many do), then just numerous the above facts by that much.

On the other hand, an O/R Mapping tool would create this code for you in a day or two. Even here, you need these 1-2 days primarily to affect your aim mappings to the database. The authentic code age bracket is instantaneous. So, your time reduction is tremendous.

Reason 2: Produces beat deliberate code

Second charity performance of an O/R mapping tool is that it lets you churn out beat intended code than doing it physically by-hand. I know what you're thinking. You think you can do a advance job than an O/R mapping tool for the reason that you write every characteristic of your code. Some of you absolutely can but not everyone. Be concerned about this. An be an average of education team has atypical levels of expertise and encounter and not every person is a good designer. As a result, they may not be a consequence conceive patterns in their code and end up with a minor characteristic code. And, if numerous developers are journalism code, their code is very expected going to be conflicting with each other. And, inconsistency itself is a big cause of poor attribute in an application's code.

On the other hand, a good O/R mapping tool uses code templates that have first-rate blueprint since they are very apt intended and produced by very chief (architect level) engineers. And, these code templates just about constantly admire known blueprint patterns. So, the code that you'll create from an O/R mapping tool is very expected going to be develop deliberate than code considered by your own education team.

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

Third allowance of using an O/R mapping tool is that you don't have to be a . NET practiced to build your doggedness code. As you know, data admittance code is crucial for the by and large carrying out of your application. If this code is deliberate and industrial poorly, it can brutally distress your application. So, if you industrial 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 determination items as well as article mapping and the another types of interactions with the list together with insert, update, load, delete, queries, stored method calls, relationships, and more. And, the O/R mapping tool would do the rest for it. It would make sure that the generated code follows all the best practices of copy stateless . NET mechanism to run in COM+ and MTS.

Reason 4: Saves you hard time

Fourth advantage of an O/R mapping tool is that it reduces your difficult endeavor dramatically. If you urban all the doggedness code by hand, you would also be accountable for hard it yourself. And, as you know, hard is as much endeavor as advance in any project.

On the other hand, if you generated code from an O/R mapping tool, it is appearance from code templates that are very possible absolutely veteran by the software vendor itself (more so than you as it is their basic focus). And, on top of it, most expected hundreds or perchance thousands of other customers are using this tool and have hardened the code generated from this O/R mapping tool. As a result, many of the bugs that you might not find in your own taxing have previously 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 doggedness code yourself, you're bogged down into the fine points of ADO. NET, COM+, MTS, stateless . NET components, and more. And, you end up payments a lot of time in minutiae that you especially don't need to. On the other hand, if you engender code from an O/R mapping tool, you get well blueprint items and you only need to deal with their communal interface.

Below is an case 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" balk } catch(Exception ex) {

// code here to carry out the exception

return; }

As you can see, the generated code is very clear-cut to use than essentially copy the . NET machinery yourself.

Many ancestors have never heard of O/R mapping tools and many more have heard of them but are frightened to use them. I hope I have made a beefy an adequate amount of case here for you to give a considerable concern to O/R mapping for your project.

Iqbal Khan is the Executive of Sales & Marketing at AlachiSoft (http://www. alachisoft. com/), a chief donor of O/R Mapping tool called TierDeveloper. You can reach him at iqbal@alachisoft. com.

Developed by:
home | site map © 2018