Client-Server applications Introduction to Java Applets Client-server architectures Why do Applets exist? What can an Applet do?

Slides:



Advertisements
Similar presentations
1 Applets Programming Enabling Application Delivery Via the Web.
Advertisements

Introduction to Java 2 Programming Lecture 10 Applets.
20 Maart 2006ISS - Internet Applications Part 21 Internet Applications part 2 René de Vries Based on slides by M.L. Liu and Marko van Eekelen.
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.
Introduction to the World of Computers
DT228/3 Web Development WWW and Client server model.
ACTIVE X By Ethan Huang. OUTLINE What is ActiveX? Component of ActiveX Why ActiveX? ActiveX and Java Security Issue.
Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 16 Applets.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
1 Applets Chapter 1 To understand:  why applets are used to extend the capabilities of Web pages  how an applet is executed and know about the restrictions.
Chapter 14 Applets. 2 Knowledge Goals Understand the differing roles of applications and applets Understand how a browser operates Understand the role.
Applets. What is an Applet?  According to Sun “An applet is a small program that is intended not to be run on its own, but rather to be embedded inside.
Object Oriented Programming (OOP) LAB # 5 TA. Maram & TA. Mubaraka TA. Kholood & TA. Aamal.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
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.
Client/Server Architectures
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Applets  The Applet Class  The HTML Tag F Passing Parameters to Applets.
CS413: Java Programming language Applications Applets
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
19-Sep-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic : Applets Maj Joel Young
Java Lecture 16: Dolores Zage. WWW n Was a method for distributing passive information n added forms and image maps n interaction was only a new way to.
Introduction to Internet Programming (Web Based Application)
JAVA APPLETS By: Ms. Humaira Siddiqui. Java and the Internet Java is considered to be a language well suited to be used in the internet. In contrast with.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Chapter 17: Applets, Images, and Sound. Objectives Learn about applets Write an HTML document to host an applet Use the init() method Work with JApplet.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
Assorted Topics Introduction AJAX What is it? Why is it important? Examples of live applications Cloud Computing What is it? Why.
Introduction to Java Programming. Introduction Course Objectives Organization of the Book.
Java Applets. 2 Introduction to Java Applet Programs Applications are ___________________ programs –executed with Java interpreter Applet is a small program.
Java Applets 1. What is an applet? An applet is a small Java program that is typically embedded in a Web page and can be run using the applet viewer or.
CSC 205 – Java Programming II Applet. Types of Java Programs Applets Applications Console applications Graphics applications Applications are stand-alone.
Program that runs in appletviewer (test utility for applets) Web browser (IE, Communicator) Executes when HTML (Hypertext Markup Language) document containing.
CS 7: Introduction to Computer Programming Java and the Internet Sections ,2.1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Chapter 6 Applets and HTML  Overview  HTML tags for Applets  Applet Life Cycle  Applet Class  JAR files.
Java the UML Way version Only to be used in connection with the book "Java the UML Way", by Else Lervik and.
CSE S. Tanimoto Java Introduction 1 Java A Programming Language for Web-based Computing with Graphics.
RUBRIC IP1 Ruben Botero Web Design III. The different approaches to accessing data in a database through client-side scripting languages. – On the client.
J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program Design, Second Edition Second Edition D.S. Malik D.S. Malik.
Chapter 14 Applets and Advanced GUI  The Applet Class  The HTML Tag F Passing Parameters to Applets F Conversions Between Applications and Applets F.
Intro to Applets. Applet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML.
F Drag and Drop Controls Display and Builder (Synoptic Display) Timofei Bolshakov, Andrey Petrov Fermilab Accelerator Controls Department March 26, 2007.
Jan 2001C.Watters1 World Wide Web and E-Commerce Client Side Processing.
Java -- A very Hot Object- Oriented Language Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung Institute of.
Fall 2000C.Watters1 World Wide Web and E-Commerce Clients & Client Side Processing.
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
Java for networking Module Introduction Data Communications Communication architecture Application.
1 Applets are small applications that are accessed on an Internet server, transported over the internet, automatically installed and run as a part of web.
1 Applets. 2 Design of Applets 3 Sun wrote Java to be executable within a hosting application browser The applications are applets. An applet is downloaded.
Applets, Images, and Audio Chapter 14 CSCI CSCI 1302 – Applets, Images, and Audio2 Outline Introduction The Applet Class –The init Method –The start.
Introduction to Programming. The Programming Process Create/Edit Program Compile Program Execute Program Compile Errors?Run-Time Errors? Source Program.
CSI 3125, Preliminaries, page 1 Applet. CSI 3125, Preliminaries, page 2 Applet An applet is a Java program that runs in a Web browser. An applet can be.
1 Applets Programming. Introduction Java programs are divided into two main categories, applets and applications. An application is an ordinary Java program.
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.
Applications Active Web Documents Active Web Documents.
Chapter 1 Introduction to Computers, Programs, and Java
30 Java Applets.
Distributed Computing, M. L. Liu
Distributed Computing, M. L. Liu
Java Applets.
Introduction to Applet, Application and JDK
Java applets 1/3/2019.
About Multimedia Files
G6DICP - Lecture 27 Java Applets.
APPLET PROGRAMMING.
Presentation transcript:

Client-Server applications Introduction to Java Applets Client-server architectures Why do Applets exist? What can an Applet do? What are they used for? Some technical details Conclusion

Client-Server applications Simple client-server architecture Servers may provide different types of services simultaneously to many clients Clients are software entities with a network connection to the server Clients vary in their capabilities – some have very little in the way of resources and are considered “thin”

Client-Server applications Thin Client systems Clients may be “thin”, for example a simple information terminal in a library or perhaps a mobile handheld device Thin client systems assume that the bulk of the work is done at the server A thin client is little more than a screen and user- input device(s)‏

Client-Server applications Client-Server on the Web Many clients are not thin Desktop computer systems with an Internet connection may be more powerful than the server It is possible to off-load much of the computing work from the server to the client – better for scalability In such cases, the client downloads and runs an application to do work locally

Client-Server applications Java client-side solutions Java is a network-centric programming language It has a number of solutions for client-side programming Applets – limited applications that run in a browser WebStart applications – desktop applications with security restrictions that can be launched from a web page Low-level programming of completely general, unrestricted network applications

Client-Server applications Why do Applets exist? In 1995, Java became available as a network-aware programming language Applets were part of the language, designed to add complex functionality to Web pages At the time, Applets were the only way to program multimedia on a Web page! Now competes with Flash, SVG and others

Client-Server applications Why do Applets exist? Applets provide trusted, secure, portable functionality Cached Applets can be run off-line Applets allow complex calculations to be run on the client machine, including; encryption and secure communication rapid data communication interactive graphics

Client-Server applications What can an Applet do? Applets are used for lots of tasks; Online discussions and communication boards Online document editing Banking front-ends Scientific visualisation, e.g. molecule viewers Advertising (although nearly all Flash now)‏ Interactive games in 2D and 3D

Client-Server applications Technical Details Applets are written in standard Java Applets are not “complete” applications – they plug into a browser Applets can be assumed to have graphics capability Applets run in a “sandbox” security environment, giving them extremely limited access to the resources of the local machine [usually a good thing!]

Client-Server applications Technical Details To make an Applet we write a class that extends Applet (or extends Japplet, the more advanced Swing-based version)‏ Then we write code to override some of the four key methods These are init(), start(), stop() and destroy()‏ There is no public static void main(String[] args)‏

Client-Server applications Applet methods Typically we would write code to initialise the Applet in public void init()‏ When the Applet becomes visible, the browser will invoke public void start(), so this is where we “activate” the program (e.g. start an animation running)‏ If the Applet is made invisible we have public void stop() which turns off animations, sounds etc.

Client-Server applications Conclusion Clients and servers vary in their needs an capabilities Applets exist to provide rich client capability Applets can be used as portable, security-limited applications For more information, see: Wikipedia on Applets, Client-server and also Sun's Applet overviewApplet Client-serverApplet overview

Client-Server applications Practical notes You need to compile the.java files on the schedule into a.class file Need a HTML to call the.class files Applets have no main method and so cannot run on their own Two examples follow to demonstrate Free Applets out on the web but beware!

Client-Server applications HTML wrapper

Client-Server applications Examples running

Client-Server applications HTML wrapper

Client-Server applications Examples running