SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Thread: orm and php

  1. #1
    SitePoint Guru
    Join Date
    Mar 2006
    Posts
    701
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    orm and php

    This question may already exists here but I did not find it at my search.
    I am thinging to use a framework as Cymfony or CI at my largest php projects.
    At java web projects also hibernate is using.
    It is advisable to use orm frameworks for php for largest project, e-commerce etc?
    And if yes, which is the best (or the 2-3 best?)
    I found proprl,doctin .
    Dimis

  2. #2
    SitePoint Guru
    Join Date
    May 2005
    Location
    Finland
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you need an ORM, go for Doctrine.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    is doctrine easy to learn ?

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2006
    Location
    Dubrovnik, Croatia
    Posts
    82
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Doctrine is good ... but no one is talking about adodb. I'm using it for two years and it's easy, good, smaller then doctrine or propel

  5. #5
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    Tbh, Adodb is a type of dbal not too unlike pdo which of course is a dbil, neither of which are an orm, afaik. HTH.

  6. #6
    SitePoint Guru dbevfat's Avatar
    Join Date
    Dec 2004
    Location
    ljubljana, slovenia
    Posts
    684
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, ADODB isn't an ORM. If you want an ORM, you can try one of the mainstream projects; Propel or Doctrine. IMO Doctrine would be a better choice, although Propel isn't bad either.

  7. #7
    SitePoint Member
    Join Date
    Oct 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Adodb does have include active record/orm functionality
    phplens.com/lens/adodb/docs-active-record.htm

    Looks much easier to learn and use. Adding it to a project now.

  8. #8
    Coding and Breathing CoderMaya's Avatar
    Join Date
    Feb 2008
    Location
    Atlit, Israel
    Posts
    470
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    There's the Retro way in my framework, you can copy the record and recordbase (.php) files and use it in your project like this (just need to change a few lines for it to work manually):

    PHP Code:
    <?php

    $rb 
    = new RecordBase();
    $rb->connect($host$user$password);
    $rb->select($rb);


    $filters['name'] = 'marc';
    $users find('users'$filters);

    $new_user record('users');

    $user->name 'yam';
    $user->save();

    // update a single user
    $user single('users', array('name' => 'yam'));
    $user->name .= 'marc';
    $user->save();

    // update 10 first users
    $users find('users'null10);
    foreach(
    $users as $user)
    {
        
    $user->name .= ' - updated';
        
    $user->save();
    }
    Edit:

    On second thought, you could just give the whole framework a try. It includes form validation and more.
    Learn about the new Retro Framework
    Code PHP the way it was meant to be coded!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •