7 ms·
I'm quite dismayed to say that this has been a feature of any Java developer setup for the past 25 years. Yet hipsters threw it all in the garbage when node.js
by abraxas 2y ago
I'm quite dismayed to say that this has been a feature of any Java developer setup for the past 25 years. Yet hipsters threw it all in the garbage when node.js took off and are only now starting to approach feature parity with a 2002 JBuilder or Eclipse of the same era.
Can I tell you about live debugging of an app server and hot reloads? Pretty wonderful stuff really.
I can't believe how much knowledge, tooling and experience was thrown in the dumpster when Java was abandoned en masse by the younger generation of devs due to the rise of node.js. And if it weren't for Typescript the tooling would still likely suck.
- mooreds 2y agoGWT was an attempt to let you live in java land and also still get the (tremendous) benefits of deploying to the browser Javascript VM. We used it on a java backed project, but we were not building an SPA so didn't see all the benefits. I haven't used it for a long time, but it's still alive: https://www.gwtproject.org/ https://www.gwtproject.org/
- abraxas 2y agoThat's cool but I get a chuckle when I see server side html rendering being all the rage now and thinking to myself, should I tell the juniors about servlets, JSP and Struts?
- jfengel 2y agoIt still blows me away that we settled on JavaScript as a VM. It wasn't designed for that, and it took a superhuman effort to make it work well enough. I feel like there's an adjacent universe where the JVM lives in every browser and JS was a weird failed experiment. But it turned out that the browser was the universal UI everyone had waited for, and Java didn't connect to it while JS entrenched itself there. GWT was a glimpse of trying to send us to that universe, via a twisty back door. But it was never gonna happen.
- agumonkey 2y agothe client side java didn't last long, flash and js were more mechanically sympathetic on too many aspects (dev culture, user expectation about load time, cute visuals) but yeah js is a strange creature
- lenkite 2y agoYou can thank Sun Microsystems for this. They had the world in the palm of their hand with HotJava, but decided to abandon it. If they had continued, Java would been the language of choice for the web and they likely wouldn't have been acquired by Oracle.
- jfengel 2y agoHotJava, IIRC, was more focused on Swing apps. Swing just wasn't the right thing for users; the HTML DOM turns out to be more comfortable. Even though it means sometimes failing out to the Canvas, which gives you nothing. NB: I was very distantly part of the Swing team. I did early reviews of its design documents.
- lenkite 2y agoConsidering we have full replacement frameworks like React, Flutter, etc built as DOM replacements, I would say Swing was definitely the right thing for users. Probably could have offered an "easy markup enhancement" library for plain documents, but anything extensively dynamic should be written with a proper UI framework.
- agumonkey 2y agoIt's a hard sell for the majority of users and the mainstream market at the time. Flash apps had cute, lazy loaded, ~lightweight, animated mini apps. Anything java at the time was heavy, enterprisey, requiring more setup to get blocky GUIs that didn't do much.
- torginus 2y agoI wish to live in that universe, and hope that WASM will bring it closer to us. Clearly, Javascript gets compiled to some intermediate representation, that then gets JITed/interpreted and then interacts with the native browser API. I wish us devs would have access to that intermediate representation.
- jappgar 2y agoDon't worry, the Typescript ecosystem is fast becoming Java. And that's the exact reason I'm done with it.
- threatofrain 2y agoYou mean capable of stable firehose throughput, similar to Go? State of the art GC research on state of the art VM? I wouldn't be surprised if Java had more money behind it than JS on the R&D & corporate backing side.
- jjav 2y ago> Don't worry, the Typescript ecosystem is fast becoming Java. Typescript is somehow becoming a laguage that supports writing extremely performant high throughput and very scalable server code? That seems unlikely. So no worries, it can't become Java.
- jappgar 2y agoI said the Typescript ecosystem. Java, as a language is fine I guess, but the culture around it sucks.
- jjav 2y ago> Java, as a language is fine I guess, but the culture around it sucks. Culture is what you want it to be. There are indeed some ridiculous subcultures within the world of developers who use Java. Like J2EE-anything or any of the baroque frameworks. It is important to realize none of that is part of Java and none of that is required unless you really want to. You can use Java simply as a memory safe language with reasonably good type safety that can create wicked fast code and has huge library and tooling support. On all those checkboxes, there are few-to-none options that are so good across all those aspects at once. Unfortunately so many people just complain about writing TaskStubConsumerWatcherVisitorServiceContainerListIdentifier classes, without realizing nobody is forcing you to do that. So don't.
- DoesntMatter22 2y agoMost of the abandoning of Java was due to Ruby on Rails not JavaScript.
- abraxas 2y agoNot where I am. Maybe a peculiarity of the community I'm in but here it was all Node all the time after Java was declared uncool.
- DoesntMatter22 2y agoJava took a ton of heat in 2005-2009 (before Node existed) because Rails came through and was eating it's lunch. It's the reason that a huge percentage of the successful Web 2.0 companies were built using Rails, not Java or .NET.
- phpnode 2y agoNo chance, relatively few software companies ever adopted Rails but a huge number went from Java or .NET -> JS/TS. The draw of cross project code reuse and having teams only needing to know a single language remains compelling.
- DoesntMatter22 2y agoJava was largely already being abandoned before NodeJS existed. A huge percentage of the web 2.0 companies were built on Rails. Twitter, Github, Shopify, AirBnB, Groupon, SoundCloud, Instacart were all built on Rails. It maybe flew beneath your radar but it was a phenomenon at the time, way before Node.js even existed.
- phpnode 2y agoThose examples aren't representative of the broader industry though. There are far more devs working at former Java and .NET shops that have never written a single line of Ruby and are all in on JS/TS now
- agumonkey 2y ago> feature of any Java developer setup for the past 25 years do you mean rmi/javabeans or something else ? beside that, I left java long ago, and believed in simpler REST stuff but now I realize that it's indeed rediscovering stuff people dealt with long ago
- abraxas 2y agoJava beans was just convention. Enterprise Java Beans was a mistake which probably contributed to Java's bad rap for a while. But you could use an app server without EJB just fine. I did for years and never had problems. As for rmi, when Java was in its heyday the most popular protocol for remote api handling was SOAP. But when RESTful era arrived Java tooling adapted very quickly and it made little difference what you were using to call outside the app server.
- agumonkey 2y agoand what kind of library / ide plugin is used to call rest api in a type safe manner without writing boilerplate ?
- mike_hearn 2y agoMost frameworks will do that? In Micronaut it's something like this on the client: @Validated public interface PetOperations { @Post @SingleResult Publisher<Pet> save(@NotBlank String name, @Min(1L) int age); } then you inject @Client("https://example.com/pets") @Inject PetOperations pets; and call its methods. It will use the annotations to validate the call client side before sending it, and you can implement the same interface on the server: @Controller("/pets") public class PetController implements PetOperations { @Override @SingleResult public Publisher<Pet> save(String name, int age) { Pet pet = new Pet(); pet.setName(name); pet.setAge(age); // save to database or something return Mono.just(pet); } } where the same validations will occur before the call is accepted.
- cjonas 2y agoJava types are not nearly as expressive as typescripts. As someone who has worked with both, I would personally pick typescript everytime.
- afavour 2y agoWhat always strikes me about posts like this is the lack of introspection: why did younger developers reject Java? It’s easy to say “because they’re hipsters following trends” but I dipped my toe in the Java world years ago and found it immensely frustrating. Eclipse was awful compared to the lightweight editors I was using at the time. The language got in my way more often than it helped me. I’m sure that’s not the case these days (indeed I’ve done a little Android-adjacent stuff and found it to be fine) but the idea that there were no downsides to Java at the time strikes me as unlikely.
- jfengel 2y agoThe design of Java is focused on code maintenance. That's exactly what young developers lack experience in. They know how to write greenfield code, by themselves. They haven't yet looked back at code they wrote and said, "ugh, what the hell was I thinking?" Since Java was developed the world has shifted to accommodate a lot more rapid development and code you throw away rather than maintain. But experienced developers also know how often "prototypes" are still around decades later. Java is also not perfect, and a lot of new languages are conscious of its faults. But the reason it's still around is that it's core principles are oriented to code that sticks around.
- jen20 2y ago> But the reason it's still around is that it's core principles are oriented to code that sticks around. You could equally say this of COBOL. > They haven't yet looked back at code they wrote and said, "ugh, what the hell was I thinking?" Ironically, "what they hell were they thinking" is exactly the reaction I have to even Greenfield code written using Spring Boot or any of the other annotation driven nonsense. The idea that programs written in Java are more maintainable than programs written in (say) Go, where you can read what the program does end-to-end instead of having to guess at what garbage has been generated by Lombok or overridden by some random JAR on the class path is bizarre. Let's not even talk about Gradle.
- jfengel 2y ago
- wongarsu 2y agoI won't apologize for rebelling against Eclipse, SOAP, XML and AbstractBeanFactories. Java the language is pretty cool and very powerful, it's the ecosystem that was turning people off. I hear Java has gotten a lot better. But then again there is C#, which is pretty much just better Java. Still too enterprisy for the tastes of most HN types though
- darepublic 2y agoWhen java shut it's door to me. When c++ gave me the cold shoulder. When mvn was very confusing for me. This little language became a cozy home for me
- rednafi 2y agoJavaScript is an awful language. Doesn’t mean Java is the answer. There are other languages—Go, Rust, Python, C# that offer better protection without sacrificing ergonomics.,
- gedy 2y agoAs someone who did Java WebApps for 10 years - they sucked if you cared about making a good user interface. I thought JS was bad at the time, but node.js was a breath of fresh air for API development, and client side JS has been fine for like 10 years (assuming you care about UI development). I'd never go back to Java except for maybe some backend service away from the UI.
- jen20 2y agoIt's pretty interesting that people think Java was abandoned because of other languages, and not because of the problems of Java itself - or indeed that features like hot reloading and live debugging are niche or unique to Java. .NET has also had all these features for just as long, and is less prone (though definitely not immune) to AbstractFactoryProxyBean nonsense.
- watwut 2y agoJava was not abandoned en masse. Small projects were done in node.js. Large projects were and still are done in java or other non-js languages.
- anon-3988 2y ago> I'm quite dismayed to say that this has been a feature of any Java developer setup for the past 25 years. Yet hipsters threw it all in the garbage when node.js took off and are only now starting to approach feature parity with a 2002 JBuilder or Eclipse of the same era. Last I checked If I change a signature or something in Java, I am not guaranteed the whole thing "checks". If I add a new exception to a function, how do I know what else is effected?
- abraxas 2y agoJava checked exceptions are (were?) a wonderful feature that was wrongly dissed for the same reason Java types and IDEs were dissed. It forced people to handle exceptions or pass them up the call stack but they had to be dealt with. And IDEs were aware of them so not catching or rethrowing was immediately flagged by the IDE. I give it five years until Typescript and peers adds checked exceptions.
- tjalfi 2y agoTypeScript definitely won't add checked exceptions, because Anders Hejlsberg considers them a mistake[0]. [0] https://www.artima.com/articles/the-trouble-with-checked-exceptions https://www.artima.com/articles/the-trouble-with-checked-exc...
- lenkite 2y agoIf you add a checked exception to a function, your code will not compile and the compiler errors will tell you everything that is affected.
- based2 2y agoHot reloads? https://tapestry.apache.org/development-dashboard.html https://tapestry.apache.org/development-dashboard.html https://tapestry.apache.org/service-implementation-reloading.html https://tapestry.apache.org/service-implementation-reloading...
- dagw 2y agoJava was abandoned en masse by the younger generation We tried. Java was fine, JBuilder was fine. When they instead started pushing J2EE, EJB and all the other acronyms I've forgotten, this 'youngster' realised he'd never be smart enough to be a Java developer and bailed back to C, Perl and Python. Had they focused on Java and making Java a great language in its own right, it no doubt would have gone a lot better. But all the 'hype' and marketing around Java was focused entirely on these huge frameworks and enterprise 'solution' architectures which most 'youngsters' just didn't understand and didn't see the need for. If someone makes it clear their product isn't for you and that they don't care about solving your problems, is it strange they abandon you?