Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
DataMapper for FUEL
  • Any plans for an ORM (preferably similar to DataMapper) support for FUEL? Either built-in or as as seperate plugin? WanWizard is doing great work on managing DataMapper - which makes me think how this will continue as FUEL grows? Thanks!
  • Currently we have a lightweight ORM in there called ActiveRecord.
  • Yes, I know. I've checked the User Guide, installed FUEL on a test domain. However, FUEL's light-weight Active Record is nowhere close to DataMapper... and it is not easy to migrate code for a site based on CI + DM to FUEL.
  • It's not very easy to migrate code from Doctrine, or Propel, or Rails either. However you look at this, converting a site from one framework to another will require some re-factoring whether it has the same ORM or not. Even a ported DataMapper would require a lot of manual changes. DataMapper is an ORM design for CodeIgniter, while our ActiveRecord has been coded specifically to our needs and will only improve over time. What are some of the features DataMapper has that ActiveRecord is missing? Bear in mind that the documentation is unfinished while Dan Horrigan is out of action in hostpial.
  • Maybe it is just the lack of documentation for now; but these are the main things that I expect: * Relationships
    * Transactions Of course, for example, just the "relationships" have many varieties, bits and pieces in itself which DataMapper is capable of (built overtime); however seeing the full documentation may change my (and many others') mind. Thanks! :)
  • Documentation for the ActiveRecord class is very needed... just as much (or needed more, imo) than the other classes documentation. I say this because when I build an app, I am always thinking of the database structure.
  • Gregory A wrote on 01/14/11 2:46 pm:
    Documentation for the ActiveRecord class is very needed... just as much (or needed more, imo) than the other classes documentation. I say this because when I build an app, I am always thinking of the database structure.

    Of course. Did you miss this bit?
    Bear in mind that the documentation is unfinished while Dan Horrigan is out of action in hostpial.
  • Phil is right. Currently, Datamapper uses the underlying CI framework, especially the Database and CI Activerecord libraries. These would need to be rewritten or emulated to make Datamapper work in Fuel. It's something I've been thinking about, but I have no plans in that direction. To be honest I don't look forward to maintaining two codebases, so if this is going to happen, I'll probably have to make a DB abstraction layer first, making it slower and more complex.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion