devcraft: protips for wordpress teams
DESCRIPTION
"Any sufficiently advanced technology is indistinguishable from magic." If your job is to wield that magic for your clients, than you need a set of incantations you can count on. You need DevCraft.TRANSCRIPT
![Page 1: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/1.jpg)
DevCraftProTips for WordPress teams
Eric Mardenhttp://xentek.net
![Page 2: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/2.jpg)
Who I Am
Chief Technology Officer at Blueprint Design Studio
14 years experience
WordPress Contributor, Plugin Dev, Theme Author
Polyglot Programmer
One of the three most important people in WordPress
![Page 3: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/3.jpg)
any sufficiently advanced technology is indistinguishable from magic
Arthur C. Clarke
![Page 4: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/4.jpg)
then you need a set of incantations you can count on
if your job is to wield that magic for your clients
![Page 5: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/5.jpg)
or this happens
![Page 6: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/6.jpg)
what you need is a process
a set of rituals designed to create reliability, predictability, and stability into your workflow
![Page 7: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/7.jpg)
the development process is fraught with dangers
the process is your saving throw
![Page 8: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/8.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 9: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/9.jpg)
task management
the method by which you describe what you see in your head so that other people know what the hell you’re talking about
![Page 10: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/10.jpg)
task management
break down the project into discrete tasks
![Page 11: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/11.jpg)
task management
write your tickets as use cases
![Page 12: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/12.jpg)
task management
every task on a project should be documented in a system you trust
tools:
trac unfuddle bugzilla
![Page 13: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/13.jpg)
task management
provides visibility, tracking, and project status
![Page 14: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/14.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 15: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/15.jpg)
source control
the means by which your cover your collective development ass and ensure that the team is always on the same page
![Page 16: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/16.jpg)
source control
every project, no matter how small, belongs in a repository.no exceptions
![Page 17: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/17.jpg)
source control
commit early and often
each time you’ve created anything of minor consequence on your project, check it in
![Page 18: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/18.jpg)
source control
commit messages matter. they provide the whythe tool already provides the what and the where
![Page 19: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/19.jpg)
source control
vendor repositories, svn:externals, and other advanced workflows
![Page 20: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/20.jpg)
source control
there is no other tool more crucial to your development process
you owe it to yourself, to your clients, and your teammates to learn your source control system like the back of your hand
![Page 21: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/21.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 22: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/22.jpg)
multiple server environments
the strategy you use to keep from blowing shit up
![Page 23: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/23.jpg)
multiple server environments
localdevelopmentstagingproduction
![Page 24: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/24.jpg)
multiple server environments
local → development → staging → production
![Page 25: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/25.jpg)
multiple server environments
speeds development and tightens the feedback loop
![Page 26: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/26.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 27: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/27.jpg)
configuration management
the technique you use to avoid clobbering your server environments and breaking your site
![Page 28: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/28.jpg)
configuration management
problem: each server environment will likely have different file paths, and database requirements
solution: make your wp-config smarter
![Page 29: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/29.jpg)
configuration management
1. your server needs to know who it is
![Page 30: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/30.jpg)
typical apache virtual host configuration, with an environment variable set
![Page 31: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/31.jpg)
1. your server needs to know who it is2. your site needs to know which server its on
configuration management
![Page 32: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/32.jpg)
configuration management
apache_getenv('webenv')
![Page 33: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/33.jpg)
configuration management
1. your server needs to know who it is2. your site needs to know which server its on3. your configuration should adapt to this knowledge
![Page 34: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/34.jpg)
replace define(‘WP_DEBUG’, false); in standard wp-config.php with this instead
![Page 35: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/35.jpg)
defining constants overrides what’s in the database
![Page 36: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/36.jpg)
make it easy to move your site from environment to environment
configuration management
![Page 37: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/37.jpg)
use absolute relative urls where possible and employ built-in variables, functions and options
configuration management
![Page 38: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/38.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 39: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/39.jpg)
data synchronization
the process you use to schlep content from server to server
![Page 40: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/40.jpg)
data synchronization
script it, or use a database tool like navicat
![Page 41: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/41.jpg)
data synchronization
this is a messy problem and requires intimate knowledge of the state of your database
![Page 42: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/42.jpg)
data synchronization
bless one server as the source of truth, and guard it with your life
![Page 43: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/43.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 44: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/44.jpg)
continuous integration
the robots you employ to keep your dev server up-to-date
![Page 45: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/45.jpg)
continuous integration
ci software:
cruisecontrol.rb ci joe integrity hudson xinc
![Page 46: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/46.jpg)
continuous integration
use a build script to automate tasks
build script tools:
phing apache ant
![Page 47: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/47.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 48: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/48.jpg)
one step deployments
the software you use to keep you from botching your code deployments
![Page 49: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/49.jpg)
one step deployments
ftp is antiquated and insecure and should be avoided
your source control software should be used instead
![Page 50: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/50.jpg)
one step deployments
manual processes will always be error-prone, automate as much possible
reuse your build script and/or use capistrano
![Page 51: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/51.jpg)
one step deployments
make publishing code changes dead simple
![Page 52: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/52.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 53: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/53.jpg)
iterative development
a style of building websites in small increments to improve quality and ensure a clean consistent design to your code base
![Page 54: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/54.jpg)
iterative development
be loose , be flexible, be nimble
this is what they mean by ‘going agile’
![Page 55: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/55.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 56: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/56.jpg)
automated testing
the code you write, before you write code
![Page 57: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/57.jpg)
automated testing
testing tools:
simpletest phpunit selenium
![Page 58: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/58.jpg)
automated testing
lowers the cost of making changes and minimizes the risk that new code will break old code
![Page 59: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/59.jpg)
components of a mature development process
• task management• source control• multiple server environments• configuration management• data/content synchronization• continuous integration• one step deployments• iterative development• automated testing
![Page 60: DevCraft: ProTips for WordPress Teams](https://reader034.vdocument.in/reader034/viewer/2022051611/54b77b304a79594e1f8b45c1/html5/thumbnails/60.jpg)
getting started
care about your craftlearn your toolsimplement in small stepskeep improving. always.
your process is your product