400 likes | 561 Views
CiviCRM v5 Technology Preview. Adrian Drott 2011, BY-NC-SA. Tim Otten IRC: totten. Kurund Jalmi IRC: kurund. CiviCRM v5: Why v5?. Because 5 comes after 4?. CiviCRM v5: Why v5?. Because salad!. CiviCRM v5: Why v5?. CiviCRM v5: Why v5?. CiviCRM v5: Why v5?.
E N D
CiviCRM v5 Technology Preview Adrian Drott 2011, BY-NC-SA Tim Otten IRC: totten Kurund Jalmi IRC: kurund
Because 5 comes after 4? CiviCRM v5: Why v5?
Because salad! CiviCRM v5: Why v5?
CiviCRM v5: Why v5? • 1. Install Civi + CMS (developer build) • 2. Create xml/schema file • 3. (For extensions: Hack Gen Code) • 4. Run GenCode • 5. Create BAO (Create, Get, Delete) • 6. Create API (Create, Get, Delete) • 7. Create route (XML Menu) • 8. Create page controller (QuickForm) • 9. Create page template (Smarty)
CiviCRM v5: Why v5? • 1. Install Civi + CMS (developer build) • 2. Create xml/schema file • 3. (For extensions: Hack Gen Code) • 4. Run GenCode • 5. Create BAO (Create, Get, Delete) • 6. Create API (Create, Get, Delete) • 7. Create route (XML Menu) • 8. Create page controller (QuickForm) • 9. Create page template (Smarty)
What is doctrine? CiviCRM v5: Doctrine Introduction
CiviCRM v5: Doctrine Introduction What is doctrine? It is better than DAO?
CiviCRM v5: Doctrine Introduction What is doctrine? It is better than DAO? Let's see some concepts and how it works
CiviCRM v5: Example Find location type where id=1 $em = CRM_DB_EntityManager::singleton(); $loctiontypeInfo = $em->find('\Civi\Core\LocationType', 1);
CiviCRM v5: Doctrine Migration (Eventually)
CiviCRM v5: Doctrine Migration (Eventually)
This is hard. CiviCRM v5: Doctrine Migration
CiviCRM v5: Doctrine Migration:But... Can we train a computer to do it?
CiviCRM v5: Doctrine Migration:#3: Change Everything CiviEvent, ... CiviEvent, ... Smarty !!! QuickForm API Entity API BAO DAO/GenCode Doctrine DB_DataObject
CiviCRM v5: Doctrine MigrationDon't Panic The Basics Experiments Sonata Experiment Manual Transformation Experiment Port Data Model Angular Experiment Doctrine CRUD API Time Earnest Phase Automatic Transformation Change Everything Manual Transformation
Before schema + metadata = xml xml → Gencode → DAO + sql CiviCRM v5: Doctrine in Core
Before schema + metadata = xml xml → Gencode → DAO + sql Now xml →Doctrine Entities + meta data + sql doctrine console → schema ( alternate option ) CiviCRM v5: Doctrine in Core
CiviCRM v5: Doctrine and APIv4 Via Wikipedia
CiviCRM v5: Doctrine and APIv4The Problem 150 entities!
CiviCRM v5: Doctrine and APIv4The Kernel API Kernel Providers API Providers API Subscribers MagicFunctionProvider DoctrineCrudProvider ReflectionProvider TransactionSubscriber I18nSubscriber ChainSubscriber XDebugSubscriber PermissionCheck AnnotationPermissionCheck
CiviCRM v5: Doctrine and APIv4The Kernel > Resolve S > > S Authorize > > Prepare S > > Invoke P > > Respond S Exception S > >
This is awesome !!! CiviCRM v5
This is awesome !!! How can I participate/help with this? CiviCRM v5
Setup local sandbox http://wiki.civicrm.org/confluence/display/CRMDOC/Github+for+CiviCRM git checkout doctrine composer install ( Don't have composer? Check https://getcomposer.org ) CiviCRM v5
https://github.com/civicrm/civicrm-buildkit civibuild create doctrine –url http://localhost:8080 CiviCRM v5
Thank you Any more questions ?