Your Site Should be Full of BEANs*

From: Dave Hall
To: boxes <[email protected]>
Subject: Our Relationship

Dear boxes,

I'm sorry but things just aren't working out between us. It's not you, it's me. I need some time to myself. I need to think things through. I'm not sure what I want. We should spend some time apart. We should try new things. I will miss you, but this is for the best. Let's meet for coffee in a couple of weeks.

Love

Dave
xox

Breaking up is never easy, but recently I broke up with the boxes module. I'd been with boxes for a long time, we'd done a lot of good things together. Over time I'd become oblivious to some of boxes' flaws, such as giving black eyes to sys admins who run features reverts on sites where users can edit boxes. Life was pretty good, but my life still felt somewhat empty and incomplete.

One day I was standing in a crowded room with lots of modules on drupal.org and across the room I spotted BEAN. I feel in love instantly. BEAN was decked out in all the latest Drupal 7 gear - fields, Entity API and CTools. The way BEAN moved make me weak at the knees. After another beer I got my courage up, crossed the room and asked if BEAN would like to come back to my site. I was shocked, BEAN wanted to hang out with me and it wasn't just a one night fling. I've been going steady with BEAN for a couple of months now.

Just before BEAN moved in permanently to my dev environment I had to find a way of removing all the remnants of boxes from my life (aka existing sites). It took me less than an hour. I created a new BEAN type and called it "box", I then wrote a little "drush scr" script which converted all of my boxes to BEANs and even updated my contexts to use the newly created BEANs. I hope neither bean or boxes finds my work on github. I chose github hoping neither of them would find my work and also because I don't want to maintain this as a module on d.o.

On a serious note - BEAN is awesome! If you haven't tried it, you really should. BEAN treats blocks as content, not config which is really useful for most sites. For new sites BEAN is a drop in replacement for core blocks or boxes making it super easy to get started. To learn more check out the docs.

If you're interested in seeing the full power of the BEAN module, and other cool stuff I've been working on recently, please comment on my DrupalCon session proposal - An Enterprise Scale Drupal Workflow. It will be a more technical version of my session at Drupal Business Days a couple weeks ago.

* "Full of beans" is phrase commonly used in Australia to describe energetic children.

RE: Our Relationship

boxes wrote:
From: boxes <[email protected]>
To: Dave Hall
Subject: RE: Our Relationship

 

Please come back. I can change.

Love

Boxes

Added Mon, 2012-05-21 01:22

"Full of beans" is also an

Anonymous wrote:

"Full of beans" is also an American phrase for lying ;)

Added Mon, 2012-05-21 02:41

We've found you.

brantwynn wrote:

Why on earth would you keep this migration project away from Drupal.org?

I've added a link to your github project to the Bean documentation.

Thanks for the great article!

Added Mon, 2012-05-21 04:18

We've actually skipped over

dalin wrote:

We've actually skipped over Beans entirely and went straight to Fieldable Panel Panes. So far it's treating us very well and offers additional features that makes it easier to empower content admins to lay out certain pages.

Added Mon, 2012-05-21 05:18

RE: We've found you

Dave wrote:

I threw this over the wall so others could make use of it. I don't have any intention of maintaining it, it is just an example. I believe you have a responsibility to maintain what you put on d.o.

If someone wants to pick this up and run with it on d.o, they're welcome do it.

Added Mon, 2012-05-21 10:21

I have a pretty solid

Iztok wrote:

I have a pretty solid relationship with Nodeblock, but after reading this I am starting to see that we two also went the wrong way...

Added Mon, 2012-05-21 19:12

Drupal 6 backport please

Anonymous wrote:

Drupal 6 backport please

Added Mon, 2012-05-21 19:29

Features Revert - The real code way

Fabian Franz wrote:

What many people don't get about features reverting is that the live site is also an upstream code base and should be treated like one.

Where the usual code flow is:

  • Push code to production
  • Revert feature (and overwrite all changes)

It should be a branch based approach:

We have branch production and branch master (development):

Updates then go like this:

[production] - On live

  • drush -y features-update
  • git commit -a
  • git push origin production

[master] - On devel system

  • drush -y features-update
  • git commit -a

Everything is now in code.

And now

[master] - On devel system

  • git fetch
  • git merge origin/production
  • # Resolve conflicts and preserve client boxes changes (should mostly _not_ be conflicting anyway)
  • git commit
  • git checkout production
  • git merge master
  • git push origin production
  • git checkout master

[production] - On live system

  • git pull
  • drush -y features-revert

Now all features are reverted, but the client changes on production are preserved.

New boxes can still be pushed and created without deploy module.

Conflicts are rare, because usually boxes content is not changed on development and the hard work of the code conflicts is solved by the branch approach.

This is a possible way to work with boxes in configuration and not in content.

Added Mon, 2012-05-21 21:57

BEAN + Problems Blocks

Chris wrote:

BEAN does seem to solve some of the problems blocks, but one thing that has always bugged me about blocks is that they get very cumbersome to work with on large sites because there is basically no way to organize them. They just show up in one giant list. Does BEAN do anything to address this issue?

Added Tue, 2012-05-22 05:05

RE: BEAN + Problems Blocks

Dave wrote:

I use context for managing block layout, so that avoid the the "big list" issue when looking at your blocks. BEAN allows you to manage you BEANs through a content listing page. You can also add a taxonomy field or even a view if you want more flexibility in managing your BEANs.

Added Tue, 2012-05-22 12:26

RE: BEAN + Problems Blocks

indytechcook wrote:

Since the beans module extends the entity api module it exposes the beans to views. You could make a admin screen with views.

It makes me very proud to see the excitement with this module. This is what makes all of the late nights worth it. I'm happy to be able to give back and very thankful for everyone else who has helped me with Beans. Keep the patches coming!

Cheers, Neil

Added Thu, 2012-05-24 00:17

How to BEANs perform in a

Anonymous wrote:

How to BEANs perform in a multilingual site?

Do they simply translate just like a node?

Added Tue, 2013-02-19 23:04

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <p> <div> <blockquote> <pre>

More information about formatting options