Zend certified PHP/Magento developer

Why are agent nouns good?

Another talk:

https://www.youtube.com/watch?v=dfgtKb-VpRk

You don’t have to really watch it. Basically, he’s saying many people currently do for example:

class Plant { // blah, blah… }

class Gardener {

public function water(Plant $plant) { // water the plant } 

}

His basic premise is too frequently people are creating service classes, then passing objects into its methods to perform some action on the object, instead of just putting the method into the object class and performing the action directly on the object, removing the service class altogether.

I know, unit tests and micro services. Anyway, thoughts? Is he right or wrong?

submitted by /u/Envrin
[link] [comments]