SlideShare a Scribd company logo
1 of 36
VS.
Abd El-Rahman Hosny Alaa Attyea M.
Agenda
- Previous State of Affairs.
- Introduction to Java
• Compilers vs. Interpreters.
• Platform-Dependency.
• Hybrid Compiler-Interpreter.
• Java Components (JDK).
• JIT Solution.
- The .NET Solution
• CLR, CTS and CLS.
• Base Class Library.
• .NET Sons.
- What’s Next?!
 Punched Cards
- Piece of paper, that contains digital information.
- Information is represented by the presence or absence of holes
in predefined positions.
Previous State of Affairs ..
Previous State of Affairs ..
 Assembly Programming
- More readable for programmers.
- Consists of machine instructions.
- Each computer architecture has its own assembly commands.
- Reduced Instruction Set Computing (RISC).
- Complex Instruction Set Computing (CISC).
- Using assembler: assembly code => executable machine code.
- However, still a low-level programming language.
- High-level assembler for assembly languages that have some
high-level programming features.
Previous State of Affairs ..
Previous State of Affairs ..
 C/Windows API
- To develop software for Windows operating systems, we use
C programming language with the Windows application
programming interface (API).
- Large number of applications already created with this
approach.
- However …
Manual memory management.
Ugly pointer arithmetic.
Spaghetti code (thousands of functions & data types).
Previous State of Affairs ..
 C++/MFC
- Object-oriented layer on top of C.
- Benefits of OOP (Encapsulation, Inheritance, Polymorphism)
- Microsoft Foundation Classes (MFC) are set of C++ classes
that facilitate building Windows applications.
- MFC hade the underlying Windows API and provide classes,
macros and code generation tools (wizards).
- However …
Backward compatibility with C makes it prone to the same
problems (memory management, pointers, constructs).
Previous State of Affairs ..
 Visual Basic 6.0
- Programmer is now able to build complex user interfaces and
code libraries.
- Can access databases easily.
- Hide Windows API by using code wizards, VB data types,
classes and VB-specific functions.
- However …
Not fully OO (rather it’s object-based).
No is-a relationship (No inheritance).
No Multi-threaded applications (actually we can use lower
level APIs.
Previous State of Affairs ..
 COM
- Stands for Component Object Model.
- Microsoft’s previous application development framework.
- “If you build your types in accordance with the rules of COM,
you end up with a block of reusable binary code”.
- Language-Independent.
- ATL ( Active Template Library) provides a set of C++ classes,
templates & macros.
- However … Complex Data Type representation
The Move ...
What is a program & how it runs ?!
Source code and native bits:
- Source code a series of related commands of specific programming languages.
- Actually source code is not what runs on our machines.
- Machines knows only it’s native language (0s&1s).
- Source code must be translated in some way to the machine native language.
Compilers Vs interpreters :
- Compilers and interpreters and some software that acts as
a translator between you (high level language) and the machine (low level
language).
- Actually compilers and interpreters are totally different in the ways how
they treat your code.
- Let’s take a look about how they are working.
What is interpreter ?!
- Interpreters doesn’t behave like compilers.
- It do not translate any programming commands, it takes the code and
executes it line by line.
- Examples for interpreted languages PHP, haskell, aslo shell command in
linux are interpreted.
Platform dependent problem:
- As there are different computer architectures there must exist different
compilers to translate the code.
- Here w have the platform dependent problem.
- However … There another solution for that problem called, hybrid compiler-
interpreter.
- In this case first there will be intermediate code, which will run over the
interpreter and we’ll get the result.
Hybrid Compiler-interpreter:
Java solution and the power of Java:
- Java has the same solution about that issue.
- After we have written our source code, when we compile it using the javac
command, it will generate the intermediate code or what is called byte code.
- This will be at the form of (.class) file.
- JRE can be responsible for running and executing the .class file over the
machine.
Java components:
- The first step to write a java program and run it is to set up something called
JDK (Java Development Kit).
- This includes three main component for java
• JRE (JVM is a part of it).
• Java compiler (javac).
• Java debugger.
- With the help of these component you can run your code wherever and whatever
the architecture or platform of your machine.
- After the programmer have written the source code, he’ll use the javac to
compile the (.java file)
- Then the javac will create an intermediate code that is known as (.class file)
or byte code.
- This byte code can run over any JVM regardless of the machine architecture
or platform.
How the Java Program Runs ?
- It is a set of dynamically loadable libraries that java application uses at run time.
Java Class Library
JCL serves three purposes within the Java Platform:
- They provide the programmer a well-known set of useful facilities.
- Provides an abstract interface to tasks that would normally depend heavily on
the hardware and operating system, such as network access and file access.
- Some underlying platforms may not support all of the features a Java
application expects. In these cases, the library implementation can either
emulate those features or provide a consistent way to check for the presence of
a specific feature.
 JIT:
- Java uses different ways to generate machine the machine code.
- There is a way to produce efficient machine code called JIT (Just In Time
compilation).
- JIT compilers promise to improve the performance of Java applications.
- Rather than letting the JVM run bytecode, a JIT compiler translates code into
the host machine’s native language.
- Thus, applications get the performance enhancement of compiled code while
maintaining Java’s portability.
Java Garbage collector:
- Objects are created in the heap.
- Garbage collector looks for those objects that are not referencing and
memory location and reclaim the heap from those objects.
- Garbage Collection in Java is carried by a daemon thread called Garbage
Collector.
- Interoperability with existing source code.
- Support for many programming language.
- Common run-time engine shared by all .NET-aware languages.
- Complete and total language integration.
- Comprehensive base class libraries.
- No COM.
- Simplified deployment model.
The .NET Solution
.NET Building Blocks
CLR
Common Language
Runtime
CTS
Common Type System
CLS
Common Language
Specification
 CTS (Common Type System)
- CTS Specification fully describes all possible data types and programming
constructs supported by the run-time.
- CTS specifies how these entities can interact with each other and how they are
represented in the .NET metadata format.
- Some .NET language might not support every feature defined by the CTS.
 CLS (Common Language Specification)
- CLS is a set of rules that describes, in detail, the minimal and complete set
of features a given .NET-aware compiler must support to produce code that
can be hosted by the CLR, while at the same time can be accessed in a
uniform manner by all languages that the .NET platform support.
- CLS is a subset of the full functionality of CTS.
 CLR (Common Language Runtime)
- The CLR locate, load and manage .NET types on your behalf.
- Memory Management (Garbage Collector).
- Application Hosting.
- Handling Threads.
- Security Checks.
 CLR (Common Language Runtime) .. cont.
- When an assembly is referenced for use, mscore.dll is loaded automatically, which
loads the required assembly in turn.
(MS Common Object Runtime Execution Engine).
- Creating the required custom types.
- The key assembly is the mscore.dll, which contains a large number of types, that
encapsulate a wide variety of common programming tasks as well as the core data
types used by all .NET languages.
- In addition to CLR and CTS/CLS specifications, the .NET platform provides a base
class library that is available to all .NET programming languages
Base Class Library
- CIL: the same as Java bytecode, it’ not compiled into platform specific instructions
until absolutely necessary.
- You can view the CIL code of any assembly using either:
ildasm.exe or using Reflector.
- Metadata
describes, in detail, the characteristics of every type within the
binary.
- Manifest:
The current version of the assembly.
Culture information (localizing string & image resources).
List of externally referenced assemblies that are required for
the proper execution of the program.
 Single-File assembly vs. Multi-File assembly.
- Applications running in a managed environment tend to require more system resources
than similar applications that access machine resources more directly
- Managed byte code can often be easier to reverse-engineer than native code.
- The .NET Framework currently does not provide support for calling Streaming SIMD
Extensions (SSE) via managed code.
- While the standards that make up .NET are inherently cross-platform, Microsoft's full
implementation of .NET is only supported on Windows.
Criticism
AbdelrahmanHosny.com
AlaaAttya.wordpress.com
A Comparison of .NET Framework vs. Java Virtual Machine

More Related Content

What's hot

EVALUTION OF COMPUTER LANGAGES
EVALUTION OF COMPUTER LANGAGESEVALUTION OF COMPUTER LANGAGES
EVALUTION OF COMPUTER LANGAGESNoorHameed6
 
Language translator
Language translatorLanguage translator
Language translatorSumitSumit26
 
It's Time for Silverlight @iRajLal
It's Time for Silverlight @iRajLalIt's Time for Silverlight @iRajLal
It's Time for Silverlight @iRajLalRaj Lal
 
Keil tutorial
Keil tutorialKeil tutorial
Keil tutorialanishgoel
 
iOS Development, with Swift and XCode
iOS Development, with Swift and XCodeiOS Development, with Swift and XCode
iOS Development, with Swift and XCodeWan Leung Wong
 
Top 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksTop 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksAlbiorix Technology
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web DevelopmentYash Sati
 
React vs Angular
React vs Angular React vs Angular
React vs Angular Appinventiv
 
STL - Map, Set, Vector
STL - Map, Set, VectorSTL - Map, Set, Vector
STL - Map, Set, VectorShikhar Garg
 
Why programming is important
Why programming is importantWhy programming is important
Why programming is importantAman Kumar
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLJayant Surana
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer langkapil078
 
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Ajinkya Saswade
 
Full Stack Web Developer (MERN STACK Developer.pptx
Full Stack Web Developer (MERN STACK Developer.pptxFull Stack Web Developer (MERN STACK Developer.pptx
Full Stack Web Developer (MERN STACK Developer.pptxRamudgarYadav
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web developmentbethanygfair
 

What's hot (20)

EVALUTION OF COMPUTER LANGAGES
EVALUTION OF COMPUTER LANGAGESEVALUTION OF COMPUTER LANGAGES
EVALUTION OF COMPUTER LANGAGES
 
React native
React nativeReact native
React native
 
Ionic Framework
Ionic FrameworkIonic Framework
Ionic Framework
 
Language translator
Language translatorLanguage translator
Language translator
 
It's Time for Silverlight @iRajLal
It's Time for Silverlight @iRajLalIt's Time for Silverlight @iRajLal
It's Time for Silverlight @iRajLal
 
Keil tutorial
Keil tutorialKeil tutorial
Keil tutorial
 
Core Java Training report
Core Java Training reportCore Java Training report
Core Java Training report
 
Keil software
Keil softwareKeil software
Keil software
 
iOS Development, with Swift and XCode
iOS Development, with Swift and XCodeiOS Development, with Swift and XCode
iOS Development, with Swift and XCode
 
Top 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksTop 11 Mobile App Development Frameworks
Top 11 Mobile App Development Frameworks
 
Front-End Web Development
Front-End Web DevelopmentFront-End Web Development
Front-End Web Development
 
React vs Angular
React vs Angular React vs Angular
React vs Angular
 
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React
 
STL - Map, Set, Vector
STL - Map, Set, VectorSTL - Map, Set, Vector
STL - Map, Set, Vector
 
Why programming is important
Why programming is importantWhy programming is important
Why programming is important
 
Web development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQLWeb development using javaScript, React js, Node js, HTML, CSS and SQL
Web development using javaScript, React js, Node js, HTML, CSS and SQL
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
 
Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI Android jetpack compose | Declarative UI
Android jetpack compose | Declarative UI
 
Full Stack Web Developer (MERN STACK Developer.pptx
Full Stack Web Developer (MERN STACK Developer.pptxFull Stack Web Developer (MERN STACK Developer.pptx
Full Stack Web Developer (MERN STACK Developer.pptx
 
Ppt of web development
Ppt of web developmentPpt of web development
Ppt of web development
 

Similar to A Comparison of .NET Framework vs. Java Virtual Machine

3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET FrameworkAbdelrahman Hosny
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .netpinky singh
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3aminmesbahi
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net frameworkFaisal Aziz
 
ASP.NET 01 - Introduction
ASP.NET 01 - IntroductionASP.NET 01 - Introduction
ASP.NET 01 - IntroductionRandy Connolly
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnishRajnish Kalla
 
Chapter 1 introduction to .net
Chapter 1 introduction to .netChapter 1 introduction to .net
Chapter 1 introduction to .netRahul Bhoge
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)DrUjwala1
 
election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...dnnindia
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet frameworkNitu Pandey
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1Sisir Ghosh
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsQUONTRASOLUTIONS
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxGaytriMate
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsQuontra Solutions
 

Similar to A Comparison of .NET Framework vs. Java Virtual Machine (20)

3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework3.0 Introduction to .NET Framework
3.0 Introduction to .NET Framework
 
.Net overview|Introduction Of .net
.Net overview|Introduction Of .net.Net overview|Introduction Of .net
.Net overview|Introduction Of .net
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 
Inside .net framework
Inside .net frameworkInside .net framework
Inside .net framework
 
ASP.NET 01 - Introduction
ASP.NET 01 - IntroductionASP.NET 01 - Introduction
ASP.NET 01 - Introduction
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 
.Net overviewrajnish
.Net overviewrajnish.Net overviewrajnish
.Net overviewrajnish
 
Tutorial c#
Tutorial c#Tutorial c#
Tutorial c#
 
Chapter 1 introduction to .net
Chapter 1 introduction to .netChapter 1 introduction to .net
Chapter 1 introduction to .net
 
Session2 (3)
Session2 (3)Session2 (3)
Session2 (3)
 
NETOverview1ppt.pptx
NETOverview1ppt.pptxNETOverview1ppt.pptx
NETOverview1ppt.pptx
 
NETOverview1.ppt
NETOverview1.pptNETOverview1.ppt
NETOverview1.ppt
 
election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...election survey comapny in delhi|election survey company|election survey comp...
election survey comapny in delhi|election survey company|election survey comp...
 
VB IMPORTANT QUESTION
VB IMPORTANT QUESTIONVB IMPORTANT QUESTION
VB IMPORTANT QUESTION
 
Dotnet framework
Dotnet frameworkDotnet framework
Dotnet framework
 
ASP.NET Session 1
ASP.NET Session 1ASP.NET Session 1
ASP.NET Session 1
 
Introduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutionsIntroduction to .NET by QuontraSolutions
Introduction to .NET by QuontraSolutions
 
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptxLearn the java basic programming with example and syntaxchapter1-part-b.pptx
Learn the java basic programming with example and syntaxchapter1-part-b.pptx
 
Introduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutionsIntroduction to .net FrameWork by QuontraSolutions
Introduction to .net FrameWork by QuontraSolutions
 
Dot net
Dot netDot net
Dot net
 

More from Abdelrahman Hosny

Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...
Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...
Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...Abdelrahman Hosny
 
iPhone Architecture - Review
iPhone Architecture - ReviewiPhone Architecture - Review
iPhone Architecture - ReviewAbdelrahman Hosny
 
Implementing a Caching Scheme for Media Streaming in a Proxy Server
Implementing a Caching Scheme for Media Streaming in a Proxy ServerImplementing a Caching Scheme for Media Streaming in a Proxy Server
Implementing a Caching Scheme for Media Streaming in a Proxy ServerAbdelrahman Hosny
 
Microsoft SharePoint 2010 Overview
Microsoft SharePoint 2010 OverviewMicrosoft SharePoint 2010 Overview
Microsoft SharePoint 2010 OverviewAbdelrahman Hosny
 
1.0 Introduction to Hardware Computer Architecture
1.0 Introduction to Hardware Computer Architecture1.0 Introduction to Hardware Computer Architecture
1.0 Introduction to Hardware Computer ArchitectureAbdelrahman Hosny
 
2.0 Introduction to Computer Science and Programming
2.0 Introduction to Computer Science and Programming2.0 Introduction to Computer Science and Programming
2.0 Introduction to Computer Science and ProgrammingAbdelrahman Hosny
 

More from Abdelrahman Hosny (16)

Teaching Philosophy
Teaching PhilosophyTeaching Philosophy
Teaching Philosophy
 
Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...
Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...
Confirming dna replication origins of saccharomyces cerevisiae a deep learnin...
 
A Study On Deep Learning
A Study On Deep LearningA Study On Deep Learning
A Study On Deep Learning
 
My Teaching Philosophy
My Teaching PhilosophyMy Teaching Philosophy
My Teaching Philosophy
 
iPhone Architecture - Review
iPhone Architecture - ReviewiPhone Architecture - Review
iPhone Architecture - Review
 
Implementing a Caching Scheme for Media Streaming in a Proxy Server
Implementing a Caching Scheme for Media Streaming in a Proxy ServerImplementing a Caching Scheme for Media Streaming in a Proxy Server
Implementing a Caching Scheme for Media Streaming in a Proxy Server
 
A Servant Leader
A Servant LeaderA Servant Leader
A Servant Leader
 
Microsoft SharePoint 2010 Overview
Microsoft SharePoint 2010 OverviewMicrosoft SharePoint 2010 Overview
Microsoft SharePoint 2010 Overview
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Office365
Office365Office365
Office365
 
The Silent Presentation
The Silent PresentationThe Silent Presentation
The Silent Presentation
 
Team Building
Team BuildingTeam Building
Team Building
 
Introduction to Marketing
Introduction to MarketingIntroduction to Marketing
Introduction to Marketing
 
Interviewing
InterviewingInterviewing
Interviewing
 
1.0 Introduction to Hardware Computer Architecture
1.0 Introduction to Hardware Computer Architecture1.0 Introduction to Hardware Computer Architecture
1.0 Introduction to Hardware Computer Architecture
 
2.0 Introduction to Computer Science and Programming
2.0 Introduction to Computer Science and Programming2.0 Introduction to Computer Science and Programming
2.0 Introduction to Computer Science and Programming
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 

Recently uploaded (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 

A Comparison of .NET Framework vs. Java Virtual Machine

  • 1. VS. Abd El-Rahman Hosny Alaa Attyea M.
  • 2. Agenda - Previous State of Affairs. - Introduction to Java • Compilers vs. Interpreters. • Platform-Dependency. • Hybrid Compiler-Interpreter. • Java Components (JDK). • JIT Solution. - The .NET Solution • CLR, CTS and CLS. • Base Class Library. • .NET Sons. - What’s Next?!
  • 3.  Punched Cards - Piece of paper, that contains digital information. - Information is represented by the presence or absence of holes in predefined positions. Previous State of Affairs ..
  • 4. Previous State of Affairs ..  Assembly Programming - More readable for programmers. - Consists of machine instructions. - Each computer architecture has its own assembly commands. - Reduced Instruction Set Computing (RISC). - Complex Instruction Set Computing (CISC). - Using assembler: assembly code => executable machine code. - However, still a low-level programming language. - High-level assembler for assembly languages that have some high-level programming features.
  • 5. Previous State of Affairs ..
  • 6. Previous State of Affairs ..  C/Windows API - To develop software for Windows operating systems, we use C programming language with the Windows application programming interface (API). - Large number of applications already created with this approach. - However … Manual memory management. Ugly pointer arithmetic. Spaghetti code (thousands of functions & data types).
  • 7. Previous State of Affairs ..  C++/MFC - Object-oriented layer on top of C. - Benefits of OOP (Encapsulation, Inheritance, Polymorphism) - Microsoft Foundation Classes (MFC) are set of C++ classes that facilitate building Windows applications. - MFC hade the underlying Windows API and provide classes, macros and code generation tools (wizards). - However … Backward compatibility with C makes it prone to the same problems (memory management, pointers, constructs).
  • 8. Previous State of Affairs ..  Visual Basic 6.0 - Programmer is now able to build complex user interfaces and code libraries. - Can access databases easily. - Hide Windows API by using code wizards, VB data types, classes and VB-specific functions. - However … Not fully OO (rather it’s object-based). No is-a relationship (No inheritance). No Multi-threaded applications (actually we can use lower level APIs.
  • 9. Previous State of Affairs ..  COM - Stands for Component Object Model. - Microsoft’s previous application development framework. - “If you build your types in accordance with the rules of COM, you end up with a block of reusable binary code”. - Language-Independent. - ATL ( Active Template Library) provides a set of C++ classes, templates & macros. - However … Complex Data Type representation
  • 11. What is a program & how it runs ?! Source code and native bits: - Source code a series of related commands of specific programming languages. - Actually source code is not what runs on our machines. - Machines knows only it’s native language (0s&1s). - Source code must be translated in some way to the machine native language.
  • 12. Compilers Vs interpreters : - Compilers and interpreters and some software that acts as a translator between you (high level language) and the machine (low level language). - Actually compilers and interpreters are totally different in the ways how they treat your code. - Let’s take a look about how they are working.
  • 13. What is interpreter ?! - Interpreters doesn’t behave like compilers. - It do not translate any programming commands, it takes the code and executes it line by line. - Examples for interpreted languages PHP, haskell, aslo shell command in linux are interpreted.
  • 14. Platform dependent problem: - As there are different computer architectures there must exist different compilers to translate the code. - Here w have the platform dependent problem. - However … There another solution for that problem called, hybrid compiler- interpreter. - In this case first there will be intermediate code, which will run over the interpreter and we’ll get the result.
  • 16. Java solution and the power of Java: - Java has the same solution about that issue. - After we have written our source code, when we compile it using the javac command, it will generate the intermediate code or what is called byte code. - This will be at the form of (.class) file. - JRE can be responsible for running and executing the .class file over the machine.
  • 17. Java components: - The first step to write a java program and run it is to set up something called JDK (Java Development Kit). - This includes three main component for java • JRE (JVM is a part of it). • Java compiler (javac). • Java debugger. - With the help of these component you can run your code wherever and whatever the architecture or platform of your machine.
  • 18. - After the programmer have written the source code, he’ll use the javac to compile the (.java file) - Then the javac will create an intermediate code that is known as (.class file) or byte code. - This byte code can run over any JVM regardless of the machine architecture or platform. How the Java Program Runs ?
  • 19. - It is a set of dynamically loadable libraries that java application uses at run time. Java Class Library
  • 20. JCL serves three purposes within the Java Platform: - They provide the programmer a well-known set of useful facilities. - Provides an abstract interface to tasks that would normally depend heavily on the hardware and operating system, such as network access and file access. - Some underlying platforms may not support all of the features a Java application expects. In these cases, the library implementation can either emulate those features or provide a consistent way to check for the presence of a specific feature.
  • 21.  JIT: - Java uses different ways to generate machine the machine code. - There is a way to produce efficient machine code called JIT (Just In Time compilation). - JIT compilers promise to improve the performance of Java applications. - Rather than letting the JVM run bytecode, a JIT compiler translates code into the host machine’s native language. - Thus, applications get the performance enhancement of compiled code while maintaining Java’s portability.
  • 22. Java Garbage collector: - Objects are created in the heap. - Garbage collector looks for those objects that are not referencing and memory location and reclaim the heap from those objects. - Garbage Collection in Java is carried by a daemon thread called Garbage Collector.
  • 23. - Interoperability with existing source code. - Support for many programming language. - Common run-time engine shared by all .NET-aware languages. - Complete and total language integration. - Comprehensive base class libraries. - No COM. - Simplified deployment model. The .NET Solution
  • 24. .NET Building Blocks CLR Common Language Runtime CTS Common Type System CLS Common Language Specification
  • 25.  CTS (Common Type System) - CTS Specification fully describes all possible data types and programming constructs supported by the run-time. - CTS specifies how these entities can interact with each other and how they are represented in the .NET metadata format. - Some .NET language might not support every feature defined by the CTS.
  • 26.  CLS (Common Language Specification) - CLS is a set of rules that describes, in detail, the minimal and complete set of features a given .NET-aware compiler must support to produce code that can be hosted by the CLR, while at the same time can be accessed in a uniform manner by all languages that the .NET platform support. - CLS is a subset of the full functionality of CTS.
  • 27.  CLR (Common Language Runtime) - The CLR locate, load and manage .NET types on your behalf. - Memory Management (Garbage Collector). - Application Hosting. - Handling Threads. - Security Checks.
  • 28.  CLR (Common Language Runtime) .. cont. - When an assembly is referenced for use, mscore.dll is loaded automatically, which loads the required assembly in turn. (MS Common Object Runtime Execution Engine). - Creating the required custom types. - The key assembly is the mscore.dll, which contains a large number of types, that encapsulate a wide variety of common programming tasks as well as the core data types used by all .NET languages.
  • 29. - In addition to CLR and CTS/CLS specifications, the .NET platform provides a base class library that is available to all .NET programming languages Base Class Library
  • 30.
  • 31. - CIL: the same as Java bytecode, it’ not compiled into platform specific instructions until absolutely necessary. - You can view the CIL code of any assembly using either: ildasm.exe or using Reflector.
  • 32. - Metadata describes, in detail, the characteristics of every type within the binary. - Manifest: The current version of the assembly. Culture information (localizing string & image resources). List of externally referenced assemblies that are required for the proper execution of the program.  Single-File assembly vs. Multi-File assembly.
  • 33.
  • 34. - Applications running in a managed environment tend to require more system resources than similar applications that access machine resources more directly - Managed byte code can often be easier to reverse-engineer than native code. - The .NET Framework currently does not provide support for calling Streaming SIMD Extensions (SSE) via managed code. - While the standards that make up .NET are inherently cross-platform, Microsoft's full implementation of .NET is only supported on Windows. Criticism