Java And Dot Net

This page I'm starting out of a real-world need, and this need is behind the name I chose, JavaAndDotNet, rather than JavaVsDotNet?. I'm actually a little surprised that no such page is already on wiki. Yes, there are bits and pieces. But I've had to do a lot of research in order to pull together the pieces. My need: to understand the features each platform provides-- No, not features. I need to grasp the gestalt of each. I do not need to know which is better, nor do I care. Rather, I need to talk intelligently to my coworkers about how each approach applies to the design problems we face. Therefore, I'm interested in exploring both. --TimKing (DeleteWhenCooked)


JavaAndDotNetPhilosophies - Millieu

Java's tagline has always been "Write once; run anywhere." If .NET had a similar tagline, it might be "Write in any language; run on Windows." Each adopts a different approach which permeates each community.

Java standards, for example, are specified and documented to be used in a variety of contexts and combinations. You can rearrange them ad hoc to devise almost any situation you desire. In contrast, .NET standards are designed for a given context and work well in that context.

Take JavaServlets, on the web tier. You can write them as pure Java classes. Or you can use JSP. You can use Struts or JSF or JSTL on top of JSP. Or you can shove JSP in favor of something like Tapestry. Or you can use these in combination in seemingly limitless ways. The resulting web application you can run on an embedded server like JettyServer. Or you can deploy it on a more elaborate server like ApacheTomcat (which could also be embedded) hosted under the built-in HTTP server Coyote, or under InternetInformationServer or ApacheHttpd (any of which Jetty could also do). Or you can go with a more integrated enterprise solution like JbossServer or IBM's WebSphere or BEA's WebLogic. Each possibility has its own strengths and weaknesses. It's a stunning, confusing, and sometimes even frustrating array of alternatives and possibilities. And this is just looking at a single Java standard.

On the other hand, .NET WebServices use AspDotNet hosted under InternetInformationServer. Period. That's it. No choices. No options. And nothing for you to screw up.

This phenomenon manifests the difference between JavaAndDotNetPhilosophies. Neither is innately superior. The Java approach provides more choices and flexibility. The .NET approach provides more certainty and order.

(I used to think everyone preferred the former. As I've grown wiser, I've learned I was wrong. For an excellent example preferring the latter, see PageAnchor: generalization near the bottom of CsharpVsJava.)

There's another important manifestation of this difference: How do you learn about each? With Java, you can go to the book store, where there are shelves of books from which to choose. But most Java technologies have good documentation available on-line. Some of Sun's own Java books are even available for free download, but we still tend to buy paper copies of many of them. While Java books are very important to the Java developer, they fill a different role. We buy Java books after we've decided what we want to read. But they are not necessarily the first-chance documentation that .NET books are. In order to get started with .NET, you pretty much need to buy a book. You may need to buy that book even to understand exactly what .NET is and how to use it.


Maturity

(July 2005) Java is 10 years old. .NET is less than half that. When Java was only 5, it was a pain to work with. .NET is not quite the pain Java was at its age. However, .NET is still younger, and it shows.

Third-party support for .NET is weaker than for Java. In general, for any given design problem, many more Java solutions are available than .NET solutions. This is partially due to the Java approach (see Millieu on this page), but it's also arguably due to the fact that .NET has had much less time to build a community.


Implementations

Though there are multiple sources implementing DotNet (MonoProject, DotGnu), the benchmark is MicrosoftDotNet. Other implementations are only partially compatible, and are likely to remain such, as the .NET core libraries are based on proprietary standards. (See DotNetForLinux.)

The core Java technologies, while their reference implementations are Sun's, are based on open standards and have certified, working alternatives, including open source ones. There are multiple working implementations of both the standard runtime and J2EE (JbossServer, JonasServer?, WebLogic, WebSphere).


Languages

DotNet works with a number of programming languages (CsharpDotNet, ManagedCeePlusPlus, VisualBasicDotNet, VisualJaySharpDotNet). Note that porting standard CeePlusPlus or legacy VisualBasic to .NET can be harrowing. To do so, you must traverse a maze of exceptions, sacrifices, and compromizes designed to make these languages compatible with the CommonLanguageInfrastructure.

Some say CsharpLanguage is the "consensus" language for DotNet. Whether or not this is true, it is closest in style and features to JavaLanguage. In fact, C# and Java tend to leap-frog, pulling features from each other for each successive release. See CsharpVsJava.

Compilers do exist to turn languages other than JavaLanguage into JavaByteCode. But JavaLanguage is still the standard. If you want to design any heavy-duty software for the JavaVirtualMachine, you use JavaLanguage. Others are companion languages. (See for example JavaPython.)


Tiers and Technologies

InternetInformationServer hosts all WebServices in .NET. To design them, you can use AspDotNet (with MicrosoftWebForms), or you can use DotNetRemoting. The former is typically used on the web tier and the latter on the business tier. AdoDotNet can then be used to persist business data to any database that has a .NET DataProvider? or ODBC support. For example, you can use MySql using either of these: see http://dev.mysql.com/tech-resources/articles/dotnet/. Or you can use third-party tools to support ObjectRelationalMapping, or you can write your own database-access code.

In the Java world, WebServices can be hosted under almost any web server. On the web tier, JavaServlets run inside of a ServletContainer, frequently using JavaServerPages. On the business tier, EnterpriseJavaBeans ("EJBs") run inside of an EjbContainer. EntityBeans (a type of EJB) can be used as a bridge to the database. ObjectRelationalMapping and JavaDatabaseConnectivity is also available. The companion and third-party technologies available to augment this simple scheme are too numerous to mention. Suffice it to say that none of these elements are set in stone.


Development Environment

Most Java developers use EclipseIde, NetBeans, or IntellijIdea. Most .NET developers use VisualStudioDotNet.

Java tends to support the latest development processes first. VisualStudioDotNet 2005 will add features, like source-code generation and automated refactoring, that have been available in the Java IDEs for years. JavaUnit is the benchmark for automated unit testing. Now, features like continuous testing (as continuous compilation before it) are being developed using Java.

How do tools used to design user-interfaces differ between the platforms?


Source Code

Sun publishes the source code for the core Java libraries. This can be valuable if the documentation is inadequate or if you need to figure out a bug in a library. I've saved countless hours debugging because I could step into the Java source.

For some projects, this may also pose a legal risk, requiring an explicit policy. For example, if you contribute to the Apache Harmony project, you may not contribute in any area in which you've "been exposed to" Sun's source code, so that you don't inadvertently violate someone else's IP.

Java technologies also tend to have good open-source support. This is a side effect of the maturity and multi-implementation ("run anywhere") approach.

Microsoft now makes the source code of the core libraries available for usage under their MicrosoftReferenceLicense?, and VisualStudio can be configured to retrieve it from Microsoft's symbol servers as needed - but viewing the code carries the same risk for project contributors (most notably the MonoProject) as viewing Sun's code.


BusinessValue aspects

DotNet is more "agile" (put it mildly).(say what?) Its characteristic lead some to wonder whether applications are developed to prove the concept (of DotNet), rather than to achieve a return for the business owner, who happen to require a SupplyChainManagement solution that rely on a particular WirelessDeviceEnterpriseComputing? implementation.

With JavaPlatform, the move is more "orderly" (put it mildly).(what?)Business owners are already redirected to the NextBigThing when an affordable Java solution comes out of the CommunityProcess?.

At this moment, owners of LegacySystems are wary of conversion to either platform, and BigBlue with its MiddleWare dominance is not complaining.

 -- PlainEnglishPlease


Client-side tool for ProgrammingOnHandHelds with MicrosoftWay constraints

Functionalities (including performance) that can be delivered using DotNetCompactFramework on WindowsMobile is very limited. Is there a better alternative using JavaMicroEdition, given the constraints where we are required to use WindowsMobile and DotNet servers? Or maybe someone have favorable experience on a toolset that is noncompliant with architecture of the above two StandardsStampingCompanies? (MS and Sun), yet can deliver superior results to staple solutions offered by the major software providers.

An acceptable tool will need hooks to client UI software such as a PocketWebBrowser, and can interface with addon package security solutions(e.g. kiosk mode "may be needed" in some usage scenarios). A reliable mechanism for persisting information "may be needed", if WindowsMobile facilities cannot be used.

Appreciate useful links and information

A


See also DotNetWillKillJava


CategoryComparisons CategoryDotNet CategoryJava CategoryEnterpriseComputingConcerns

Well, this wiki seems to be outdated, as most of the content here is propaganda to support java, hmmm today it seems to be Ruby On Rails or is that J2EE on some kind of train. Which is it, where is the java platform going? I have seen DotNet grow so fast and mature that it out performs Java in just about every aspect. Sorry to bust your bubble, but hey maybe you should call this wiki JavaVsTheWorld?.


EditText of this page (last edited July 26, 2013) or FindPage with title or text search