Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Going bare - writing the web without a framework - php[world] 2018

Going bare - writing the web without a framework - php[world] 2018

This talk was given at php[world] 2018

If you've only ever experienced web development through a web framework, you're missing out. Have you ever been tempted to rewrite a codebase in your favorite framework? That's a smell that you need to come to this talk. Being comfortable developing without a framework is a crucial skill to have for refactoring legacy applications. In this talk I show you how to harness the power of going "frameworkless" so you'll feel empowered to make better decisions in your next web project. Be set free from your web-framework ball and chain.

Sammy Kaye Powers

November 15, 2018

More Decks by Sammy Kaye Powers

Other Decks in Programming


  1. joind.in/talk/c3f16 @SammyK #phpworld Bootstrapping / ˈbo ͞ otˌstraˌpiNG / Define:

    (…at least for this talk) Code that acts as an entry point into an app.
  2. joind.in/talk/c3f16 @SammyK #phpworld Boilerplate / ˈboilərˌplāt / Define: The “glue”

    code that ties components together. (…at least for this talk)
  3. joind.in/talk/c3f16 @SammyK #phpworld The of going bare skill • Writing

    bootstrap & boilerplate • Choosing exact components • Use different paradigms • Use those skills on domain code (Get to know the component ecosystem) (Like singleton, et al) (Gives you more control over how components interact) (Makes you better at writing your domain code)
  4. 5.3

  5. joind.in/talk/c3f16 @SammyK #phpworld Install a console component $ composer require

    symfony/console (or maybe you like zendframework/zend-console)
  6. joind.in/talk/c3f16 @SammyK #phpworld Singleton •Ensures one & only one instance

    •Global access (static function) •Initialization on first access
  7. joind.in/talk/c3f16 @SammyK #phpworld •Ensures one & only one instance •Global

    access (static function) •Initialization on first access
  8. joind.in/talk/c3f16 @SammyK #phpworld Framework pros to maintain …most the time

    it’s really not that bad No bootstrap & boilerplate code
  9. joind.in/talk/c3f16 @SammyK #phpworld Framework pros The code is …so are

    the components you use when going bare battle tested
  10. joind.in/talk/c3f16 @SammyK #phpworld #3 You’ll spend most of your time

    on bootstrapping instead of on domain code It takes a little longer at first but you’ll get faster with practice
  11. joind.in/talk/c3f16 @SammyK #phpworld #4 You must be an architecture astronaut

    Going bare is more pragmatic for legacy codebases
  12. joind.in/talk/c3f16 @SammyK #phpworld Create a PHP application without a framework

    Patrick Louys https://github.com/PatrickLouys/no- framework-tutorial