The Mijingo Blog

Latest news, updates, free tutorials, and more from Mijingo.

Getting Started with Craft Plugin Development with Ben Croker

by Ryan Irelan

This is a part of an interview with Craft Plugin Development author Ben Croker. Ben had a lot of great stuff to share; this is the first part.

What made you learn Craft plugin development?

Ben Croker: By nature I’m someone who likes to tinker with things and figure out how they work. That’s why I can often be found in my garage replacing parts on my motorcycle or tweaking my bicycle.

When Pixel & Tonic first released Craft (initially codenamed “Blocks”) I was very keen to take a look at the UI and the underlying code and I absolutely loved what I saw. It was obvious that they had put a huge amount of thought into building the CMS they wish they had had when they were developing their ExpressionEngine add-ons.

What resulted was a purely content focused CMS with a gorgeously minimalistic UI, as well as a framework for plugin development. Once I saw what this framework looked like and what I could do with it, I was hooked (excuse the pun).

Craft is built on the Yii framework. If I want to create a plugin, how much Yii do I need to know?

BC: You don’t need any knowledge or experience of Yii to create a plugin, although by developing plugins in Craft you will be inadvertently learning Yii’s coding conventions. As you start working with ActiveRecord and the database you’ll want to do some reading up on Yii’s docs, but it is certainly not a prerequisite.

How easy will it be to update plugins based on the changes in future versions of Craft?

BC: Craft 3 is bringing some changes to how plugins will work, however the update process for plugin developers is very simple and I am actually working on a bonus video that will cover this. There is already some documentation on how to do this as well as a recording of Brandon Kelly’s workshop at Peers 2015.

Thanks, Ben!

We’ll have two more installments of this interview coming in the next couple of days.

Ready to develop your first Craft plugin?

Ben’s Craft Plugin Development course is 90+ minutes, broken up into several videos for easier learning and reference. Ben will get you from not knowing how to develop Craft plugins to having your first plugin done and working!

Get Immediate Access

Filed Under: Craft CMS