emily's picture
From emily rss RSS  subscribe Subscribe

Comparing .NET and Java  



NET
The .NET Framework
Java
Java application servers
Products include:
IBM WebSphere Application Server
BEA WebLogic Application Server
Sun iPlanet Application Server
Oracle Application Server
Many others

 

 
 
Tags:  .NET  Java  Framework  Application  Server 
Views:  23862
Downloads:  157
Published:  August 16, 2007
 
1
download

Share plick with friends Share
save to favorite
Report Abuse Report Abuse
 
Related Plicks
Java Programming India

Java Programming India

From: annaharris
Views: 59 Comments: 0

 
Hire Java Developers

Hire Java Developers

From: SteveSmith405
Views: 301 Comments: 0
Get hiring Java programmer services from Offshore-outsourcing-Company-India.com. Hire Java programmer, hire Java application developer, hire Java web developer, hire J2EE programmers, hire J2EE developers, hire JSP developers, hire JSP programmer, h (more)

 
Hire Java Programmer

Hire Java Programmer

From: AliciaRodricks
Views: 67 Comments: 0
Hire Java Programmer or java specialist for java programming. Our Hire J2EE Programmer service comes at affordable rates.
 
Platform Comparison Java and .NET

Platform Comparison Java and .NET

From: emily
Views: 6324 Comments: 1
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 platfo (more)

 
See all 
 
More from this user
Java One 2005 Technical

Java One 2005 Technical

From: emily
Views: 3053
Comments: 0

NSDI - Poland

NSDI - Poland

From: emily
Views: 2090
Comments: 0

Welcome to the Minnesota SharePoint User Group

Welcome to the Minnesota SharePoint User Group

From: emily
Views: 6045
Comments: 0

Java One 2002 Overview

Java One 2002 Overview

From: emily
Views: 2107
Comments: 0

SQL Server 2005

SQL Server 2005

From: emily
Views: 3795
Comments: 1

CATPDG Quick Start Demo

CATPDG Quick Start Demo

From: emily
Views: 1326
Comments: 0

See all 
 
 
 URL:          AddThis Social Bookmark Button
Embed Thin Player: (fits in most blogs)
Embed Full Player :
 
 

Name

Email (will NOT be shown to other users)

 

 
 
Comments: (watch)
plicker rathika.k.p (2 years ago)
Please accept to downloading of sloides
 
 
Notes:
 
Slide 1: Comparing .NET and Java David Chappell Chappell & Associates www.DavidChappell.com David@DavidChappell.com
Slide 2: What is .NET?    It’s a vision – A new platform for the digital era It’s a brand – One applied to many things It’s a set of products and technologies – A concrete set of software
Slide 3: .NET Technologies     The .NET Framework – With support for XML Web services and more Visual Studio.NET – Supporting Visual Basic.NET, C#, C++, and more .NET My Services The .NET Enterprise Servers – – – – BizTalk Server 2000 SQL Server 2000 Commerce Server 2000 More
Slide 4: Application Platforms Today Browser Apps GUI Services Web Services Apps Transaction Services Web Scripting Local Apps Data Access Other Apps More Standard Library Runtime Environment Operating System
Slide 5: The .NET Framework Browser Apps Windows Forms Web Services Apps Enterprise Services ASP.NET Local Apps ADO.NET Other Apps More .NET Framework Class Library Common Language Runtime Windows
Slide 6: The Competition: The Java Environment Browser Apps Swing Web Services Apps Enterprise JavaBeans JavaServer Pages Local Apps JDBC Other Apps More Standard Java Packages Java Virtual Machine (VM) Windows, Solaris, Linux, others
Slide 7: Application Platforms: Some History 1996 Microsoft Windows DNA - MTS (now COM+) - ASP - ADO 1998 2001 .NET Framework - CLR - C#, VB.NET - Next generation of COM+, ASP, ADO - Web svcs/.NET My Services Java Java - Java language - Java VM - J2SE J2EE - EJB - JSP - JDBC
Slide 8: .NET and Java: Application Platforms   .NET – The .NET Framework Java – Java application servers – Products include: • IBM WebSphere Application Server • BEA WebLogic Application Server • Sun iPlanet Application Server • Oracle Application Server • Many others
Slide 9: Inside a .NET Framework Application   Every .NET Framework application relies on the CLR The CLR provides: – A common set of data types – An intermediate language generated from all CLR-based programming languages – A common mechanism for packaging compiled code – More  Software that uses the CLR is called managed code
Slide 10: Data Types in the CLR   The CLR defines the Common Type System (CTS) – All languages built on the CLR use the CTS Types are divided into two categories – Value types: • Relatively simple types • Allocated on the stack – Reference types: • More complex types • Allocated on the heap • Destroyed through garbage collection
Slide 11: Illustrating the CTS Object Class Interface Array String Delegate Others Reference Types Byte Char ValueType Int16 Int32 Int64 Decimal Boolean UInt16 UInt32 UInt64 Structure Others Single Double Enum Value Types
Slide 12: Compiling and Executing Managed Code Compilation Source Code Language Compiler Microsoft Intermediate Language (MSIL) The first time each method is called Native Code Execution JIT Compiler
Slide 13: .NET and Java: Runtime Environments  .NET Framework – Intermediate language is MSIL – Provides JIT compilation • There is no interpreter in the CLR  Java – Intermediate language is bytecode – Original design targeted interpretation – Java VMs with JIT compilation are now also used
Slide 14: Compilation in the .NET Environment Class X … Class Y … Class Z … Source Code Compiler (C#, VB.NET, etc.) MSIL Code for Class X MSIL Code for Class Y MSIL Code for Class Z Metadata for Classes X, Y and Z DLL or EXE
Slide 15: The Structure of a .NET Framework Application App Domain Class X Method 1 Method 2 Method 3 Assembly Class Y Method 1 Method 2 Method 3 Method 4 Class Z Method 1 Method 2 Metadata for Classes X, Y and Z Stack Garbage Collector Heap Loader JIT Compiler Common Language Runtime
Slide 16: Languages in .NET   All .NET languages are built on the CLR – All have much in common Visual Studio.NET supports: – – – – C# Visual Basic.NET C++ JScript  Other languages will also be available
Slide 17: .NET and Java: Programming Languages  A simple-minded view is “C# vs. Java” The true story is more complex 
Slide 18: An Interface and Class in C# public interface ICalc { int add(int x, int y); int subtract(int x, int y); } public class Calculator : ICalc { int add(int x, int y) { return x + y; } int subtract(int x, int y) { return x – y; } }
Slide 19: An Interface and Class in Java public interface ICalc { int add(int x, int y); int subtract(int x, int y); } public class Calculator implements ICalc { int add(int x, int y) { return x + y; } int subtract(int x, int y) { return x – y; } }
Slide 20: A Simple Comparison:Similarities  Similarities: – C-derived syntax – Object-oriented – Single implementation inheritance, multiple interface inheritance – Built-in immutable String type – More
Slide 21: A Simple Comparison: Differences:  C# adds: – Attributes – Properties – Direct memory access • In “unsafe” code – More
Slide 22: C#  A new language designed expressly for the .NET Framework – Syntax based on C/C++  Built on the CLR, with – Support for the CTS: • Classes • Inheritance • Method overloading • Much more  Has only a couple of small things that aren’t in VB.NET
Slide 23: A C# Example (1) // A C# example interface IMath { int Factorial(int f); double SquareRoot(double s); }
Slide 24: A C# Example (2) class Compute : IMath { public int Factorial(int f) { int i; int result = 1; for (i=2; i<=f; i++) result = result * i; return result; }
Slide 25: A C# Example (3) public double SquareRoot(double s) { return System.Math.Sqrt(s); } }
Slide 26: A C# Example (4) class DisplayValues { static void Main() { Compute c = new Compute(); int v; v = 5; System.Console.WriteLine( "{0} factorial: {1}",v, c.Factorial(v)); System.Console.WriteLine( "Square root of {0}: {1:f4}", v, c.SquareRoot(v)); } }
Slide 27: VB.NET  Redesigned from the ground up for the CLR, with: – Full support for the CTS – All other CLR features • Classes • Inheritance • Method overloading • Much more  It’s functionally very much like C#
Slide 28: A VB.NET Example (1) ‘ A VB.NET example Module DisplayValues Interface IMath Function Factorial(ByVal F As Integer) As Integer Function SquareRoot(ByVal S As Double) As Double End Interface
Slide 29: A VB.NET Example (2) Class Compute Implements IMath Function Factorial(ByVal F As Integer) As Integer Implements IMath.Factorial Dim I As Integer Dim Result As Integer = 1 For I = 2 To F Result = Result * I Next Return Result End Function
Slide 30: A VB.NET Example (3) Function SquareRoot(ByVal S As Double) As Double Implements IMath.SquareRoot Return System.Math.Sqrt(S) End Function End Class
Slide 31: A VB.NET Example (4) Sub Main() Dim C As Compute = New Compute() Dim V As Integer V=5 System.Console.WriteLine( "{0} factorial: {1}", V, C.Factorial(V)) System.Console.WriteLine( "Square root of {0}: {1:f4}", V, C.SquareRoot(V)) End Sub End Module
Slide 32: C++  C++ with Managed Extensions can be used to create .NET applications – Extends the base language  Managed C++ provides: – Garbage collection – Built-in support for interfaces, properties, and events – Access to all other CLR features  C++ can still create native binaries if desired – All other Visual Studio.NET languages produce only MSIL
Slide 33: Introducing the .NET Framework Class Library     Accessible from any language targeting the CLR Written in C# Organized into namespaces – All of which are below the System namespace Contains: – – – – ASP.NET ADO.NET Windows Forms Much, much more
Slide 34: A Small Part of the System Namespace System … Int32, String, … UI … Web Services … Data Windows Forms EnterpriseServices XML XmlDocument, … ServicedComponent, … … Connection, DataSet, …
Slide 35: .NET vs. Java: Standard Libraries  .NET Framework class library – Defined by Microsoft – Somewhat Windows-oriented – Organized into a hierarchy of namespaces  J2SE, J2EE – Defined by Sun and the Java Community Process – Not bound to any operating system – Defined as packages and interfaces
Slide 36: Conclusion  The .NET Framework includes: – The CLR • Supporting multiple programming languages – The .NET Framework class library   Both .NET and Java will survive – Which is a good thing .NET is the future of application development on Windows
Slide 37: About the Speaker David Chappell is Principal of Chappell & Associates in San Francisco, California. David has been the keynote speaker for conferences in the U.S., Europe, Latin America, and the Middle East, and he’s also delivered keynotes at many in-house events. His popular seminars have been attended by tens of thousands of developers and decision makers in more than two dozen countries, and his appearances have been covered in print and online publications in the U.S., England, Israel, China, and India. David’s books on enterprise software technologies have been translated into ten languages and used in courses at MIT, ETH Zurich, and other schools. He is Series Editor for AddisonWesley’s Independent Technology Guides, and his most recent book, Understanding .NET, was published in this series in early 2002. More than 100 of David’s articles have appeared in various publications, and he currently writes a regular column for Application Development Trends magazine. In his consulting practice, David works with a diverse group of companies each year, with Compaq, Microsoft, and Stanford University among his recent clients. He has also met with and advised a broad range of organizations including Deutsche Bank, Singapore Airlines, the Industrial and Commercial Bank of China, and the Israeli Air Force. David holds a B.S. in Economics and an M.S. in Computer Science, both from the University of Wisconsin-Madison.

   
Time on Slide Time on Plick
Slides per Visit Slide Views Views by Location