Dependency Injection withGuice Compile Time Dependency Injection Main concepts Section introduction ConfigurationAPI HTTPprogramming Asynchronous HTTPprogramming The Twirltemplate engine Form submission and validation Working with Json Working with XML Handling file upload Accessing anSQLdatabase Using the Cache Calling RESTAPIs with Play WS Integrating with Akka Internationalization with
これはScala Advent Calendar 2017の11日目の記事です。 こんにちはセプテーニオリジナルの池田です。 弊社では社内勉強会が定期的に開かれており 先月 @kawachiさんより「DIを正しく知って便利に使おう」という発表がありました。 私自身社内での勉強会を受ける前までは、javax.injectやGuiceのDIが使われる背景やメリットをあまり理解していませんでしたが、発表を聞いて、DIの歴史的な背景やPlayでのベストプラクティスな使い方など勉強になりました。 今回は、勉強会の復習にPlayFrameworkのDI周りについて書きます。 目次 1.そもそもPlayFrameworkでDIが使われる背景 2.DI(Dependency Injection)とは 3.PlayFrameworkで提供されているDIのアプローチ 4.Playにおけるベストプラクティス 5
Table of contents Introduction Manual Dependency Injection UsingMacWire for wiringSimple scoping Modularising object graphcreation Multiple implementations Testing Interceptors Advanced scoping Factories Accessing the object graph dynamically Multiple instances DI in Akka Comments Introduction ↟ Back totop ↡ Comments Dependency Injection (DI) is a popular pattern which encourages loose couplin
Scrap Your Cake Pattern Boilerplate: Dependency Injection Using the Reader Monad There are a number of ways to do dependency injection inScala without adding a framework. The cake pattern is probably the most popular approach and is used in theScala compileritself. Using implicit parameters is less popular and is used in theScala 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-WorldScala series I amgoing to discuss how to implement/achieve Depenency Injection (DI) inScala.Scala is a very rich and deep language that gives you several ways of doing DI solely
Toshiyuki Takahashi @tototoshiScalaでDIするのほんとにCakePatternでいいんだろうか。要素が増えるとDIするためだけのコードが増えて疲れる。割り切ってDIコンテナ使っちゃえば悩みから解放される気がする。 2013-05-20 00:11:55

1リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く