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

The Art Of Plugin Development

Ben Croker
September 27, 2018

The Art Of Plugin Development

A presentation about plugin development in Craft CMS given at the DotAll conference in 2018.

Ben Croker

September 27, 2018
Tweet

More Decks by Ben Croker

Other Decks in Programming

Transcript

  1. The Art Of
    Plugin Development
    Ben Croker
    @ben_pylo
    PutYourLightsOn

    View Slide

  2. View Slide

  3. View Slide

  4. Personal Home Page Tools

    View Slide

  5. View Slide

  6. CS101
    Travelling Salesman Problem:
    Given a set of cities and distances
    between every pair of cities, find
    the shortest possible route that
    visits every city exactly once and
    returns back to the starting point.

    View Slide

  7. PHP Hypertext Preprocessor

    View Slide

  8. “ElePHPant”

    View Slide

  9. View Slide

  10. Percentages of websites using various server-side programming languages
    20 %
    40 %
    60 %
    80 %
    100 %
    PHP ASP.NET Static Files Java Ruby ColdFusion JavaScript Perl Python
    0.2 %
    0.3 %
    0.5 %
    0.6 %
    0.6 %
    2.2 %
    2.3 %
    12.9 %
    83.5 %
    Source: W3Techs.com, September 2018

    View Slide

  11. Open source, object-oriented, web application framework.

    View Slide

  12. Application
    Management
    Content
    Framework
    Driven Platform
    System
    Module
    Plugin
    Web
    Data
    Plugin
    Module
    2

    View Slide

  13. The Reality
    “That’s not a bug, that’s a feature.”
    Features
    Testing
    Updates
    Bug Reports
    Troubleshooting
    Documentation

    View Slide

  14. Writing New Code Modifying Existing Code Understanding Code
    Source: “What Do Programmers Really Do Anyway?” by Peter Hallam

    View Slide

  15. Understanding Code

    View Slide

  16. There is no such thing as
    beautiful code.

    View Slide

  17. User Experience
    Driven Development
    The biggest challenge is understanding the problem
    that you are trying to solve.

    View Slide

  18. View Slide

  19. View Slide

  20. Possibility vs Feasibility
    A plugin should do one thing and do it well.

    View Slide

  21. Warp Time
    Don’t get distracted by the noise.

    View Slide

  22. Refactoring
    Restructuring your code for readability and
    reusability without changing its external behaviour.
    Technical Debt
    Maintainability
    Readability
    Reusability Complexity
    Bloat

    View Slide

  23. }
    }

    View Slide

  24. Documentation

    View Slide

  25. View Slide

  26. View Slide

  27. View Slide

  28. Specialisation

    View Slide

  29. do the
    demo

    View Slide

  30. Craft 3 plugin development
    videos have landed.
    Available today.

    View Slide

  31. In conclusion...

    View Slide

  32. Thank You
    Ben Croker
    @ben_pylo
    PutYourLightsOn

    View Slide

  33. Acknowledgements
    Pixel & Tonic – creators of Cra CMS
    JetBrains – makers of PhpStorm
    Alexander Makarov – core maintainer of Yii
    Ryan White – advice and guidance on presentation
    Ryan Irelan – training partner and founder of cra quest.io
    Simon Oberrauner – paragliding photos
    Vladimir Reznichenko – creator of Php Inspections and Yii2 Inspections
    Ondřej Mirtes – creator of PHPStan
    Philip Sharp – editor of afieldguidetoelephpants.net
    Programming Wisdom (@CodeWisdom) – inspirational quotes
    The entire Cra CMS community for their endless support and willingness to help each other out!

    View Slide