50 platforms

W
Shared by: G790sJJ
Categories
Tags
-
Stats
views:
0
posted:
11/10/2011
language:
English
pages:
35
Document Sample
scope of work template
							              Platform Comparison

                  Java and .NET


                   Pat Palmer
            University of Pennsylvania




10-Nov-11             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?



10-Nov-11                              compare.ppt                 2
    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

10-Nov-11                                  compare.ppt               3
                                    main sections




      1. simple programs



      2. overview of platforms


      3. why did Sun do it?



      4. why did Microsoft do it?



      5. Service Oriented Architecture – the peacemaker?



10-Nov-11                              compare.ppt         4
            1   simple programs




10-Nov-11         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


10-Nov-11                               compare.ppt                                6
            how much work is it to get this?




10-Nov-11               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()
                                                    {
     public void run()                                 Application.Run(new HelloForm());
     {                                              }
        this.setSize(new Dimension(200,200));
        this.setTitle("Hello in Java");             public HelloForm()
        this.setVisible(true);                      {
     }                                                 ClientSize = new
   }                                                      System.Drawing.Size(200, 200);
                                                           Text = "Hello in C#";
                                                       }

                                                  }
                                              }

10-Nov-11                                compare.ppt                                       8
            2   overview of platforms




10-Nov-11            compare.ppt        9
                         identical types of runtime environments


            •J2SE (Standard) runtime              •C# or VB.NET with VS Express
                •desktop applications                  •desktop application
            •J2EE (Enterprise) runtime            •IIS with VS Express Web
                •web applications                      •web applications
            •J2ME (Micro) runtime                 •.NET compact framework
                •runtime for gadgets                   •runtime for gadgets




10-Nov-11                                compare.ppt                              10
                                    Java platform - .NET platform


    • Java Virtual Machine (JVM)                        • Microsoft .NET Framework 2.0
    aka Java Runtime Environment (JRE)                  aka .NET common language runtime (CLR)
             • Linux, Windows, Mac and Unix                      • all versions of Windows (40+)
             • download from Sun                                 • download from Microsoft
                  • JIT compiler and libraries                        • JIT compiler and libraries


    •       Java Development Kit (JDK)                  •    NET framework 2.0 SDK
             • Java compiler and utilities                       • C# and VB.NET compilers and utilities
                  • Java bytecode                                     • Common Intermediate Language (CIL)


    •       integrated development env. (IDE)           •    integrated development env. (IDE)
             • Eclipse (free - IBM)                              • Visual Studio Express (free - Microsoft)
             • Netbeans (free - Sun)             FREE

    •       application servers                         •    application servers
                                                 NOT
             •   Tomcat                                          • Microsoft Internet Information Server (IIS)
             •   Glassfish (Sun)
             •   BEA Weblogic
             •   IBM Websphere



10-Nov-11                                          compare.ppt                                                   11
                                              features 1


            •virtual machine                      •virtual machine
                •platforms (all major OS’s)              •platforms (all versions of Windows)
                •spec                                    •spec
                •implementations                         •implementations
            •libraries                            •libraries
            •languages                            •languages
                •Java                                    •C#, VB.NET, J# from Microsoft
                •Jython                                  •many others from third parties
                •Groovy                                  (Haskell, Lisp, Python, COBOL, Fortran, etc.)
            •web servers (many vendors)           •web servers (just one!)
                •platforms (Unix, Linux)                 •platforms (most Windows)
                •scalability                             •scalability
                •cost                                    •cost
            •web capabilities                     •web capabilities
                •servlet                                 •handler
                •JSP                                     •ASP (.NET)
                •JSF                                     •(forgot equivalent name)


10-Nov-11                                      compare.ppt                                               12
                                             features 2


            •native code calling                       •native code calling
            •components                                •components
                •beans                                      •.DLL
            •environments                              •environments
                •applet (in browser)                        •ActiveX (in browser)
                •servlet (in server)                        •handler (in server)
                •Web Start                                  •Smart Client
                    •installs from web                          •installs from web
                    •caches on user’s PC                        •caches on user’s PC
            •deployment                                •deployment
                •.jar                                       •.exe (on file system)
                •.war                                       •.exe (in GAC)
                •.ear                                       •.dll (on file system)
                •.class                                     •all builds and web installation
                •complex, painful learning curve            is automatically handled by
                that differs for each web server,           Visual Studio (Microsoft’s IDE)
                container, and IDE
                    •automated via ANT
                         •XML, like make on Unix



10-Nov-11                                     compare.ppt                                      13
                                             features 3


     •databases                                         •databases
            •JDBC                                           •ODBC
     •CORBA                                             •COM
            •binary object remoting                         •binary object remoting
     •XML                                               •XML
            •via 3rd-party add-ons until Java 6             •excellent support early one
     •IDE’s                                             •IDE’s
            •Eclipse, with 1000’s of plugins                •free versions of Visual Studio
            •NetBeans (from Sun) – also free                •some third party IDE’s
     •service oriented architecture (SOA)               •service oriented architecture (SOA)
            •annotations appearing                          •annotations
            •web services WS-I                              •web services WS-I
                •supported but difficult (3rd party)             •superbly automated by Visual
                •new partial automation in Java 6 and            Studion since 2005
                latest NetBeans IDE
                      •I haven’t evaluated these yet




10-Nov-11                                     compare.ppt                                        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




10-Nov-11                                 compare.ppt                          15
            Just in Time (JIT) compilers in JRE (JVM) and .NET runtimes



                            compilation
              source                                bytecode
               code             compiler           .class file
                                                   metadata




                                                            before installation,
                                                             or the first time
                        execution                            each method is
                                                                  called
               native                JIT
               code                Compiler




10-Nov-11                            compare.ppt                                   16
              console commands for compiling Java and C#.NET




                   hello.java                     hello.cs

                         javac                          csc

                   hello.class                   hello.exe
            1001111010001110              1001111010001110
              Java bytecode             Common Intermediate Language (CIL)



                   > java hello                 > hello.exe     assembly


                          these run in different
                            virtual machines


10-Nov-11                         compare.ppt                                17
                               .NET platform components                download free
                                                                   Software Development
                                                                         Kit (SDK)




                                                                  compilers
            VB     C++       C#       J#    Python          …

            web services automation        Windows Designer
                                                                Microsoft Visual
                            ASP.NET, IIS                            Studio .NET


                            Data and XML
                                                                Microsoft .NET
                    framework class libraries                    Framework
              Common Language Runtime (CLR)
                 virtual machine (like Java)

             Microsoft operating systems since Win98            free download




10-Nov-11                                     compare.ppt                                 18
                               Java platform components                download free
                                                                   Software Development
                                                                         Kit (SDK)




                                                                  compilers
            Java JRuby                   JPython           …

            web services automation   beans, remoting, servers
                                                                  various open source
                Java Server Pages and servlets                    and proprietary players


                            Data and XML

                              Java API’s                         JRE and JDK

              Java Runtime Environement (JRE)
                       virtual machine

                  Unix, Linux, Max OS X, Windows                 free download




10-Nov-11                                    compare.ppt                                    19
                            who implements Java runtimes?

       Sun Microsystems
            • Java HotSpot Virtual Machine
               for Windows, Linux, Unix

       Hewlett-Packard
            • Java runtime for HP-UX, OpenVMS,
              Tru64, Reliant(Tandem) UNIX)

       IBM
            • Java runtime for MVS, AIX, OS/400, z/OS

      Apple Computer
            • MacOS Runtime for Java (MRJ)
                • J2SE built-in on Mac OS X
                • includes JDK (compilers)


      BEA Systems
            • JRockit (for their web server)




10-Nov-11                                      compare.ppt   20
                                 jargon checklist
   •    metadata
   •    bytecode
   •    JVM
   •    JRE      •   what is an assembly?
   •    JDK           •   an .exe or .dll file compiled by a .NET compiler


   •    J2SE     •   what is “metadata”?
                      •   the self-describing information inside a .NET assembly or Java
   •    J2ME              .class file

   •    J2EE     •   What is CIL? (formerly MSIL)
                      •   Common Intermediate Language (inside a .NET assembly)
   •    IDE
                 •   What is the CLR?
   •    GUI           •   Common Language Runtime that executes CIL code

                 •   what is managed code?
                      •   software that runs in the CLR

                 •   what is native code (or unmanaged code)?
                      •   software than can run on Windows without the CLR




10-Nov-11                                compare.ppt                                       21
            3   why did Sun do it?




10-Nov-11          compare.ppt       22
                      C and C++ perceived common problems



            • pointers are dangerous
               • memory leaks (failing to free memory correctly)
               • function pointers (jumping to the wrong place)
               • data pointers (pointing to the wrong place)


            • manual garbage collection is a lot of work

            • multiple inheritance (C++) can get very complicated
               • ambiguities like the ―diamond problem‖ (a.k.a. ―diamond of
                 death‖)


            • not easily portable across platforms, even with re-compile
              and discipline



10-Nov-11                                compare.ppt                          23
                          a few ways Java improved on C++


            • instead of pointers, Java has references
               • references are similar to pointers, but with protections (cannot
                 jump into illegal parts of memory)—avoids segmentation fault
                 problems
            • automatic garbage collection
               • memory is reclaimed from the heap automatically—avoids
                 memory leaks
            • single inheritance
               • avoiding the deadly diamond of death
            • encapsulation
               • all code must be in a class—intended to encourage information
                 hiding
            • array bounds checking
            • libraries
               • many common tasks already coded and available for ―reuse‖ by
                 means of inheritance
               • many interfaces (behaviors) already coded


10-Nov-11                                compare.ppt                                24
            4   why did Microsoft do it?




10-Nov-11             compare.ppt          25
                                 Microsoft’s big headache


            • prior to .NET, Microsoft had a big headache
               • Microsoft was supporting too many operating systems
               • application programming interfaces (API’s) were implemented
                 as dynamic link libraries (DLL’s) develop using C++
               • calling the Windows API was different on every operating
                 system
               • developers first had to find out exactly what kind of system the
                 program was running on
                   • and then determine if the API desired was actually installed on the
                     system


               • that doesn’t sound so bad
               • after all, there are only a few different kinds of Windows…
                   …right?




10-Nov-11                                   compare.ppt                                    26
                                 party trivia question




            • how many different versions of the Windows operating
              system existed before Vista, which had their own distinct
              mix of API’s?

            select the closest answer:

               a)   5
               b)   15
               c)   25
               d)   35




10-Nov-11                                compare.ppt                      27
              Windows versions which can run the .NET framework

   1.    Windows 98                                   22.   Windows XP Professional x64 Edition
   2.    Windows 98 Second Edition                    23.   Windows Server 2003, Standard x64
                                                            Edition
   3.    Windows 2000 Professional with SP4
                                                      24.   Windows Server 2003, Enterprise x64
   4.    Windows 2000 Server with SP4                       Edition
   5.    Windows 2000 Advanced Server with SP4        25.   Windows Server 2003, Datacenter x64
   6.    Windows 2000 Datacenter Server with SP4            Edition
   7.    Windows XP Professional with SP2             26.   Windows Server 2003 R2, Standard x64
   8.    Windows XP Home Edition with SP2                   Edition
   9.    Windows XP Media Center Edition 2002 with SP227.   Windows Server 2003 R2, Enterprise x64
   10.   Windows XP Media Center Edition 2004 with SP2      Edition
   11.   Windows XP Media Center Edition 2005         28.   Windows Server 2003 R2, Datacenter x64
                                                            Edition
   12.   Windows XP Tablet PC Edition with SP2
                                                      29.   Windows Server 2003 with SP1, Enterprise
   13.   Windows XP Starter Edition                         Edition for Itanium-based Systems
   14.   Microsoft Windows Millennium Edition         30.   Windows Server 2003 with SP1,
   15.   Microsoft Windows Server™ 2003 Standard            Datacenter Edition for Itanium-based
         Edition                                            Systems
   16.   Windows Server 2003 Enterprise Edition       31.   Windows Server 2003 R2, Enterprise
   17.   Windows Server 2003 Datacenter Edition             Edition for Itanium-based Systems
   18.   Windows Server 2003 Web Edition              32.   Windows Server 2003 R2, Datacenter
   19.   Windows Server 2003 R2, Standard Edition           Edition for Itanium-based Systems
   20.   Windows Server 2003 R2, Enterprise Edition   33.   Microsoft Windows Mobile™ for Pocket PC
   21.   Windows Server 2003 R2, Datacenter Edition   34.   Windows Mobile for Smartphone
                                                      35.   Microsoft Windows CE


                           •   NOTE: does not include Vista

10-Nov-11                                     compare.ppt                                              28
            Windows versions that can not run the .NET framework v2.0


   1.       Windows   95
   2.       Windows   NT® Server
   3.       Windows   NT Workstation
   4.       Windows   Server 2003, Enterprise Edition for Itanium-based Systems
   5.       Windows   Server 2003, Datacenter Edition for Itanium-based Systems




10-Nov-11                                 compare.ppt                             29
            5   Service Oriented Architecture – the peacemaker?




10-Nov-11                         compare.ppt                     30
            who are the big web server and database marketplace players?




              •   Sun
              •   IBM
              •   BEA
              •   SAP
              •   Oracle




              • Microsoft




10-Nov-11                             compare.ppt                          31
                            world wide web development


    • Java servlets                     • .NET handlers
            • Java Server Pages (JSP)        • Active Server Pages (ASP.NET)
    • Beans                             • .NET DLL’s and .NET custom controls
            • CORBA (binary)                 • COM (binary)



    • XML web services (SOA)            • XML Web services (SOA)




10-Nov-11                                compare.ppt                            32
                         Service Oriented Architectures (SOA)


            • web services
               • remotely located programs that use XML to make remote calls
                 and get the results
            • XML traveling over HTTP
               • it’s all plain text and goes through firewalls
               • standards are emerging
               • Jave service end points and Microsoft client endpoints can talk
                 to each other (and vice versa)




10-Nov-11                                compare.ppt                               33
                              what we just covered




      1. simple programs



      2. overview of platforms


      3. why did Sun do it?



      4. why did Microsoft do it?



      5. Service Oriented Architecture – the peacemaker?



10-Nov-11                            compare.ppt           34
            the end of this PowerPoint file




                         Hooray!




10-Nov-11             compare.ppt             35

						
Related docs
Other docs by G790sJJ
OWASP_Flyer_Sep06
Views: 0  |  Downloads: 0
4761
Views: 3  |  Downloads: 0
BSc_Syllabus
Views: 9  |  Downloads: 0
Part1 Introduction
Views: 2  |  Downloads: 0
PAIG
Views: 0  |  Downloads: 0
3046000A
Views: 148  |  Downloads: 1
UCIS_Replacement_RFP_180 08 01
Views: 0  |  Downloads: 0
TJM 20Resume
Views: 0  |  Downloads: 0
Kofax_Cross_Product_Compatibility_Matrix
Views: 6  |  Downloads: 0