Support the ongoing development of Laravel.io →
Configuration Meetups Architecture
Last updated 2 years ago.
0

That's not really an example of technical debt. That's a simple find/replace operation across a project. One way Model::create() could potentially be considered debt in your example is if you want to change the model or type of ORM easily to not use a static interface. To do this you can just use the build dependency injection container and refer to your models by a name to avoid it entirely. It should be noted that the same is true for DB::insert() though. Maybe you don't want to use Laravel's DB layer at all, so now you worry about changing all instances of DB you have inserted into your code - could also avoid with dependency injection and some given interface.

However, premature optimizations can lead to way more technical debt than you'd expect so be wary to abstract before you feel the need or the pain.

Additional examples of technical debt may may having too much logic shoved into a controller or model to where it becomes hard to figure out or test, you start leaving large areas of code untested, you allow bits of code to rot because you're too afraid to modify them, etc.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

bkuhl bkuhl Joined 27 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.