fundamentals with java

24
WEB DEVELOPMENT Fundamentals with Java 1

Upload: tamptress-vamp

Post on 22-Nov-2014

351 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Fundamentals With Java

WEB DEVELOPMENT

Fundamentals with Java

1

Page 2: Fundamentals With Java

Table of Contents #1

Description Java Example of Java Description of JavaScript Example of JavaScript Comparison of Java and JavaScript Open Source and JavaScript Description of DOM Example f DOM Discussion of the open-source nature of JavaScript scripts

and examples of their use in commercial settings Comparison of AJAX and JavaScript

2

Page 3: Fundamentals With Java

Table of Contents #2

Security vulnerability of AJAX and JavaScript Summary of the use of Java applets in commercial settings Future trend of Java applets in commercial settings Java applets and AJAX JavaScript in DHTML Comparison of cookies and spyware

3

Page 4: Fundamentals With Java

Description of Java

Java is object-oriented

Java is architecture-neutral

Java was designed as a crossing point within web pages to allow applications over the internet.

Java is a programming language

Java does not require a network

Java applications may use network connection for dispersed computing

4

Page 5: Fundamentals With Java

Example of Java

This is an example of the Java programming language. This program will calculate an amortized monthly mortgage payment including the remaining principal.

5

Page 6: Fundamentals With Java

Description of JavaScript

JavaScript is an object-based language

JavaScript deals directly with the browser entities like windows, forms, frames and documents

It can respond to browser events like mouse clicks and user- typed text.

It is based on manipulating objects by changing their properties or applying methods to them.

Each object has properties that describe its appearance, purpose, or behavior

Validate forms Helps detect browsers An object can have

methods, which are actions that can be performed with or to it.

Objects are items that exist in a defined space in a Web page (window, document, form etc)

6

Page 7: Fundamentals With Java

Example of JavaScript

This is an example of JavaScript for menu that is a drop down from the top of the page.

It is also possible to modify the menu to scroll or not, also to change colors, and all dimensions.

7

Page 8: Fundamentals With Java

Java vs. JavaScript

Interactive Web Graphics

Creating web browser applications

Writing stand-alone applications

runs within the context of the Web browser

Customizing pages based on browser version

Visual Feedback to user actions

Validating data entered on HTML Forms

Java - Programming LanguageJavaScript - Scripting Language

8

Page 9: Fundamentals With Java

Open Source and JavaScript

The promise of open source is better quality, higher reliability, more flexibility, lower cost, and an end to predatory vendor lock-in

It gives access to source code and ability and right to modify it

Technology-Neutral

9

Open source is a development method for software that harnesses the power of distributed peer review and transparency of process.

Page 10: Fundamentals With Java

Description of DOM

DOM stands for Document Object Model.

DOM is an crossing point that permits scripts to access and update the content, structure and style of the document.

Every element of the web page can be actively updated in response to input from the user or other programs

The DOM has a hierarchy of elements with the window as the top level object

10

Page 11: Fundamentals With Java

Description of DOM

Document Object Model Defines a hierarchical model of the document structure through which all document elements may be accessed Nodes.

The W3C DOM defines element of a document is a node of a particular type Node Types

Common types are:

document node element node text node attribute node comment node document-type

node

11

Page 12: Fundamentals With Java

Example of DOM

DOM provides access to the structure of an HTML page by mapping the elements in that page to a tree of nodes.

Document

ElementParagraph

Attraligh

Textleft

Text portion

Element it

TextThe

TextItalicized

12

Window

Page 13: Fundamentals With Java

Comparison of Java applets and AJAX

Web Page Enhancement

User-Friendly Wide Access

Web Page Enhancement

Coordinates Multiple Languages

Requires Less Bandwidth

Based on Open Standards

Java applets AJAX

13

Page 14: Fundamentals With Java

Security Vulnerabilities of Ajax and JavaScript

Inexperienced Ajax developers failing to implement proper safety precautions

Ajax applications present large attack surface

14

Page 15: Fundamentals With Java

Security Vulnerabilities of Ajax and JavaScript

An attack surface = number of points of entry that can be exploited

Reduce attack surface by removing features not used

15

Page 16: Fundamentals With Java

Security Vulnerabilities of Ajax and JavaScript

Other Ajax vulnerabilities:

Cross-site scripting attacks to mislead visitors

Screen-Scraping and Web session Hi-jacks to steal information

16

Page 17: Fundamentals With Java

Security Vulnerabilities of Ajax and JavaScript

JavaScript Vulnerabilities

Attacker may gain access though privileges required to use JavaScript

Malware spreads because a visitor trusts website viewed

17

Page 18: Fundamentals With Java

Security Vulnerabilities of Ajax and JavaScript

Home routers also under attack changing DNS entries using JavaScript

JavaScript Hijacking exposes vulnerabilities with JSON (JavaScript Open Notation)

18

Page 19: Fundamentals With Java

Commercial uses of Java Applets

Applets windowed applications

Provide GUI (Graphical User Interface)

Embedded in WebPages and execute in browser environment

19

Page 20: Fundamentals With Java

Commercial uses of Java Applets

Applets provide visual interest

Scrolling or Shimmering Text

Graphics that repeat patterns

Add Animation

20

Page 21: Fundamentals With Java

Commercial uses of Java Applets

Applet Users Sun Microsystems Dimension X HotWire The Rolling

Stones

21

Page 22: Fundamentals With Java

The Future Trend of Java applets in commercial settings

Synchronizing applications for multiple platforms

Smart Phones Netbooks Laptops

22

Page 23: Fundamentals With Java

Comparison of Cookies and Spyware

Cookie saved as text file

Contains user information : Name, Password, Credit Card Information

Facilitates return visit

Website specific

23

Page 24: Fundamentals With Java

Comparison of Cookies and Spyware

Spyware is a software application

Installs undetected Collects personal

information Associated with

Adware Can change

computer’s configuration

24