7 ms·
The prevalence of Spring(Boot) is insane. Talk about freedom of choice!
by klemola 6y ago
The prevalence of Spring(Boot) is insane. Talk about freedom of choice!
- Traubenfuchs 6y agoIt's just that pleasant to use, has a very mature ecosystem and a very helpful community.
- lmm 6y agoNah, it's the PHP of the Java world: easy to spin up something quick with, but impossible to maintain.
- Traubenfuchs 6y agoIf there is no both WORTH to maintain and hard to maintain code in your language of choice, it's because that language of choice was not used to solve the type of problem Java is used for... In this current post monolith, micro-service world, most java applications remain very maintainable though.
- lmm 6y agoActually my language of choice has been used mostly as a Java replacement. And while there is no perfectly maintainable language, little else is remotely close to the awfulness of trying to maintain a Spring Boot application.
- nurgasemetey 6y agoFor me, node js projects are not difficult to maintain. Who is right at the end?
- int_19h 6y agoThat's certainly not true of Spring MVC, and yet it's also very popular.
- jto1218 6y agoWhat are you talking about? What exactly makes Spring projects unmaintainable? Have you ever seen or used it before?
- lmm 6y agoSpring boot specifically; regular Spring is relatively ok. I'm using it professionally at the moment. It's just impossible to find where anything is coming from or understand how your application is wired up, because everything magically appears based on what's on the classpath - it's like the COME FROM statement joke. Even just changing your dependency versions can suddenly radically change your application's behaviour (e.g. now it's suddenly running a webserver).
- jto1218 6y agoThat is true, there's a lot of "magic" that comes with boot. It can be helpful to take a look at what all of that auto-configuration code is actually doing, but reading that stuff is pretty difficult as well.
- lmm 6y ago> It can be helpful to take a look at what all of that auto-configuration code is actually doing You can't tell by reading it either, because it's all dynamic: all of the autoconfigurations create beans conditionally only if other beans of that type aren't defined, if certain classes are present on the classpath, if particular values are defined in the configuration that's written in magical self-transforming YAML, or all three. The only way I've found is to breakpoint at the point where something is wired in to see what the concrete class is, then breakpoint again in the constructor of that class to find where it's being constructed from, so you have to restart your application and run the (slow) spring boot startup twice for each thing you care about. And even that doesn't always work because spring encourages doing AOP with bytecode-manipulation-based proxies.
- a_imho 6y agoI don't understand why is it better to have something wired up by annotations than explicitly writing java code. Is 'new' obsolete? At least tools (including IDE) can look for method calls, annotation strings not so much. I'm completely baffled by the popularity of Spring.
- fetbaffe 6y ago> Laravel of the Java world Fixed it for you.
- vbsteven 6y agoNobody forces you to use it, there are a lot of alternatives out there. But I have to admit that Spring Boot combined with Kotlin is the most productive development environment I have ever worked in. I am not surprised it is so popular among Java devs.
- selfhoster11 6y ago> Nobody forces you to use it, there are a lot of alternatives out there. That assumes you're starting a greenfield development. If you're joining existing companies with a mature tech stack, you won't be able to unseat their existing choices because there's a lot of risk involved.
- sigzero 6y agoThat's just how it works period. Regardless of what software stack you use.
- Cthulhu_ 6y agoPlenty of freedom, it's just that Spring is a good framework and has been since it came out. It was used in one of the first big projects I did and it helped me become a better developer.
- tannhaeuser 6y agoI'm not much of a Spring fan (overengineering) but that's how a mature stack looks like. There were plenty alternatives 10-20 years ago. What's a bit more surprising IMO is the prevalence of Spring MVC in 2020 which doesn't mix well with modern JS-centric frontend approaches, just as splitting frontend and backend work between JS and Java is flying in the face of agile job rotation.
- ahpearce 6y agoI'm not sure why they separated them. Spring is Spring imo. There's a lot of tooling that is very quickly accessible and "just works". We have 15 microservices and three or four UIs that are all Spring backend with React frontends and it isn't even a little cumbersome. We don't serve the static content from Spring as a webserver though (we use a separate nginx instance).
- johnnycerberus 6y agoWe haven't used Spring MVC since 2015, all our services are running Spring Boot because it is the most mature solution on the market to create the webservice layer. Our Spring apps are then containerized and optimized with jib[1]. Our frontend is built on React Hooks + TypeScript, fully SPA. All the work nowadays in our company is focused on data engineering, by that I mean: databases, parsers, managing the data pipelines, orchestration, Python for creating the models and Java for inference in production, our teams consist of data scientists that are using Python and software engineers that are using Java and TypeScript. I don't understand why people consider Spring to be overengineered. We find it very productive, time to market is huge and we can focus on other parts of development instead of reinventing the wheel. We are also considering Quarkus for some of our services that aren't supposed to run for a long time. [1] https://github.com/GoogleContainerTools/jib https://github.com/GoogleContainerTools/jib
- pjmlp 6y agoI am still doing JEE when Java Web projects come around.
- vbezhenar 6y agoRaw servlets and JSP is surprisingly nice when a little bit of server rendering is required. war-file is tiny and functionality is adequate.