Open main menu

Changes

1,250 bytes added ,  20:41, 5 August 2015
adds custom search and database info
* See [https://civicrm.org/extensions/drupal listing of CiviCRM extensions for Drupal]
* [http://wiki.civicrm.org/confluence/display/CRMDOC/Extensions Extensions documentation in the wiki]
* [http://wiki.civicrm.org/confluence/display/CRMDOC/Create+a+Custom-Search+Extension Create a Custom Search extension]
== Developing Extensions ==
<li> Use the [https://equality-tech.com/civicrm/api/doc#explorer 'API Explorer'] and the [https://equality-tech.com/civicrm/api/doc#docs 'API Docs'] interface that is available in your installation
<li> http://wiki.civicrm.org/confluence/display/CRMDOC40/CiviCRM+Public+APIs
 
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/API+Examples
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
</ol>
== Database ==
The database code in CiviCRM is divided into two logical sections: the DAO and the BAO. The BAO holds the "business logic" for objects and extends the DAO. The DAO is concerned with data to/from the database backend and it's definition (object to relational database mapping, aka "<abbr title="Object-relational Mapping">[[wp:Object-relational mapping|ORM]]</abbr>"). Both are an extension of the [https://pear.php.net/manual/en/package.database.db-dataobject.php PEAR DB DataObject] class. As of August 2015, this is true and [https://civicrm.org/node/95 this blog post from 2006] gives some more (early) background.
<source lang="php">
// from CRM/core/DAO.php
 
require_once 'PEAR.php';
require_once 'DB/DataObject.php'
class CRM_Core_DAO extends DB_DataObject
</source>
In 2009, [https://civicrm.org/node/597 Doctrine was proposed] as a OODB approach instead of an ORM. There are [https://civicrm.org/blogs/dharmatech/data-mapper-pattern-civicrm-architecture-proposal other discussions too] in the "Architecture Series" that are worth reviewing if you want to know more about database development in CiviCRM.
== Notes ==
4,558

edits