|
|
To print: Select File and then Print from your browser's menu
-------------------------------------------------------------- This story was printed from ZDNet Australia. --------------------------------------------------------------
|
J2EE vs .NET: levelling the playing field By David Braue, 0 February 21, 2003 URL: http://www.zdnet.com.au/news/business/soa/J2EE-vs-NET-levelling-the-playing-field/0,139023166,120272095,00.htm
Telstras decision to standardise on Sun Microsystems-backed J2EE (Java 2 Enterprise Edition) technology for its future application development surprised Australias IT community. For Telstra, Microsofts largest private-sector Australian customer, to pick J2EE over Microsofts own .NET architecture sent shock waves all the way to Redmond. Microsoft president Steve Ballmer wasted no time coming to Melbourne, and his smiling embrace upon emerging from discussions with Telstra suggested that the relationship was back on track. That such a seemingly small announcement could cause such a large stink reveals just how serious the stakes have become in the brewing battle for control of the enterprise. In one corner is Microsoft, which has made it clear that its .NET strategyannounced nearly two years ago in a fanfare of enthusiasm thats set to explode with the frequently-delayed launch of Windows Server 2003 (previously named Windows .NET Server) now due in Aprilis the companys latest bet-the-farm attempt to build an extensible, distributed and standards-compliant framework for Web applications. In the other corner is Sun Microsystems, perennial Microsoft critic and developer of the Java family of technologiesincluding nearly two-year-old Java 2 Enterprise Edition (J2EE)which has years of experience in providing tools to the worlds developer community. Both are promoting their own visions of the future of enterprise computing. But as the dust settles and product begins shipping, its becoming clear that maybe theyre not so different after all. War of words In time-honoured tradition, the pitting of Microsoft against Sun has led to a war of words between executives, who trade barbs over keynotes waxing lyrical about the future of enterprise computing. J2EE . . . is more feature-complete, more mature, and what .NET has going for it is a marketing budget only God can dream of, Sun vice president and Java creator James Gosling told the crowd at a November developers conference in the US. Gosling also took the opportunity to attack the technical design of Microsofts Common Language Runtime (CLR) compiler, an analogue to the Java Virtual Machine, that runs applications written in any .NET-compatible language and compiled into MSIL (Microsoft Intermediate Language)the conceptual analogue of Java bytecode. Yet in the same speech, Gosling acknowledged the appeal of Microsofts Visual Studio.NET development environmentimplicit recognition that, in technology terms, the race is well and truly on. With Microsoft and Sun platforms already moving, however, its unlikely to become anything more than a two-horse race any time soon. And in the long term, it could be a competition with no clear winner: Gartner, for one, has projected that .NET and Java will each settle at around 40 percent of the market, with other development platforms making up the remaining 20 percent. Given the J2EE leanings of application server giants IBM, BEA, and Sun, the game has become a familiar one: Microsoft against the rest of the world. Faced with this challenge in the past, Microsoft has often sought to differentiate its products with proprietary extensions that led the market in new directions but broke established standards. This time, however, Microsoft may find itself constrained by its need to keep .NET interoperable with common Web services-related standardsXML (eXtensible Markup Language) for data representation, SOAP (Simple Object Access Protocol) for interoperability between services, and UDDI (Universal Description, Discovery, and Integration) for cataloguing Web services. Standards compliance will be crucial to avoid chaos, points out Peter Pritchard, regional director with software giant Compuware, who believes customers will try both environments and drift towards one or the other. But the one thing everybody needs to keep an eye on is if we see anyone truly trying to break the standard, he warns. If someone succeeds, Web services goes out the window and the only thing well be able to use is EDI. And nobody wants that. Theres a lesson there for all of us: youve got to try to win this on fairly even turf rather than trying to [jockey for advantage]. J2EE vs .NET: Developers, Microsoft and platform choicesDevelopers take up the reins After all, both .NET and J2EE ultimately provide a standards-based architecture for deploying distributed, online, enterprise applications to any device, anywhere. And both Microsoft and Sun recognise that this time, it will be the developers who will be making technology recommendations to their business associates. Just what theyre going to like depends on personal taste. Owing to its roots in the well established Java development language, J2EE is perceived by many to be more matureand, therefore, a safer betthan its rival. Java, after all, has become ubiquitous within university programming courses, something that should guarantee a large and available pool of Java-skilled developers for the long term. Having said that, .NETs intrinsic support for most major programming languages means that developers may find that environment more accommodating than J2EE, which only supports Java. Support for multiple languages is particularly important in companies with a significant code base that needs to be moved online: instead of having to rewrite aging COBOL, C++, and Visual Basic applications in Java, those applications can be ported to .NET with minimal effort. Developers are also coming to appreciate the Microsoft-authored C# language that debuted with Visual Studio.NET last year. Java programmers like C# in ways they dont like C++, says Eyal Aronoff, chief technology officer with Quest Software. Its a modern development language with all the key concepts of Java, whereas C++ is trying to take an ancient language and make it modern. People that never went for Java get very excited about [.NET]. Anecdotal evidence supports Aronoffs observations. Visual Studio.NET encapsulates many complex Web application components into easy-to-manage function calls, maintaining detailed lists of interdependencies between applications. These lists ensure that modules communicate properly no matter how theyre moved. The end result is that developers often get up and running with .NET in virtually no time. Software vendor MXL, for one, saw productivity increase four-fold when it jumped from C++ to C# and .NET (see case study on page 36). Charles Sterling, .NET developer evangelist with Microsoft Australia, has a simple explanation for the improvements: I dont think weve had anything thats truly fun to develop in since Visual Basic 3, he says. The developer community has embraced and loves .NET. Its not painful; you can just go out and develop. Well have to [win developers by] focusing on productivity: you can get apps done faster because youll have to write fewer lines of code. Smarter J2EE tools are delivering efficiency improvements on the other side of the scale, too. One business analyst, working with US consulting firm E-SoftSys, recently tried out Compuwares OptimalJ development system to rewrite a J2EE-based workflow application. He was able to complete the work in 248 hours, compared with the 400 hours it had taken a two-person team the first time around. Thats a significant improvement, given the inherent complexity of J2EE and its component Enterprise Java Beans (EJB) architecture. Whether those improvements came from the development tools or were the result of the specific developers technique is not clear. The point to take from their experiences is that with the right approach to development, both J2EE and .NET can help developers produce fully Web-enabled applications far faster than they could in the past. As they come to favour the nuances of one environment over the other, theyll be able to formulate concrete arguments as to which direction their company should go. In the long term, however, those preferences may well change as J2EE development tools follow the lead of Visual Studio.NET, and other .NET development environments. Its currently easier in Visual Studio.NET to build a Web service than it is under Java, says Andy Cooper, brand manager for information management solutions with Computer Associates Australia. But thats now as opposed to three months down the track. By the time Web services become really used, a year from now, both will probably have similar ease of use. Microsoft: learning to be open? For example, a US judges recent decision to force Microsoft to incorporate Java into Windows could revitalise Javas role in that environment, paving the way for a better J2EE platform running under Windows. If customers took that approach, they would tap into the innovation around the Windows environment without being locked into .NET and Microsofts other applications. At the same time, the obvious need for Microsoft to avoid seeming heavy-handed has seen its representatives surprisingly open about the possibility of moving .NET off the Windows platform. It was quick to submit its Common Language Interface (CLI), a key component of the CLR, to the European Computer Manufacturers Association (ECMA). ECMA standardised the CLI, along with the C# language, in 2001, paving the way for third parties to build other versions of the applications on other platforms. As if to prove the point, Microsoft partnered with one-time Linux advocate Corelwhich owes its very existence to Microsofts US$135 million stake in the companyto build shared-source versions of C# and the Common Language Interface (CLI) for Windows and the FreeBSD operating system. Linux was intentionally left off the agenda, a move that suggested Microsoft was testing the waters of Unix but wasnt yet ready to give in to longtime nemesis Linux. Recognising that playing in the world of standards removes the strength of leverage, Sterling concedes that Microsofts desire to promote .NET has forced a different mindset. Hes even accepting of the possibility that Linux and Solaris will play a role in .NETs success, thanks to the efforts of the Ximian-headed Mono project (www.go-mono.com). The developers working on Mono have already ported the CLI to Linux on Intel and PowerPC processors as well as S390-based mainframes; versions for StrongARM (used in handheld computers) and Suns SPARC computers are also underway. Not encouraging .NET on Windows arch rivals, but not discouraging it eitherits a strategy that will ultimately allow Microsoft to extend .NETs reach without having to overtly support its philosophical arch rival Linux. And with low-cost or free alternatives to .NET out there, Sterling says Microsoft is committed to playing the game right this time around. Operating systems now have to compete on their own merits, he says. They dont get to compete on history, momentum, or existing investments. If were going to compete with OSes that cost 20 times as much as us, and compete with OSes that are free, we have to show were much more cost-effective and provide more value than either. This is whats going to cause us to become a much better company. I like to think of it not so much as competing, but as playing well with others. A kinder, gentler Microsoft? Maybe. But James Eagleton, enterprise architect with Sun, believes Javas openness and support across multiple platformsthe standard is progressed by a 400-strong worldwide community of software vendors building all kinds of applicationswill make it the emotional favourite for developers long sceptical of Microsofts way of doing things. .NET is relatively untested, but its a recognition from Microsoft that object-oriented based languages are a step forward in better componentisation of code, and that a runtime environment is a good step, Eagleton says. It will make development much easier in terms of interoperability between business logic and internal operations. But there are other reasons that big enterprises want to run their systems. A lot of it comes down to the maturity of the language and framework. Compatibility between all three application tiers is a compelling factor for Java. There is one area where many fear Microsoft hasnt learned new tricks, however. Its disastrous Licensing 6.0 pricing program, launched to widespread criticism last August, raised the cost of Microsoft products so much that its been credited with convincing many companies to evaluate non-Microsoft products for the first time. With Windows Server 2003 poised to become the linchpin of Microsofts future application strategy (soon to include enterprise applications like its Great Plains ERP and a forthcoming Microsoft-built CRM package) many fear the company will impose an equally onerous pricing model this time around. Among the changes is a new per-processor External Connector license, says Microsoft Australia Windows server product manager Michael Leworthy, that will cover access to .NET Server for business partners, customers, alumnianyone whos a non-employee of the company. In other words, anyone whos not an internal, salaried employee needs to pay for even occasional use of Windows Server 2003-driven resources (see www.microsoft.com/licensing/resources/server_overview.asp for more details of the licensing scheme). That approach may prove unpalatable for companies seeking to build large .NET applications extending to a large number of business partners. Implications for individual companies will obviously vary, but its worth your time to carefully weigh up current and future licensing obligations when considering long-term application costs. Making the platform choice With cross-breeding between Sun, Microsoft, Linux and other platforms now well underway, the decision is very much about personal tastethat of your developersrather than being an exercise in technical isolation. Also important in the decision is your existing allegiance to IT suppliers: strong involvement with IBM, for example, may push you in the direction of J2EE simply because thats where the companys skills are. Since both frameworks are built to interface with industry-standard Web services, integration between the two should (theoretically) be a relatively simple matter. This will make it entirely feasible for companies to apply a horses-for-courses approach and teach J2EE and .NET to live together in something resembling bliss. Thats one theory, at least. In practicality, the expense of sourcing and keeping dual-skilled developers may drive many companies towards the platform thats best supported by strategic application partners. If more Microsoft-loving software companies build their applications more for .NET than J2EE environments, natural selection will start to play a role. But if application developers can maintain parity in their support for the two, tomorrows enterprise applications market should support both for the long term. I think a lot of organisations who are currently saying theyre going to choose one or the other, will probably end up using both, says CAs Cooper, who says the company wants to be the Swiss of the platform battle. You tend to find hard and fast rules only tend to appear when the business gets involved. Companies with relatively few legacy environments and a strong investment in Windows may gravitate towards .NET for its ease of use and ability to consolidate their applications around Windows servers. Certainly, companies wanting to roll out rich applications integrated with client desktops may find .NETs tight Windows integration to be a real benefit. But that doesnt mean its the only choice. J2EE is universally recognised (even by Gosling) to be harder to work with and more complex to get up and running, but once its up it is highly secure, tremendously scalable, and extremely robust. That was one of the key factors behind Telstras decision to use J2EE as the basis of its future development, although .NET will still play a role in scattered parts of the organisation. The use of Java also allows encapsulation of business logic into highly portable application modules that mirror individual business functions. Those modules can then be assembled in different ways to follow the companys change over time. This, says Compuwares Pritchard, could tilt the scales in J2EEs direction. The whole J2EE model architecture is a nice thing for large applications where you can have business analysts write the program, he explains. Thats been one of the big problems of IT projects from back in the dinosaur ages: business analysts would design something but couldnt code it, and it was done by technical people who did not know what the code means. They would code something wonderful that didnt do the job. Ultimately, doing the job is exactly what these platforms are all about. Thanks to Suns years of experience with Java and the ongoing pressure on Microsoft to conform to standards, corporate customers now have two extremely robust, well-received application platforms on which to base their future Web-based businesses. Thats not a clear answer to the question which platform is betterbut it may help many managers sleep well knowing they no longer have to sell their souls when making the choice. Getting a handle on Web servicesWith procedural programming, data structures refer to each other and routines are created to manipulate the data structures. As the complexity of programs increases, so does the number of routines and data structures operating on each other. So with procedural programming, complex programs can become increasingly difficult to maintain and support. Then, theres object-oriented programming (OOP), which offers a greater level of sophistication to developers. With OOP, objects contain both state and behaviour, allowing a single entity to describe what it is and what it can do. And the objects have relationships to each other. Also, OOP introduced such concepts as encapsulation and polymorphism. OOP made complex programs easier to write, maintain, and support. Now service-oriented programming (SOP) has entered the fray with even more sophistication. Developing applications using SOP encourages a powerfully clean separation of developer concerns, increased reuse, fewer defects, and increased ability to meet future needs. In the same manner that OOP builds on procedural programming, SOP builds on object-oriented programming. A service is a core piece of business logic that is protocol independent, location agnostic, and contains no user state. Services dont contain presentation logic, nor do they contain logic to integrate with data-tier resources, such as a database. Services focus exclusively on solving business domain problems. Services are very loosely coupled with other components of an application. Theyre protocol independent, allowing for the same service to be accessed in multiple ways, and coarse-grained. This allows the service to perform its business logic and return the result in a single call. A good example of this would be a service named getAccounts, which returns the information for all specified bank accounts for a given user. Services typically rely on configuration data to determine things, such as which data-tier integration module to call. But configuration data for individual users is typically never stored. For example, services shouldnt store user state beyond a single request. This enables services to be multi-user-safe (ie, a single instance of a service can be called simultaneously for many users). Applications are typically described by what they do, not necessarily by what they are or what they contain. For this reason, its much more straightforward to describe an application using verbs as opposed to nouns. In contrast, OOP establishes itself on the basis of describing objects, and the state and behaviour they contain. In most distributed component frameworks, such as J2EEs Enterprise JavaBeans, the primary entities that are intended for business logic are based on an OOP component. Since objects define a thing and not an action, an impedance mismatch can occur when attempting to encapsulate what a component does as opposed to what a component is. In SOP, an application is described much more naturally. Each function of the application that can be verbalised will likely be a candidate for a service. Typically there are five tiers in an enterprise application:
These five tiers are logical constructs in nature. Where they reside physically is typically a deployment issue. For example, in a small application, the presentation, business, and integration tiers might all reside on a single machine. In more complex applications they will be deployed across multiple machines. Similarly, when an applications popularity increases to the point that it needs additional resources, these logical tiers can be separated physically to provide additional computing power. A service-oriented approach to enterprise application development encourages increased reuse of major business components. With a service-oriented development model, application development consists of combining one or more business services together to form a cohesive unit. This approach has the potential to bring about a faster time-to-market, fewer bugs, and lower maintenance costs. Jeff Hanson .NET switch proves academic for MXLSoftware developer MXL has been developing its eMinerva academic management system (www.eminerva.com) for nearly seven years. In that time, the system has found a strong following among Australias academic institutions, which need effective tools for managing their academic, financial, and other interactions with thousands of students. Previously, eMinerva had been designed to run inside a school over a conventional local area network. Several years ago, however, it became clear that many institutions would benefit from a Web-based version in which MXL hosted customer data and bore the burden of keeping the applications running. The company initially developed an ASP (Active Server Page) based version of eMinerva, which was hosted from the Macquarie Corporate Telecommunications data centre. Acceptance of that version proved the viability of the Web-based model. However, MXL realised its growth planswhich include aggressive international expansion (UK and Singapore agreements have already been struck)required a more flexible, redundant, distributed architecture that would allow seamless distribution of eMinerva across many data centres around the world. Early last year, the decision was made to use Microsofts .NET framework as the foundation for a complete rewrite of eMinerva. After mapping business processes to determine customers core requirements, MXL programmers began redeveloping the system from the ground up using C# and the .NET framework. Almost instantly, says Paul McNamara, MXLs director of IT, they were hooked. We found that we got about four times the productivity using C# and .NET, he explains. Because .NET comes with Web-based components, we were able to deploy a lot of Web functionality at a much more rapid rate than with the traditional C++ environment. The technology guys were telling me that Microsoft seemed to have taken the best of other languages and put it into one. We did look at doing it in Java, but because C# was closer to C++ the jump to C# seemed a lot less than the jump to Java. The whole process didnt present any problems; there were always workarounds, and there were no major showstoppers along the way. Over a dozen schools along Australias eastern seaboard are already up and running with the new system after just a few months of operation. Performance tests show a 20 to 30 percent speed improvement over the ASP version, and the new systems scalable structure should ensure that eMinerva maintains its performance as MXL targets some 1300 additional high schools and other institutions its already identified as potential users. Because the .NET development environment maintains interÂrelationships between objects as they change, the new version of eMinerva will be easy to scale and adapt to customers changing needs. This includes, for example, a forthcoming move to increase redundancy by distributing the system across clusters of servers. McNamara is anything but reserved in his praise for .NET. It was a huge step forward into a very robust environment, he says. Its very much easier to support, because the system can throw exceptions and report errors electronically. The turnaround on new releases and fixes is dramatically quicker, and we can bring on customers much faster. This is the first time in 25 years Ive been in the industry that there has been some dramatic delivery from IT. There have been promises, but this technology actually delivers. What you need to know about J2EE and .NETJ2EE and .NET both have their strong points, and deciding between them may be difficultâ€"and unnecessary. Here are a few things to remember when planning your next application: It's not just about Web services . . . . . . but they can be a big help J2EE and .NET are not mutually exclusive You can still choose your OS Think about the future XML is the path to your legacy People are your destiny Involve the business leaders Microsoft has changed Subscribe now to Australian Technology & Business magazine.
Copyright © 2009 CBS Interactive, a CBS Company. All Rights Reserved. |