0

Hi guys,
I just reviewed the design of a project I am working on at the moment and a software design related question raised...
If I can save data from a form to a database through data access classes or whatevar, and I can display data from the database,
WHY would I need an Object/Relational Mapping layer e.g. why would I need to translate data and tables from the database in to classes and objects?
Because even if it is good practice and usually needed, wouldn't it be redundant having a conversion in both direction for no use at all like in the case above described?
I would like to know what do you guys think about it and please tell me if I should post this thread in any other forum as well.
Thank you in advance for your help.
Silh

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by ShawnCplus
0

ORMs exist to make the life of a developer easier, so you aren't manually dealing with physical resultsets from mysql_fetch_array all the time.

Also, having an ORM allows you to attach functions to certain objects ie., you want to be able to perform drawCircle on every Circle saved to the database.

In the end it is just good OOP practice, allows for code reuse, code maintainability, and ease of expansion.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.