Can scripts save the world?

November 14, 2014


I really like scripts. I use them every day. I write them every other day. I secretly love ’em♡. I also love hammers and powertools. However I don’t use a hammer to fix my guitar (I’ve got a couple of Epiphones and a Norman acoustic;)) nor do I use a wrench to fix my kids toy doll. The point is – there’s a proper tool for every job.

Scripts as a solution to every problem

This notion of scripts saving the world comes to my mind when I hear arguments like “… but I can do this with some scripts” every now and then. Sure, almost everything in the IT world can be achieved with some scripts. But is right? Is it necessary? Is it scalable, controllable, manageable? I seriously doubt it!

As you might understand, this post is directed at bash scripts. And I mean to literally bash them;) I’m not angry at scripts nor am I angry at people who use them. I’m just frustrated to see how people misuse great tools and how they justify using wrong tools and processes with wrong arguments. Scripts are like glue and duct tape – unavoidably necessary in specific cases where better tools are not available. But let’s take a look at a specific example.

Multi-stage content management in Magento

Content management is a tough topic in Magento projects and deployments. In most Magento projects there are multiple Magento instances used at different stages of a project. In the simplest case there are at least two Magento instances: development and production. However, in most cases there are many more as as there’s more people participating in the project and a more complex process is established. Here’s the diagram to explain it better:



During the project these people create various content – CMS pages, static blocks, products, categories and many other types of content. The big question is:

How does Magento content get into testing, staging or production?

There are different ways to migrate content through different stages of a Magento development project:

  1. manually copy-pasting content;
  2. creating Magento setup scripts (data install scripts) manually or with an extension;
  3. using some custom scripts;
  4. using a sophisticated, complex change tracking tool;
  5. using a content repository such as MageFlow.

3 of 5 options are just wrong. Let me explain.

Manually copy-pasting anything is just as wrong as it can be. Manual labour is just… wrong. It must be avoided, it must be automated. It’s prone to errors. It’s a waste of human resources that are capable of a lot more than just copy-pasting things.

Magento data install scripts are better than manual job but it’s still wrong. It’s wrong because it mixes content and code and that goes against good practices. You end up with a pile of content in your Git repository and that can be disastrous in the long run. Also it required coding skills and therefore is not accessible to non-technical users.

Custom scripts and hacks are undeniably the worst of the three. Why? Because it locks a store owner to a specific developer, to a specific person who wrote these scripts. If anything goes wrong there is no support. Furthermore, it’s not scalable – technically nor business-wise. It requires coding skills and probably some extra magic skills to understanding other person’s code (trust me here – this is not easy).

Then there are some sophisticated, complex change tracking tools like MagePloy. Even though we really like what they’ve built – the solution is not accessible to non-technical people and even novice developers. It requires a lot of development effort to get implemented properly and it’s not scalable across teams with multiple projects. However, kudos to these guys for creating something cool and useful.

Last but not least – there’s MageFlow.

MageFlow – the multi-stage content management system for Magento

I know I’m blowing my own horn here but this is currently the best solution for Magento content management. I’d leave it up to you to assess it (sign up for a free tier!). Here’s some basics:

  • You can start using MageFlow in 5 minutes – it’s that easy;
  • MageFlow supports the most important content types in Magento (incl. CMS pages, blocks, categories, attributes, products, and more);
  • MageFlow enables users to easily add support for custom data types;
  • MageFlow is built to be scalable across a large number of Magento instances;
  • MageFlow has a dedicated customer support team focusing on the needs of every user;
  • MageFlow will support Magento Enterprise Edition very soon (currently in beta);
  • MageFlow puts strong emphasis on following Magento standards and patterns;
  • MageFlow has a free tier and the subscription plans are very affordable;

If you got this far – thanks for reading! Let me know if you have any questions.


No comments

Leave a Reply

Your email address will not be published. Required fields are marked *