|
|
|
Ask HN: Java or .NET for a new big enterprise system?
|
|
4 points
by vitoralmeida
3591 days ago
|
|
I work at a company that has a big (in development for about 7 years) and critical system developed in PHP (PHP 5.3 without frameworks and a few base libraries (AdoDB, NuSoap, Smarty)). It is a monolithic application with many SOAP webservices, a big MySQL database (main table has 33M rows) and a number of background services (crontabs running some shellscripts that calls a php program).
We want to improve that base (the technical debit is already really big) or develop a better one if economically viable. Other facts:
- we use the PHPStorm IDE (so IntelliJ is an option here if we are talking about Java), but I believe that Visual Studio or Eclipse are both really capable.
- the system needs to be reliable AND easy to maintain (rapid development is desirable but is a minor feature compared to the availability and maintainability of the system);
- we use version control (GIT) and Continuous Integration (Bamboo and Stash from Atlassian) About Java:
- what are the best production monitoring tools for a JVM in production? Does .NET have something comparable?
- about interface: it is more productive to use JSF for interface (Java) or it is best to use a framework like Spring Boot?
- does Hibernate scales? It is a pretty vague question, I know (we actually use plain SQL without abstractions in our system)
- application servers: is Glassfish ready for production or it is better to use something more "robust" like jBoss?
- anyone has some experience with Oracle Cloud or another Cloud to host Java apps? About .NET:
- is Visual Studio it REALLY good compared to all other IDEs?
- Scalability: Stackoverflow uses the .NET stack. Are there any other big sites that uses it?
- Price: Are the current licensing prices on Windows Server affordable for medium companies?
- Future: does .NET have a future that we can trust looking forward 10, 12 years ahead? Any feedback, experience or consideration is really appreciated and will impact our decision. |
|
On many angles (open-source project count, speed of most-optimized code, etc) I think Java is clearly ahead - however on many other angles, I think .NET wins.
C# is a much nicer language to program with, having all kinds of nice things like type inference, async/await, generics that work properly, proper closures, anonymous types, LINQ, and other things that Java doesn't have, and probably never will.
I also think the memory and disk footprint of a .NET server application is likely to be a lot lower than that of Java - In my company we have some REST api's written in C# running on windows, and some comparable REST api's written in java, and the C# ones consume about 100MB of RAM compared to over 1GB for the Java ones. The java programmers tell me this is a side effect of the open source project culture - A typical .NET service might pull in half a dozen third party libraries whereas a java service might pull in dozens.
.NET Core running on linux I find to be really interesting - it's just as fast as the windows one, if not faster, and uses a comparable amount of memory (I.E. still heaps less than java) - I'd go with that if I were starting today. Yes it's very new, but remember the core parts have been battle-tested in .NET for windows for over a decade, so it's not that new. Also if you're developing a big new enterprise system I'd guess your timelines are in the multi-year range. .NET core is going to have a long time to mature before you need it for production critical systems.
Looking further ahead, to be honest I like the look of .NET more than Java as well. C# 7 ships very soon with a bunch of nice language level features, and microsoft are really pushing forward with .NET core and making a lot of improvements. Java on the other hand is moving a lot more slowly, and since Oracle purchased sun there has been a lot of noise in the java OSS community about Oracle abandoning large parts of it and basically letting it fall to bitrot.
P.S. As much as I like Visual Studio, IntelliJ is a lot better... Just make sure you've got heaps of RAM :-)