+1-757-461-3022 x124

Introducing xDruple — An efficient object-oriented Drupal 7

 xTuple Web Services team began building an application framework on top of Drupal 7 (in 2014), to assist with our effort to integrate xTuple ERP with Drupal. We are now open-sourcing the code we developed called xDruple. This article describes the exact problems we were attempting to solve, what we've accomplished, and who can benefit from this code.

Summary

xDruple is a developer-oriented, object-oriented programming (OOP) application framework for Drupal 7 which is compatible with major core and contributed Drupal modules. We are currently migrating all the components of the xDruple framework plus documentation to public access on GitHub. (Want early access?

Problems to be Solved

  • xTuple has been developing xTupleCommerce — an eCommerce, marketing and customer service solution for ERP customers — using Drupal 7

  • Both eCommerce and enterprise solutions require high-level code quality and reliability

  • Even as Drupal 7 and contribributed modules introduced various improvements in the process, eventually we hit a ceiling: codebase, containing 120+ enabled core and contribributed modules, and massive custom functionality was less and less maintainable

  • Management of 3rd-party PHP libraries and their autoloading was a problem

Accomplishments

  • Embraced best practices (unit testing, code-driven development) and full object-oriented programming (OOP) capabilities of PHP

  • Shortcut major Drupal APIs to speed up development of the most critical and complicated components, such as custom form element and field types

  • Built a large scale application framework on top of Drupal 7 (no comma) that integrates with major core and contrib APIs

  • Reduced the number of enabled modules from 120+ down to 45+ (and we continue to count down!)

  • Managed all dependencies with Composer (a dependency management tool for PHP)

  • Separated all business logic code from the Drupal global functions as much as possible, allowing unit testing of the code

  • Using PHP7.1 and the best OOP practices allows us to statically check code, making refactoring and maintenance seamless

  • Provided maximum compatibility between existing code and upcoming Drupal 9, to speed up migration from Drupal 7

Who will be interested

  • Developers working with enterprise-grade Drupal 7 installations looking for ways to improve maintainability, speed up development and simplify support of their applications

  • Companies that cannot afford risking migration to Drupal 8 due to the large scale of their systems

Want access?

xTuple is migrating all components of the xDruple framework and adding documentation to public access on GitHub. Drupal Developers who are interested in being among the first to see the code may sign up for xDruple access.

up
58 users have voted.