On the surface, Drupal makes a great content management system. Flexible fields, custom types of content, and more make it seems ideal and ready to take on any content or application requirements. Work with Drupal past the surface and soon you'll find that those dream features have very real limits and running into them can hurt. Badly.
A little history
The sheer number of different solutions that have presented themselves over the years makes it obvious that there isn't an easy one size fits all solution to data modeling. From the original node system (with types defined each in their own module), the Content Construction Kit, to Drupal 7 Fields, the solutions have always been evolving. With all the flexibility that comes with the sanctioned version there is often a tradeoff. In Drupal 7 Fields API, that tradeoff is usually performance, with large numbers of fields bringing a site to a crawl.
A better way
Imagine a system that allows you the flexibility to construct your database schema anyway that you want, one that gives you performance, and ease of imports while better representing the relations between your data. What if you could have all this without giving up the power of Drupal, with it's easily extended field types? What if you could build your site this way, knowing that you could integrate your data with any contributed module, without having to rewrite everything, or write your own integration code?
I sincerely believe that this isn't just my fantasy, but that of just about every developer out there. Being able to reuse as much code as possible (DRY) but having the flexibility to quickly control the things that matter the most to you without fighting the system you are integrating with. It kinda sounds like the future, right?
The future is here
The surprising truth is that this dream is much closer to reality than you would think. Drupal 7's Entity API is a bit of a sleeper, waiting to be fully discovered and put to work. It was added at the last minute as a way of encapsulating the ideas required by the new Field API in order to function across Nodes, Users, Taxonomy terms and in a unified way. What Drupal actually got, was the hint of core system for modeling data.
When combined with the Entity API contributed module, this system becomes much more complete, eliminating the need for repetitive code to handle things such as saving or deleting custom entities. Despite the ease of use, I've found a bit of a disconnect when talking to folks about the Entity API.
I think alot of folks don't know just how easy it is to model your data with custom entities. Or maybe they don't know how easy it is to encapsulate their domain logic within their models. Maybe the most important feature to them is being able to have control over their schema.
Whatever it is, I think it's important to get more people using the Entity API. Which is why I've decided to write Model Your Data with Drupal, a book dedicated to understanding and utilizing the Entity API in real world situations. Model Your Data with Drupal will cover the core APIs such as Entity, Fields, Schema, Forms, and more along with contributed modules such as Entity API, Views, and others. While it's not an all inclusive module development book, it will give you all the information you need to write a module that will let you simply, and easily model your data.
To learn more, and keep in touch, visit http://modelyourdatawithdrupal.com and sign up for updates for more info.