I understand Craft Templating pretty well, but when it comes to programmation I am entirely lost, I don't get how it works. I used to use CodeIgniter a lot, which is a MVC as you guys may know. In CodeIgniter, everything goes through the controller, then in the controller, I call models. In models, I interact with database and then return the data to the controller and then display a view. In Craft, it doesn't seems to work like this. Is there any good tutorials for "programming" in Craft or develop a plugin? Like how controllers, models, services and events works? Or is there any good people willing to help me?

I want to use Craft so much, I just need to understand it before I use it at large for my client's projects.

I appreciate your help.

  • This seems to be a duplicate of this question. See if that doesn't help. If you have a more specific question, please ask — we'll be glad to help. Additionally, you might want to check out a plugin called BusinessLogic which provides a nice plugin template for getting started. – Douglas McDonald Dec 16 '14 at 20:35
  • Hi, thanks for your answer. I did some reverse engineering on a plugin to see how things work. It seems that "models" in codeIgniter are "services" in Craft and "models" are used to validate data. I can accomplish what I need to do but it would be great if I could understand the basics. – JeePee Dec 16 '14 at 21:21
  • 1
    Check out the plugin development docs. They provide a pretty good overview of the different components. – Douglas McDonald Dec 16 '14 at 21:42

We just published a video course on Craft plugin development that might help you. https://mijingo.com/products/screencasts/craft-plugin-development/

  • 3
    Pay almost 50 bucks for the lack of documentation? That's ridiculous. – Stalinko Feb 16 '18 at 17:38

You can have https://pluginfactory.io generate the Craft CMS plugin framework for you.

If you're writing a plugin for Craft CMS 3, this may help you as well: So You Wanna Make a Craft 3 Plugin?


You can find the plugin development docs here

There is also the cocktail recipes plugin by Adrian Macneil inspired on the docs

Both will give you a pretty good understanding of how plugins, controllers, models, services, ... work

You can also find lots of free / open source plugins on straightupcraft.

  • I know this answer is a couple years old, so no disrespect... but at this point, the Cocktail Recipes plugin is extremely outdated, and shouldn't be used as a reference point for learning plugin development. – Lindsey D Jun 24 '16 at 22:11
  • @LindseyD Do you know if there is a Craft 3 plugin that would be good to start learning plugin development? I'm feeling pretty overwhelmed right now. – Jim Pannell Aug 24 '18 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.