Languages

Kickstarting Entity Development

Introducing a drupal.org project to help kickstart Entity development by providing a fully functional but generic example and associated documentation.

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.

Comments

Submitted by Anonymous (not verified) on

Good effort !! but this need to be a part of examples module.

Thank but I don't think it can be part of examples - check the issue I link to. Examples tries to stick to Core - no dependencies. Also this aspires to go a bit beyond just an example.

Submitted by bleen (not verified) on

The link to your model entities project is borked

Submitted by blazey (not verified) on

Great idea. Please post a comment here when you push the code. I can't wait to see it :)

Submitted by jeni_d (not verified) on

Hello..... I am a drupal developer and such kind of information is really very helpful to me. I have bookmarked the blog and waiting for more posts.

Thanks & Regards..
Jenifer Diaz from http://www.halosys.com/drupal-development

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
By submitting this form, you accept the Mollom privacy policy.