Skip to content

Example code from my talk at Vienna Scala User Group on 23th July 2013

Notifications You must be signed in to change notification settings

teliatko/di-with-scala

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

di-with-scala

Example code from my talk at Vienna Scala User Group on 23th July 2013. You can find the slides here. All the examples are in context of Play! framework.

Content

I've covered following DI frameworks from Java and Scala world:

  1. Spring
  2. Spring-Scala
  3. CDI
  4. Guice
  5. SubCut
  6. Cake Pattern

Structure

Each sub-folder contains separate Play! application. So to run it you have to go into subfolder and run:

play run

Afterwards you can go to http://localhost:9000/[framework]/[anytext]. You will see the page with text "Bonjour [anytext]". Please look at routes file to exact URLs.

Explanation

I've used very simple example to show the DI. In package services you can find Translator service interface and its implementation FrenchTranslator. Translator service is injected into controllers.Translate controller. Controller takes any string on the query path, assuming that you've put the name there, and greets you accordingly in french.

About

Example code from my talk at Vienna Scala User Group on 23th July 2013

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages