Most people I know when asked the difference between the two will generally say, “They are both similar and both are compiled down to bytecode to be interpreted by their runtimes (CLR or JVM)”. I’d agree with that on the surface as well. Both have
- Strings, Floats, Doubles, Ints etc
- HashMap or Dictionary and any flavor in between
- Same for lists and Arrays
- As of Java 8, support for streams and chained expressions as you do with LINQ. One could argue the robustness of one vs the other, but so far, I’ve found streams to be as much as I need
- Logical and functionality grouping with Namespaces vs Packages
- Solid testing frameworks in XUnit/MSTest vs JUnit
- Asynchronous and concurrency constructs such as async/await, Futures and Tasks and CompletableFuture and TaskCompletionSources. Additionally, both languages threading support has everything you’d expect from a tried and true language
I could go on a little longer as there are more similarities or 1:1 copies of functionality in 1 vs the other but you get the idea. Both languages have the tools and constructs you need to get the job done .
The spot that I’ve spent the most time reading and doing trial and error sandboxes has been in the concurrency and stream space. PLINQ vs Streams in Java is fairly comparable but learning the different thread pool managers have taken me sometime. However my biggest source of learning has been in the frameworks. I’ve spent a large portion of those years in C# doing ASP.NET and even more specifically ASP.NET MVC and most recently in ASP.NET Core. The Java world in my take has had many more years of community collaboration (MSFT has made great strides in the last 1/2 dozen years or so) and therefore has a ton of choice where it comes to libraries and packages to chose from. Which is where I’ve spent most of my time learning
Spring Boot vs ASP.NET MVC
I couldn’t possibly compare these two in detail in a summary article such as this but my initial and early impressions are that Spring Boot is a joy to work with. It is sometimes tough to figure out dependencies in Maven (which is probably my fault) but the libraries themselves are robust and easy to plug in. Again though, most of my time has been figuring out how Spring Boot does what I’m expecting to do from an Enterprise Development standpoint. All the things I need, I’m still figuring out how they apply.
- Dependency injection (configuring Unity vs @Autowired)
- The concept of Beans, Components and Services
- Transaction management
- Hibernate. Before EF I used NHibernate pretty seriously but that’s been 10 years ago. Hibernate has a learning curve
- Aspect and Cross cutting filters and interceptors
- The Pipeline — which gets called first, second, third and so forth
- Jackson vs NewtonSoft for JSON Serialization/Deserialization
- Different return types OkObjectResult vs ResponseEntity
- Configuration … application.properties vs appsettings.json and so forth
I could literally go on for a while on just the figuring out of what I know I need and the places I did to locate that information. (This resource has been incredible http://baeldung.com ). But bottom line, both frameworks are just fine and it’s a matter of figuring out where things are to accomplish the tried and true OOP, DDD and other 3 letter abbreviations for good quality systems design.
I’m sure there have been so many articles written about this topic and many strongly contested debates but for me the transition has been just fine. End of the day, I like delivering and helping teams delivery product that people find usable. You can do this in either. I love C#, I really do. And sure, I miss properties, LINQ, async/await and a couple of other things, but I’ll adapt and get used to the nuances of Java just like I did the same for C# and life will go on. One thing that I’m still doing a lot of is AWS so expect more content driven that direction. I’m interested to diving into Microservice architecture here and how the patterns and guidance can be applied using Spring Boot, AWS and occasionally some third party tools.
And last but not least, Jetbrains has been there with me through it all. IntelliJ feels just like Rider so it more feels like I’ve changed appliances/hand tools vs moving into a new home.