4 ms·
Lat time I played with Java was in 2015. It seemed like there was a new JVM zero-day every month, and every time I upgraded, the Java installer tried to install
by Pharylon 9y ago
Lat time I played with Java was in 2015. It seemed like there was a new JVM zero-day every month, and every time I upgraded, the Java installer tried to install the Ask toolbar.
After that, I started joking that installing malware one way or the other was Oracle's primary goal.
- maxxxxx 9y agoConsidering that Java runs on many more servers than .NET it can't be that bad.
- tracker1 9y agoCompared to most of today's more recent frameworks, that doesn't mean it's actually great. And while I appreciate the direction of .Net (Core), I am hoping the integrated tooling story gets a bit better (outside VS for windows). Code is okay, but not great, and other editors are mostly non-starters. Installing VS for Mac was a horrible experience that had to be done via manual steps for all the dependencies, etc. My understanding is Java tooling has gotten better, but being able to setup a hello world application in Java, or any established application without a ton of weird dependencies to discover always seemed painful, and "Enterprise" .Net applications didn't feel much better. Today, my world tends to mostly center around Node.js and git... I've dipped my feet into some new .Net bits, and a little bit of go, and that's about it. I find the learning curve steep, but the actual implementation WTFs are nearly non existent. With Java/.Net it's always been a relatively steep learning curve (worse with Java) and a lot of WTFs along the way.
- kuschku 9y agoEh, lol? Setting up new applications in Java or .NET is by far easier than Node.JS. It's Node.JS where you need 400 dependencies just to use the latest version of the language. That said, there's many easy to use and simple frameworks for Java, and you can try also other JVM languages such as Kotlin, Clojure, Scala or Eta. The JVM hosts the most powerful and fastest managed languages at the moment (via eta and clojure also allowing haskell and lisp on the JVM). .NET is nice, but there's quite a few reasons why Java is used everywhere.
- dagw 9y agoSetting up new applications in Java or .NET is by far easier than Node.JS I'm far from a node fan, but that is simply not true. When it comes to going from zero to a "Hello World" webapp (super simple rest api that grabs data from db and returns as JSON) nothing really beats node in my opinion. Install npm, npm install express (or restify), npm install database-driver (and there are drivers for everything), type a dozen lines of code into a single file and you're done. Sure npm is probably doing some crazy things with dependencies in the background, but you don't have to worry about it to just get started. Doing the same with Java or C# is much more involved. Of course going from there to a large complete application is far from equally trivial and I definitely prefer working in something else in most cases, but node has the whole getting started experience down pat and that's probably the reason it's become so popular.
- kuschku 9y agoMuch more involved? With Java and co it’s literally the same. You add two dependencies to your gradle, write a dozen lines of code, and you’re done. Even if you go full enterprise it’s not much more. Let’s go full Java Enterprise: // Enterprisify everything! compile group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: '1.5.0.RELEASE' compile group: 'org.springframework.data', name: 'spring-data-jpa', version: '1.11.0.RELEASE' compile group: 'org.springframework.data', name: 'spring-data-commons', version: '1.13.0.RELEASE' // persistence framework compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.0.Final' // database driver compile group: 'org.postgresql', name: 'postgresql', version: '9.4.1212' // to auto-generate getters, setters etc. compileOnly "org.projectlombok:lombok:1.16.16" Now we’ve imported spring, our database driver and an ORM. Let’s write the code. First, let’s config: // application config spring.application.name=ourapp server.port=8090 // database config spring.datasource.url=<our database url> spring.datasource.username=<username> spring.datasource.password=<password> spring.datasource.driver-class-name=org.postgresql.Driver Then add the database layer, defining our model: @Entity @Table // To auto-generate mapping for the ORM @Getter @Setter // To auto-generate getters and setters public class Book { @Id private long id; @Column private String name; @Column private String description; } And our access layer: public interface BookRepository extends CrudRepository<Book, Long> { Optional<Book> findById(long id); } And our application: @RestController @SpringBootApplication @EnableJpaRepositories public class OurApplication { @Autowired private BookRepository books; @RequestMapping(path = "/{id}") public Optional<Book> getBookById(@PathVariable long id) { return books.findById(id); } public static void main(String[] args) { SpringApplication.run(OurApplication.class, args); } } So. This is if you go full insanely Java Enterprise, want full Spring, and everything. If you choose sanely, it’s obviously far less code. Notice how I don’t have to use any transpilers, etc, and still get typing and the latest language features.
- rat87 9y agoa JVM browser plugin zero day, totally unrelated to java for server programming