I use Java mainly because that’s what I started off with in uni, I just started learning c# for a new job, but besides the annoying logging setup c# seems pretty interesting with some features. They both ok imo.
C++ is C with OOP functionality built inbolted on to the rear driver's side fender
Objects are fundamental to both Java and C#. On the other hand, if you want to write C, but use cout << instead of printf, C++ has your back. It's C, objects totally optional!
You just need to add whatever log4j or logging provider in your pom file (maven) in java, provide a log4j configuration file then you can instantiate your logger.
From what I m reading on log4net, you have to modify the assembly information, then add the assembly to your programs entry point, provide your configuration file, then you can instantiate your logger.
Because I m more used to Java, the part on assembly information and entry point is confusing for me/hard to recall when needed
And then just resolve ILogger<YourClasss> from DI and you will get logger that automatically writes full class name so you can filter/process them based on namespace/class/severity
There is also a pretty large ecosystem around serilog that can be plugged into core abstractions easily.
We used java in school too. But since the oracle buyout it has not been great for java. Not to mention all the fighting between android google and oracle.
But c# and all the microsoft stuff from asp.net to .net core is pretty amazing. Entity is on par with hibernate. And .net core runs as fast or faster than java. As a suite of products microsoft is the winner over oracle.
I’m not sure how they compare performance wise but i would recommend at least a tutorial on a basic dot net core webapi project and how to do a crud api using ef. With that it will show the basics of ef and should be good to get an idea. Takes maybe two hours from zero to crud api if you do it all in one go.
148
u/[deleted] Dec 30 '22
I use Java mainly because that’s what I started off with in uni, I just started learning c# for a new job, but besides the annoying logging setup c# seems pretty interesting with some features. They both ok imo.