DevCraft
ProTips for WordPress teams
Eric Marden
http://xentek.net
Who I Am
Chief Technology Officer at
Blueprint Design Studio
14 years experience
WordPress Contributor, Plugin
Dev, Theme A...
any sufficiently advanced technology is
indistinguishable from magic
Arthur C. Clarke
then you need a set of incantations you can count on
if your job is to wield that magic for your clients
or this happens
what you need is a process
a set of rituals designed to create reliability, predictability, and stability into your
workflow
the development process is fraught with dangers
the process is your saving throw
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
task management
the method by which you describe what you see in your head so that other
people know what the hell you’re ...
task management
break down the project into discrete tasks
task management
write your tickets as use cases
task management
every task on a project should be documented in a system you trust
tools:
trac
unfuddle
bugzilla
task management
provides visibility, tracking, and project status
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
source control
the means by which your cover your collective development ass and ensure
that the team is always on the sam...
source control
every project, no matter how small, belongs in a repository.
no exceptions
source control
commit early and often
each time you’ve created anything of minor consequence on your project,
check it in
source control
commit messages matter. they provide the why
the tool already provides the what and the where
source control
vendor repositories, svn:externals, and other advanced workflows
source control
there is no other tool more crucial to your development process
you owe it to yourself, to your clients, an...
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
multiple server environments
the strategy you use to keep from blowing shit up
multiple server environments
local
development
staging
production
multiple server environments
local → development → staging → production
multiple server environments
speeds development and tightens the feedback loop
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
configuration management
the technique you use to avoid clobbering your server environments and
breaking your site
configuration management
problem: each server environment will likely have different file paths, and
database requirements
s...
configuration management
1. your server needs to know who it is
typical apache virtual host configuration, with an environment variable set
1. your server needs to know who it is
2. your site needs to know which server its on
configuration management
configuration management
apache_getenv('webenv')
configuration management
1. your server needs to know who it is
2. your site needs to know which server its on
3. your confi...
replace define(‘WP_DEBUG’, false); in standard wp-config.php with this instead
defining constants overrides what’s in the database
make it easy to move your site from environment to environment
configuration management
use absolute relative urls where possible and employ built-in variables,
functions and options
configuration management
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
data synchronization
the process you use to schlep content from server to server
data synchronization
script it, or use a database tool like navicat
data synchronization
this is a messy problem and requires intimate knowledge of the state of your
database
data synchronization
bless one server as the source of truth, and guard it with your life
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
continuous integration
the robots you employ to keep your dev server up-to-date
continuous integration
ci software:
cruisecontrol.rb
ci joe
integrity
hudson
xinc
continuous integration
use a build script to automate tasks
build script tools:
phing
apache ant
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
one step deployments
the software you use to keep you from botching your code deployments
one step deployments
ftp is antiquated and insecure and should be avoided
your source control software should be used inst...
one step deployments
manual processes will always be error-prone, automate as much possible
reuse your build script and/or...
one step deployments
make publishing code changes dead simple
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
iterative development
a style of building websites in small increments to improve quality and ensure a
clean consistent de...
iterative development
be loose , be flexible, be nimble
this is what they mean by ‘going agile’
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
automated testing
the code you write, before you write code
automated testing
testing tools:
simpletest
phpunit
selenium
automated testing
lowers the cost of making changes and minimizes the risk that new code will
break old code
components of a mature development process
• task management
• source control
• multiple server environments
• configuratio...
getting started
care about your craft
learn your tools
implement in small steps
keep improving. always.
your process is yo...
thank you
Eric Marden
eric@xentek.net
http://xentek.net
twitter: @xentek
Upcoming SlideShare
Loading in...5
×

DevCraft: ProTips for WordPress Teams

3,039

Published on

"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.

Published in: Technology
1 Comment
0 Likes
Statistics
Notes
  • i like his style...straight to the point...nice...
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Views
Total Views
3,039
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
30
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

DevCraft: ProTips for WordPress Teams

  1. 1. DevCraft ProTips for WordPress teams Eric Marden http://xentek.net
  2. 2. 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
  3. 3. any sufficiently advanced technology is indistinguishable from magic Arthur C. Clarke
  4. 4. then you need a set of incantations you can count on if your job is to wield that magic for your clients
  5. 5. or this happens
  6. 6. what you need is a process a set of rituals designed to create reliability, predictability, and stability into your workflow
  7. 7. the development process is fraught with dangers the process is your saving throw
  8. 8. 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
  9. 9. 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
  10. 10. task management break down the project into discrete tasks
  11. 11. task management write your tickets as use cases
  12. 12. task management every task on a project should be documented in a system you trust tools: trac unfuddle bugzilla
  13. 13. task management provides visibility, tracking, and project status
  14. 14. 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
  15. 15. source control the means by which your cover your collective development ass and ensure that the team is always on the same page
  16. 16. source control every project, no matter how small, belongs in a repository. no exceptions
  17. 17. source control commit early and often each time you’ve created anything of minor consequence on your project, check it in
  18. 18. source control commit messages matter. they provide the why the tool already provides the what and the where
  19. 19. source control vendor repositories, svn:externals, and other advanced workflows
  20. 20. 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
  21. 21. 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
  22. 22. multiple server environments the strategy you use to keep from blowing shit up
  23. 23. multiple server environments local development staging production
  24. 24. multiple server environments local → development → staging → production
  25. 25. multiple server environments speeds development and tightens the feedback loop
  26. 26. 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
  27. 27. configuration management the technique you use to avoid clobbering your server environments and breaking your site
  28. 28. configuration management problem: each server environment will likely have different file paths, and database requirements solution: make your wp-config smarter
  29. 29. configuration management 1. your server needs to know who it is
  30. 30. typical apache virtual host configuration, with an environment variable set
  31. 31. 1. your server needs to know who it is 2. your site needs to know which server its on configuration management
  32. 32. configuration management apache_getenv('webenv')
  33. 33. configuration management 1. your server needs to know who it is 2. your site needs to know which server its on 3. your configuration should adapt to this knowledge
  34. 34. replace define(‘WP_DEBUG’, false); in standard wp-config.php with this instead
  35. 35. defining constants overrides what’s in the database
  36. 36. make it easy to move your site from environment to environment configuration management
  37. 37. use absolute relative urls where possible and employ built-in variables, functions and options configuration management
  38. 38. 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
  39. 39. data synchronization the process you use to schlep content from server to server
  40. 40. data synchronization script it, or use a database tool like navicat
  41. 41. data synchronization this is a messy problem and requires intimate knowledge of the state of your database
  42. 42. data synchronization bless one server as the source of truth, and guard it with your life
  43. 43. 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
  44. 44. continuous integration the robots you employ to keep your dev server up-to-date
  45. 45. continuous integration ci software: cruisecontrol.rb ci joe integrity hudson xinc
  46. 46. continuous integration use a build script to automate tasks build script tools: phing apache ant
  47. 47. 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
  48. 48. one step deployments the software you use to keep you from botching your code deployments
  49. 49. one step deployments ftp is antiquated and insecure and should be avoided your source control software should be used instead
  50. 50. one step deployments manual processes will always be error-prone, automate as much possible reuse your build script and/or use capistrano
  51. 51. one step deployments make publishing code changes dead simple
  52. 52. 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
  53. 53. iterative development a style of building websites in small increments to improve quality and ensure a clean consistent design to your code base
  54. 54. iterative development be loose , be flexible, be nimble this is what they mean by ‘going agile’
  55. 55. 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
  56. 56. automated testing the code you write, before you write code
  57. 57. automated testing testing tools: simpletest phpunit selenium
  58. 58. automated testing lowers the cost of making changes and minimizes the risk that new code will break old code
  59. 59. 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
  60. 60. getting started care about your craft learn your tools implement in small steps keep improving. always. your process is your product
  61. 61. thank you Eric Marden eric@xentek.net http://xentek.net twitter: @xentek
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×