Submitted by kurund on April 1, 2014 - 05:35
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
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:
- Make CiviCRM schema accessible via Doctrine entities.
- Build API's which will use these entities for basic CRUD (create, read, update and delete) operations.
- Migrate existing code to use Doctrine entities (one component at a time).
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.