BFFs 4eva: Drupal 8 and Custom Databases
How do you gain all the benefits of Drupal while trying to preserve an existing, complex database schema? What if migration isn’t feasible because you need real-time data maintained by a non-Drupal 3rd party? Learn one solution utilizing Drupal 8’s powerful custom entities from a transitioning Drupal 7 developer’s perspective.
In this session we will walk through topics such as:
- Approaches to mapping relational database tables to entities, difficulties encountered.
- Advantages/disadvantages to using custom entities.
- Workarounds for tables with Drupal incompatibilities.
- Creating modules and custom entities using Drupal Console.
- Making both custom entities entity references and Views relationships work.
- Using custom SQL Storage classes and class inheritance for filtering.
- Utilizing custom Views plugins to overcome the dreaded group by/aggregate duplicate row scenario.
- Lessons learned along the way.
Each area will provide code examples based on a transforming recently launched DigitalDemocracy.org from Drupal 7 to Drupal 8. By the end of the session, attendees will walk away with the knowledge of how to implement custom entities in Drupal 8 for an existing database schema. Attendees should have Drupal 7+ skills in Views/Blocks/Custom Module development, PHP OOP, and SQL experience.