CiviCRM has been around for 9 years, and some of the technologies that we use are older and need architectural revamping and improvements. For developers, architectural improvements will make the platform easier to adapt and easier to learn -- which means developers can spend more time creating better features to help our users and our causes. In the next few releases, we'll work to improve these technologies -- especially the core frameworks and libraries that CiviCRM is based on.
Here are two areas of our focus:
  • Database layer: currently we use PEAR DB_DataObjects
  • Presentation layer: currently we use PEAR QuickForm and Smarty templating engine for manging front-end constituent forms, back-end administration forms, and data listings

Database Layer

We decided to tackle the database layer first. After evaluating a few options, Doctrine ORM was an obvious choice. We had the CiviCRM schema definition in XML, so we could easily generate Doctrine entities from it. Doctrine is also growing fast and has a large community. It integrates well with popular PHP frameworks like Symfony.
Current plan for the DB_DataObjects to Doctrine switch:
  1. Make CiviCRM schema accessible via Doctrine entities.
  2. Build API's which will use these entities for basic CRUD (create, read, update and delete) operations.
  3. Migrate existing code to use Doctrine entities (one component at a time).

Presentation Layer

So with regard to the form and data listing layers above, we are still investigating two posible approaches. One is to use a PHP framework (probably Symfony), and  the  other could be to build a client side application using a modern JS framework like AngularJS.
Another improvement that we are considering is switching to Twig from Smarty for templating (relevant if we decide to stick with a PHP framework).
Note that we have also done several improvements to add more client-side streamlining in the upcoming 4.5 release. For more info click here.

An On-Going Conversation

Revamping the architecture is a major undertaking -- there will be many issues, decisions, and patches along the way.  To ensure an open and transparent process, we've begun some informal converstionas in the 5.0 Saloon.


Congrats to the Civi Core team for tackling this re-factoring beast!

There is always so much pressure to add new features and fix bugs that it is very difficult to make time to overhaul the foundational pieces - which will surely introduce more bugs in the short term and add few if any features. However, now is the perfect time to take on this project and is well worth the time and effort it will require.

I think CiviCRM has left adolescence and is ready to move out of it's parent's old fashioned (and slightly decrepit) PEAR home.