SynapseIndia java and net development

Page 1

Platform Comparison Java and .NET

compare.ppt

1


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

2


2008 forecast for market share of OS by platform: Windows Unix Linux Others

(2q 06)

40% 29% 15% 16%

forecast market share of OS unit sales:

in 2002 Windows 45% Linux 20% Unix 16% Others 19%

in 2003 59% 24% 10% 7%

(05)

in 2007 59% 33% 5% 3%

market share of server shipments by platform in 2005: Windows Linux Unix NetWare Others

65.6% 20.0% 9.5% 4.2% 0.7%

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

compare.ppt

3


main sections

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

4


1

Nov 6, 2014

simple programs

compare.ppt

5


console programs // Java public 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(); } } } ‘ VB Module HelloWorld Sub Main System.Console.WriteLine(“Hello World in VB.NET”) System.Console.ReadLine() End Sub End Module Nov 6, 2014

compare.ppt

6


how much work is it to get this?

Nov 6, 2014

compare.ppt

7


mininal window import java.awt.*; import javax.swing.*; public class Hello extends JFrame implements Runnable using System.Windows.Forms; { namespace TinyWindowApp { public static void main(String[] args) public class HelloForm : Form { { SwingUtilities.invokeLater(new Hello()); static void Main() } { Application.Run(new HelloForm()); public void run() } { this.setSize(new Dimension(200,200)); public HelloForm() this.setTitle("Hello in Java"); { this.setVisible(true); ClientSize = new } System.Drawing.Size(200, 200); } Text = "Hello in C#"; } } Nov 6, 2014

}

compare.ppt

8


2

Nov 6, 2014

overview of platforms

compare.ppt

9


identical types of runtime environments •J2SE (Standard) runtime

C# or VB.NET with VS Express

•J2EE (Enterprise) runtime

IIS with VS Express Web

•J2ME (Micro) runtime

.NET compact framework

•desktop applications •web applications

•runtime for gadgets

Nov 6, 2014

desktop application web applications

runtime for gadgets

compare.ppt

10


Java platform - .NET platform •

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

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

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

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

• JIT compiler and libraries

• JIT compiler and libraries

Java Development Kit (JDK)

• Java compiler and utilities • Java bytecode

Nov 6, 2014

application servers • • • •

Tomcat Glassfish (Sun) BEA Weblogic IBM Websphere

• C# and VB.NET compilers and utilities • Common Intermediate Language (CIL)

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

NET framework 2.0 SDK

integrated development env. (IDE)

application servers

FREE NOT

compare.ppt

• Visual Studio Express (free - Microsoft)

• Microsoft Internet Information Server (IIS)

11


features 1 •virtual machine

virtual machine

•libraries •languages

libraries languages

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

•Java •Jython •Groovy

platforms (all versions of Windows) spec implementations

C#, VB.NET, J# from Microsoft many others from third parties

(Haskell, Lisp, Python, COBOL, Fortran, etc.)

•web servers (many vendors)

web servers (just one!)

•web capabilities

web capabilities

•platforms (Unix, Linux) •scalability •cost •servlet •JSP •JSF

Nov 6, 2014

platforms (most Windows) scalability cost handler ASP (.NET) (forgot equivalent name)

compare.ppt

12


features 2 •native code calling •components

native code calling components

•environments

environments

•beans

.DLL

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

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

•installs from web •caches on user’s PC

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

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)

•automated via ANT •XML, like make on Unix

Nov 6, 2014

compare.ppt

13


features 3 •databases

databases

•CORBA

COM

•XML

XML

•IDE’s

IDE’s

•service oriented architecture (SOA)

service oriented architecture (SOA)

•JDBC

ODBC

•binary object remoting

binary object remoting

•via 3rd-party add-ons until Java 6 •Eclipse, with 1000’s of plugins •NetBeans (from Sun) – also free •annotations appearing •web services WS-I

excellent support early one

•supported but difficult (3rd party) •new partial automation in Java 6 and latest NetBeans IDE •I haven’t evaluated these yet

Nov 6, 2014

compare.ppt

free versions of Visual Studio some third party IDE’s annotations web services WS-I

superbly automated by Visual Studion since 2005

14


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

Nov 6, 2014

compare.ppt

15


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.