Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 4 Applets Cop 2250. Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your.

Similar presentations


Presentation on theme: "Chapter 4 Applets Cop 2250. Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your."— Presentation transcript:

1 Chapter 4 Applets Cop 2250

2 Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your browser. Ubiquitous access. Applets are programs that run inside a web server.

3 Why Applets? User sends request from web browser Request is sent to web server through internet The HTML files or images files are downloaded to the browser. If the requested webpage contains applets, the code for an applet is downloaded also.

4 Why Applets? Independent from terminal. The codes are downloaded into the browser whenever you access the webpage. Advantage: Do not have to run an applet in your own computer. Disadvantage: It takes time for you to wait when the applet code is downloaded.

5 Why Applets - Example A company with a fast local area network connection. Benefit to use applets: –Use applets for the public access source, i.e., scheduling, product catalog… –Instead of rolling out for every user. –Easy for management: only update in web server, not every user.

6 Why Applets? Multiple platforms: PCs, Macintoshes, Unix Workstation, and so on. Applets are delivered by Java byte code. The computer can execute Java byte code can execute the applet, i.e., Java class file.

7 Introduction to HTML Applets are embedded in web pages. Web pages are written in HTML, one of the markup language. Using tags to format text and include images. Browser reads a webpage: interprets the code and renders the page, displaying characters, fonts, prgraphs, tables, and images.

8 Introduction to HTML Tags tell the browser how to render the text. HTML tags come in pairs consisting of opening tag and a closing tag. Each pair applies to the text between the two tags. For example: italics - … Java is an object-oriented programming language.

9 Introduction to HTML Paragraph: …. Bold-faced text: … Java is an object-oriented programming language. List: …

10 Introduction to HTML Java is object-oriented safe platform-independent Java is object-oriented Safe platform-independent

11 Introduction to HTML Include images in the web pages Note: do not use … Use attribute to specify a file name <img src = “imagename.jpeg” width=“640” height=“480” alt = “alternate description”>

12 Introduction to HTML Link to another file: … makes the enclosed text linked to another file. Java is an object-oriented programming language. Java Value of href attribute here is a Universal Resource Locator. –http: for hypertext transfer protocol, to fetch the file as web page. –ftp: to download a file –mailto: to sent email –File: to view a local html file

13 Introduction to HTML Applet tag: …

14 Question Create an HTML file that includes the italic, bold-face, hyper link to course webpage. Please Click to go to the Course web page for COP2250 information:Click –Applets –Arrays –ArrayLists


Download ppt "Chapter 4 Applets Cop 2250. Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your."

Similar presentations


Ads by Google