More Related Content


The Evolution of WordPress Software Development

  1. The Evolution of WordPress Software Development Aki Björklund @akibjorklund
  2. How do you organize your custom code?
  3. Why?
  4. I bet it is not pretty
  5. WordPress offers no file/folder structure
  6. WordPress offers no autoloading
  7. WordPress offers no unit test framework
  8. WordPress offers no dependency management
  9. WordPress offers no [insert a “professional” software development tool here]
  10. Probably it shouldn’t either
  11. There aren’t any plugins you can install to get those
  12. There are plugin frameworks and some site frameworks
  13. They are not widespread
  14. …thus not suitable as basis of significant applications
  15. We could roll our own… or not
  16. What can we use then?
  17. Create a solution out of existing widespread technologies
  18. Solution like that is on a stable foundation
  19. I’ll introduce to you our stack
  20. Yours could be different
  21. Bedrock gives us a project structure, but not for your own code
  22. Composer gives us dependency management
  23. Composer PHP autoloader will load files when they are needed
  24. Symfony’s DependencyInjection component lets us write loosely coupled code
  25. PHPUnit and WP_Mock enable unit testing
  26. WPlinth is our collection of base classes
  27. About code organization
  28. Site specific code lives in the mu-plugins folder
  29. mu-plugins/app-loader.php
  30. Example folder structure of the application /Connection /PostType /QueryFilter /Service /Taxonomy /Test Application.php
  31. Classes inherit WPlinth base classes
  32. Invest in some time to organize your code
  33. No need to use all the tools mentioned here for all projects
  34. Document your solution online
  35. Let’s start building standards
  36. Write code that you would gladly inherit from someone else
 10 years from now
  37. @akibjorklund for slides and more info