this is delicious cookie you must eat. :o~. problem domain designed to be reliable, high-performance...

16
This is delicious cookie you must eat. :O~

Upload: theodora-bradley

Post on 01-Jan-2016

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

This is delicious cookie you must eat.:O~

Page 2: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Problem DomainProblem Domain• Designed to be

Reliable, high-performance and secure

Comfortable and familiar to Java-language developers

Assist in the transition to .NET framework

• Developed solely to write software for Windows, using the .NET framework

Page 3: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Historical ContextDeveloped by Microsoft from 1998 to

2002.Named after Java / J++

# marking it as one of the .NET languages (C#, F#,…)

Recycled from earlier attempt: Visual J++

Page 4: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Historical Context: J++Windows-specific implementation of JavaJ++ programs only capable of running on

Microsoft’s special interpreter, optimized for Windows.

Sun Microsystems had originally licensed Java to Microsoft but sued over failure to fully implement Java specifications.

As part of the settlement, Microsoft ceases distribution of the interpreter.

J++ developers marooned.

Page 5: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Evolution of the LanguageRun-time libraries frozen at the JDK 1.1.4

levelJDK compatibility largely irrelevant due to coverage elsewhere by the .NET framework.

J# integrated into releases of Visual StudioAnnouncements in January 2007:

J# upgrade for 64-bit runtime support, compatibility with next version of Virtual StudioJ# being retired from future versions of Virtual Studio, with support for the existing version ending 2015

Page 6: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

New ConceptsSame syntax as javaAccess to both java API and .NET

Framework library (BCL - Base Class Library)

Cross-language capabilities method written in one language can be

overriden in another language

Page 7: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Familiar Java Syntaximport System.*;

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

Page 8: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Familiar Java Syntax cont.For Java

To Compile - javac Hello.javaTo Run - java Hello

For J#To Compile - jc Hello.java

To Run - Hello

Page 9: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Access to both java API and .NET Framework library

package ConsoleApp;

import java.io.*;

public class ReadString{      public static void main(String[] args)      {            String firstName = null;            String lastName = null;                        System.Console.WriteLine("Enter your first name: ");            BufferedReader br = new BufferedReader(new InputStreamReader(System.in));            try {

                  firstName = br.readLine();

            } catch (IOException ioe) {

                  System.out.println("IO error");                   System.exit(1);

            }             System.out.println("Enter your last name: ");            lastName = System.Console.ReadLine();             System.out.println("Hello " + firstName + " " + lastName);            System.Console.WriteLine("Hello {0} {1}", firstName, lastName);      }}

Page 10: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Cross-language capability //J# class

import System.*;public class JLanguage{     public void getMessage()     {         System.Console.WriteLine("J#");     }}

//C# classusing System;class CLanguage:JLanguage{  public static void Main()  {       CLanguage c = new CLanguage();       JLanguage j = new JLanguage();       j.getMessage();       c.getMessage();  }  public override void getMessage()  {       Console.WriteLine("C#");  }}

Page 11: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Google Search

(not all are re the language, of course)

String

J#C#

java

Google results

.4M5M64M

Page 12: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

JAVA vs. J#/.NET

Page 13: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

Advantages and Disadvantages

Page 14: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

J# offers the following features:•Generates platform-neutral code•Support for class libraries of VJ++, JDK 1.1.4•Brings cross-language capabilities into Java language•Simultaneously supports both JDK 1.1.4 and BCL (Base Class Library) of .NET Framework•Accesses platform-native resources•Generates XML documentation•Writes ASP.NET applications•Writes web services•Retains the majority of Java-like syntax and features

Page 15: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language

J#'s disadvantages:Programs can't run under the umbrella of JVMNo support for the Java Native Interface or

Remote Method InvocationNo operator overloadingMinimal support to convert binaries making

J/Direct callsAutomatic generation of proxy classes for web

servicesCannot call WebService methods using Enum

typesCannot add reference to .exe files

Page 16: This is delicious cookie you must eat. :O~. Problem Domain Designed to be Reliable, high-performance and secure Comfortable and familiar to Java-language