115 ms·
Hacker news likes to dunk on Spring Boot, but its usage in enterprises is very very high.
by sidcool 6mo ago
Hacker news likes to dunk on Spring Boot, but its usage in enterprises is very very high.
- fiftyacorn 6mo agoit saves a lot of reinventing the wheel
- rockyj 6mo agoAnd at the same time, gives you a dozen of footguns. This is just a list for the gotchas in the "@Transactional" annotation - https://dev.to/closeup1202/8-spring-transactional-pitfalls-that-break-production-and-how-to-catch-them-all-258f https://dev.to/closeup1202/8-spring-transactional-pitfalls-t... Now read up on all the dozen of annotations. But yeah, we did not want to "re-invent the wheel".
- fiftyacorn 6mo agoIm comparing against node equivalent ORMs and find spring consistently better. Yeah ive got to read up on annotations - but when it comes to transactions its always worth revisiting them to check for changes
- tracker1 6mo agoMeh... await using cn = await pool.connect(); const records = await cn.query<MyType>` SELECT ... FROM ... WHERE ... `; for await (const record of records) { ... } Oh, spring is so much better...
- throwawey1234 6mo agoSpring version: var records = jdbcClient .sql("select * from posts") .query(Post.class) .toList(); records.forEach(p -> ...);
- tracker1 6mo agoI'm not seeing a RecordsRequestFactoryHandlerProviderFactory in there... maybe it's not as bad as I remember.
- throwawey1234 6mo agoHalf of those are not really an issue with the annotation and seem a bit contrived. Thankfully the company that wrote the article has a linter/warning product to help avoid those pitfalls.
- tonyedgecombe 6mo agoYes but enterprise software is some of the worst software you will encounter.
- geodel 6mo agoHuh, Enterprise usage of Blackberry was very very high and then it was not. And at one point SOA, SOAP/WSDL/XML usage was very very high and now I am told in my very enterprise job I'd be fired if I dared bring those names up. Usage being high doesn't say anything about quality or suitability of a product specially in enterprise settings.
- sidcool 6mo agoHonestly, it does. Enterprise software does need high reliability.
- nilamo 6mo agoI'm not that deep into Java, but I was under the impression that things like Quarkus were starting to replace Spring in enterprise use...
- theflyinghorse 6mo agoIt will take some time for Quarkus to become a significant enough presence in the market share. In my experience, for the majority of Java shops Spring Boot does just fine because it worked before and it will probably work in the future.
- nogridbag 6mo agoWe have a medium sized Quarkus app (~200kLOC) and Quarkus has been fantastic. Startup in JVM mode for our app is around 10 secs. Not blazing fast - but likely much faster than a typical Java enterprise app. I'm sure a few of those secs are spent doing things like pulling authz policies from github or due to having several thousand hibernate entities.
- sidcool 6mo agoQuarkus, Micronaut etc. are doing well. But Spring Boot is the giant of Java ecosystem.
- dukeyukey 6mo agoEven in startups, lots of places are on Spring Boot (albeit more often using Kotlin over Java).
- bberrry 6mo agoMy favorite stack, Kotlin with Spring Boot. A real delight to work with
- dzonga 6mo agoit doesn't mean that usage of something being very high is a clever idea. lots of people take meth - so are you gonna take meth too. ```@EnableConfigurationProperties(CasConfigurationProperties.class) @EnableScheduling @ConditionalOnFeatureEnabled(feature = CasFeatureModule.FeatureCatalog.SimpleMFA) @AutoConfiguration @Import({ CasSimpleMultifactorAuthenticationComponentSerializationConfiguration.class, CasSimpleMultifactorAuthenticationConfiguration.class, CasSimpleMultifactorAuthenticationEventExecutionPlanConfiguration.class, CasSimpleMultifactorAuthenticationMultifactorProviderBypassConfiguration.class, CasSimpleMultifactorAuthenticationRestConfiguration.class, CasSimpleMultifactorAuthenticationTicketCatalogConfiguration.class, CasSimpleMultifactorAuthenticationWebflowConfiguration.class }) public class CasSimpleMultifactorAuthenticationAutoConfiguration { }``` this is what we mean by "JavaCulture" - java | JVM really wonderful things but the culture is what sets these things back someone can't just go in and understand things - they have to understand a bunch of notations too. then if you work at a place and try do things differently the same people will tell you to revise your PR cz it ain't software engineering (or it won't scale)
- mindcrime 6mo agoThat's a ridiculously extreme example, IME. Having been working with Java for 25+ years, I've never seen anything like that in code written by a shop I worked at, FWIW. And as a corollary I'm about 100% certain that you could find some equivalent extreme case to use as an example to dunk on any language/platform. this is what we mean by "JavaCulture" - java | JVM really wonderful things but the culture is what sets these things back Maybe there are still some Java shops out there living like this. But to me, this is a 20 year old outdated notion. shrug
- theflyinghorse 6mo agoYou have worked at some outstanding java shops then! In my experience the article is precisely representative of Java culture even today
- mindcrime 6mo ago
- the_gipsy 6mo agoCuisine Magazine likes to dunk on McDonalds, but its the most popular choice of dining.
- smrtinsert 6mo agoAnd startups not in the SV echo chamber. They happily exist and make money without worrying about supply chain attacks and js engine of the week.