Monday, 1 July 2013

When and why to choose to use a Drupal custom entity


Entities introduced into Drupal 7 and a number of contrib modules significantly improved the data modelling capabilities of Drupal. Prior to entities we were stuck with add-hoc solutions and data modelling that was essentially based on making modifications to data structures designed for page related content.

It is still not trivial to get started with entities however, especially difficult to get past the ingrained response to solving every data modelling problem by creating a new content type and adding fields.

Drupal as a framework (the role of entities)


This is my second post in a series of related posts about Drupal entities the first is here.

If Drupal was predominately a framework as opposed to a customisable CMS then you would expect that a skilled PHP programmer with a good understanding of appropriate design patterns from other frameworks (MVC etc.) could reasonably quickly start from scratch with Drupal to build a moderately complex and well designed website.

Unfortunately this is not the case at the moment, the learning curve for Drupal is still too steep for most people to pull this off. One aspect of the "Drupal way" is to not re-invent the the wheel and to use from the massive selection of community contributed modules to implement your required functionality, and this works well for relatively simple sites.

Of course you could point out that Drupal is essentially a CMS, but it is increasingly being used for functionality that goes far beyond a traditional CMS and in those cases it is fair to ask how does it stack up as a framework. Sometimes software like Drupal will also be described as a content management framework (CMF), it may put things in perspective to see a list of software that could be considered in a similar space.

Where Entities step in to raise the bar for Drupal is in the role of modelling data.

Sometimes you have to write code, maybe your requirements are not mainstream enough to have a custom module or you have to integrate with a bespoke API or your clients are using Newsweaver rather than MailChimp or you have to integrate a bunch of contrib. modules in a way that was never envisaged. Of course all those wonderful custom modules required development and Drupal core requires a continual injection of developers that can work on the next generation of Drupal required for the ever involving web.

Not surprisingly the higher paid developer roles expect you to write quite a lot of code...

Sunday, 30 June 2013

Background to Drupal entities


The first of a series of related posts about Drupal custom entities, all will be linked into here as they are published. If not useful in themselves I hope to at least provide lots of links to useful entity resources online.

Entities were introduced into Drupal 7, they fundamentally change the way you can deal with things in Drupal and pave the way for some vast improvements in the use of Drupal as a development framework (rather than a CMS with customizable bits and modules that can be bolted on).

Entities are not proving easy for people to get into, although embraced by a number of contributed modules, many working Drupal developers don't fully understand or use them and although there are plenty of resources and explanations about them it is not easy to get started using them.

I believe that a key factor in the small number of developers embracing entities is that they are not directly exposed to site builders in Drupal 7, there is no sliding scale of entity use in core, you have to know about how they work and get your hands dirty.

Mastery of Entities may have been 'Take it or leave it' for a lot of developers building Drupal sites in Drupal 7 but I think for Drupal 8 they will be vital knowledge for anybody building medium to large Drupal sites.

Thursday, 27 June 2013

Shoddy Drupal security advice from

Getting back into twitter and quickly encountering some of the things I dislike about the current social media and information saturation: shoddy content pushed out merely for traffic purposes and that thinly disguised advertising.
This article 10 Simple steps to protect your Drupal site is bad, bad, BAD. Apart from the fact that there is no distinction between upgrade and update (are you really going to do all that just to update a module?) there is some lame advice about file permissions (755 is more secure than 644 really???).

Friday, 7 June 2013

New WordPress blog on the way

I started blogging about language learning many years ago (about seven I think), at the time using a service like Blogger was the path of least resistance, I was working on publishing platforms for online Journals and magazines and didn't at work, at home I wanted to learn languages not more of the same.

Now I feel a need to have an online presence that represents me centrally on the web and I want to control that rather than being enslaved to an online service. I have had (although my name is Christopher David Hall I always associate the full 'Christopher' as being in trouble as that is the only time anyone calls me that) for some time now but put nothing there.