Nov 6, 2014compare.ppt
2
Just in Time (JIT) compilers in JRE (JVM) and .NET runtimescompilationcompilation
before installation, before installation, or the first time or the first time each method is each method is
calledcalledexecutionexecution
JIT JIT CompilerCompiler
nativenativecodecode
.class file.class filebytecodebytecode
metadatametadatasource source codecode compilercompiler
Nov 6, 2014compare.ppt
3
console commands for compiling Java and C#.NET
> java hello
hello.java
hello.class
javac
1001111010001110Java bytecode
hello.cs
hello.exe
csc
1001111010001110 Common Intermediate Language (CIL)
> hello.exe
these run in differentvirtual machines
assembly
Nov 6, 2014compare.ppt
4
.NET platform components
Microsoft operating systems since Win98Microsoft operating systems since Win98
Common Language Runtime (CLR)virtual machine (like Java)
framework class libraries
Data and XML
web services automation Windows Designer
VB C++ C#
ASP.NET, IIS
J# Python …compilers
Microsoft .NETFramework
Microsoft VisualStudio .NET
download freeSoftware DevelopmentKit (SDK)
free download
Nov 6, 2014compare.ppt
5
Java platform components
Unix, Linux, Max OS X, WindowsUnix, Linux, Max OS X, Windows
Java Runtime Environement (JRE)virtual machine
Java API’s
Data and XML
web services automation beans, remoting, servers
Java JRuby
Java Server Pages and servlets
JPython …compilers
JRE and JDK
download freeSoftware DevelopmentKit (SDK)
free download
various open sourceand proprietary players
Nov 6, 2014compare.ppt
6
who implements Java runtimes? Sun Microsystems
• Java HotSpot Virtual Machine for Windows, Linux, Unix
Hewlett-Packard• Java runtime for HP-UX, OpenVMS, Tru64, Reliant(Tandem) UNIX)
IBM • Java runtime for MVS, AIX, OS/400, z/OS
Apple Computer • MacOS Runtime for Java (MRJ)
• J2SE built-in on Mac OS X• includes JDK (compilers)
BEA Systems • JRockit (for their web server)
Nov 6, 2014compare.ppt
7
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
Nov 6, 2014compare.ppt
9
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
Nov 6, 2014compare.ppt
10
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
Nov 6, 2014compare.ppt
12
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?
Nov 6, 2014compare.ppt
13
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) 5b) 15c) 25d) 35
Nov 6, 2014compare.ppt
14
Windows versions which can run the .NET framework
1. Windows 982. Windows 98 Second Edition3. Windows 2000 Professional with SP44. Windows 2000 Server with SP45. Windows 2000 Advanced Server with SP46. Windows 2000 Datacenter Server with SP47. Windows XP Professional with SP28. Windows XP Home Edition with SP29. Windows XP Media Center Edition 2002 with SP210. Windows XP Media Center Edition 2004 with SP211. Windows XP Media Center Edition 200512. Windows XP Tablet PC Edition with SP213. Windows XP Starter Edition14. Microsoft Windows Millennium Edition15. Microsoft Windows Server™ 2003 Standard Edition16. Windows Server 2003 Enterprise Edition17. Windows Server 2003 Datacenter Edition18. Windows Server 2003 Web Edition19. Windows Server 2003 R2, Standard Edition20. Windows Server 2003 R2, Enterprise Edition21. Windows Server 2003 R2, Datacenter Edition
1. Windows XP Professional x64 Edition2. Windows Server 2003, Standard x64 Edition3. Windows Server 2003, Enterprise x64 Edition4. Windows Server 2003, Datacenter x64
Edition5. Windows Server 2003 R2, Standard x64
Edition6. Windows Server 2003 R2, Enterprise x64
Edition7. Windows Server 2003 R2, Datacenter x64
Edition8. Windows Server 2003 with SP1, Enterprise
Edition for Itanium-based Systems9. Windows Server 2003 with SP1, Datacenter
Edition for Itanium-based Systems10. Windows Server 2003 R2, Enterprise Edition
for Itanium-based Systems11. Windows Server 2003 R2, Datacenter Edition
for Itanium-based Systems12. Microsoft Windows Mobile™ for Pocket PC13. Windows Mobile for Smartphone14. Microsoft Windows CE
• NOTE: does not include Vista
Nov 6, 2014compare.ppt
15
Windows versions that can not run the .NET framework v2.0
1. Windows 95
2. Windows NT® Server
3. Windows NT Workstation
4. Windows Server 2003, Enterprise Edition for Itanium-based Systems
5. Windows Server 2003, Datacenter Edition for Itanium-based Systems
Nov 6, 2014compare.ppt
17
who are the big web server and database marketplace players?
• Sun• IBM• BEA• SAP• Oracle
• Microsoft
Nov 6, 2014compare.ppt
18
world wide web development
• Java servlets• Java Server Pages (JSP)
• Beans• CORBA (binary)
• XML web services (SOA)
• .NET handlers• Active Server Pages (ASP.NET)
• .NET DLL’s and .NET custom controls• COM (binary)
• XML Web services (SOA)
Nov 6, 2014compare.ppt
19
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)
Nov 6, 2014compare.ppt
20
what we just covered
1. simple programs
1. overview of platforms
1. why did Sun do it?
1. why did Microsoft do it?
1. Service Oriented Architecture – the peacemaker?
Top Related