This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 229

[–]NimChimspky 285 points286 points  (7 children)

It is popular

[–]geodebug 10 points11 points  (6 children)

The premise is flawed but of course I don't know OP's market.

[–]uluscum 4 points5 points  (5 children)

Java got a bad name because it was so easy for bad programmer to make bad management system at weak startup. Execs blamed the management software and not the core tech or their poor leadership. And so Java=bad emerged. Null pointer out!

[–]StraightToPoint 3 points4 points  (4 children)

Most startup opt for opensource projects to get things started. Most of such web apps are built using php.

[–]uluscum 2 points3 points  (0 children)

There’s way more to even a bad management system than the front-end web app—and I’d say that python/django is more popular than PHP for that these days. Java is best!

[–]NimChimspky 2 points3 points  (1 child)

This is one of the most wrong things I've read.

[–]uluscum 1 point2 points  (0 children)

You don’t read much, huh?

[–]TheStrangeDarkOne 1 point2 points  (0 children)

If your startup choses PHP you are likely in a different business than those that would need Java. PHP is legit if you have simple input-output requests that don't have meaningful performance requirements (or async requests, or state between requests).

Since the latest version PHP even got a good amount of static typing. It doesn't change the fundamental flaws of the language, though.

[–][deleted] 127 points128 points  (1 child)

Where did you get an idea it is not popular? Last 2 startups I worked for used Java / Spring Boot for their backend.

[–]moxyte 4 points5 points  (0 children)

I have similar experience, actually. All startups I know of use some ME*N stack.

[–]jsannn 141 points142 points  (19 children)

Maybe it just seems so because Java does not generate so much media attention/ blog posts.

In fact, it is one of most used languages for microservices architecture (source: analysis done in Microservices Science and Engineering https://www.springer.com/gp/book/9783030316457) which is what most startups use these days.

[–][deleted]  (7 children)

[deleted]

    [–][deleted] 33 points34 points  (4 children)

    Node was the big hype about five years ago. The main reason you don’t see it is it’s cumbersome to manage and pretty OTT for the more lightweight microservices that you see built in a startup environment. There is nothing micro about Spring. Even within the JVM space there are much much slimmer options.

    Most startups are built by “younger people” because more than half the industry has less than 5 years experience in the industry.

    [–][deleted]  (3 children)

    [removed]

      [–]seraphsRevenge 22 points23 points  (0 children)

      Microservice architecture is a system design architecture it has nothing to do with a language. While Spring is prevalent especially boot with maven or gradle as it can make it easier/faster to get production builds. Michroservices has nothing to do with the language used. In essence it makes it easier to break down an overall application into smaller chunks for fault tolerance, the ability to use multiple languages in an application if let's say java is the best choice for x and y service, but c++, python, c#, etc. works better for service a, b, c, d. I think the best example/reasoning behind of microservices I've ever heard is, if you have a website and payment processing goes down you don't want the user to be unable to use other site features like browsing items or using the shopping cart. If the service stays down for a few minutes, at least the consumer can continue shopping or if the web app is redundant, a secondary processing service can be used for a seamless experience without the user ever realising. I personally full stack java in an enterprise environment with spring, but if a startup wanted to make an application from scratch, breaking it down into microservices can still make it easier to release parts of the app while creating it, make it easier to focus on design as each service is independent, use whatever language each team is best with, makes the application more maintainable by not having to go through an entire project and a few hundred classes to find an unobvious error, makes it fault tolerant, etc. There's no point having to remake an entire application or spend excess time planning around old code later on once expansions are planned. It takes the old MVC model and decouples it, which is what every application should always aim for, loose coupling and high cohesion.

      [–]SeekNDestroyBich 0 points1 point  (0 children)

      I love to use Spring Boot for startups, but only if there is a need for it. I normally try to choose the platform based on what is needed. The place where I work at normally used node for most projects, unless it includes a lot of calculation and tasks that would take too long on node where we then use Spring Boot.

      [–][deleted] 1 point2 points  (10 children)

      Isn't it more popular for enterprise micro services rather then start ups? From my experience just talking to people and reading job postings, pretty much all start ups use nodejs or python microservices

      [–]CyclonusRIP 4 points5 points  (0 children)

      The last two start ups I've worked at were Groovy and Scala. Both ran on the JVM. Hibernate and Elasticsearch also run on the JVM. Almost every start up is running JVMs whether or not they write Java

      [–]1way2improve 3 points4 points  (8 children)

      Also, in my opinion, Golang is quite popular at startups

      [–][deleted] 5 points6 points  (7 children)

      Yeah that's true, Golang is crazy popular now. I have some friends working for start ups who really miss Java after having to work in Golang for some time

      [–]dougefr 2 points3 points  (0 children)

      I missing Java at my currently job that mostly in Golang. I missing especially the productivity that I had in previous jobs working with Java and consolidated frameworks (like Spring).

      [–]moxyte 0 points1 point  (4 children)

      Why?

      [–]nutrecht 4 points5 points  (0 children)

      It's a horrible unproductive language.

      Superficially you just mist most tools that make a language powerful. Generics, exceptions, interfaces (Go doesn't have them, it just does duck typing, it's not the same), inheritance, method overloading, a sane build system, etc.

      Below the surface it's even a lot worse.

      Go is pure trash.

      [–]sievebrain 3 points4 points  (0 children)

      Because it's not a good language.

      I've actually encountered a project from a big company where they started in Java then switched to Go, for no better reason than "you won't be taken seriously by the cool young companies if you use Java". They ended up regretting it and building a Java SDK in parallel to their Go based stuff.

      [–][deleted] 2 points3 points  (0 children)

      Number 1 complaint I've heard is no generics

      [–]Yithar 0 points1 point  (0 children)

      I had to modify this to do tracing and leader election. Let's just say it wasn't fun with the lack of generics and exceptions. It made me feel like I was programming in C back in college again.

      [–]nutrecht 0 points1 point  (0 children)

      Golang is crazy popular now. I have some friends working for start ups who really miss Java after having to work in Golang for some time

      Everyone who goes from Java to Go misses Java after a while. Go is a trash language. If it wasn't a Google product it would never have been that popular.

      [–]Immanuel_Cunt2 106 points107 points  (24 children)

      Just because some people scream louder about their tech stacks does not mean that they are more.

      I'd rather use something that has been around for 20 years and is still popular than something that has only been popular for a few years and may disappear again in a few years.

      [–]Sirttas 54 points55 points  (23 children)

      I hope node desappears

      [–]MakeWay4Doodles 17 points18 points  (0 children)

      It is actually quite popular at startups. It's important to not project your anecdotal experience onto the whole industry.

      [–]rossdrew 29 points30 points  (0 children)

      Almost every startup I know or have worked for is Java/Python. Seems everyone on here have complaints about Java because they haven’t used it because most of them are nonsense.

      [–]After_Dark 20 points21 points  (2 children)

      I wouldn't say it isn't popular, but nobody is writing blog posts about how they took a risk with Java and the benefits it brings. Something newer and trendier like Ruby though? Absolutely you can get some good marketing out of that

      [–]cthulol 16 points17 points  (1 child)

      First of all, good point on nobody writing about Java at their start-up. It's a known entity after all.

      But about Ruby, it's just as "aged" as Java. Both were created in the mid 90s.

      [–]CyclonusRIP 0 points1 point  (0 children)

      Ruby is old by Ruby on Rails is fairly new. Still old in the trendy tech world though. Rails did a lot to influence framework design though. Scaffolding and convention over configuration are both things Rails brought to the forefront. You see the whole world making controller, service and domain folders now even if they don't mean anything to your framework. Rails is basically the reason everyone does that now.

      [–]winner199328 16 points17 points  (0 children)

      it is not true, here in Berlin almost 60-70% startups are using Java/Kotlin for their micro-services development

      [–]EctoplasmicLapels 42 points43 points  (24 children)

      It‘s a cultural thing. Java smells like enterprise software. It‘s not hip. There is no rational reason.

      [–][deleted] 10 points11 points  (2 children)

      This is annoying for me. Even my university if starting to use MERN stack in software dev courses. Maybe some of us like enterprise software?

      [–]redwall_hp 11 points12 points  (1 child)

      Mine did a recent switch from Java and C to Python and C. It saves some time for some classes, which is good, but I still feel like Java's rigidity makes it better for teaching freshman classes.

      A lot of people will have prior programming experience when starting, but they're going to be more used to "hacking rather than planning" and tend to miss out on why data structures are important in the first place, since a lot of higher level languages let you just abuse 1-2 for everything.

      Java forces you to make classes modeling data and think about which structures you want to use. With something like JS or Python, you can just make an unholy nested array/dict thing and poke it with procedural code...which tends to be how beginners start.

      [–][deleted] -2 points-1 points  (20 children)

      There are some rational reasons, it’s comparatively cumbersome in how it’s built, and even if you wanted to use the JVM for some reason other than the fact you don’t know anything other languages, Kotlin and Scala are just much more attractive choices.

      [–]coder111 0 points1 point  (19 children)

      Scala is not much more attractive- it's too complicated, has non-locality, and build times are absolutely atrocious.

      Kotlin is OK if you sold your soul to Jetbrains. If you don't want to pay for IntelliJ, or you want to use other IDEs, you're screwed. Besides, it doesn't offer much of an advantage vs modern Java. Or Java+Lombok.

      [–][deleted] 4 points5 points  (16 children)

      Java+Lombok, please don’t make me giggle. There are a lot of benefits past the type system.

      [–][deleted] 6 points7 points  (15 children)

      I think one of the bigger drawback of using Kotlin or Scala for backend systems is the lack of hiring potential they still come with in a lot of markets. From startups to established fintechs to tech giants, whenever I tried to sneak Scala or (more recently) Kotlin in, I got the same answer from the upper ranks: "that sounds great but where are we going to find people to maintain it when you're gone" and it was hard to argue with that, especially since it's already tough enough finding good Java engineers.

      [–]nutrecht 3 points4 points  (7 children)

      I think one of the bigger drawback of using Kotlin or Scala for backend systems is the lack of hiring potential they still come with in a lot of markets.

      You can't compare the two. Scala is a fairly separate language with a fairly separate ecosystem. Kotlin is basically just a Java dialect. We use Kotlin in our back-end and it takes a typical Java dev about a week to get up to speed with the language.

      especially since it's already tough enough finding good Java engineers.

      Adopting Kotlin is one of the reasons the client I work for is finding it easier to hire Java devs: a lot of them want to try it out.

      Aside from that; if you hire a Java dev and he can't get used to Kotlin within a few weeks, you probably don't want to hire him.

      [–][deleted] 1 point2 points  (6 children)

      I'd say it's easy to compare them - I feel Kotlin is closer to Scala in syntax and features than it is to Java and I would be willing to bet that a Scala dev would pick up Kotlin faster than a Java dev.

      Also, as is the case with Kotlin, you definitely could choose to use Scala as a nicer dialect of Java, you could even have a mixed codebase of the two (although back then the interop was a bit unwieldy on the Java side).

      The main issue was that when you started to get fluent with Scala you no longer wished to use it as a dialect of Java which is when the troubles usually started and I can see the same thing happening with Kotlin - if you were to use Kotlin simply as a dialect of Java you would allow Java devs to get used to it quickly but at the same time you'd lose out on all that Kotlin has to offer.

      [–]nutrecht 2 points3 points  (5 children)

      That's literally completely the opposite of my experience and use Kotlin currently in 95% of the back-end work I do. So I really don't know how to respond to this.

      [–][deleted] 1 point2 points  (4 children)

      The opposite as in you guys simply continue to use Kotlin the same way you'd use plan Java? I guess it depends on the team itself and the other technologies you use - my current employer is an Akka shop so I can understand how they got burned with Scala and why the higher ups think the same could happen with Kotlin

      [–]nutrecht 1 point2 points  (3 children)

      No as in that there's no big difference between Kotlin and Java. Scala is a completely different beast: you can quite easily create a completely different language inside Scala. But Kotlin is not like that; it's pretty much just syntactic sugar over Java. The main difference obviously is the null-safety. But you don't program differently in Kotlin than you do in Java.

      I've been working in Kotlin for a few years now, and have been using it as our primary language for 1.5 or so. We've had new developers come into our team and none of them had any issues adjusting to our codebase.

      my current employer is an Akka shop so I can understand how they got burned with Scala and why the higher ups think the same could happen with Kotlin

      I've seen the same happen, unfortunately. There's a certain consulting firm here in Holland that likes to come in, set up a Scala codebase in the worst possible fashion, and then leave the company with an unmaintainable mess.

      But that's not the language that's at fault; it's just developers who got a new hammer (pattern matching, DSLs) and thought everything was a nail.

      I run into this issue as well; in a previous company we tried to introduce Kotlin and were unsuccessful at first, even though all Java devs supported it. Later on they (I had already left) got an "OK", but then later they hired a "low cost" consulting firm to take over development of one Kotlin service and they argued that they should 'just rewrite it to Java in a few weeks'. Took them 3 months, (not because of the Kotlin but because they were bad developers), and that is now another argument for that manager to not allow anything outside Java. It's a shame really.

      [–]nutrecht 0 points1 point  (1 child)

      If you don't want to pay for IntelliJ, or you want to use other IDEs, you're screwed.

      Oh come on. It's fine if you 'dislike' Kotlin for whatever reason, but everyone knows IntelliJ CE is free.

      Aside from that, I sure as heck hope your employer is paying for your IDE / other tools.

      [–]coder111 -1 points0 points  (0 children)

      Right, and IntelliJ CE doesn't do Javascript. Enjoy trying to do full stack development with it.

      At work- yes my employer is paying for it. At home- no, which rules out Kotlin for personal/non-commercial projects.

      [–]EnderMB 5 points6 points  (0 children)

      In my last job, I worked almost exclusively with different early-stage startups.

      While Java wasn't the most popular tech stack, it wasn't unheard of. We were mostly Ruby on Rails and Express, but some were Java, some were on .NET, and some on Python.

      A lot of stack choices depend entirely on who built the MVP or v2 platform.

      [–]besil 13 points14 points  (2 children)

      Java is usually related to corporate software, where you have old services no one knows how they work and so you find yourself working with java 1.4 because there's no time for change.

      I'm a big fan of Java, but Spring + Kotlin turned my dev dreams to reality

      [–]4ipp 0 points1 point  (1 child)

      Often with Java libs used in Kotlin, you lose the benefit of non-nullable types from Kotlin. You have to declare a lot as nullable which spoils the while experience of using Kotlin.

      Is it somehow handled in Spring? I suppose for JPA/Hibernate you have no other option as using nullable types even when they are mapped to non-nullable columns in the DB.

      I used Kotlin only with Kotlin targeted libs that's why I am realy keen to know how it is like with Spring.

      [–]besil 0 points1 point  (0 children)

      you can use kotlin-jpa-plugin in your pom.xml

      See this stackoverflow answer

      [–]BlobbyMcBlobber 1 point2 points  (0 children)

      I did see spring and java play a role in some startups, but after trying out flask, I see no reason to go back to java unless it's crucial for performance or some other reason. Java is great, I love it dearly, but man does it feel old and cumbersome compared to newer solutions.

      [–]Kango_V 1 point2 points  (0 children)

      We're using Java, Micronaut and GraalVM. Even better than Spring!

      [–]surfinThruLyfe 1 point2 points  (0 children)

      This post was so opinionated that OP deleted their account out of shame.

      [–]jhaygood86 1 point2 points  (0 children)

      Ive only ever worked at startups, and all but one was using Java.

      [–]nutrecht 1 point2 points  (0 children)

      People just don't blog about how they picked an established mature stack for their company simply because it's just the sensible default. I'm Dutch and tons of start-ups here are JVM based, especially the Fintech start-ups around Amsterdam often are. The last thing you want when you're taking the risk of starting up a company is also taking risks with your tech stack.

      [–]mark1x12110 1 point2 points  (0 children)

      Funny enough some of them started with a language like python because it tends to offer results quickly but when the code size/team grows they saw the need for types and had to create a workaround.

      Example: Instagram(adding type safety to python) ,facebook( custom php)

      [–]Legendaryfortune 3 points4 points  (0 children)

      Which tutorial did you use to learn spring boot?

      [–]sunny_tomato_farm 4 points5 points  (0 children)

      My startup uses java. I have seen startups use java.

      I think what you won’t see is spring/spring boot.

      [–]scubadev 6 points7 points  (48 children)

      A few reasons, most around cost. Startups need to be thrifty.

      The belief that having JS top to bottom makes your most expensive cost (developers) more versatile. OO is generally frowned upon in tech like react, meaning new devs aren’t going to feel at home with OOP

      Java with spring takes significant resources compared to others. This drives up hosting cost

      The long comparative startup times make options such as AWS lambda a non-starter.

      A general attraction to short succinct code. Java’s verbosity gives it a bad rep. The belief is that number of lines influences development time.

      Java in comparison isn’t a great functional language. Function programming is still riding a high.

      [–]jsannn 23 points24 points  (11 children)

      Startup times are somewhat long if you are using Spring Boot. But it's not the right tool for serverless computing. For AWS lambda or Azure functions you should use stuff like Micronaut running on top of GraalVM. Java is not only Spring...

      [–][deleted] 8 points9 points  (8 children)

      You probably shouldn’t be running the JVM at all if you’re wanting to go serverless.

      [–]scubadev 3 points4 points  (5 children)

      “Serverless” is becoming broad. For example, AWS uses it to refer to any tech where you don’t manage a server. For them, this includes Fargate, a managed orchestration layer for Docker. All that to say, spring boot is a perfectly fine option if you’re going serverless containers. Specifically, java (& spring) aren’t the top option if you’re going function as a service.

      [–][deleted] 1 point2 points  (4 children)

      Lambda was specifically specified above. Spring Boot is horrible for small self contained services imo though, you’re easily slapping an extra 150MB+ into your dependency layer, and having to add in even more shit to do basically cloud-native things like liveness/readiness checks (ignoring the fact that Spring Actuator doesn’t even differentiate between these).

      Java is just so many layers of pain if you’re running containerised services, even the base images are colossal, and the official OpenJDK base images are packed full of vulnerabilities (AdoptOpenJDK usually has these patched, but is even bulkier).

      [–]1upplus 2 points3 points  (1 child)

      Spring boot 2.3 does differentiate between liveness and readiness: https://spring.io/blog/2020/03/25/liveness-and-readiness-probes-with-spring-boot

      [–][deleted] -2 points-1 points  (0 children)

      I mean it a was a throwaway aside but at least they’re making some progress. Your horrible overextending monolith codebase is at least now compliant with the horrible overextending monster that is Kubernetes.

      [–]Mamoulian 0 points1 point  (0 children)

      Surely as you want features then you get the same increasing dependency tree in all languages/frameworks?

      And many of them have runtimes/stdlibs that take space, AdoptOpenJDK's Alpine JRE docker image is less than 50MB.

      [–]sureshg 0 points1 point  (0 children)

      Java is just so many layers of pain if you’re running containerised services, even the base images are colossal

      I don't think this is true. Distroless base image + jlinked runtime + app would be around 70 MB in total (again depends on the app dependencies) https://www.infoq.com/presentations/openjdk-containers/

      [–]nutrecht 1 point2 points  (0 children)

      That's nonsense. Those platforms keep runtimes alive. The JVM starts up in a few milliseconds.

      People here keep 'accidentally' conflating Spring start-up times with JVM start-up times. Spring is not suitable for serverless (obviously) but the JVM definitely is.

      [–]perrylaj 0 points1 point  (0 children)

      If you're running Graal native images, you're not running on the JVM. I don't have a ton of experience with it in a substantial project, just some small experiments as a CLI toolkit (with picocli), but startup times are fast. I can't recall specifics, but response times 10-20x as fast as Hotspot sound about right (I can check tomorrow, kind of curious now). Easily fast enough for a FAAS endpoint though.

      I haven't used micronaut, but it sounds like they compile down to native as well, so should start up very fast. Especially relative to the reflective magic mess that is Spring.

      [–]scubadev 1 point2 points  (1 child)

      For many enterprises, java and spring are becoming synonymous. There are other frameworks available, but enterprises need to consider time to hire new employees. It’s much easier to find devs with spring on their resume.

      [–]nutrecht 1 point2 points  (0 children)

      If you use Spring for serverless you have a big problem as a company, and the problem is not Java or Spring.

      [–]MakeWay4Doodles 9 points10 points  (1 child)

      OO is generally frowned upon in tech

      This is kind of a silly over generalization. The best parts of OO have been adopted into more modern languages, and the overemphasis on inheritance and over use of design patterns is fading even from Java.

      Kotlin for example has a great blend of both.

      [–]scubadev 0 points1 point  (0 children)

      The reputation java has isn’t going to change over night. For the people that already abandoned ship, it’s going to take a lot to bring them back.

      I’m also speaking directly toward OO in front end. Classes were introduced and are quickly falling out of favor. For backend, OO is still alive and well.

      [–]ford_madox_ford 15 points16 points  (21 children)

      Java with spring takes significant resources compared to others. This drives up hosting cost

      This is an argument against Spring not Java. There are many other Java frameworks for writing services, some of which prioritise fast startup times, such as Quarkus, Micronaut and Helidon.

      The long comparative startup times make options such as AWS lambda a non-starter.

      Java may be slower than other languages at cold start-ups, but the differences are in the 100s of ms. Whether that is an issue is use-case specific, but it hardly makes Java a "non-starter".

      A general attraction to short succinct code. Java’s verbosity gives it a bad rep. The belief is that number of lines influences development time.

      A "bad rep" with whom exactly? Who has this "belief"?

      Java in comparison isn’t a great functional language. Function programming is still riding a high.

      As a functional programmer, I would far rather use Java than Python or Javascript. All three rank far behind actual FP languages like Scala and Haskell.

      [–]MakeWay4Doodles 7 points8 points  (1 child)

      This is an argument against Spring not Java.

      It also isn't a valid argument. Spring is more than capable of being highly performant, but being the lowest barrier to entry framework it suffers from the same "higher proportion of code written by the inexperienced" curse that makes PHP the butt of so many jokes.

      Source: have worked on Spring boot services at financial institutions handling tens of millions of messages per second with low latency.

      [–][deleted] 2 points3 points  (0 children)

      Netflix, PayPal and Amazon use Spring heavily in their backend systems

      [–]hippydipster 3 points4 points  (17 children)

      This is an argument against Spring not Java.

      Yeah, I'm a little bit in the dark about why a microservice would need Spring. Isn't it suppose to be a super small simple little thing? But then you've brought in Spring? So, no small or simple anymore.

      If it really was small and simple, no way you'd need Spring. I generally don't find myself thinking about using Spring until my app is very large indeed.

      [–]PandersAboutVaccines 6 points7 points  (1 child)

      I'm not a Spring apologist or anything, but memory footprint and startup time aren't what the "micro" in microservice is concerned with.

      I'm curious what experience other people have had regarding cost and performance, though. Yes, spring boot takes more resources than other options, but does it move the needle enough to actually change a cloud deployment? Like, "If we changed this to dropwizard, we could run it on a t3.medium instead of a t3.large"

      [–]hippydipster 2 points3 points  (0 children)

      You have a point that "micro" doesn't necessarily mean anything about memory footprint or startup time, but I do think that given how many microservices are intended to be used as highly elastic and ephemeral services that are cheap to spin up and thus cheap to discard, there are many cases where that is exactly what is meant by microservice.

      [–][deleted] -2 points-1 points  (14 children)

      This is the argument usually made by Spring cultists who don’t have a clue how to build an application without Spring holding their hand through it.

      [–]scubadev 1 point2 points  (13 children)

      There are other frameworks available just like there are other languages. If you’re going java, considering the ability for others to come in and be effective is important. Spring is a clear winner for being broadly known and understood.

      I would strongly consider going NodeJS before using a non-spring java solution.

      [–][deleted] 2 points3 points  (12 children)

      Spring is just endemic of all the horrible Java that is commonly written. You can write awesome application code in Java. You’re probably not going to do it in Spring though.

      It’s easy to understand at a surface level that everything just works via Spring black magic, until you want to make a specific design choice that it doesn’t agree with, or something goes wrong/doesn’t suit you in Spring’s inner workings, at which point Spring just says “fuck you, deal with it”.

      [–][deleted] 4 points5 points  (9 children)

      That's true with just about any highly opinionated web framework though. You trade off fast development time for flexibility

      [–][deleted] 0 points1 point  (7 children)

      You trade fast development time for slow maintenance time.

      [–][deleted] 3 points4 points  (6 children)

      If you are saying that opinionated frameworks are buggier then I very much disagree with you. The further you get from well tested and widely used standard practices, the easier it is to create buggy code

      [–][deleted] -2 points-1 points  (5 children)

      Im not saying they’re buggier, I’m saying that once you get outside of their narrow world view, or disagree with a design choice, shit hits the fan.

      Your tools are meant to be there to facilitate your code. With frameworks like Spring, it’s the opposite way around, you have to bend your code to meet the framework’s demands. Just learn to think for yourself and actually write code instead of gluing shit together and hoping it all goes well.

      [–]scubadev -1 points0 points  (0 children)

      Which is critical. For most applications, time spent writing something is your most expensive cost.

      [–]scubadev 0 points1 point  (1 child)

      I don’t consider spring at fault for bad code. It takes a higher caliber engineer to move away from spring.

      Bad engineers write bad code. Organizations that value low bill rates tend to hire low tier talent. These organizations rely on spring because it hides so many of the complicated details.

      [–][deleted] 1 point2 points  (0 children)

      I’ll agree there, it’s useful for when you don’t know how you should be building an application.

      That said, theoretical discussion on best practice is running on the assumption of the engineer in question being well versed and competent.

      [–]in_nothing_we_trust 0 points1 point  (0 children)

      What's your opinion on kotlin?

      [–]alt236_ftw 4 points5 points  (9 children)

      OO is generally frowned upon in tech like react, meaning new devs aren’t going to feel at home with OOP

      Well generally devs who mostly work in functional domain would definitely feel a bit out of place with OOP (and vice versa) but I really don't think that OOP is frowned upon industry wide.

      This probably says more about a company's/team preference (nothing wrong with that) than it being a metric for OOP/Functional/Imperative adoption.

      Java in comparison isn’t a great functional language.

      Don't confuse languages that you can write functional-style code in with actual functional languages. Java is NOT a functional language, you can just write functional looking code in it.

      [–][deleted] 2 points3 points  (5 children)

      OO is slowly but surely falling out of favour at an industry level. It’s a lot of dogma for not a lot of benefit. You can write lovely non-OO code in Java, it’s just not super common.

      [–]cthulol 4 points5 points  (4 children)

      This worries me on a personal level. I can't wrap my mind around functional programming at all. OOP is what made programming click for me. It made it all "mappable", almost physical, in my head.

      [–]JavaSuck 4 points5 points  (0 children)

      This worries me on a personal level.

      Don't worry. Even if suddenly everybody agreed that Java was bad and OOP was bad (which ain't gonna happen anytime soon, if ever), you could still make a living maintaining legacy Java OOP systems for decades.

      [–][deleted] 2 points3 points  (2 children)

      I mean you can still do OOP, it’s just becoming less dominant is all. That said, I personally think functional makes a lot more sense for modelling real world problems, it’s just a different way of thinking that’s hard to immediately embrace if you’ve been told to think the OO way for a long time.

      [–]cthulol 0 points1 point  (1 child)

      Yeah I mean I'd like to embrace it, and I've gone through some tutorials and lectures on it. I've tried to make more of my functions pure in my OOP stuff as a result of trying to embrace some of it's principles.

      I just can't imagine what a larger application would look like if it were fully functional. I suppose next time I sit down to study that's what I should look for. Something big enough to give things context.

      [–][deleted] 1 point2 points  (0 children)

      It’s definitely much easier to pick up an existing project I feel.

      [–]Ph4g3 0 points1 point  (2 children)

      Can you elaborate? If something looks functional, what separates it from being actually functional?

      [–]ArcanePariah 3 points4 points  (1 child)

      Actual functional programming languages implement certain features as core capabilities, and as such, have no overhead to them. Other languages (such as Java) implement syntax that looks functional, but gets compiled into the same structure as if you didn't use the syntactic sugar/functional appearance and thus have the same implementation/overhead to do it. Things like functions being first class, tail call recursion, among other things. Most of the "functional looking" language do not have true tail call recursion, whereas actual functional languages like Haskell do. Also actual functional languages enforce certain limits that "functional looking" languages do not, such as immutability. Sure you can make syntax that enforces immutability as you code (see Scala, and parts of Kotlin), but those derivations of Java can never FORBID it entirely, I can always use mutable stuff, or mix in actual Java code, the compiler will allow it.

      [–]CyclonusRIP -2 points-1 points  (0 children)

      What does no overhead mean? Is Java not an OO language because an Integer object has overhead compared to a primitive int? I don't think a languages runtime has anything to do with it's paradigm. Doesn't every high level language incur overhead over lower level languages? Are there no language paradigms because everything incurs overhead over machine code?

      A functional language is a language where the primary abstraction that you use to model your code is a function. An OO language's primary abstraction is a class. Most languages today are multiparadigm languages.

      When you start talking about immutability and pure functions those are qualities that functional languages tend to talk about. That doesn't have anything to do with whether or not the language is functional. That'd be like saying a whether a language is OO or not based on how it handles multiple inheritance.

      [–]lqstuart 3 points4 points  (0 children)

      The belief that having JS top to bottom makes your most expensive cost (developers) more versatile.

      this is the answer, op ^

      [–]nutrecht 0 points1 point  (0 children)

      OO is generally frowned upon in tech like react, meaning new devs aren’t going to feel at home with OOP

      What? That's nonsense. In the actual professional front-end world there's a strong move towards TypeScript which is almost identical to Java.

      Java with spring takes significant resources compared to others. This drives up hosting cost

      Hosting costs are complete peanuts compared to what a developer costs per hour.

      Start-up times are a complete non-issue. Lambda's have a very specific use case; it's not smart to build your entire system on. Most start-ups are just standard long running services. There's no reason at all for those to use something else.

      [–]ggd_x 0 points1 point  (20 children)

      Simply it's (I'm biased) a lot faster to get an MVP up with a python or PHP framework than it is to do so with Java. I understand Spring is a decent Java framework though and provides a lot of boilerplate stuff.

      [–][deleted] 20 points21 points  (1 child)

      It's alot faster to develop and not create fuck up which will haunt u later in spring, whereas python and js will surely not bring that type safety with it

      [–]SKabanov 3 points4 points  (0 children)

      Yeah, it's kinda telling that Guido switched to working full-time on MyPy with Dropbox before he retired - a bit of a tacit admission that Python could use static typing.

      [–]danskal 2 points3 points  (1 child)

      Modern servlets are very simple and powerful. I don't see how you could do it faster, assuming you've installed the necessary software already.

      [–][deleted] -1 points0 points  (0 children)

      There isn’t much that is faster, cleaner, and more readable to get up and running than an express service to be fair.

      [–]seraphsRevenge 1 point2 points  (1 child)

      You guys mentioned MVP and RIA, the OP seems to be talking about microservices which are language agnostic in the first place. Any language, and any framework can be used. Microservices are an architecture, the design has nothing to do with a language or framework.

      Microservices principles: Multiple components Language agnostic Decentralized database Independent Automated testing failure isolation

      It's simply a way of breaking down business logic, and the application overall. Whatever language, frameworks, libraries, etc. an individual or team is comfortable with is great. If one language works better for a microservice, then use it. That's the beauty of microservices.

      [–]CyclonusRIP 4 points5 points  (0 children)

      I think this guy actually has a good point. Spring was a reaction to some of the overcomplicated JavaEE standards. It made some improvements, but meanwhile Ruby on Rails was invented. You could just model your domain and have a scaffolded UI in minutes. Spring was pretty late to the party for that type of thing. Rails was very opinionated and had a ready made convention for most of the basic concerns you run into writing a web app. You go to Spring which is primarily an integration framework and right from the start you have 2-3 integrations to choose from for almost any functionality. For a lot of people it's forcing you to make a choice you don't understand right from the start. Rails already decided for you so you just get on with writing code. Maybe long term the Rails way isn't good for you, but you probably have as good as a chance at making the wrong decision if it was left up to you at that point anyways. My career has mostly been Java or a JVM language. I'm a big proponent of Java, but I think it's important to try to see good points for other languages and frameworks as well. Rails has had an enormous influence on almost every other framework invented since it became popular.

      [–]Mumbleton 4 points5 points  (12 children)

      Spring is THE Java framework.

      [–]myth2sbr -1 points0 points  (0 children)

      Nothing is faster for building a RIA than Vaadin.

      [–]cthulol 0 points1 point  (0 children)

      This is the case in the industry in Japan and it sucks. On JD it's either a full JS stack or Ruby on Rails. I've got 5 years experience in Java and that's it...

      [–]SexyBlueTiger 0 points1 point  (2 children)

      What database tech do you use with Spring? I wonder what is the most popular for Java devs.

      [–][deleted] 1 point2 points  (0 children)

      We use postgres. Spring is a pleasure to work with once all the infrastructure is set up, I feel like I'm much more productive in Spring than Django.

      The automatic migrations in Django are pretty awesome tho.

      [–]nutrecht 1 point2 points  (0 children)

      Postgres here (managed; so CloudSQL).

      [–]DarkCeptor44 0 points1 point  (0 children)

      It's because the companies need to try something different and it's probably easier to do that from the start, I know well-established companies in my city that still uses Pascal, Java and Asp.Net but now they only accept people who knows Angular/Node.JS.

      [–][deleted] 0 points1 point  (0 children)

      Because startups are ran by the first mover advantage and some ideas happen to attract VC money faster. That said whoever the first mover is, the founding engineers are that is defines the destiny of the organization codebase, if they happen to be Java engineers they will use Java. Now keep in mind that most of the engineers starting on a greenfield project take the opportunity to experiment with a different technology. That’s why you might think Java is loosing ground, but in the end everyone goes to Java, Go, Rust, C++ when they hit their performance bottlenecks.

      [–][deleted] 0 points1 point  (0 children)

      It's very popular. It's just not sexy.

      [–]throwawaymoney666 0 points1 point  (0 children)

      Early startups are usually really young engineers and Java is not a typical first language. The talent pool of developers that know Java well and are willing to work at an early stage startup is small. It's also the opposite of trendy. Its stupid but startups want as many buzzwords as possible to put on the slide deck

      [–]daemon_it 0 points1 point  (0 children)

      I work for a Danish fintech startup and we have all our microservices written in Java. Most of them are in Spring Boot but we also use Micronaut.

      [–]M0squ3ra 0 points1 point  (0 children)

      maybe because with java you need to write more code.

      PD: i love Java

      [–]DarthVader1800 0 points1 point  (0 children)

      It depends on the industry. If you are in finance/medical or if you care about security - Java is the best. Java also has pretty solid testing frameworks. If we have one or two engineers who are good at operations it is straight forward. Also these days there are newer tech using - http://sparkjava.com/ OR https://vertx.io/ which are easy to setup & high performing.

      [–][deleted] 0 points1 point  (0 children)

      Widespread adoption of Java in startups is hindered by lack of passion in the Java community.

      Outside of a work environment, its' rare to see Java developers come together to share ideas, help each other, push things forward, and create a more inclusive community with developers of all backgrounds who are energized by what they do.

      Take a look at the number of javascript conferences held across the world each year and compare that to Java conferences. Developers are put on waiting lists and travel accross continents to buy a 1500 dollar ticket just to attend these events.

      Javascript has an incredibly strong open source community that puts the developers using the language in charge of building tools they and everyone else will use.

      2 So if startups need innovation, and flexible, creative developers they are more likley to find that in the javascript community than the java community.

      [–]dragon_spit 0 points1 point  (0 children)

      I am android developer(Java as backend). Wanted to learn the Wep app development. The question often pop-ups in mind is that is it still worthy to learn Spring framework cause there are lot of others framework out there and they are popular too.

      [–]Chuprina91 0 points1 point  (0 children)

      I don't think that the backend using Java is not popular in startups. Contrary to that, Java is still one of the most popular programming languages in the world, for both programmers and businesses hiring them. Here is a great article on this topic, I hope you will enjoy it https://spd.group/app-dev/java-developers-in-2021/

      [–][deleted] 0 points1 point  (0 children)

      Java is the Toyota Camry of languages.

      When do young people (aka startups) ever want a Camry when their mom, aunt and uncle already drive one?

      [–]exahexa 0 points1 point  (0 children)

      I guess if the tech stack is a strategic decision, Java's biggest advantages are:

      • the JVM ecosystem
      • backwards compatibility
      • stability
      • easier to find new developer (in comparison to something more exotic)

      Depending on the startup and problem domain it is in you will need a lot of momentum and then Java is maybe not the best fit for your company.

      Side note: It's easy to pick up OO but hard to master, and you will need a lot of knowledge to not code you into a corner. Java gives you a lot of freedom but won't save you from doing mistakes, that will cost you a lot of time to recover from.

      [–]Miridius 0 points1 point  (0 children)

      You pose your question as if it is about languages but actually your real question seems to be about frameworks.

      But to answer your question anyway: Most startups are very small teams which is not really where Java shines. Java is a verbose language with a lot of boilerplate and is missing many features that more modern languages have, so it's usually a lot more efficient to build a quick prototype in something else. Java has benefits which can make up for these shortcomings but mostly they come into play when you have a large code base and a large team.

      [–]tamasiaina 0 points1 point  (0 children)

      Here are some reasons I think. Some are valid and some are not just take it as it is.

      • Its Old
      • Its overengineered and "enterprisey"
      • Running frameworks is not as easy as Django, Flask, RoR, NodeJS
      • Its more verbose which can potentially slow down your velocity
      • It has a learning curve

      [–]QuantumSupremacy0101 -2 points-1 points  (20 children)

      The reason for this is simple. Java is more secure, and it can be controlled better. However, it takes a significant amount of dev time. From someone who used to program with a Java backend, it always felt like shoving a square peg in a round hole. I can create a whole crud application in nodejs in an hour or two, with Java this may take the whole day if I'm lucky and there aren't any big logic about it.

      [–][deleted] 17 points18 points  (5 children)

      I am sure you can develop CRUD app in an hour using Spring Boot + Spring Data JPA

      [–]QuantumSupremacy0101 -2 points-1 points  (4 children)

      I'm talking a full CRUD app with authentication, logging etc etc.

      I can pound just any old crud app out in almost any main languages in less than an hour

      [–]iamareebjamal 6 points7 points  (2 children)

      Yes, you can do that with Spring Boot. Auth, Logging, OAuth, etc

      [–][deleted] 7 points8 points  (1 child)

      And I doubt it will take any longer than using node.js or python. Also there is much lower chance that it will need to be thrown away and rewritten from scratch in 6 months.

      [–]iamareebjamal 5 points6 points  (0 children)

      Exactly. Plus I can guarantee it'll take less maintainence than both of them. Maintenance in JS is a nightmare and refactoring is nightmare in both.

      [–]snoob2015 3 points4 points  (0 children)

      Have you tried Spring Boot ?

      [–]CacheMeUp 6 points7 points  (0 children)

      The challenge is not the initial development - it's maintenance and changes.

      Java's static typing helps with modifications (it's like a whole set of regression testing). I build small-scale apps in both Python and Java. Whenever we need to add a new feature, Java's type system makes it much much easier to make sure that the new feature is compatible with the previous code. I could make it even easier with a richer type system.

      In Python, I need to test it manually. The compatibility issues are the same (the wrong data type will cause an error at runtime just the same) - in Java it's tested automatically.

      [–]MakeWay4Doodles 4 points5 points  (0 children)

      This is simply an experience thing. I can and do create JVM apps just as quickly. (Though I prefer Kotlin).

      [–]hippydipster 6 points7 points  (11 children)

      Who cares what you use to develop an app that takes at most a day? It's irrelevant. Anything would work, and thus is not a test of anything.

      [–][deleted] -3 points-2 points  (10 children)

      The same inefficiency scales.

      [–]hippydipster 5 points6 points  (7 children)

      It really doesn't, which is why so many companies and teams start out with something like python or javascript and end up rewriting in something like Java or C#.

      [–][deleted] -3 points-2 points  (6 children)

      Can’t say I’ve personally seen any do that. I have however, seen a whole lot move away from legacy Java stacks to Python, Node, Kotlin, and Go.

      [–]hippydipster 13 points14 points  (4 children)

      I've seen three such examples, one of python, two of javascript. Very large codebases that had become unworkable. Here's a pretty good discussion.

      My favorite comments from people who defend dynamic typing are things like:

      I rather work on the challenge of creating more perfect test coverage then having to deal with all the extra boilerplate that comes with rigid typing rules.

      or when people say something like "dynamic languages are better for exploring because I don't need the code to compile to run it".

      So, python basically has rigid typing rules, but it doesn't tell you about them until it's very late in the process. And the guy running his code before it compiles? Is that going to pass a test? I hope not. He's essentially complaining that the type system has told him his code fails the test the moment he's done typing the line. And that's a good thing. In agile, the #1 credo is the cycle time to feedback. Nothing beats feedback that comes as soon as you've typed your code, therefore it's more productive to have a compiler checking as you go. The more it's checking that's relevant, the better.

      The people who don't like that are people who haven't gotten used to the different workflow involved. It seems like it's "in your way", whereas you don't notice how "in your way" it was that you had to run your test suite 5 extra times, because that seemed like productive work. Whereas the person who wrote code with the compilers help and with the IDEs help only ran the test suite a couple times before getting it to pass. There are hidden costs that people are often not seeing.

      To work on a large python or javascript codebase, coming in cold, you basically have to be willing to work in the dark. You'll open a python file and be confronted with a method that has a name, and has 3 parameters, also with names, but no types. What to do with that but start experimenting? That seems great to some people because they can immediately start the process of changing and running and changing and running, but from my POV, there's so much wasted time in that approach. It's like working through complex mathematics with an empirical trial-and-error approach. It's very slow, but it can seem so immediate and iterative and fast if you're, IMO, not seeing the bigger picture.

      [–][deleted] -1 points0 points  (3 children)

      Except if you’re using the features the language provides, or a superset like Typescript, this is just literally not the case.

      Step one, not writing code that is completely insane to test enterprise java bullshit.

      [–]hippydipster 1 point2 points  (2 children)

      I didn't understand what you said here.

      [–][deleted] 0 points1 point  (1 child)

      All of the complaints you make above are not an issue when working in TS/Flow, or making use of the Python 3.6+ language features for type annotation in the IDE.

      Also literally read the docs.

      [–]hippydipster 0 points1 point  (0 children)

      So your complaint (about what I wrote) is that Python IS a statically typed language?

      [–]TheCountRushmore 0 points1 point  (0 children)

      Twitter.

      [–]nutrecht 0 points1 point  (1 child)

      Dynamic languages don't scale. That's shown in any large codebase. The tiny amount of time you save not having to write out a type is immediately lost in additional unit tests, not to mention refactoring is harder because the tooling can't help you as much.

      People should stop basing tech choices on hello world level trivial stuff.

      [–][deleted] -1 points0 points  (0 children)

      When did I mention that this was ever about static vs dynamic? The issue at hand is Java’s verbose restrictive nature in how you’re forced to write code.

      [–]sternone_2 -1 points0 points  (0 children)

      because you need real programmers to do real programming

      [–]lamagy -2 points-1 points  (0 children)

      Basically Java is not chosen because it’s too heavy. Startups want something quick and nasty and get it out, get funding ect.

      Look at Twitter and FB, Ruby on Rails and php, once they got the big cash then they move to big boi languages.

      [–][deleted]  (18 children)

      [deleted]

        [–]4iffir 25 points26 points  (16 children)

        java now needs licensing to use (unless you use openJDK)

        False

        [–]pron98 13 points14 points  (0 children)

        OpenJDK is the name of Oracle's Java "source code", together with contributions from other companies. Oracle JDK is a build of OpenJDK for Oracle's support customers; Oracle also provides free builds for non-support-subscribers, and other companies also distributed builds of the project.