관리자

https://martinfowler.com/bliki/InversionOfControl.html

https://martinfowler.com/articles/injection.html

  • controlling the flow of program

    One important characteristic of a framework is that the methods defined by the user to tailor the framework will often be called from within the framework itself, rather than from the user's application code. The framework often plays the role of the main program in coordinating and sequencing application activity. This inversion of control gives frameworks the power to serve as extensible skeletons. The methods supplied by the user tailor the generic algorithms defined in the framework for a particular application.-- Ralph Johnson and Brian Foote

  • user가 정의한 함수를 언제/어떻게 호출하는지를 user의 application code가 결정하는 것이 아니라, framework에서 제어하는 것.

  • 어떤 것을 spring의 bean으로 등록할지 정의하는 것은 user가 하지만,

    언제, 어떻게 bean을 등록하고, 호출하는지는 framework에서 제어한다.

    user는 interface/형식에 맞추어서 작성하면, 내부 구현(?)/알고리즘에 의해 알아서 해준다.

  • library와 다른 점은, framework는 main program의 역할을 한다는 것.

+ Recent posts