Thursday, April 12, 2012

.Net vs. Java ?!?!


As most of programmers and developers looking to know what are the differences between .NET & JAVA. I was looking to find which one is better & WHY???!!
I read a lot of articles and discussions talking about this interesting issue, which most of JAVA, .Net programmers and fresh graduate programmers looking also.
So, I will take this initiative to starting this comparison here...

It will be as a reference for me, and I will add any new feedbacks, opinions, point of views from other experts. I will be happy to see if this discussion in the future has a lot of opinions and inputs from persons that have experience in both Java & .Net.

As I have a good experience in JAVA and a little .Net technology experience, I always have this opinion:
"If you have to choose between both, go with Server-Side as Java, and GUI/Client side as .NET".
I've been using JAVA for like 5 years. I love it. But if necessary I can and should switch to any other technology if necessary.
Hint:
Before any details, I would like to say that .Net is a framework and Java is a programming language, so this discussion talking about full technology not only programming language and not only framework.
Now, let's discuss this issue in more details, it is a huge, has many respects and criteria that should mention and know:
  1. Market: Sometimes market affects when the majority of market prefers .NET you can't force clients to buy Java Software or vice versa.
  2. Company: Company policies and the product that company has experience with affects also. for example one company uses both Java and .Net in one integrated system, but other company uses JAVA because they have their own product.
  3. Cost: .NET is a framework you can download it from web, you can develop .NET application using mono under ubuntu-linux, but if we mean the Environment so IBM WebSphere and Oracle Fusion middle ware are more expensive than .NET.
  4. Cross platform: Both are cross platform. Java is cross-platform, and ASP.Net has always been cross-platform on the client end, with the advent of Silverlight (Mono). but I don't think it's a good idea to invest in a technology already declared to be obsolete. Some people say: "Mono is not supported anymore as of few months ago. It was promising idea, but budget cuts made the developers be re-assigned" and it ain't stable enough
... & a lot of things that hope to mention later...

Conclusion:
I conclude that strictly favoring one technology without thoroughly exploring others is a sign of immaturity as a developer. That said, it seems clear that I should explore other technology in more detail. There is no such thing as a bad platform, just platforms that are unfit for certain circumstances.

7 comments:

  1. 1- Java is more stable than .Net thats why its more server oriented than .Net not because of .Net specifically but also what .Net runs on
    2- .Net in general needs a Windows OS which is a problem by itself that minimizes the availability of the service
    3- Regarding Java being more expensive, remember there are open source replacements (Tomcat, etc ...)
    4- Using Java at the client side might create a problem, no matter how Java is fast now its still a heavy programming language that requires lots of HW resources and you cannot guarantee that every client is a super desktop but you can guarantee that the server is power enough to serve
    5- In general both are bad, despite the fact that its a tiring, complicated language but I will choose C/C++ whenever possible :-), the next good thing is PHP.

    ReplyDelete
  2. one thing i hate so much about Microsoft is that they try to integrate everything in there OS (windows).
    ex, the IIS got installed through the OS, thats really a headache and here is my opinion:

    1- if you want to upgrade or downgrade the IIS, this will be a critical operation

    2- if you have the IIS crashed, 70% you can't fix it, unless you install the whole OS again!

    3- if you want to set/install other versions of the framework it's a good way to mess everything...

    and other things i can't remember now :)

    but if you are using Java and its stuff, say Tomcat.
    if you faced any of the above (upgrade, downgrade, changing Java version, server crash or even OS crash)

    all you have to do is ... EXTRACT A ZIP FILE... and you are done.
    this is good , isn't it?

    ReplyDelete
  3. thanks @Khamis & @Yazan for your inputs :)) like it..
    @Khamis
    Java/.Net vs. PHP!! :) PHP is a server-side scripting language whereas Java/.Net is a general-purpose language. In other words, PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Moreover, Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language.
    Hence, only for server-side programming, the comparison between Java/.Net and PHP makes sense. ...
    I like if some PHP experts can correct me and add their inputs here. Actually i don't use PHP and I don't have an experience in PHP..

    @Yazan
    mostly you are right, but on the other hands they see that IIS is the easiest way to handle with a web server.
    Five advantages of IIS:
    1. It is has a GUI interface, which makes the installation a bit easier.
    2. It "plays" well with other Microsoft applications.
    3. Performance Monitor feature is very useful.
    4. Tech Support of IIS is actually pretty good (this is speaking from .Net experts).
    5. Isolation of the client from the web applications allows IIS to maintain TCP/IP connections while a worker process is being recycled. In other words, IIS has crash protection.

    as you said @Yazan:
    there are disadvantages, like: It only works with the Windows OS & it is not a terribly flexible web server, due to Microsoft constraints. From my point of view the main disadvantage for IIS is : "If you are using two servers, the server configurations must match exactly."

    ReplyDelete
  4. .NET magic is: development is easy and fast.
    The Java Developers in general are using the open source and free tools and packages, once the java Developer start using the non free java packages and tools, the java Developer will notes how is life easy with java.

    ReplyDelete
  5. @Amjad, nice to hear from you:)
    If we are talking about IDE. I think the MS visual studio is very well done, but on the other hand you have to pay for it ... So everything depends on the budget as most choices in life.

    ReplyDelete
  6. i think in 10 years to come everyone will be using Microsoft.net...
    yooo this thing is the best in the world of tecnology

    ReplyDelete
  7. @Emanuel, thanks for your input.
    actually I don't agree bro, because the world prefers and goes to the open source technologies instead of other restricted technologies.

    ReplyDelete