Kickstarting Entity Development
I’ve spoken at length about Entities in Drupal and the development opportunities they afford us. Nevertheless, these are early days in Drupal 7 development land and a lot of questions remain - as well as a lot of work to even get started. While everyone is pretty happy to say that Entities are a really cool abstraction the next question is how and when would they use that in their own project.
The Examples for Developers module has an ongoing effort to provide a working example but part of the difficulty is that an example using just core functionality is mostly an academic exercise. All real life examples of entities "in the wild" depend heavily on other modules or a lot of application-specific code.
In order to address these issues and make it easier for people to decide when and how to use entities I’ve started the Model Entities project.
The goals are:
a. To provide a fully functional but generic implementation of entities and entity administration interface making use of the Entity API and Views for the appropriate aspects of that. This will serve as a more realistic example and also as code that can hopefully be used “as is” within your own project. While you can refer to projects such as Profile2 or Commerce for uses of entities they mix the entity specific
b. Create dev-friendly documentation (i.e concise to the point diagrams, cheat sheets) and reference a body of real-life examples (I did some of that in a presentation in Dev Days Brussels)
c. Favor convention over configuration - a necessary requirement to provide something that works, can be used as is. Throwing some opinion around in unavoidable.
Hope this will be of help - in the best of open-source traditions I am doing it because I have a couple of modules that need entities and thought I’d separate the domain-specific from the generic and share.
For those of you wondering what Entities are all about checkout the other blog posts on the subject.