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:  1264
Downloads:  37
Published:  August 16, 2007
 
0
save to favorite
ask author to add audio Ask author to add audio
Share plick with friends Share
mark as inappropriate Mark as inappropriate
 
Related Plicks
Microsoft .Net vs. J2EE

Microsoft .Net vs. J2EE

From: emily
Views: 2709 Comments: 0

 
Platform Comparison Java and .NET

Platform Comparison Java and .NET

From: emily
Views: 2078 Comments: 0
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)

 
Java vs. .Net

Java vs. .Net

From: emily
Views: 2648 Comments: 0
Both multi-tiered, similar computing technologies
Both support “standards”
Both offer different tools & ways to achieve the same goal.
A lot of parallelism can be seen. (more)

 
Comparing J2EE with .NET

Comparing J2EE with .NET

From: gavi
Views: 2290 Comments: 0

 
Creating Web Applications for SAP BW and SAP Enterprise Portal with the SAP Java IDE

Creating Web Applications for SAP BW and SAP Enterprise Portal with the SAP Java IDE

From: emily
Views: 2666 Comments: 0

 
See all 
 
More from this user
Tomcat apache setting

Tomcat apache setting

From: emily
Views: 6109
Comments: 1

Building on SOA Entry Point Successes

Building on SOA Entry Point Successes

From: emily
Views: 5949
Comments: 1

NRL Business Plan 2

NRL Business Plan 2

From: emily
Views: 3435
Comments: 1

4.- Funciones. Subrutinas y procedimientos

4.- Funciones. Subrutinas y procedimientos

From: emily
Views: 20927
Comments: 1

Top 10 Pretty Words

Top 10 Pretty Words

From: emily
Views: 4682
Comments: 1

Top 10 cute  animal babies

Top 10 cute animal babies

From: emily
Views: 11579
Comments: 2

See all 
 
Place your Ad here for $2.00 a month
Sample Ad
Advertise your business on myplick.
Only $2.00 a month.
 
 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:
 
 
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
close
Please fill out the form below. You will be asked to make your payment to Myplick (Eastar Technologies) via Paypal. Your request will be processed within 24 hours after your submission.
 
Title (max 25 characters)
Link (placed on title)
Content (max 100 characters)
You have successfully submitted your ad request. Please send your payment to ericandlei@myplick.com via PAYPAL.
Ad submission failed. Please report the problem to ericandlei@myplick.com.