For many years now, a common pattern, at least in PHP, is to organize your classes and files by archetype. But as a project grows (and grows, and grows) you may find that you’re jumping all over the place to work on a single feature. In fact, you may even find it hard to locate or figure out where all the related pieces of your feature are at. In this presentation, I’ll show you the way forward with a pattern called co-location. And we find that as we apply these principles, we actually learn to think differently about our software and how it’s put together. And that can tend to make us better software engineers, which is a goal we all share!

Comments

Comments are closed.

Jim Wigginton at 10:41 on 3 Nov 2023

My two favorite slides were the "organized by technical concern" and the "organized by use case" slides.

Also I feel like packagist / composer kinda self organize based on use case. Like maybe a good mental model would be to consider every use case as an independent composer package. Like you have a Note package that depends on a Note_Add package, etc

Joseph Lavin at 10:42 on 3 Nov 2023

Content and slides are great.

Joseph Leedy at 10:46 on 3 Nov 2023

Great talk, thanks! It’ll give me something to think about.

Great talk. Would be cool to see how one could refactor an existing app to locality of behavior. Of course, that may take too much time, but it would be helpful.

Kevin Smith at 11:12 on 3 Nov 2023

Big proponent of organizing by use case/capability/feature myself. Great talk, TJ!

Joseph Thayne at 12:52 on 3 Nov 2023

I really enjoyed this. It is similar to what I have been doing in my design decisions already. Thank you for helping me understand that I am not necessarily incorrect in my designs. The only other comment would be to maybe make the text larger so the back of the room can see it when showing the code (or provide the repo link earlier in the talk). Would help a lot.

Ryan Marks at 13:00 on 3 Nov 2023

Great talk. I appreciated the two slides about organizing by technical concerns versus use cases.

Ben Batschelet at 15:07 on 3 Nov 2023

I’ve run across similar structure & organization a decade ago in a company’s own homegrown framework (in the days before namespaces) so it’s an idea I’ve thought about a lot since then. It’s really great to have it crystalized more clearly than I’ve ever thought of it before.

Nick A at 20:31 on 3 Nov 2023

This was a fun talk that explored the idea of breaking conventions with code organization that we normally just accept without even thinking about it. Thinking about how we organize files as us setting up boundaries is a great idea. Why not put things that work together... together? The comparison of how web pages used to be organized versus how frameworks like React have changed things for the better is the example that probably encapsulates the core of this talk the best. The takeaways from this presentation may be the driving force behind some paradigm shifts with code in the future. Great work, TJ!

Larry Garfield at 09:16 on 4 Nov 2023

Well argued, good examples. I like the idea, but I'm not sure how well it plays out in practice. Something I'd like to try when I can.

michael kimsal at 11:20 on 4 Nov 2023

Good stuff

Ben Ramsey at 15:09 on 4 Nov 2023

TJ is able to explain a highly abstract topic in clear, concise, and practical terms, using relatable examples that didn’t feel contrived. The diagrams and examples were great.