"Cruddy by Design" - Adam Wathan - Laracon US 2017
Video Statistics and Information
Channel: Adam Wathan
Views: 54,028
Rating: undefined out of 5
Keywords:
Id: MF0jFKvS4SI
Channel Id: undefined
Length: 40min 30sec (2430 seconds)
Published: Mon Aug 28 2017
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Forever my bedside video
#oldbutgold
This video made my development so much better. After watching this video, I instantly went to refactor my entire Laravel app.
The old war. RPC(natural entities and natural verbs) vs REST(natural and pseudo-entities and 4-5 standard verbs).
From my point of view, the world is not Cruddy by design.
I just "publish" the podcast. Not create a publish-podcast pseudo-entity.
User "registers" self in some app. Not create.
The car just "moves" somewhere. Not creates a CarMovement pseudo-entity.
Reducing the methods amount in controllers is not a good target for refactoring. If methods are only 3-4 lines and almost never changed, you can have even 20+ methods in one controller. The application code will be better than several controllers with huge methods...
I can easily make only 1 method for each controller. There is a package for that - https://github.com/hivokas/laravel-handlers . It won't automatically make my code much better.