Selasa, 16 Juli 2013

The Use of Object Relational Mapper

Hi, now I will talk about object relational mapper(ORM) and the use of it to reduce development time dramatically. ORM is a programming technique for converting data between incompatible type systems in object-oriented programming languages according to Wikipedia. In layman terms, ORM translate traditional relational database into object oriented one. Each record at the database is treated like an object in OOP. You can access foreign key or any relation with simple method at the object. While in using SQL, we need to write custom SQL for every different data we need and it was really time-consuming and boring.

By using ORM, you might not need to write SQL syntax or even maybe not knowing anyhing about SQL. Everything can be accessed with one line code. Of course it would reduce the development time greatly. IMO, writing SQLs are one of the most boring part of the development, it would boost your mood too! Yeah. :D. There are a lot of factors if we want to reduce the development time, one of the most effective factor is to boost the programmers mood. Reducing time in tedious task like writing SQL and building CRUD for every models and focusing more in the application logic will boost the developer mood. Thus, development time will be reduced.

In my developer career, I have tried several ORMs. I think, I prefer to use ORM that has been integrated to the framework rather than use the independent one. It is easier to use and not much configuration needed to run it. Like Yii, Rails, and Django, they developed their own ORM for their ows framework. PHP Doctrine or Python SQLAlchemy are examples for independent ORM. The drawback of using ORMs are database load will increase depend on how complex is the query. In short, hardware is cheap and developer time is expensive. It is better to use spend more money on hardware rather than give work to the developer. :D

Tidak ada komentar:

Posting Komentar