Most active commenters

    ←back to thread

    177 points chhum | 27 comments | | HN request time: 1.633s | source | bottom
    1. cloudking ◴[] No.44006117[source]
    Why is Java so popular in enterprise?
    replies(12): >>44006154 #>>44006195 #>>44006204 #>>44006207 #>>44006215 #>>44006230 #>>44006361 #>>44006382 #>>44006575 #>>44007440 #>>44009423 #>>44011637 #
    2. tylerflick ◴[] No.44006154[source]
    My guess is the size of the talent pool to hire from.
    3. hackthemack ◴[] No.44006195[source]
    I worked in IT from the 90s to today. My perspective is it grew and grew because Sun supported it, then IBM supported it, RedHat supported it. It had the glimmer that it was the "Enterprise Way" of doing "Real IT" programming for "Real Businesses". I am not saying any of that is the "Truth", just the perception that was held by the majority of people who could choose what to write enterprise code in.
    replies(3): >>44006373 #>>44006392 #>>44006571 #
    4. locopati ◴[] No.44006204[source]
    it hits a sweet spot of reliable, C-like, fast enough for most things, with a ton of library/framework support. plus Sun and later Oracle pushed it hard in the 90s/00s. it'll be the new COBOL.
    5. mpalfrey ◴[] No.44006207[source]
    Decent talent pool.

    Decent tooling. Been around for long enough that a lot of the quirks of it are well known and documented. Basically it's a blue collar programming language without too many gotchas. Modern(ish) day Cobol.

    (I'm predominantly a Java dev still, even after diversions over the years to Javascript, Python and C#).

    6. lemonwaterlime ◴[] No.44006215[source]
    Among other things, because the structure of the code corresponds to the structure of the organization itself.

    Things tend to form fractal systems of systems for efficiency. A cleanly delineated org chart maps to a cleanly delineated codebase.

    replies(1): >>44006425 #
    7. eBombzor ◴[] No.44006230[source]
    Spring Boot
    8. j45 ◴[] No.44006361[source]
    Another way to look at it based on coming across it in enterprise:

    How did he build something adopted by so many enterprises?

    It does some things at scale very well and has been afforded the performance improvements of very smart people for 30y.

    It’s not to say the language isn’t verbose, one of my favourite features was the ability to write code in other languages right inside the a Java app pretty well in-line by using the JVM, thanks to JSR-223.

    It was possible to write Ruby or Python code via Jruby or Jython and run it in the JVM.

    https://www.jython.org/

    https://www.jruby.org/

    Clojure also runs on the JVM.

    https://docs.oracle.com/javase/8/docs/technotes/guides/scrip...

    9. toyg ◴[] No.44006373[source]
    > Sun supported it, then IBM supported it, RedHat supported it

    And Oracle (well before the Sun acquisition - in fact, control of Java was basically the main cause of that move).

    Any technology that could bag both IBM and Oracle is (or rather was) likely to dominate the enterprise space.

    10. izacus ◴[] No.44006382[source]
    Because there was nothing else quite like it at the time most enterprise software was created or recreated.

    And it's still stable, fast and reliable with a massive ecosystem of stable, fast and reliable libraries and software. With good developer tooling, profilers and debuggers to go with it. And big enterprise support teams from RedHat, Oracle, IBM, etc. throwing in their (paid) support services.

    It might not be the best language in any of the categories (speed - runtime and compile time, tooling, ecosystem, portability, employee pool), but there's pretty much almost no languages that are as good in all categories at once.

    And to top it off, JVM can host other languages so it can easily interoperate with more modern takes on language design like Kotlin while still running on pretty much all major operating systems used in the wild and most CPU architectures as well. It'll run on your car's SoC, your phone and on your server. In many cases, using the same libraries and same code underneath.

    replies(1): >>44006505 #
    11. fidotron ◴[] No.44006392[source]
    What was the viable alternative?

    Microsoft had C#, at one point IBM pushed SmallTalk. C++ for these environments is doable but going to slow you down at development a lot, as well as being much harder to secure.

    At that time the dynamic alternative was Perl, and that remained true basically until Rails came along.

    replies(2): >>44007316 #>>44010398 #
    12. keeganpoppen ◴[] No.44006425[source]
    on one level this is clearly “shipping the org chart”, but… honestly, even as no fan of Java this is clearly efficient on many levels, especially when you consider the humans and org to be part of the system (which everyone should. or it’s just my HCI brain talking.).
    13. js8 ◴[] No.44006505[source]
    I believe there were alternatives at the time, but expensive. Java was free and also syntactically compatible with C++. I think that rather these properties (than being somewhat unique) are the main causes of its success.
    replies(1): >>44009526 #
    14. aaronbaugher ◴[] No.44006571[source]
    Yes, its early popularity was very much management-driven, based on magazine articles and the like. Its object-oriented design (often presented as if something new) was supposed to make programmers fungible, and its portability was supposed to let you build an app that would run on anything. And it had a Real Corporation behind it, which appealed to corporate management.

    In the late 90s, I got stuck making a scheduling program in Java, but it had to run on the 16-bit Windows systems of the time. That was a huge pain, because the 16-bit version didn't have all the capabilities that management was expecting based on the hype. These days, I sometimes have to install enormous enterprise applications that tie up north of 32G of RAM even though they're just basic hardware management tools that would take a fraction of that if built in something like C++ with a standard GUI library. I manage to avoid Java most of the time, but it's been an occasional thorn in my side for 30 years.

    15. ben7799 ◴[] No.44006575[source]
    Java beta & 1.0 were released my Freshman year of college and I've been writing Java ever since. With the exception of one job where we tried to write a Java-style Enterprise security cloud application in Python every commercial product I've worked on has been built in primarily Java, often times with other languages on the edges of the application.

    The key thing I think with Java is the programming model & structure scale well with team size and with codebase size, perhaps even in a way that tolerates junior developers, outsourced sub-teams, and even lower quality developers. All of those things end up becoming part of your reality on big Enterprise products, so if the language is somehow adding some tolerance for it that is a good thing.

    The other things around Syntax and such that people complain about? Those are often minor considerations once the team size and code base size get large enough. Across my career there has always been the lone guy complaining that if we did everything in a LISP derived language everything would be perfect. But that guy has almost always been the guy who worked on a small tool off by himself, not on the main product.

    Java has changed a tremendous amount as well. A modern Java system has very little in common with something written before Generics and before all the Functional code has been added. Where I work now we have heavily exploited the Functional java add-ons for years, it has been fantastic.

    16. hackthemack ◴[] No.44007316{3}[source]
    I am not sure. C# came long after Java already made inroads into the Enterprise space. It was a different time.

    I would say that many things in IT are not chosen on technical merits alone. You have people that do not want to accrue any blame. Back then, by choosing what IBM endorses or what Microsoft endorses, you absolve yourself of fallout from if and when things go wrong.

    Back in the 90s, it felt like IBM, Redhat, Sun kind of, sort of, got together and wanted to keep Microsoft from taking over the Enterprise space by offering Java solutions.

    replies(1): >>44007978 #
    17. snovymgodym ◴[] No.44007440[source]
    Because it was in the right place at the right time to supplant C++ and C for application code.
    18. nradov ◴[] No.44007978{4}[source]
    Right. Before Microsoft created .NET and C# they first tried to play their "embrace, extend, extinguish" trick with Java. They released a JVM and "Visual J++" language which was sort of Java, but had incompatible proprietary extensions to lock customers in to Windows. Eventually they were forced to stop that for legal reasons so they completely dropped all Java support, and built their own replacement virtual machine and associated languages from scratch.
    19. octo888 ◴[] No.44009423[source]
    It's safe. It's easy to hire anyone from anywhere to write Java. You generally can't create an ungodly mess apart from layers and thousands of classes. There's a library for almost everything. It'll still be around in 10/20 years. It's good enough
    20. zabzonk ◴[] No.44009526{3}[source]
    > syntactically compatible with C++

    Not. And certainly not semantically.

    replies(1): >>44011012 #
    21. SoftTalker ◴[] No.44010398{3}[source]
    C++ or maybe Objective-C.

    Of course those were much more hazardous languages than Java.

    replies(1): >>44010638 #
    22. fidotron ◴[] No.44010638{4}[source]
    Oh yeah, WebObjects! I had forgotten that entirely, and it then transitioned to Java itself.
    23. Pet_Ant ◴[] No.44011012{4}[source]
    That’s just obtuse. Compare Lisp, Forth, APL, Prolog, Ada, or Fortran. Java is just C++ with a few twists. You can literally write code that will compile in both.
    replies(2): >>44011871 #>>44011990 #
    24. zmmmmm ◴[] No.44011637[source]
    Consider that in the mid 90's when it arose, most organisations were writing business code in C++ and paying license fees for things as simple as string handling libraries. There was almost no good solution to cross platform network code. RPC calls required things like manually dealing with byte order.

    Then most organisations had deployed windows for staff but needed to run things on Sun servers. Java was a god send as a free and actually cross platform solution that let devs work on windows and run the same thing on the corporate server infra without changes. The culture at the time would not consider deploying scripting language sfor full scale applications acceptable, so Java with it's C++-like structure but built in cross platform capabilities and generous stack of batteries included libraries (for the time) was an absolute god send.

    25. js8 ◴[] No.44011871{5}[source]
    That's exactly how I meant it. Another alternative to Java at the time was Smalltalk, with different syntax. Choosing C++ syntax for Java was clearly a marketing move (as it was for C++) - we shouldn't underestimate network effect of familiar syntax.

    I think Java succeeded for the same reasons C++ succeeded - built on familiar syntax, reasonably free and "supported by" a large company. Java being a decent language is a consequence of its success more than of its original design.

    26. zabzonk ◴[] No.44011990{5}[source]
    > You can literally write code that will compile in both.

    An example, please.

    replies(1): >>44012039 #
    27. Pet_Ant ◴[] No.44012039{6}[source]
    int fibonacci(int n) {

        if (n <= 0) return 0;
    
        if (n == 1) return 1;
    
        int a = 0, b = 1, temp;
        for (int i = 2; i <= n; i++) {
            temp = a + b;
            a = b;
            b = temp;
        }
        return b;
    }

    ...if only the return type was "Crow" then you could .eat() that...