0

Hey guys. Which is better? .NET or Java. I know .NET isn't really portable, however independent projects (Mono Project, MonoXNA) are trying to give it some portability. What benefits does Java and .NET offer and what downsides do they have?

Edited by Andrei15193: Posted in the wrong section

4
Contributors
8
Replies
11
Views
5 Years
Discussion Span
Last Post by Andrei15193
0

"Better" is a meaningless word without any context. Are you asking this question out of general curiosity or because you want to use one of those frameworks for your next project? If it's the latter, what are the needs of the project?

If it's the former then I can only say that neither one is better than the other, and which one is more suited for use in a specific project depends on the needs of that project.

0

Kinda both. I know that the word "better" requires in most if not all cases a context. However I'm in search to find the contextes where Java is better than .NET and the other way around.

0

They are basically competing products. When I talk from a language-theoretic point of view, they are very difficult to distinguish at all. The same goes for application domains, generally speaking, they target similar domains, in a very similar way. So, just as a general opinion, I would say that Java is more consistent (less of a Frankenstein framework like .NET), has a more established user-base, and is more portable. But I don't know enough of either to be able to draw specific contextual differences between them, I think they only differ in some details and for some specific tasks.

0

Ok, to start let's presume the next scenario.
You need to make an application in Java or .NET that can handle operations with an address book. Operations can be: adding a new contact, deleting or updating an exinsting one. Search for a contanct by it's name. Sort after name, adress or phone number of a contanct. Export and import to, respectively from a XML file. Basic operations with entities actually.

Which of the two would make best for design time, implementation time and running time? For .NET coding we will presume C# since it's widely used. The application is a desktop app with graphical user interface.

Another question. When you find yourself in this scenario, which language will you go for and why?

Edited by Andrei15193: small typo

0

Ok, to start let's presume the next scenario.
You need to make an application in Java or .NET that can handle operations with an address book. Operations can be: adding a new contact, deleting or updating an exinsting one. Search for a contanct by it's name. Sort after name, adress or phone number of a contanct. Export and import to, respectively from a XML file. Basic operations with entities actually.
Which of the two would make best for design time, implementation time and running time?

For such a simple application, it will most likely make no difference at all which one you use. Design time: exactly the same. Implementation time: depends only on your aptitudes at either language. Running time: my hunch would be to say that Java would run faster, but I can't tell for sure.

The difference will start to be felt on larger projects, especially those that require a lot of interoperation of various libraries, and which are available in which platform and how much work is needed to interface them.

The other difference will be in terms of development environments (IDE). Having a good GUI tool and a helpful debugger are important factors in these applications. So, then, you have to compare the development environments more than the actual platforms / languages.

Another question. When you find yourself in this scenario, which language will you go for and why?

If the project involves existing code to be fixed or extended or reused, then I go for the language of that code. Or else, I examine the requirements for the project to establish if there are any aspects of it that constrain the choices (e.g., target platforms, performance, distributed architectures, etc.). Then, I look at the external libraries and utilities I need for the project, and pick the language that meshes the best with those. If any language works for that (e.g., typical "C" interfaces to the libraries), then I pick whatever language me and my team are the most productive with, by experience or other familiarities (in my case, C++).

The point is, a lot of things go into selecting a language / platform for a project besides the general "which is the best?" rhetorics. When you are only at the "learning" stage, it is hard to see how the various factors impact development times and quality of applications, you just need more exposure to programming, to languages, to projects, and general experience. Look at some fairly large projects (e.g., open-source projects) that are in your areas of interest and see how they set things up (language, platform, build tools, GUI tools, version control system used, unit-testing policies, etc.) and try to understand why.

0

Mike has some great points...

What I will say is I've written apps in both java and .net. Now dotnet hands down wins when it comes to a polished GUI development area. Probably because Microsoft can pour a little more money into their IDE's.

I've worked with java's eclipse, it was okay-ish. Now I've heard good things about jbuilder, but never used it. It is it still comercial -probably I think.

Overall, java wins hands down with portability but then they've been around longer. This is if you want to deploy your apps on *nix systems (linux macs etc). Mono might be an option, but even now I'd imagine it would be still unstable and definitely not guaranteed to work.

Professional apps probably tend to be developed without any framework as they bloat up the app, but then big software companies can pour money into development and have trained professionals who know how to quickly put together GUI apps... They probably have their own little macros and frameworks. Coding here tends to be rooted in c++ with OS calls to whatever native OS they're programming in... windows is win32, mac not sure, linux not sure.

Overall in terms of speed, when you get to a point of knowing how most languages work, coding is irrelevant. RAD is no different to dotnet and java.

Another option which is becoming more and more popular these days is to create web-based apps. These have the advantage of being portable as long as good web coding practices are used.

Problem is you have to use server side scripting so your app must be hosted somewhere. You can't expect the end user to install a WAMP or LAMP or whatever on their home pc.

That's about the long and short of it.

Edited by iamthwee

0

Thanks for the input guys.
Cross-platformity given by Web apps stends to be a trend these day, however the security has to be higher and, as iamthwee said, the need for a server to host the app. Also the different interpretations of CSS in different browsers bring problems with display.

Mono has only a part of .NET implemented and so does MonoXna.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.