Scrap Your Cake Pattern Boilerplate: Dependency Injection Using the Reader Monad There are a number of ways to do dependency injection in Scala without adding a framework. The cake pattern is probably the most popular approach and is used in the Scala compiler itself. Using implicit parameters is less popular and is used in the Scala concurrency libraries. An approach that doesn't get as much ment
Update: Corrected typo in the Cake Pattern version of the last example. Update: Added a version of the last example using the Cake Pattern for easier comparison (see end of post). In this second post in the Real-World Scala series I am going to discuss how to implement/achieve Depenency Injection (DI) in Scala. Scala is a very rich and deep language that gives you several ways of doing DI solely
Toshiyuki Takahashi @tototoshi ScalaでDIするのほんとにCakePatternでいいんだろうか。要素が増えるとDIするためだけのコードが増えて疲れる。割り切ってDIコンテナ使っちゃえば悩みから解放される気がする。
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く