1-1 Copyright (c) 1999 N. Afshartous Introduction to Java™

Slides:



Advertisements
Similar presentations
1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Advertisements

1 G54PRG Programming Lecture 1 Amadeo Ascó Adam Moore G54PRG Programming Lecture 1 Amadeo Ascó 3 Java Programming Language.
In Review JAVA C++ GUIs - Windows Webopedia.com.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Introduction to Java Kiyeol Ryu Java Programming Language.
JDK, Jan Pettersen Nytun - HiA 1 The Java Programming Environment: The programmer write source code with a text editor. The programmer write source code.
INTERNET DATABASE Chapter 9. u Basics of Internet, Web, HTTP, HTML, URLs. u Advantages and disadvantages of Web as a database platform. u Approaches for.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
COMP 519: Web Programming Fall 2006 Acknowledgment: The slides are by Dr. David Reed.Dr. David Reed Java Overview  Design goals & features  platform.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Java Programming, 3e Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Introduction to Web Based Application. Web-based application TCP/IP (HTTP) protocol Using WWW technology & software Distributed environment.
For more Lectures and Notes Visit
Java Server Team 8. Overview What is a Java Server? History Architecture Advantages Disadvantages Current Technologies Conclusion.
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
L EC. 01: J AVA FUNDAMENTALS Fall Java Programming.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
LESSON 1 INTRODUCTION Compiled By: Edwin O. Okech [Tutor, Amoud University] JAVA PROGRAMMING.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
1 CSC 551: Web Programming Spring 2004 Java Overview  Design goals & features  platform independence, portable, secure, simple, object-oriented, … 
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
BASIC JAVA PROGRAMMING TUTORIAL. History  James Gosling and Sun Microsystems  Oak  Java, May 20, 1995, Sun World  Hot Java –The first Java-enabled.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Java Programming, 2E Introductory Concepts and Techniques Chapter 1 An Introduction to Java and Program Design.
Chapter 1 Coding Introduction.
Applets & Servlets.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Introduction to ASP.NET. Prehistory of ASP.NET Original Internet – text based WWW – static graphical content  HTML (client-side) Need for interactive.
Introduction to Internet Programming (Web Based Application)
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
Chapter 2: A Brief History Object- Oriented Programming Presentation slides for Object-Oriented Programming by Yahya Garout KFUPM Information & Computer.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
What is Java? Object Oriented Programming Language Sun Microsystems “Write Once, Run Everywhere” Bytecode and Virtual Machine Java Platform (Java VM and.
Java – in context Main Features From Sun Microsystems ‘White Paper’
JavaScript 101 Introduction to Programming. Topics What is programming? The common elements found in most programming languages Introduction to JavaScript.
Introduction to the World Wide Web & Internet CIS 101.
Introduction to Programming 1 1 2Introduction to Java.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 15: Java Basics Fundamentals of Web Programming.
Introduction to JAVA Programming
Java Programming, 3e Concepts and Techniques Chapter 1 Section 56 – An Introduction to Java.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Fundamental of Java Programming (630002) Unit – 1 Introduction to Java.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
Chapter 1 Coding Introduction.
CX Introduction to Web Programming
Applications Active Web Documents Active Web Documents.
Chapter 1 Introduction to Computers, Programs, and Java
Introduction Enosis Learning.
Introduction Enosis Learning.
Java™ Intermediate.
CSC 551: Web Programming Spring 2004
(Computer fundamental Lab)
CSC 551: Web Programming Spring 2004
Java History, Editions, Version Features
Outcome of the Lecture Upon completion of this lecture you will be able to understand Fundamentals and Characteristics of Java Language Basic Terminology.
Presentation transcript:

1-1 Copyright (c) 1999 N. Afshartous Introduction to Java™

1-2 Copyright (c) 1999 N. Afshartous Version 3.0 Copyright (c) 1997,1998,1999 N Afshartous - All rights reserved. This product and related documentation are protected by copyright and distributed under licenses restricting its use, copying, distribution, decompilation. No part of this product or related documentation may be reproduced in any form by any means without prior written authorization. Trademarks: Java, JDK, Java Development Kit are trademarks of Sun Microsystems. Mosaic, NCSA Mosaic are proprietary trademarks of the University of Illinois. Disclaimer:Although great care has been taken to ensure the accuracy and quality of these materials, all material is provided without any warranty whatsoever, including, but not limited to, the implied warranties of merchantability or fitness for a particular purpose.

1-3 Copyright (c) 1999 N. Afshartous About the author: Niki Afshartous has been teaching corporate technical training courses for five years. Previously he was at the MIT Lincoln Laboratory as a systems programmer. He holds a Ph.D. degree in computer science from New York University where his research focus was on concurrent programming languages. Dedication: For Jenny Acknowledgement: Thanks to Maki Takeuchi for carefully proof reading earlier versions of this course. Comments, questions ? Don’t hesitate to contact the author. WWW:

1-4 Copyright (c) 1999 N. Afshartous Contents 1.Introduction 2.Types and Variables 3.Statements and Control Flow 4.Reading Input 5.Classes and Objects 6.Arrays 7.Methods 8.Scope and Lifetime 9.Utility classes 10.Introduction to Object-Oriented Analysis and Design

1-5 Copyright (c) 1999 N. Afshartous Chapter 1: Introduction After this chapter you will be able to: -Describe the history of the Web -Identify the impact of Java™ on the Web -List the design goals of the Java™ team

1-6 Copyright (c) 1999 N. Afshartous History of WWW (Early nineties) Web was invented by Tim Berners-Lee who applied hypertext to make the internet user-friendly (1994) Most people were using the non- commercial web-browser Mosaic. Mosaic was partially developed by Marc Andressen for $6.85/hr as an undergrad on work-study. Later Andressen co-founded Netscape (1995) Microsoft holds a major press conference to announce an Internet strategy

1-7 Copyright (c) 1999 N. Afshartous Architecture of WWW Web server client Browser HTMLImages CGI scripts Client HTML - Hypertext Markup Language CGI - Common Gateway Interface WWW limitation: only server side execution using CGI.

1-8 Copyright (c) 1999 N. Afshartous Enter Java™ Sun introduced Java™ at the Sun World conference on May 25, 1995 Java™ makes client-side execution on the Web possible !

1-9 Copyright (c) 1999 N. Afshartous Architecture of WWW + Java™ Web serverclient HTML Java Bytecode CGI scripts Client A Web page can be downloaded along with Java™ bytecode The bytecode is executed by a virtual machine embedded inside the web-browser Images Browser + Virtual Machine

1-10 Copyright (c) 1999 N. Afshartous Javascript Netscape subsequently released Javascript (originally called Livescript) The Java™ name was licensed from Sun Micro Javascript also facilitates client-side execution on the web Javascript is essentially an extension of HTML

1-11 Copyright (c) 1999 N. Afshartous Architecture of WWW + Javascript Web serverclient HTML + Javascript CGI scripts Client A Web page can contain both HTML and Javascript The Javascript code is executed by an interpreter embedded inside the web-browser Images Browser + Javascript Interpreter

1-12 Copyright (c) 1999 N. Afshartous Java™ VS Javascript Created by Sun Micro Can be used stand-alone or with the web Source compiled into bytecode Object-oriented Has facilities to support large applications Variables and expressions are statically typed Has threads for concurrent programming Fast exec but slow download Created by Netscape Tied to the web Source directly interpreted Object-based (no inheritance) No facilities for large applications Variables and expressions are dynamically typed No threads Slow exec but fast download

1-13 Copyright (c) 1999 N. Afshartous Summary of Java™ and Javascript Java™ is a powerful general purpose programming language –web server –web client –stand-alone Javascript facilitates making web pages more dynamic –web client –Common application is validating user entered form data

1-14 Copyright (c) 1999 N. Afshartous Java™ Design Goals Simple Object-oriented Distributed Robust and secure Architecture neutral and portable Interpreted High-performance Multithreaded Dynamic

1-15 Copyright (c) 1999 N. Afshartous Simple Java™ designed as close as possible to C++ to look familiar Java™ omits confusing and complex features of C++ –operator overloading –multiple inheritance –extensive automatic coercion's Java™ incorporates: – garbage collection TM

1-16 Copyright (c) 1999 N. Afshartous Object-oriented Focuses design on data and the operations on the data Helps to provide reusable software components

1-17 Copyright (c) 1999 N. Afshartous Distributed Java™ has library support for TCP/IP protocols –http –ftp Java™ applications can access remote objects by using URLs JDBC (Java Database Connectivity) kit allows access to remote databases

1-18 Copyright (c) 1999 N. Afshartous Architecture neutral Java™ compiler generates an architecture neutral object file format (bytecode) Bytecode can be executed on any platform where there is a virtual machine

1-19 Copyright (c) 1999 N. Afshartous Robust and secure Compile-time type checking Run-time checking (i.e. array bounds) Hard to write viruses in Java™ (no pointers) Bytecode is verified before it is run

1-20 Copyright (c) 1999 N. Afshartous Interpreted Java™ bytecode executed by an interpreter (virtual machine VM) VM can be stand-alone or embedded inside a web browser Other interpreted languages –scripts –Lisp –SmallTalk –Basic (Visual Basic)

1-21 Copyright (c) 1999 N. Afshartous Interpreted cont, bytecode (.class) source (.java) interpreter (virtual machine) compiler

1-22 Copyright (c) 1999 N. Afshartous High-performance Interpreting bytecode is more efficient than interpreting a source file (script). Just-in-time compilation (JIT) makes Java™ even faster. A virtual machine with JIT will translate bytecode into native executable format.

1-23 Copyright (c) 1999 N. Afshartous Multithreaded Java™ has threads and primitives for synchronization. Having threads facilitates writing programs that incorporate animation.

1-24 Copyright (c) 1999 N. Afshartous Dynamic Java™ was designed to adapt to an evolving environment. New code can be dynamically linked into a running system.

1-25 Copyright (c) 1999 N. Afshartous Free ! JDK™ - Java Development Kit available from Sun Microsystems ( JDK™ consists of: –javac:compiler –java:virtual machine (bytecode interpreter) –javadoc: a program that generates HTML doc from source code comments –other miscellaneous programs

1-26 Copyright (c) 1999 N. Afshartous Terms Applet - A Java™ program that executes inside a web browser Servlet - A Java™ program that executes on a web server Javabean - a Java™ object which may be graphically manipulated

1-27 Copyright (c) 1999 N. Afshartous References The Java Language: An Overview (a.k.a. “The Java™ Whitepaper”) at