I recently moved from Java world to to Scala and migrating/rebuilding many of our projects to Scala. I wanted to know is there any framework similar to Spring available for Scala(spring-security, spring-mvc, spring-data, dependency injection etc). Or Still Spring is the better option so that I should stop looking for alternatives?
-
1You may want to check this out... http://stackoverflow.com/questions/2683914/why-would-i-use-scala-lift-over-java-spring – qantik Aug 20 '16 at 07:09
-
3Spring, as a whole, is a huge project. It contains many different modules, each helping you out developing a small part of your application. As far as I've seen there is nothing this big in Scala. There are many choices for the different modules though. For example Play Framework (which now offers a DI system) might be considered an alternative to spring-mvc. Deadbolt might be considered an alternative to spring-security. – mfirry Aug 20 '16 at 07:56
1 Answers
No!
Now personally I am of the view that this a testament to Scala and a huge negative against Java. That massive frameworks are built to overcome fundamental flaws in the language to substitute for features that should be part of the core language or at least the core platform.
That's my opinion and you can take or reject it as you see fit, but what is certainly true is that Scala is much less framework orientated. The Scala way is most certainly to favour libraries over frame works. We see this with the new Akka-Http module: one of their primary goals is to get out of the way so to speak and let you structure your code as you want, rather than forcing you to structure your code and your project according to the dictates of the framework.Because Scala is powerful and feature-full it allows greater dependency injection just using the language. The power of Scala is its strength, but also a weakness. Because its is so much easier to "roll your own", that has allowed Scala to get with out providing libraries / frameworks for quite fundamental programming tasks, notably the lack of a proper io library, although hopefully this is finally going to be rectified.

- 6,001
- 4
- 34
- 57
-
4Thanks Oliver. This answer made me come out from Java world. I should stop comparing and start Scala. – Ashok Krishnamoorthy Aug 20 '16 at 12:04