Answer the question
In order to leave comments, you need to log in
Is Spring Scala worth using?
Good afternoon.
Wondering if anyone has used Spring Scala . Is it worth using it? And are there alternatives as close as possible to Spring?
It is alarming that he is not off. spring project and low activity on github (last updated 7 months ago...).
I'm trying to switch to the Scala stack, but I'm afraid to abandon Spring - I'm used to it already. I like his ideology and would like something as similar as possible, but with Scala goodies (immutable collections etc.)
Answer the question
In order to leave comments, you need to log in
It has become fashionable in Scala for existing Java libraries to write high-level wrappers, but I don't think this is the right way to go. First, as a rule, performance suffers. Secondly, when you throw an exception, you get an insane stack trace with lines like MyClass#anonfun#dde#ff. By the way, with logs the same situation with incomprehensible names. Thirdly, Scala is a completely different ideology and using it only for the sake of some "goodies" for a more or less serious project is pure overkill. It's better to use Java 8. Given that Spring Scala is an unofficial project and poorly maintained, it's better not to use it at all.
If you want web on Scala use Play! Framework version 2.
What's wrong with java 8? immutable collections also exist , there are lambdas, and a lot of things.
I know about Play! - but this is not the same approach as in Spring. All these code generations, incomprehensible configs, etc. It is necessary that everything is logical and understandable, as in spring - you pull through dependency, you use the standard structure for the Java web and you don’t take a steam bath.
No matter how cool Java 8 is (and the 7th one, in principle, suited me), but this is not at all the same, I want to use FP.
I looked at Spray - not bad at all, but then again .... I like the approach with beans in the spring. Its flexibility and documentation. He does not force you to use something, it's like a frame with a bunch of goodies. The MVC model is very convenient, even a person who is not familiar with Java will understand where the Controller is, where the service / dao layers are, and how to insert a view loaded with data. You don’t even need to talk about how to write REST in Spring - it’s better, IMHO, they haven’t figured it out yet. Everything is done clearly and concisely - if you want another Template Engine - easy: I registered dependency in gradle / maven, created a bean - that's it, you don't even need to read the documentation.
If you take the play framework, then there is already a built-in guice di, but special “aesthetics” can, of course, also screw spring, it’s not difficult. The question is why?
Well, as if the capabilities of scala itself allow you to use DI minimally, unlike java + spring and write in a programming language, and not in xml and annotations.
Play+Scala, in particular, is much clearer, more convenient, and easier to work with than java+spring.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question