473,395 Members | 1,568 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Is an ORM tool really necessary for web applications?

I was reading the book AJAX in action and it mentions using ORM tools
such as PEAR, EZPDO or Metastorage. The ORM is supposed to facilitate
data retrieval. Is everyone out there using one of those ORM tools?

Sep 22 '06 #1
6 3726
On ORM (Object Relational Mapper) most definitely does NOT facilitate data
retrieval. It is used when the structure within an object is different from
the structure within that part of the relational database with which it
connects, in which case you need a mapper to deal with the differences
between the two structures. If the two structures are identical then you
don't need a mapper because it is redundant.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org

"Thierry Lam" <la********@gmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
>I was reading the book AJAX in action and it mentions using ORM tools
such as PEAR, EZPDO or Metastorage. The ORM is supposed to facilitate
data retrieval. Is everyone out there using one of those ORM tools?

Sep 22 '06 #2
Hello,

on 09/22/2006 04:23 PM Thierry Lam said the following:
I was reading the book AJAX in action and it mentions using ORM tools
such as PEAR, EZPDO or Metastorage. The ORM is supposed to facilitate
data retrieval. Is everyone out there using one of those ORM tools?
I am, but I am suspicious, as I wrote Metastorage. ;-)

Anyway, what can I tell you is that I started Metastorage in 2002 and I
wish I started invested time on it much sooner.

It is really a breeze. I use the Use Case Mapping methodology to develop
Web applications.

http://www.meta-language.net/metastorage-example.html

This methodology could be implemented without using ORM tools, but with
Metastorage now I focus most of my time on implementing the business
logic, i.e. classes that implement the use case logic steps. The data
access layer is totally generated by Metastorage.

Not only it generates bug free code (saving me a lot of debugging time),
but it also prevents that I waste time rewriting data access code
whenever I figure I need to change anything in the data model. Sound too
good to be true, but it is real.

I believe that most people still hand code their SQL. I think that is
due to the fact that they don't know the power of code generation tools
to implement ORM.

At least with Metastorage, you do not have to write a single line of
SQL. You just need to determine what objects of your data model you want
to access and how. If you are confortable with object oriented
programming, it is a matter of time until you get up and running with
ORM tools that do most of the muscle work for you, so you can focus
mostly on the brain work.

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Sep 28 '06 #3
Hello,

on 09/22/2006 08:41 PM Tony Marston said the following:
On ORM (Object Relational Mapper) most definitely does NOT facilitate data
retrieval. It is used when the structure within an object is different from
the structure within that part of the relational database with which it
connects, in which case you need a mapper to deal with the differences
between the two structures. If the two structures are identical then you
don't need a mapper because it is redundant.
That is really not the role of Object Relational Mapping. In this
context, mapping means translating data structures into SQL statements
to store and retrieve such structures from objects.

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Sep 28 '06 #4

"Manuel Lemos" <ml****@acm.orgwrote in message
news:ef**********@emma.aioe.org...
Hello,

on 09/22/2006 08:41 PM Tony Marston said the following:
>On ORM (Object Relational Mapper) most definitely does NOT facilitate
data
retrieval. It is used when the structure within an object is different
from
the structure within that part of the relational database with which it
connects, in which case you need a mapper to deal with the differences
between the two structures. If the two structures are identical then you
don't need a mapper because it is redundant.

That is really not the role of Object Relational Mapping. In this
context, mapping means translating data structures into SQL statements
to store and retrieve such structures from objects.
I disagree. The primary function of an ORM is not to generate SQL
statements, that is what a Data Access Object is for. An ORM has a different
purpose which I have already explained. Take a look at
http://www.martinfowler.com/eaaCatal...taMapping.html

--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Sep 29 '06 #5
Hello,

on 09/29/2006 05:41 AM Tony Marston said the following:
>>On ORM (Object Relational Mapper) most definitely does NOT facilitate
data
retrieval. It is used when the structure within an object is different
from
the structure within that part of the relational database with which it
connects, in which case you need a mapper to deal with the differences
between the two structures. If the two structures are identical then you
don't need a mapper because it is redundant.
That is really not the role of Object Relational Mapping. In this
context, mapping means translating data structures into SQL statements
to store and retrieve such structures from objects.

I disagree. The primary function of an ORM is not to generate SQL
statements, that is what a Data Access Object is for. An ORM has a different
purpose which I have already explained. Take a look at
http://www.martinfowler.com/eaaCatal...taMapping.html
I am afraid you are confusion the purpose with the means. This is what
ORM is:

http://en.wikipedia.org/wiki/Object-relational_mapping

Now, how do you implement it, that is another story.

--

Regards,
Manuel Lemos

Metastorage - Data object relational mapping layer generator
http://www.metastorage.net/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
Sep 30 '06 #6

"Manuel Lemos" <ml****@acm.orgwrote in message
news:ef**********@emma.aioe.org...
Hello,

on 09/29/2006 05:41 AM Tony Marston said the following:
>>>On ORM (Object Relational Mapper) most definitely does NOT facilitate
data
retrieval. It is used when the structure within an object is different
from
the structure within that part of the relational database with which it
connects, in which case you need a mapper to deal with the differences
between the two structures. If the two structures are identical then
you
don't need a mapper because it is redundant.
That is really not the role of Object Relational Mapping. In this
context, mapping means translating data structures into SQL statements
to store and retrieve such structures from objects.

I disagree. The primary function of an ORM is not to generate SQL
statements, that is what a Data Access Object is for. An ORM has a
different
purpose which I have already explained. Take a look at
http://www.martinfowler.com/eaaCatal...taMapping.html

I am afraid you are confusion the purpose with the means. This is what
ORM is:

http://en.wikipedia.org/wiki/Object-relational_mapping

Now, how do you implement it, that is another story.
The examples in that article clearly show that when the structure of the
object is different from the structure of the database then it because
necessary to provide something which provides a map between the two
different structures. That is entirely different from a Data Access Object
which accesses the database without dealing with different structures. In
short, an ORM is not a DAO, and it is more efficient not to have different
structures so that you do not need an ORM.

--
Tony Marston

http://www.tonymarston.net
http://www.radicore.org

..
Sep 30 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: GianGuz | last post by:
Everyone knows about the complex and cpu-expensive procedures taken by dynamic_cast to find the right function call in a virtual classes hierarchy. The question I would to rise is when...
12
by: Jack | last post by:
Hi, Is it recommended to use the var keyword when declaring a variable? IE lets me create a variable with var, then create the same one again with no problem. Also it lets me create a...
22
by: What Rhyme is it? | last post by:
....for <some poets> to show their stupidity about technical issues that they don't have a shred of a clue about. I really have to wonder. With that, I must wash my imaginary cat.
0
by: pat | last post by:
Group, In order to communicate with SSL (443) web services, I need to have my VB.NET client accept certs. This is no big deal when modifying the References.vb file's New() method with the line:...
5
by: crescent_au | last post by:
Hi all, I've been using PHP for a while now but I haven't actually used PEAR. I have just read half a chapter in a book, it sounds alright but haven't actually used it. I was just wondering, is...
18
by: Earl Anderson | last post by:
First, I feel somewhat embarrassed and apologetic that this post is lengthy, but in an effort to furnish sufficient information (as opposed to too little information) to you, I wanted to supply all...
7
by: Jim Langston | last post by:
I'm working on a program, and at one time I find it necessary to load classes into a map. Now, these classes don't have default constructors, so I can't retrieve them using MyMap. So I wound...
16
by: Bill Cunningham | last post by:
Is it really necessary to check the return type (int) or fclose ? fopen I can understand but what about using fflsuh(fp); /* fopen's pointer */ fclose(fp); Would that take care of any...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.