Are entities drupal's new nodes?

Submitted by fago on Fri, 11/06/2009 - 12:07
With drupal 7 the concept of an entity gets introduced in drupal, thus nodes, comments, users, terms - all these are drupal's entities. Most important the also new field API is able to support any entity! So how will this affect the drupal landscape? As a consequence contrib modules will have to support all kind of different entities to be really useful. Many modules like views or flag already support different entities, with the number of entities growing this will become even more important! Well while working on rules2 and the profile module for d7, I had to implement basic CRUD functionality, which is already very simple in d7. To make it even simpler I started working on an entity CRUD API. This is useful for developers creating a new db entity as they get all CRUD functionality for free. It's even possible to introduce new entities just by implementing a hook. So as an entity is now fieldable, supported by views and easy to create, I see the number of different entities growing. Instead of implementing custom content types or new features for nodes, developers will create custom entity types and new features for entities. So in a way entities are becoming drupal's new nodes! Yeah, no more ugly tricks necessary! Awesome! While thinking about all that an interesting thought came to my mind. Will this lead to the creation of a Custom Entity Kit - thus a module that allows the creating of new entities like CCK and now core does for content types?

Tags (not verified)

Tue, 11/10/2009 - 00:19

Good stuff. Do you think the proliferation of entities will increase or decrease the problem described here: I would suggest that the problem comers form a failure to fully use the node system, and the creation of new entities unsupported by Drupal core. Now that Core supports generic entities, in theory, thing could get better. But in reality, I am concerned that module developers will fail to fully use the entity system just as they failed to use the node system. To turn a phrase, it's not that the node system was tried and found wanting, but that it was found difficult and left untried. The same could very well happen with entities.

>in theory, things could get better. But in reality, I am concerned that module developers will fail to fully use the entity system just as they failed to use the node system. Indeed, so its our task to educate module developers. Write entity-aware modules! Document them and show examples! But also we need to work on making writing entity-aware modules easier - that's mostly something for d8 though.

Rodriguez (not verified)

Sun, 01/10/2010 - 20:42

Hmm these Drupal Entities look great. It should make things much easier to develop, as well as being more logical and hopefully more powerful. Will be interesting to see how it is adopted by contribs! Inner Game | Seduction Community.

manuelBS (not verified)

Tue, 02/07/2012 - 21:48

I really like entities, its a greate abstraction layer. But could you tell me, when to create a new entity and create a bundle from it, and when to create a new bundle from an existing entity. I cannot get a clear thought about that strategy.