Social Human Architecture for Beginners
By Sebastian Schürmann (@sschuermann) (scrum master)
Works at mytaxi.de
- introversion vs extroversion (thinking is internal or externalized)
- nobody is one at all (just introvert for thinking or feeling)
- talk to you team about it (try to express everybody on a scale to get better understanding)
- take a look to "Maslows hierarchy of needs"
- self actualization
- try to create your own needs of hierarchy
- use "non-violent communication" (Marshall Rosenberg)
- observation (just the facts)
- feelings (just feeling good or bad won't cut it, try to express yourself)
- needs (we all have them, feeling bad? need is not fulfilled)
- honest request
- psychology of programming by Gerald Weinberg
- egoless programming
- stages of group development
- storming [...]
- engagement can be reached by
- let people get into the flow state
- try a fed-ex day (people can do what they want)
The Flip Side of Dependency Injection
- do not add to much dependecies (thing is doing to much)
- do not hide dependencies by using a container (it's like throwing in "the config")
- all dependencies must be in code
- separate object creation from usage
- there must be the ability to choose the actual implementation on runtime
How to Get There
- use a factory with explicite API (instead of "get('Foo')", do "getFoo()")
- avoid injecting factories, try to use locators (locators are returning "FooInterface" and using factories for instance creation)
With the newest version of some fancy php frameworks, i got in touch with the terms of dependency injection and service locator. While the ideas behind the to terms a quick clear so far, i wanted to know how dependency injection is implemented. Because of that, i took a look into some implementations and i'm still in the process of getting a feeling of the terms and process for dependency injection.
Nevertheless, i had to use and implement some AwareInterfaces and here are my thoughts about the.
A AwareInterface should have three methods:
- setObject(\My\Object $object)
If a class is not useable without the object, it should either throw an runtime exception or implement the InjectInterface.
A InjectInterface should only have one method:
Currently, i prefer to define InjectInterfaces if they are needed to use a object. The AwareInterface is used as an addition / nice to have object, for example if you want to inject a logger. This leads to situations that a class only implements a "FooInjectInterface" or a "FooAwareInterface".
Lets see where the journey goes. Hopefully i don't have to overturn the position from above.
A teammate made the suggestion to rename the "InjectInterface" to "DependentInterface" to keep the naming in sync with the "AwareInterface".