Skip to content

Latest commit

 

History

History

slides

Running a CakePHP App in Different Operating Environments

This repo is part of a talk I am presenting at CakeFest 2015 in New York.

Slides

Talk Summary

Web applications have to run in multiple environments. Those environments may include developers' local instances, in a staging or quality assurance environment and in production. Even the application's most basic dependencies, such as a database connection, tend to be different in each of these environments. Managing the settings for each of them can become tedious and error prone, especially when source control is involved.

This talk covers how to make your CakePHP app adapt its behavior to the environment in a clean way. The configurations for multiple environments can coexist and inherit from a base config, the configs can all be committed to source control and determining which set to activate can be dependent on whatever environment indicator works best for your app's situation. Also covered are code examples for how to keep the code in your app clean and independent of environment-specific logic, instead encapsulating everything unique about each environment into the configurations.

Info

Brian Porter
@beporter
(you probably shouldn't follow me- you'll be disappointed.)

Project Lead & Web Developer at Loadsys
loadsys.com

Slides (with speaker notes) & Demo Project
github.com/beporter/CakePHP-EnvAwareness

Resources