J2EE & .NET, similarities and differences
About this posting: This post discusses the high-level similarities and differences between the J2EE and .NET programming models and provides some insight about future postings
Hello,
There are many similarities between .NET and J2EE. I am taking some liberty with the official definitions of these models but in the real world, J2EE is a programming model based on the Java language, having a concept of a container (typically application server) that provides services like lifecycle management and support for declarative transactions. J2EE is based on object oriented design principles; it is a specification owned by Sun Microsystems, however, Sun does involve the community in building the specification through the Java Community Process. The core J2EE specification is supported by multiple vendors most notably Sun Microsystems, BEA and IBM and other vendors build applications that run on J2EE applications servers. In addition to the 'write once, deploy on multiple operating systems' feature of Java, J2EE also defines layers of abstractions in the forms of APIs that provide some level of decoupling between your application and the underlying infrastructure and resources e.g. as in case of JMS and JDBC APIs.
In the real world, .NET is a programming model that supports multiple languages; it provides services like lifecycle management, sand box security and garbage collection and is based on object oriented design principles. The .NET specifications and the core APIs are developed by Microsoft, however, Microsoft involves the community by actively getting feedback through multiple channels and uses that feedback to decide the new features of the framework, the .NET frame work is supported by a large ecosystem of ISVs that develop solutions that utilize the .NET APIs. The applications developed using the .NET model are typically deployable on the Windows platform only, however, they can interoperate with applications running on other platforms using a variety of mechanisms that I will be discussing in my future posts. The new version of .NET, .NET 2.0, introduces the concept of ‘providers’ which decouples your application from the underlying resources like the database and security-credential provider. Both J2EE and .NET have concepts of Virtual Machines and Just-in-time compilation, J2EE has a Java Virtual Machine (JVM) that facilities platform choice and .NET has Common Language Runtime (CLR) that facilitates choice of programming languages, the conceptual architecture for both the models looks quiet similar. I will be willing to provide a mapping for those who are interested in a more detailed comparison.
Keeping all the prejudices aside, it is possible to develop good IT solutions using either model of programming, there is nothing inherently wrong with .NET or J2EE, those who claim that a reliable system cannot be developed in Java or that it is not possible to develop a highly secure and reliable system in .NET have not done their homework or are not current in their research. It is true that both J2EE and .NET have had their set of issues in the past years, however both programming models have passed through radical changes and many of the issues have been resolved some time ago, e.g. I recently corresponded with someone that was concerned about the inherent capability of .NET to support his enterprise mission critical application consisting of 100 transactions per second in a system where a 150 million dollars exchanges take place in an year. It came as news to him that their are many absolutely mission critical applications running on .NET, including applications that support 3000 transactions per second with over 5 trillion dollars changing hands (at a stock exchange). Similarly, I have seen a very complex and large airline reservation system successfully developed and running on J2EE. In my humble opinion, the inherent capability of the programming models is only one of the factors and the architects and technical decision makers need to look at other criteria for making an objective decision, I will talk about some of the decision criteria in my future posts, stay tuned and please do provide feedback so I may learn from you.
Best regards,
Mohammad