Between the inertia and reasonable fear-of-change that many teams have over making a big change in technologies - cost of training, risk of failure, difficulty finding maintainers - there's a big barrier to adopting any new language, and while I can see that Scala can be used as a 'better' Java it has a reputation for being a complicated language with difficult new concepts.
Given all this, does anyone have strategies that have worked for them in introducing Scala into an existing Java-centric team?
* Start small or commit fully?
* Embedded modules e.g. Akka within Camel?
* Scala infrastructure with embedded Java?
Not sure if you've already seen this, but there are a couple of videos on InfoQ describing how The Guardian newspaper moved part of its systems over from Java to Scala and how they feel this simplified development. They seem to have taken a fairly evolutionary approach i.e. writing Scala-as-Java initially then gradually re-factoring to a more functional style as their developers became more confident in FP. The Guardian seems to be a bit of a poster-child for Scala, and they seem to have a very progressive approach (as you'd expect!) to their IT e.g. they also use MongoDB for their web content rather than a relational DB.
Joined: Aug 11, 2003
Thanks for that Chris I'd not seen it before, and it's certainly inspiring and perhaps reassuring for Java devs being asked to take the jump.
What seems to have worked for them appears to be an inside-out growth, starting with Scala replacing certain Java-written features and growing outwards to finally have Scala own the whole application. The implication is that there was a customer willing to pay for significant refactoring work with minimal new features, or a whole lot of extra hours put in under-the-radar, which obviously worked for them but I'm not sure would happen in a less 'progressive' setting.
Any other examples of where it's gone well, especially in an enterprise setting?
Unfortunately, I have yet to make it into a Scala-enabled workplace, but I've read that some people sneak Scala into their organisations by using Scala-based testing tools like Specs 2 or ScalaTest which are allegedly quite easy to use for testing Java apps.
I guess it depends on how much buy-in you have from your paymasters and developers for the idea of investing in learning new stuff that should hopefully pay off in the medium/longer term. If nobody has a good reason for playing along, they're not going to.
Joined: Sep 05, 2007
Thanks for the link from the Guardian.. it was quite enlightening. 2 things struck me: 1) the ability to keep all your production deployments the same as with Java, and 2) the massive code reduction. Since every line of code introduces potential bugs this is very cool. Their REST API for accessing data across the enterprise is also just the kind of application I'm looking at. Interesting how they started with test then felt they had to build the whole think in Scala.