2
25-Aug-14compare.ppt2 Java and.NET Java was created by Sun in 1992 Microsoft introduced.NET and C# in 2000 both platforms are object-oriented, type safe, and have automatic garbage collection the two platforms have been competing vigorously on the desktop but especially in the area of server technology many developers become expert on one platform few have time to learn both the schism of understanding the two platforms widens due to misinformation and disinformation what are the strengths and issues for each platform?

15
25-Aug-14compare.ppt15 the JRE and.NET runtimes include lots of libraries programs can call a huge body of pre-written code these reusable components are called the Class Libraries in Java, sometimes they are also called packages or Java API’s in.NET, they tend to be called the framework class libraries the libraries are designed to be used identically in Java, regardless of the underlying operating system in.NET, regardless of the underlying version of Windows OR which language is being used

16
25-Aug-14compare.ppt16 Just in Time (JIT) compilers in JRE (JVM) and.NET runtimescompilation before installation, or the first time each method is called execution JIT Compiler nativecode.class file bytecode metadata source code compiler

21
25-Aug-14compare.ppt21 jargon checklist metadata bytecode JVM JRE JDK J2SE J2ME J2EE IDE GUI what is an assembly? an.exe or.dll file compiled by a.NET compiler what is “metadata”? the self-describing information inside a.NET assembly or Java.class file What is CIL? (formerly MSIL) Common Intermediate Language (inside a.NET assembly) What is the CLR? Common Language Runtime that executes CIL code what is managed code? software that runs in the CLR what is native code (or unmanaged code)? software than can run on Windows without the CLR

23
25-Aug-14compare.ppt23 C and C++ perceived common problems pointers are dangerous memory leaks (failing to free memory correctly) function pointers (jumping to the wrong place) data pointers (pointing to the wrong place) manual garbage collection is a lot of work multiple inheritance (C++) can get very complicated ambiguities like the “diamond problem” (a.k.a. “diamond of death”) not easily portable across platforms, even with re-compile and discipline

24
25-Aug-14compare.ppt24 a few ways Java improved on C++ instead of pointers, Java has references references are similar to pointers, but with protections (cannot jump into illegal parts of memory)—avoids segmentation fault problems automatic garbage collection memory is reclaimed from the heap automatically—avoids memory leaks single inheritance avoiding the deadly diamond of death encapsulation all code must be in a class—intended to encourage information hiding array bounds checking libraries many common tasks already coded and available for “reuse” by means of inheritance many interfaces (behaviors) already coded

26
25-Aug-14compare.ppt26 Microsoft ’ s big headache prior to.NET, Microsoft had a big headache Microsoft was supporting too many operating systems application programming interfaces (API’s) were implemented as dynamic link libraries (DLL’s) develop using C++ calling the Windows API was different on every operating system developers first had to find out exactly what kind of system the program was running on and then determine if the API desired was actually installed on the system that doesn’t sound so bad after all, there are only a few different kinds of Windows… …right?

27
25-Aug-14compare.ppt27 party trivia question how many different versions of the Windows operating system existed before Vista, which had their own distinct mix of API’s? select the closest answer: a)5 b)15 c)25 d)35

33
25-Aug-14compare.ppt33 Service Oriented Architectures (SOA) web services remotely located programs that use XML to make remote calls and get the results XML traveling over HTTP it’s all plain text and goes through firewalls standards are emerging Jave service end points and Microsoft client endpoints can talk to each other (and vice versa)

34
25-Aug-14compare.ppt34 what we just covered 1.simple programs 2.overview of platforms 3.why did Sun do it? 4.why did Microsoft do it? 5.Service Oriented Architecture – the peacemaker?