fundamentals with java

Post on 22-Nov-2014

354 Views

Category:

Documents

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

WEB DEVELOPMENT

Fundamentals with Java

1

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

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

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

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

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

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

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

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.

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

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

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

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

Security Vulnerabilities of Ajax and JavaScript

Inexperienced Ajax developers failing to implement proper safety precautions

Ajax applications present large attack surface

14

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

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

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

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

Commercial uses of Java Applets

Applets windowed applications

Provide GUI (Graphical User Interface)

Embedded in WebPages and execute in browser environment

19

Commercial uses of Java Applets

Applets provide visual interest

Scrolling or Shimmering Text

Graphics that repeat patterns

Add Animation

20

Commercial uses of Java Applets

Applet Users Sun Microsystems Dimension X HotWire The Rolling

Stones

21

The Future Trend of Java applets in commercial settings

Synchronizing applications for multiple platforms

Smart Phones Netbooks Laptops

22

Comparison of Cookies and Spyware

Cookie saved as text file

Contains user information : Name, Password, Credit Card Information

Facilitates return visit

Website specific

23

Comparison of Cookies and Spyware

Spyware is a software application

Installs undetected Collects personal

information Associated with

Adware Can change

computer’s configuration

24

top related