1/14
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
control inversion
control doesn’t follow the call order, different parts of the code receive control at unpredictable moments
characteristics of control inversion 1
can’t walk through the code because logical flow is uncertain
characteristics of control inversion 2
need to ensure all paths are correct when debugging
why control inversion?
allows for more sophisticated programming constructions
example of inverted control 1
callbacks - allow server to interact with client
example of inverted control 2
factories - components that create others
example of inverted control 3
dependency injection - complex factories that encapsulate dependencies between sets of components
example of inverted control 4
extension via code fragments - move code around the network
challenges with callbacks
concurrency - client has to respond to server in the middle of a call, which means it constantly needs to be listening and responding
dependency injection design pattern
encapsulate complex construction and wiring, the inversion of control comes as the DI component contains logic that’s been removed from the clients and refactored
variations of dependency injection
method, interface, setter and constructor dependency
issue to bear in mind for all the systems 1
different code bases
issue to bear in mind for all the systems 2
different authorities
issue to bear in mind for all the systems 3
different permissions
issue to bear in mind for all the systems 4
different levels of understanding of how the overall system fits together