5 ms·
8 years later, how do people feel about Spring today?
by lizardactivist 5y ago
8 years later, how do people feel about Spring today?
- Hackbraten 5y agoI still hate it. It gets in my way every day at work. I love to write small, self-contained, testable units. But our code is peppered with @SpringAnnotations. You can never be sure what’s really going to happen. Also we don’t upgrade because teammates are afraid of breakage. Because of that, we’re now at five different versions of Spring in our app. If I had my way, I would rip it all out.
- agumonkey 5y agoI stopped following the Java world (beside major releases language changes) but i'm surprised that Java has consistently bred misery. Something in this culture is special.
- marginalia_nu 5y agoI do a lot of java development (even in my free time, voluntarily). I find it helps a lot when you avoid the Spring ecosystem, really anything that's popular or buzzword:y. The more buzzwords there are and the more start-ups you find on the project page, the more of your day you spend programming in some more or less undocumented YAML dialect, desperately piecing together snippets you don't understand from outdated tutorials and remarks on stack overflow. As I mentioned in a comment earlier today, frameworks make the easy things easier and the hard things harder. If your needs are to build a really basic CRUD app, then sure, Spring is nice. But since it probably isn't, if indeed you're doing something else more than a hello world TODO app, then it's an unimaginable pain in the ass, and it's a lot easier to cobble together what subset of its features you need from other libraries.
- agumonkey 5y agoSpring is still the first name that comes with Java jobs (from my limited sample). What features / libs do you enjoy (design/perf/safety) ?
- mosdl 5y agoI've found using just jersey libs tends to give me enough power while being maintainable for WebApps. Add your own annotations when needed, etc
- Hackbraten 5y agoThe core language has dramatically improved in the last decade. It’s not exactly a joy to use, but it feels a lot more pleasant than the XML-ridden, 200-char-line-length monstrosity we used to have in the 00s.
- agumonkey 5y agoI saw that, that's why I'm surprised spring still ~~grams~~ harms devs. I thought the culture evolved too.
- Hackbraten 5y ago> spring still grams devs Apologies but English is not my first language. I can’t find “to gram” in any dictionary, including urbandictionary. Care to explain?
- agumonkey 5y agofinger failure on my side, I meant "I'm surprised spring still harms devs"
- codebolt 5y agoWhat about Spring4Shell, isn't updating at this point pretty much a necessity?
- Hackbraten 5y agoIt is. We’re paying the price right now, and justifiably so.
- GlennS 5y agoI haven't worked with it in almost that long, but I still hate it quite a lot. I try not to be too fussy about tech overall, but Spring is on my "I won't work with this again" list: 1. Spring 2. Mediawiki Visual Editor / OOJS UI 3. Typo3
- ogogmad 5y ago2. Mediawiki Visual Editor / OOJS UI I find this helps with adding citations. I don't know why you'd fuss over something that seems easy to learn and easy to ignore. [edit] I had to look up OOJS UI. It appears I hadn't understood your comment.
- GlennS 5y agoAh yes, sorry, I was very unclear there. Mediawiki Visual Editor is fine to use. It's not fine to make plugins for.
- twic 5y agoUsed it non-stop for ~3 years at Pivotal Labs. Moved elsewhere and haven't touched it once. Don't miss it in the slightest. It turns out it just doesn't actually do anything you need that you can't easily do yourself.
- pandemic_region 5y ago> It turns out it just doesn't actually do anything you need that you can't easily do yourself. That's neither a productive nor a cheap approach to software development.
- amoe_ 5y agoI like Spring, Spring Boot is good, and the libraries do stuff that you'll need (while maybe you don't realize whether you'll need it yet). I'm a DI fan and I've found alternative DI frameworks to not work as well as Spring's DI. I'm only talking about Spring's annotation-based configuration. There are also several good reasons not to like it, though: the errors can be unbelievably confusing, and it's quite hard to get a good mental model of how and why things are done in it.
- throwaway2037 5y agoCaveat: I always avoid DI frameworks / libraries if possible. I just add an AppContext to all of my projects, then write "10,000 new()'s" in one place. That is my wiring. That said, I don't want to hate on people who are productive with DI frameworks / libraries. There is more than one way to do it well! Real question: When Google Guice came out, there was a hype about it was better than Spring DI. Honestly, I think part of the hype came from their amazing PR, courtesy of "Crazy Bob". Have you tried it, and what did you think? If not, what other DI frameworks / libraries have you tried? Why did you prefer Spring? I am throwing zero share here. I am genuinely curious!
- amoe_ 5y agoIt's been a while since I last was experimenting with them. I did try Guice briefly, but I stopped for some reason that I don't recall now. Perhaps I should have given it more time. Dagger I tried in a bit more detail, and I found the code-generation aspect of it to be unpleasant and not sufficiently abstracted. I don't know if that could have been addressed by IDE configuration, plugins, etc, but I had to stop working on that project.
- throwaway2037 5y agoIt is interesting that you wrote <<I don't know if that could have been addressed by IDE configuration, plugins, etc>>. This is another thing that I don't like about DI frameworks. Usually, they require heavy IDE integration. (I recall this is less true for Guice.) Don't get me started about old school Spring XML...
- bloat 5y agoWe have a good time with it in our work. We don't use everything it has to offer, but we do use dependency injection, Spring MVC and JMS. We write testable classes, we new them up in @Bean methods and group them together in @Configuration classes. Everything is modular - you want to use our in-process message bus? Just @Import the configuration class. You want to include Jetty and use MVC? Just @Import the configuration class, you can set a couple of properties and authentication is enabled using our in house SSO. I think modern Spring lends itself very well to making services this way, if you can make the effort to make your application components modular, you can reuse the common stuff and have it interface nicely with the service specific code.
- qlm 5y agoNot had the bad experiences that other people have had with Spring. I'm currently at a Java/Kotlin place that prefers lightweight frameworks. A lot of time has been invested in reinventing stuff Spring already does and does better.
- kaba0 5y agoI really feel like people often compare long-running projects with ill-defined/ever-changing requirements that churned through 100s of developers with some trivially small-scoped new microservice written in Y that can be written in 2 months by a single dev. Of course the former will be a disgusting monster compared to that, but that would be the case with any 2 frameworks substituted. Spring does a shitton of things, because enterprise business project require the strangest things. But it has a clear structure convention and if the developers actually know the platform instead of using the chimp-typewriter technique it does make other devs job easier. I am not necessarily a fan of runtime DI though, but otherwise I think it is a well-thought out framework making the easy thing really easy, and making the hard random godforsaken requirements of businesses possible — many possibly better liked framework forgets about the latter. I would be interested in what others consider a good framework (in any language) Nonetheless, I would like to see a new framework slowly emerge making use of new java features as much as possible.
- Ensorceled 5y ago> But it has a clear structure convention and if the developers actually know the platform instead of using the chimp-typewriter technique it does make other devs job easier. I consulted on a enterprise java project that had a few dozen full-time developers and a few consultants, maybe one of the full-timers "knew the platform" and certainly one of the consultants did. By the time I left a year later after finishing my part, I kind of "knew the platform" and the rest of the team was no further along than before. Counting on people learning a very complex platform is just asking for heart ache.
- kaba0 5y agoWell, what is the alternative? There is a minimum requirement we really should demand from any developer worth their money. Sure, there are plenty that are not too good with the base language either, but we really shouldn’t program in Comenius Logo, should we?
- smrtinsert 5y agoIt really isn't that hard and gets even better as you incorporate tools like lombok and mapstruct. There's very little programming to do and with testing I barely bother starting my local docker containers before kicking off pipelines to try in the larger org Spring monoliths used to be hard but that was a long time ago. My advice is this though. If you have an app written to xml spring stay that way until it's eol. Mixing annotations and xml was hairy and made things answers and documentation less applicable. Wrt the author sounds like some poor decisions were made. Leaking Spring apis is an obvious nono. Even from v1. Second modularization is for pluggability of common apis not for you to version internal software projects. Stuff like that. If you just sit and whiteboard how you should use this thing you'll see it's not that scary. There's no doubt it's a sharp tool which is good right? If someone really needs certain beans to not show up in specific contexts they're glad it's there as a feature and easily implemented. I'm glad spring and spring boot are available. I've looked at other alternatives and don't consider them in the same league.