addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwchatcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrosseditemptyheartexportfacebookfolderfullheartglobegmailgoogleimageimagesinstagramlinklocation-pinmagnifying-glassmailminusmoremuplabelShape 3 + Rectangle 1outlookpersonplusprice-ribbonImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruseryahoo

Re: [lsug] Dependency Injection

From: Richard W.
Sent on: Thursday, February 14, 2013 3:59 PM
Maybe because of my lack of experience in Scala, I found the Cake Pattern a bit verbose and SubCut a bit intrusive since I need to add SubCut stuff to all my classes. At least, that was my impression when reading the tutorial. 

Any views?

Hey Sandro,

Caveat: I've not written much Scala for about 18 months now so there might be more up to date views than mine.

The approach that I took last time I was using Scala was to use Google Guice, which is a pretty lightweight DI solution not tied into any particular development framework - I suspect you've come across it at some point.  The thing to bear in mind is that if you're familiar with a Java library and you feel it does the job it might also be entirely suitable for use when using other languages on the JVM.

That applies to more than just DI, sometimes even when there's a scala-specific library out there it can be easier to use a more mature or better performing Java alternative - I'm not saying that's the case in all or even a majority of situation simply that I wouldn't rule out a Java library even if my code was written in Scala.

regards,

  Richard Warburton

Our Sponsors

  • Scala Dojo

    Web site for monthly Scala Dojo

  • Scala Jobs

    Google Group of Scala Jobs in the London Area

  • _.underscore

    Scala consultants, trainers, and developers, based in London, UK

  • Springer

    Help and supporters of the monthly dojo

  • Skills Matter

    Provide the venue for many of our meetings.

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy