Hacker News new | ask | show | jobs
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.

4 comments

Personally I'd say .NET, but I've got a windows development background.

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 :-)

That depends on dev current skill in each language. Both languages are very similar. But .net is far better ^^

Comments pointing out that java is open sourced and has multiple libraries and tools written by community makes my giggle XD. Most of .net world is open sourced now. Just check github. Believe or not, but .net also plenty tools/libs, which in my opinion are far better. In .net world there is usually, one outstanding piece of code which has a lot of love from community, while in Java there are sometimes dozens for same thing and it is just personal choice to pick one of them.This sometimes a big problem, because it harder to find employees with expertise of these particular(sometimes very niche) tools your company use in every project.

Eclipse and NetBeans compared to Visual Studio are just advanced notepad. Creating and debugging a new project is just 1-2 clicks. Deploying? 2-3 click and it is hosted in azure cloud.

There is a lot of support from Microsoft Microsoft care. Microsoft listen. Microsoft has program for new companies (bizspark). It gives the access for all MS software for free. As far as I know. Orcacle can only give you a law sue and don't give a damn at all about community. All MS product are based on .net used by millions There is now way it disappear any soon.

Windows Licensing costs comes to none if you host your apps in azure cloud which is great for any size of company, but small and medium benefit most. Moving our client app to azure saves him 30k euro per year.

Out of those two choices, Java easily wins. The open source tools & libraries for it make .NET's pale in comparison.

Regarding frameworks/strategy, I'd recommend you try to go vanilla java for as long as possible and stay away from all the frameworks you mentioned, like JSF, Spring Boot, Hibernate, JBoss, etc. Because dependencies.

AFAIK, none of the ones you mentioned offer a really compelling value proposition, but they will all bring along their constraints. That is unless they you have some really specific requirement in mind to justify adopting one of them.

For general stuff like REST or M2M you might want to look at DropWizard or grpc. If you want to go shopping for replacement libs, here is a list of some general libs that someone made: https://github.com/akullpp/awesome-java You could also try doing a general search on github.

I can not agree. Java does well in some aspects of your request and .Net is better in others.

Java does a longer history with Open source, but .Net Open source projects are growing. .NET now targets Linux and Android.

.Net is much easier to get working out of the box, but Java may have cheaper toolset.

It really depends upon your target team - if you are in Silicon valley, then Java. NYC, then .Net

I agree, although sticking with what you know and have expertise in is always a good choice (PHP).
I would consider Java more due to pricing, community, and long term stability. I'm not criticizing .NET on those areas. My experience has showed that. By the way, feel free to email me. I don't mind bouncing off ideas with you. :)

PS. Not trying to sell you anything. Just happy to help.