Difference between revisions of "CiviCRM"

From Freephile Wiki
Jump to navigation Jump to search
(adds custom search and database info)
Line 91: Line 91:
 
* See [https://civicrm.org/extensions/drupal listing of CiviCRM extensions for Drupal]
 
* 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/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 ==
 
== Developing Extensions ==
Line 102: Line 102:
 
<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> 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/CRMDOC40/CiviCRM+Public+APIs
 
 
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/API+Examples
 
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/API+Examples
 
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
 
<li> http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
Line 109: Line 108:
 
</ol>
 
</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 ==
 
== Notes ==

Revision as of 20:41, 5 August 2015