Michael walks us through MVC frameworks with CakePHP and Backbone.js, and deploying with Capistrano

Interviewed by Christophe Limpalair on 03/02/2015

Have you ever had messy jQuery code? The more features you add, the worse it gets! Backbone helps manage this by separating concerns with Models and Views. Michael not only explains how to do this, but he shows us his code on screen!

He also talks about an MVC Framework called CakePHP. If you're still writing your own MySQL connect functions, this interview will show you a different way and save you hours of coding. It will also help you avoid leaving gaping security holes. This means you spend a lot less time coding features over and over again, and instead spend all your time shipping amazing products.


Interview Snippets

When Jordan Barber (a friend of mine and one of Michael's coworkers) helped set up the interview, Michael specifically asked to talk about CakePHP and Backbone. This is usually his go-to for clients who need more customization than WordPress or Drupal can offer.

Watch the interview, and you'll see why! Everything is cleanly laid out and provides structure to code that would otherwise be all over the place.

If you've ever written more than a few lines of jQuery, you'll know exactly what I'm talking about:

All these data-attributes="you have to keep track of", on all these different pages. It can quickly lead to a lot of elements stored in memory, and you're bound to eventually change an element of your DOM that another function in your code wasn't expecting-- leading to hours of debugging.

What's really cool about this interview, is that I learned from it even though I use Laravel instead of CakePHP. Like Michael says in the interview, a lot of features overlap in all these different platforms, and learning something about Cake can transfer over to Symfony, Laravel, Yii, or whatever else MVC framework you use!

Do you still use WAMP/XAMPP?
What happens when you work on a project with other people using different operating systems?

"It worked on my localhost!"

What about when you want to use a caching service like Redis or Memcached?

Do yourself a big favor, and use Vagrant boxes. These can easily be setup to mimic your live server with Docker, PuPHPet, or Protobox. Once setup, you simply send a config file to your co-developers, and they'll have the exact same environment.

Deploy with Capistrano
Capistrano is "A remote server automation and deployment tool written in Ruby**."

Michael will show you on screen how he can deploy code, restart services, and do whatever else on their servers-- with a single command.

** Being a pro in Ruby is not required ;)!

Resources to learn more

Backbone.js Documentation

Backbone.js Tutorials

CakePHP Documentation

CakePHP Getting Started

CakePHP Tutorials

Thanks for watching, and let us know if this helped you in any way!

How did this interview help you?

If you learned anything from this interview, please thank our guest for their time.

Oh, and help your followers learn by clicking the Tweet button below :)