databasedrupal-7methodology

In Drupal should I use content-types or database abstraction layer?


I posted a question on the Drupal forum about whether I should build my database in Drupal using content-types or the database abstraction layer and schema module: [here][1]

Any advice would be greatly appreciated. [1]: https://drupal.stackexchange.com/questions/98020/should-i-use-content-types-or-database-abstraction-layer


Solution

  • I'd recommend using content types.

    For a PHP coder, sometimes using the Drupal User Interface to build things feels non-intuitive, but in the long run you're going to benefit a lot from doing things "the drupal way.

    Once you reverse engineer your need into a content type and all it's associated fields, install the modules that provide those field types and set things up, you'll start to see the benefits.

    By writing your own schema you'll need to handle all these things yourself (and more), and not just once, but you'll need to maintain all that custom code over time.

    Learn to leverage the community and all the great work that's been done already, you'll save yourself time in the long run :)