synapseindia java and .net development

15
compare.ppt 1 Platform Comparison Java and .NET

Upload: synapseindiappsdevelopment

Post on 22-Aug-2015

64 views

Category:

Technology


3 download

TRANSCRIPT

compare.ppt 1

Platform Comparison

Java and .NET

Nov 6, 2014 compare.ppt 2

Java and .NET

• 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 platforms have been competing vigorously on the

desktop• but especially in the area of server technology

• many developers become expert on one platform• few have time to learn both

• the schism of understanding the two platforms widens• due to misinformation and disinformation 

• what are the strengths and issues for each platform?

Nov 6, 2014 compare.ppt 3

2008 forecast for market share of OS by platform: (2q 06)

Windows 40% Unix 29% Linux 15% Others 16%

forecast market share of OS unit sales: (05)

in 2002 in 2003 in 2007 Windows 45% 59% 59% Linux 20% 24% 33% Unix 16% 10% 5% Others 19% 7% 3%

market share of server shipments by platform in 2005:

Windows 65.6% Linux 20.0% Unix 9.5% NetWare 4.2% Others 0.7%

FROM: InfoTech Trends http://www.infotechtrends.com/report from 2Q 2006, accessed on 4/8/2007

Nov 6, 2014 compare.ppt 4

main sections

1. simple programs

2. overview of platforms

3. why did Sun do it?

1. why did Microsoft do it?

1. Service Oriented Architecture – the peacemaker?

Nov 6, 2014 compare.ppt 5

1 simple programs

Nov 6, 2014 compare.ppt 6

// Javapublic class Hello { public static void main(String[] args) { System.out.println("Hello world in Java"); }}

// C#namespace Hello { public class Hello {

static void Main(string[] args) { System.Console.WriteLine ("Hello world in C#");

System.Console.ReadLine(); }

}}

‘ VBModule HelloWorld

Sub MainSystem.Console.WriteLine(“Hello World in VB.NET”)

System.Console.ReadLine()End Sub

End Module

console programs

Nov 6, 2014 compare.ppt 7

how much work is it to get this?

Nov 6, 2014 compare.ppt 8

mininal window

import java.awt.*;import javax.swing.*;

public class Hello extends JFrame implements Runnable

{

public static void main(String[] args) { SwingUtilities.invokeLater(new Hello()); } public void run() { this.setSize(new Dimension(200,200)); this.setTitle("Hello in Java"); this.setVisible(true); }}

using System.Windows.Forms;namespace TinyWindowApp{ public class HelloForm : Form { static void Main() { Application.Run(new HelloForm()); }

public HelloForm() { ClientSize = new System.Drawing.Size(200, 200); Text = "Hello in C#"; }

}}

Nov 6, 2014 compare.ppt 9

2 overview of platforms

Nov 6, 2014 compare.ppt 10

identical types of runtime environments

•J2SE (Standard) runtime•desktop applications

•J2EE (Enterprise) runtime•web applications

•J2ME (Micro) runtime•runtime for gadgets

C# or VB.NET with VS Expressdesktop application

IIS with VS Express Webweb applications

.NET compact frameworkruntime for gadgets

Nov 6, 2014 compare.ppt 11

Java platform - .NET platform

• Java Virtual Machine (JVM)aka Java Runtime Environment (JRE)

• Linux, Windows, Mac and Unix• download from Sun

• JIT compiler and libraries

• Java Development Kit (JDK)• Java compiler and utilities

• Java bytecode

• integrated development env. (IDE)• Eclipse (free - IBM)• Netbeans (free - Sun)

• application servers• Tomcat• Glassfish (Sun)• BEA Weblogic• IBM Websphere

• Microsoft .NET Framework 2.0 aka .NET common language runtime (CLR)

• all versions of Windows (40+)• download from Microsoft

• JIT compiler and libraries

• NET framework 2.0 SDK• C# and VB.NET compilers and utilities

• Common Intermediate Language (CIL)

• integrated development env. (IDE)• Visual Studio Express (free - Microsoft)

• application servers• Microsoft Internet Information Server (IIS)

FREE

NOT

Nov 6, 2014 compare.ppt 12

features 1

•virtual machine•platforms (all major OS’s)•spec•implementations

•libraries•languages

•Java•Jython•Groovy

•web servers (many vendors)•platforms (Unix, Linux)•scalability•cost

•web capabilities•servlet•JSP•JSF

virtual machineplatforms (all versions of Windows)specimplementations

librarieslanguages

C#, VB.NET, J# from Microsoftmany others from third parties (Haskell, Lisp, Python, COBOL, Fortran, etc.)

web servers (just one!)platforms (most Windows)scalabilitycost

web capabilitieshandlerASP (.NET)(forgot equivalent name)

Nov 6, 2014 compare.ppt 13

features 2

•native code calling•components

•beans•environments

•applet (in browser)•servlet (in server)•Web Start

•installs from web•caches on user’s PC

•deployment•.jar•.war•.ear•.class•complex, painful learning curve that differs for each web server, container, and IDE

•automated via ANT•XML, like make on Unix

native code callingcomponents

.DLL

environmentsActiveX (in browser)handler (in server)Smart Client

installs from webcaches on user’s PC

deployment.exe (on file system).exe (in GAC).dll (on file system)all builds and web installation is automatically handled by Visual Studio (Microsoft’s IDE)

Nov 6, 2014 compare.ppt 14

features 3

•databases•JDBC

•CORBA•binary object remoting

•XML•via 3rd-party add-ons until Java 6

•IDE’s•Eclipse, with 1000’s of plugins•NetBeans (from Sun) – also free

•service oriented architecture (SOA)•annotations appearing•web services WS-I

•supported but difficult (3rd party)•new partial automation in Java 6 and latest NetBeans IDE

•I haven’t evaluated these yet

databasesODBC

COMbinary object remoting

XMLexcellent support early one

IDE’sfree versions of Visual Studiosome third party IDE’s

service oriented architecture (SOA)annotationsweb services WS-I

superbly automated by Visual Studion since 2005

Nov 6, 2014 compare.ppt 15

the JRE and .NET runtimes include lots of libraries

• programs can call a huge body of pre-written code

• these reusable components are called the Class Libraries• in Java, sometimes they are also called packages or Java API’s• in .NET, they tend to be called the framework class libraries

• the libraries are designed to be used identically• in Java, regardless of the underlying operating system• in .NET, regardless of the underlying version of Windows

OR which language is being used