Laracon DB
Laracon DB
Talks for "refactoring"
Curing the Common Loop

Adam Wathan presents a talk on improving code quality by eliminating loops, conditionals, and temporary variables using Laravel Collections and functional programming concepts. He demonstrates how to refactor complex nested loops into cleaner collection pipelines using methods like map, filter, flatMap, and contains. The talk includes practical examples ranging from data transformation to simple conditional checks, showing how collections can make code more expressive and maintainable.

Get A Whiff Of This

Sandi Metz delivers a talk on code smells and refactoring, focusing on practical techniques to improve code quality. She explains how to identify code smells, apply appropriate refactorings, and use dependency injection to make code more testable. The talk emphasizes the importance of making incremental improvements and understanding classic Object-Oriented programming principles.

YAGNI With Laravel

A talk about YAGNI (You Aren't Gonna Need It) principle in Laravel development. The speaker discusses how to avoid over-engineering by only implementing features when they're actually needed, while maintaining balance between simplicity and necessary complexity. He covers the stages of adopting YAGNI, from initial resistance through to confidence, and provides practical examples of when to apply or not apply YAGNI in Laravel applications.

Cruddy by Design

Adam Wathan presents strategies for simplifying Laravel controllers by following the 'Never Write Custom Actions' (NWCA) rule. He demonstrates how to break down large controllers with many custom actions into smaller, more focused controllers that only use standard CRUD/REST actions. Through examples from a podcast management application, he shows how to model seemingly custom operations as standard resource actions by thinking creatively about your domain models and resources.

Slay the Beast

Jeffrey Way shares 9 code refactoring techniques to improve Laravel applications, focusing on simplicity and practical solutions. He emphasizes letting code 'grossness' guide refactoring decisions rather than premature optimization, and advocates for optimizing code for deletion rather than trying to future-proof everything. The talk provides concrete examples of patterns like decorators, query objects, and event handling while warning against over-engineering.

Resisting Complexity

In this talk, Adam Lavin discusses a common misunderstanding about object-oriented programming, specifically how methods should be thought of as affordances (properties that tell you what you can do with an object) rather than abilities. He demonstrates how this shift in thinking leads to cleaner, more maintainable code through real-world examples from his course platform, including how to eliminate agent nouns, break up God objects, and when to use simple functions instead of classes.

Patterns That Pay Off

A detailed talk about practical design patterns and code organization in Laravel applications, focusing on when and how to implement different patterns. The speaker emphasizes writing maintainable code by making strategic decisions about pattern usage based on actual needs rather than prematurely implementing complex architectures. He covers both preventative and reactive patterns, from code organization to scaling solutions.

Design Patterns with Laravel

The speaker presents a practical guide to understanding and implementing design patterns in Laravel applications. Starting with a story about a junior developer struggling with the Gang of Four design patterns book, he demonstrates how to make patterns more accessible by showing real-world implementations of the Adapter, Strategy, and Factory patterns using Laravel examples. The talk focuses on practical refactoring techniques and how to properly structure code using these patterns.

Embrace The Backend

The talk focuses on simplifying Laravel frontend development by reducing JavaScript complexity and leveraging more backend functionality. The speaker describes his journey from basic blade templates to Vue.js components, and then demonstrates how to improve frontend architecture by moving logic back to PHP, using props effectively, embracing form submissions, and not being afraid of page reloads when appropriate.

Simplification Tips and Tricks

The talk focuses on code simplification techniques in Laravel applications. The speaker demonstrates several approaches including using view models to separate presentation logic from controllers, utilizing Blade X components for reusable form elements, and implementing query filters. The presentation includes practical examples of refactoring controller code and implementing custom components to make code more maintainable and reusable.

Everything I Ever Needed To Know About Web Dev, I Learned From My Twitter Timeline

The speaker discusses how to write more declarative code in Laravel by refactoring common patterns found in controller actions. Using examples shared on Twitter as inspiration, he demonstrates how to transform verbose, imperative code into cleaner, more declarative alternatives using Laravel's built-in features like form requests, policies, mutators, and real-time facades. The talk focuses on practical refactoring techniques to reduce branching logic and improve code readability.

Time Driven Development

The talk discusses time-driven development and software architecture decisions, using real-world examples from building a user profile management system. The speaker emphasizes the importance of balancing proper software design principles with practical time constraints. They demonstrate how over-engineering can sometimes waste time, while strategic architecture decisions can save time in the long run. The talk includes examples of transitioning from a CRM-based system to a local database, and lessons learned from over-engineering a GitHub integration.

State Machines

Jake Bennett presents his first conference talk on implementing State Machines and the State Pattern in Laravel applications. He demonstrates how to refactor complex conditional logic around invoice status management into a cleaner, more maintainable state machine implementation using PHP classes. The talk walks through creating a state diagram, implementing state classes, and delegating behavior through a state machine pattern rather than traditional event-action controllers.

Monads in PHP

The talk demystifies monads by explaining them as ordinary data types with specific operations and rules, similar to stacks and collections. The speaker uses practical examples in PHP/Laravel to show how monads are already being used (like Laravel's fluent syntax, JavaScript promises, and jQuery), and demonstrates how to implement basic monads like Maybe and Many to handle null checking and collections in a functional way.

Refactoring to SOLID in Laravel

The speaker demonstrates how to refactor a complex Laravel/Livewire component handling mortgage calculations into smaller, more maintainable pieces using SOLID principles and good design practices. Through several refactoring steps, he shows how to extract business logic into services, use DTOs, implement interfaces, and write proper unit tests while maintaining functionality.

A real-life journey into the opinionated world of 'utility-first' CSS

Simon Vrachliotis shares his journey of refactoring a website's CSS using utility-first CSS methodology. He describes how he transformed from being skeptical of utility classes to becoming a strong advocate after successfully refactoring an entire website while camping with his family. The talk covers the benefits of utility-first CSS, including reduced CSS anxiety, faster development speed, and better maintainability, while drawing parallels to how Dick Fosbury revolutionized high jump technique despite initial skepticism.

Migrating to Laravel: Managing the ick

The talk discusses strategies for migrating legacy CodeIgniter applications to Laravel. The speaker shares his approach of gradually refactoring code while maintaining functionality, using Laravel Torch for eloquent models, implementing API endpoints, and leveraging Laravel Dusk for testing during migration. He emphasizes the importance of managing stakeholder expectations and using proper data modeling during the transition.

Reformat, Refactor, Replace: A practical guide for dealing with legacy software

The speaker discusses strategies for modernizing and refactoring legacy PHP applications. He covers the challenges of dealing with old, poorly structured codebases and presents a methodical approach to upgrading them using the 'strangler fig' pattern. The talk emphasizes the importance of securing buy-in, implementing code standards gradually, and carefully migrating functionality to new systems while maintaining business operations.

Building a maintainable Livewire application

Josh Hanley, a core maintainer of Laravel Livewire, presents best practices for building maintainable Livewire applications. He covers various architectural approaches including page components, computed properties, form objects, and action classes. The talk focuses on code organization, naming conventions, and strategies to keep Livewire components clean and testable.

Put Verbs in your database

Daniel Kurn presents 'Verbs', a Laravel package for event sourcing that aims to make it more ergonomic and developer-friendly. Through live coding, he demonstrates how to refactor a job application system from using traditional status columns to an event-sourced approach, showing how this better captures business requirements and handles state transitions while making it easier to track history and implement features like notifications.