SynapseIndia Dotnet Development Dotnet Runtime
Just in Time (JIT) compilers in JRE (JVM) and .NET runtimes compilation source code
compiler
execution native code
Nov 6, 2014
JIT Compiler
compare.ppt
bytecode .class file metadata
before installation, or the first time each method is called
2
console commands for compiling Java and C#.NET
hello.cs
hello.java
csc
javac
hello.exe
hello.class 1001111010001110 Java bytecode
1001111010001110 Common Intermediate Language (CIL)
> java hello
> hello.exe
assembly
these run in different virtual machines Nov 6, 2014
compare.ppt
3
.NET platform components
VB
C++
C#
web services automation
J#
Python
‌
Windows Designer
ASP.NET, IIS
download free Software Development Kit (SDK)
compilers
Microsoft Visual Studio .NET
Data and XML framework class libraries
Microsoft .NET Framework
Common Language Runtime (CLR) virtual machine (like Java) Microsoft operating systems since Win98
Nov 6, 2014
compare.ppt
free downloa d
4
Java platform components
Java JRuby
JPython
web services automation
‌
beans, remoting, servers
Java Server Pages and servlets
download free Software Development Kit (SDK)
compilers
various open source and proprietary players
Data and XML JRE and JDK
Java API’s Java Runtime Environement (JRE) virtual machine Unix, Linux, Max OS X, Windows
Nov 6, 2014
compare.ppt
free downloa d
5
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, 2014
compare.ppt
6
• • • • • • • • • •
jargon checklist
metadata bytecode JVM JRE • what is an assembly? • an .exe or .dll file compiled by a .NET compiler JDK • what is “metadata”? J2SE • the self-describing information inside a .NET assembly or Java .class file J2ME • What is CIL? (formerly MSIL) • Common Intermediate Language (inside a .NET assembly) J2EE IDE • What is the CLR? • Common Language Runtime that executes CIL code GUI
Nov 6, 2014
•
what is managed code?
•
what is native code (or unmanaged code)?
•
•
software that runs in the CLR
software than can run on Windows without the CLR
compare.ppt
7
3
Nov 6, 2014
why did Sun do it?
compare.ppt
8
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 recompile and discipline Nov 6, 2014
compare.ppt
9
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 compare.ppt
Nov 6, 2014
10
4
Nov 6, 2014
why did Microsoft do it?
compare.ppt
11
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, 2014
compare.ppt
12
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 Nov 6, 2014
compare.ppt
13
Windows versions which can run the .NET framework
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21.
Windows 98 Windows 98 Second Edition Windows 2000 Professional with SP4 Windows 2000 Server with SP4 Windows 2000 Advanced Server with SP4 Windows 2000 Datacenter Server with SP4 Windows XP Professional with SP2 Windows XP Home Edition with SP2 Windows XP Media Center Edition 2002 with SP2 Windows XP Media Center Edition 2004 with SP2 Windows XP Media Center Edition 2005 Windows XP Tablet PC Edition with SP2 Windows XP Starter Edition Microsoft Windows Millennium Edition Microsoft Windows Server™ 2003 Standard Edition Windows Server 2003 Enterprise Edition Windows Server 2003 Datacenter Edition Windows Server 2003 Web Edition Windows Server 2003 R2, Standard Edition Windows Server 2003 R2, Enterprise Edition Windows Server 2003 R2, Datacenter Edition
• Nov 6, 2014
1. 2. 3. 4. 5. 6. 7. 8. 9.
10. 11. 12. 13. 14.
Windows XP Professional x64 Edition Windows Server 2003, Standard x64 Edition Windows Server 2003, Enterprise x64 Edition Windows Server 2003, Datacenter x64 Edition Windows Server 2003 R2, Standard x64 Edition Windows Server 2003 R2, Enterprise x64 Edition Windows Server 2003 R2, Datacenter x64 Edition Windows Server 2003 with SP1, Enterprise Edition for Itanium-based Systems Windows Server 2003 with SP1, Datacenter Edition for Itanium-based Systems Windows Server 2003 R2, Enterprise Edition for Itanium-based Systems Windows Server 2003 R2, Datacenter Edition for Itanium-based Systems Microsoft Windows Mobile™ for Pocket PC Windows Mobile for Smartphone Microsoft Windows CE
NOTE: does not include Vista compare.ppt
14
Windows versions that can not run the .NET framework v2.0 1. 2. 3. 4. 5.
Windows 95 Windows NT速 Server Windows NT Workstation Windows Server 2003, Enterprise Edition for Itanium-based Systems Windows Server 2003, Datacenter Edition for Itanium-based Systems
Nov 6, 2014
compare.ppt
15
5
Nov 6, 2014
Service Oriented Architecture – the peacemaker?
compare.ppt
16
who are the big web server and database marketplace players? • • • • •
Sun IBM BEA SAP Oracle
• Microsoft
Nov 6, 2014
compare.ppt
17
world wide web development • Java servlets
• .NET handlers
• Active Server Pages (ASP.NET)
• Java Server Pages (JSP) • .NET DLL’s and .NET custom controls
• Beans
• CORBA (binary)
• COM (binary)
• XML Web services (SOA)
• XML web services (SOA) Nov 6, 2014
compare.ppt
18
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, 2014
compare.ppt
19
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?
Nov 6, 2014
compare.ppt
20
the end of this PowerPoint file
Hooray!
Nov 6, 2014
compare.ppt
21