FORUM IS CLOSED. PLEASE USE QUESTIONS / ANSWERS PAGE INSTEAD
Login  |  Forum  |  Search   

Board index » Development » Feature requests




Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2
 
Author Message
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun Apr 25, 2010 7:22 am 
Offline

Joined: Sat Feb 27, 2010 9:42 am
Posts: 30
No it doesnt.
You require cmd line tools while developing and no one does really dev on a staging server, so you develop locally. Locally you use the cmd to transform schemas into sql syntax and so on, the results are classes (many of them in the beginners view) which you simply upload to the webspace.
So while you develop you need the cmd, after developing is done you dont.
The schema should anyway never be modified online since this would mean you run out of sync with your local dev tree which should typically be under source control


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun Apr 25, 2010 8:05 am 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
Thank you for detailed information. I still wait others to join the discussion.


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun May 02, 2010 1:14 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
Wen I talk to web developers in personal, they say, that ORM is to difficult for many of them. So we think about PDO.

Main pros:
  • easy to learn
  • fast
  • database independent
  • automatic escaping of variables

Cons:
  • no automatic way to retrieve object from database or save to database


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun May 02, 2010 2:03 pm 
Offline

Joined: Sat Feb 27, 2010 9:42 am
Posts: 30
Can you describe the cons more clearly?

What is automatic?

I retrieve something like

Code:
$user = UserPeer::retrieveByPk(1);



Ok, primary key.
Other way
Code:
$user = UserPeer::retrieveByMyCustomMethod("nickname");


Saving:
Code:
$user = new User();
$user->setName("foobar");
$user->save();

here the ORM takes the responsibility to create a transaction, optimize query, write and commit the transaction.
All these methods except the custom one is automatically generated from the schema definition. It does escape the input, store and retrieve.


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun May 02, 2010 2:23 pm 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
I wrote about pros and cons of PDO. And in PDO you can't simply say: $user->save(); You need to write an SQL. It is what I mean by automatic. And it is disadvantage of PDO.


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Sun May 02, 2010 5:19 pm 
Offline

Joined: Sat Feb 27, 2010 9:42 am
Posts: 30
Ah sure, my fault, was somehow on the ORM train :)


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Wed May 05, 2010 1:43 am 
Offline

Joined: Wed May 05, 2010 1:16 am
Posts: 8
IMHO, although Propel looks nice, it's geared towards the big stuff while ImpressPages isn't. I mean IP is supposed to create fast, fairly simple and easy to manage websites, isn't it? Its speed comes from its lightweight, not from some supposedly superoptimized query (at the expense of a steep learning curve for devs, anyway). Then what's doing Propel in this equation?

I second Sokolowski, putting effort in adding more modules is better.


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Thu May 06, 2010 6:10 am 
Offline
Project Developer

Joined: Tue Apr 28, 2009 9:43 am
Posts: 1720
valuable opinion. I still wait more people to join the discussion.


Top 
 Profile  
 
 Post subject: Re: Use ORM as database abstraction layer
 Post Posted: Thu Oct 25, 2012 2:57 pm 
Offline

Joined: Sat Feb 27, 2010 9:42 am
Posts: 30
Every decent provider (usually one that does not use safe_mode on :D)
Can host Propel and Doctrine. I've deployed both on shared hosts without a problem since they do not install but simply exist.

I've used both ORMs while working with the Symfony(1 and 2) Framework


Top 
 Profile  
 
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 19 posts ]  Go to page Previous  1, 2

Board index » Development » Feature requests


 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron