4 ms·
Well there was also like 10-15 year period where Java was taken over by enterprise factoryClassFactoryFactoryClassFizzBuzz architectural cancer that really made
by bane 2y ago
Well there was also like 10-15 year period where Java was taken over by enterprise factoryClassFactoryFactoryClassFizzBuzz architectural cancer that really made things suck as a want to be user of the language.
If you just stuck to the core language and the JVM, it's kind of always been a nice place to code even if the language was changing glacially.
- ok_dad 2y agoWhere can I learn about modern Java like you describe? I only remember Java from the days of "enterprise factoryClassFactoryFactoryClassFizzBuzz architectural cancer" and I hate the language due to that old memory, but I'm willing to try again. A lot of companies are using it in the industry I'm in, and it would be worthwhile to learn, but searching Google for Java resources is as much cancer as the enterprise stuff is.
- stickfigure 2y agoYour question seems odd to me. You had to learn to write AbstractFactoryFactoryService. Just forget it? You don't need a book. If you're used to writing nice concise code in other languages, just keep doing that, but in Java.
- renewedrebecca 2y agoExactly. I've been using Java since 2000, and I haven't once written an AbstractFactoryFactoryService. To be fair, I skipped over early versions of Spring.
- goalieca 2y agoThe ecosystem rewards inheritance and patterns. The language is and always was highly opinionated about OOP which is a flawed paradigm.
- stickfigure 2y agoThe Java ecosystem is vast and there is very little you can say about it generally. It's trivially easy to write Java programs without (ab)using inheritance. It's trivially easy to write Java programs in a functional style. There are countless libraries that will provide just about any programming interface you like, the only hard part is picking.
- syspec 2y agoThis is the classic example: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpris... I've tried to follow along with it, but man I just can't - it's that crazy. It does work though
- bane 2y agoI haven't used it myself, but I've heard good things about Spring Boot. For other stuff I usually just write in a dialect I like to use, and be very selective about libraries and other bits I use. It's fortunate that the standard library isn't very ClassFactory and is pretty batteries included so you can get a lot done without too much fuss. In many ways it's not terribly dissimilar to how one might approach using C++ or Perl or any other big language with lots of different ways to do things that you can pick and choose from.
- npalli 2y agoGood things eh? The simplest Spring Boot program (assuming you can handle maven after this). The fact that Spring Boot is the end result of lot of de-FactoryFactoryization of Java shows how god awful standard programming in Java is. package com.example.hello; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MainApplication { public static void main(String[] args) { SpringApplication.run(MainApplication.class, args); } } //controller file package com.example.hello; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/api") public class HelloController { @GetMapping("/hello") public String sayHello() { return "Hello, World!"; } } Even C++ is better than this!! #include "crow.h" int main() { crow::SimpleApp app; CROW_ROUTE(app, "/api/hello") ([]() { return "Hello, World!"; }); app.port(8080).multithreaded().run(); }
- Gibbon1 2y agoPeanut gallery comment is C# because while you can do the old "enterprise factoryClassFactoryFactoryClassFizzBuzz architectural cancer" it doesn't fight you when you try not to. Want to pass a pure function that takes structs as arguments around, sure.