java programming language

16
1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language

Upload: rogan-bray

Post on 30-Dec-2015

58 views

Category:

Documents


1 download

DESCRIPTION

3. Java Programming Language. Previously. What is a programming language? Set of grammatical rules for instructing a computer to perform specific tasks Languages by implementation Machine language; Assembly language Compiled languages; C, C++ Interpreted languages; Java - PowerPoint PPT Presentation

TRANSCRIPT

1

G54PRG ProgrammingLecture

1

Amadeo Ascó Adam Moore

G54PRG ProgrammingLecture

1

Amadeo Ascó

3

Java Programming Language

2Amadeo Ascó , Adam Moore

Previously• What is a programming language?– Set of grammatical rules for instructing a computer to

perform specific tasks• Languages by implementation– Machine language; Assembly language– Compiled languages; C, C++– Interpreted languages; Java

• Language by paradigm• Simple initial design– Divide project into smaller and simpler subprojects– Pseudocode

3Amadeo Ascó , Adam Moore

Overview

• What’s Java?• Some history• Characteristics• Components• Type of programs• Development

4Amadeo Ascó , Adam Moore

What’s Java?

Java is a programming language • Created by Sun Microsystems • Often used for web programming – Initially marketed as a web development system – Java is not only for web programming

• General purpose programming language • Very similar to C++ – simplified!

5Amadeo Ascó , Adam Moore

What Else?

NOT JAVASCRIPT!!!!

6Amadeo Ascó , Adam Moore

Some history

• James Gosling - Sun– Started 1991, Launched 1995– "write once, run anywhere" WORA

• There were five primary goals :– It should be "simple, object oriented, and familiar".– It should be "robust and secure".– It should be "architecture neutral and portable".– It should execute with "high performance".– It should be "interpreted, threaded, and dynamic".

• NOT Licensed to Microsoft - $20M

7Amadeo Ascó , Adam Moore

Current 'Flavours'

• Java SE– Standard Edition

• Java EE– Enterprise Edition– Servlets

• Java ME– Micro Edition– Optimised for mobile devices

8Amadeo Ascó , Adam Moore

Characteristics

• Object Oriented• Concurrent• Interpreted• Modular– There's a library for (nearly) everything!

• Internationalization - utf8 native• Memory Management• Error Handling

9Amadeo Ascó , Adam Moore

Components

Hardware

Operating System

Virtual Machine

Byte Code

10Amadeo Ascó , Adam Moore

Development / Distribution

• JDK– Development Toolkit– Compiler– Header Files

• JRE– Runtime Environment– Just what's needed to execute bytecode

11Amadeo Ascó , Adam Moore

Type of programs

• Applications– Has an entry point; static main method– Runable in a computer with JVM

JVM

OS

Application

Storage

Library (y)Library (y)Library (y)

12Amadeo Ascó , Adam Moore

Type of programs

• Applets– GUI applications– Applet is a program written in the Java that can be

included in an HTML page

Browser

Library (y)Library (y)

OS

Applet

Web Server

Storage

Library (y)

13Amadeo Ascó , Adam Moore

• Servlets– Applications that run on the server side, so has an

entry point– Normally used to extend functionality of a Web

Type of programs

ServletWeb

Server

Storage

JVM

OS

LibraryLibrary

14Amadeo Ascó , Adam Moore

• Libraries– Re-usable code– Cannot be run by itself; doesn’t have an entry

point

Type of programs

JVM

OS

Application

Storage

Library (y)Library (y)Library (y)

15Amadeo Ascó , Adam Moore

Development

• Java Development Kit (JDK)http://www.oracle.com/technetwork/java/javase/

downloads/index.html

• Eclipse Development EnvironmentPenumbra is in

http://wiki.eclipse.org/Eclipse_IDE_for_Education

• Documentation for Java librarieshttp://download.oracle.com/javase/6/docs/api/

• Tutorialhttp://download.oracle.com/javase/tutorial/index.html

16Amadeo Ascó , Adam Moore

Eclipse

• Rapid Application Development• Very Powerful• Most commonly used RAD today• For (just about) all Languages• Can be very complex• So - we are using Penumbra– Special Educational Edition