4 ms·
Spring works with everything and scales horizontally really well. It can play with every framework and has many engineers/knowledge around it. Specially it has
by invalidname 5y ago
Spring works with everything and scales horizontally really well. It can play with every framework and has many engineers/knowledge around it.
Specially it has builtin caching, transaction management, DB access etc. But it connects to many external services for all of those seamlessly. It abstracts all the layers so you can easily replace everything under the hood with full compatibility as your business grows.
- davedx 5y ago> caching, transaction management, DB access etc Aren't these mostly features of your data layer e.g. Hibernate? > It abstracts all the layers so you can easily replace everything under the hood with full compatibility as your business grows. Java is a perfectly capable language for implementing abstractions. What does Spring offer you there that you can't do with plain old Java?
- invalidname 5y agoYes it uses Hibernate. The integration through Spring Data is seamless. Also caching isn't just L2 Hibernate cache. It's external caching layer, integrations with Redis/memcached etc. It provides encapsulation for all of these elements that you don't have to do on your own.
- rad_gruchalski 5y ago> Java is a perfectly capable language for implementing abstractions. What does Spring offer you there that you can't do with plain old Java? A concise framework where all components talk the same language across the full stack.
- signal11 5y ago> A concise framework where all components talk the same language across the full stack. Spring is many things, but it's not a "concise" framework by any means.
- rad_gruchalski 5y agoStill better than writing everything by hand.
- signal11 5y agoSpring vs “writing everything by hand” is a false dichotomy.
- xboxnolifes 5y agoConsidering this conversation branched from "What does Spring offer you there that you can't do with plain old Java?", I'm not so sure that's the case.
- pritambarhate 5y ago>> What does Spring offer you there that you can't do with plain old Java? Well nothing. Since Spring it written in Java, anyone else using Java can do all of those things. The things is Spring already does all these things and it does them well. It's well tested and well supported. Most people don't want to do all of this from scratch. So they need a framework anyways. So they choose Spring because it's the leading framework in Java world. There are a lot of people who already know Spring and can become productive in a Spring codebase fairly quickly.
- stefan_ 5y agoYou went from "Spring isn't a framework for frameworks" to "[the Spring framework] can play with every framework". I think OP got it right.
- invalidname 5y agoLOL totally got me there ;-) Yes. I was talking about Spring Boot there. Yes, that wasn't clear. Spring is a framework and some of the elements within it abstract other tools some of which are frameworks in their own right (e.g. JPA/Hibernate). There are many abstractions but Spring sort of unifies them to a single "story" you can work with. JPA under Spring makes a lot more sense with the JPA Repository etc.
- MathCodeLove 5y agoI mean you do realize that many complex web apps use multiple frameworks for different things, right? Personally I don't like Java and haven't used spring, but take a modern web app and you could be using something like express/fastify, react + next, an ORM, a schema validator, and quite a bit of other domain specific pieces of functionality. Ofc these aren't all "frameworks" in the traditional sense, but that line is often arbitrary and I think this interpretation of OP's usage of the word is the most generous one.
- stefan_ 5y agoSure, you use a lot of frameworks - in parallel. But that's not what happens in Spring land. Instead, you get one framework (Spring) offering you an abstraction behind which another framework lurks, for things as large as say an ORM. Something that complex can of course not be hidden behind mere 1000s of Java interfaces, it all leaks horrendously and you find yourself "reaching through" the layers.