“The Ruby way” (mixins and class reopening) vs. dependency injection

前端 未结 5 1198
生来不讨喜
生来不讨喜 2021-02-07 06:01

In studying mixins vs. dependency injection, I often hear the phrase \"the Ruby way.\" Often developers say something along the lines of

Ruby lets you reo

5条回答
  •  梦毁少年i
    2021-02-07 06:25

    Article about how to use IoC in Ruby You underestimate the power of IoC

    With working samples.

    UPDATE

    Link is dead by now, here's the source https://github.com/alexeypetrushin/rubylang/blob/master/draft/you-underestimate-the-power-of-ioc.md

    I used that IoC as a part of my web framework, I kinda re-created Ruby on Rails and it worked, but, it won't give significant advantage over RoR, had similar characteristics. So, it became a burden and I abandoned it, some details http://petrush.in/blog/2011/rad-web-framework .

提交回复
热议问题