• No results found

Chapter 1 Programming Languages for Web Applications

N/A
N/A
Protected

Academic year: 2021

Share "Chapter 1 Programming Languages for Web Applications"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

Chapter 1

Programming Languages for Web Applications

Introduction

Web-related programming tasks include HTML page authoring, CGI programming, generating and parsing HTML/XHTML and XML (eXtensible Markup Language), creating dynamic HTML pages, writing HTTP clients and servers applications, Web site management, and Web applications. Programming languages used by Web programming professionals include HTML/XHTML, XML, Java, Java Server Page, JavaScript,

VBScript, Visual Basic, Active Server Page (ASP), C/C++, PHP, Perl, ASP.NET, VB.NET, and C#..

1.1 HTML (HyperText Markup Language) and XHTML

The HTML is a structure language with a formal definition for use in creating static Web pages or HTML documents that we request from Web servers around the world. A typical Web page may include the following information:

ƒ Text of its document with appropriate settings such as front, color, alignment, numbered and bulleted lists, etc; any hypertext links to other documents, images, and other media; tables and user feedback form

ƒ Embedded client-side scripts such as JScript

ƒ Embedded images and media

ƒ Embedded other objects such as Java Applet program, ActiveX, audio, video, and VRML objects

ƒ Embedded video, audio, and other formats via Plug Ins

XHTML 1.0 Standard

• HTML 4.01 was approved by W3C (World Wide Web Consortium http://www.w3.org/markup) in 1999

• XHTML 1.0 was approved by W3C in early 2000 for replacing HTML 4.01

• Just like HTML 4.01 but it was modified to conform to the XML standard

(2)

• All XHTML tags are case sensitive

• DOCTYPE – document type

• xmlns – XML Name Spaces

Editing HTML/XHTML Documents Text editors:

• Microsoft’s Notepad, Wordpad, Word

• UNIX/LINUX’s vi, emac, pico

• Save the files with either an .html or .htm file-name extension

XHTML Document Structure

<?xml version = “1.0”?>

<!DOCTYPE html PUBLIC

“-//w3c//DTD XHTML 1.0 Strict//EN”

http://www.w3.org/TR/xhtml11/DTD/xhtml-strict.dtd>

<html xmlns=http://www.w3.org/1999/xhtml”>

<head>

<title The First XHTML Page ></title>

</head>

<body>

<p> The First XHTML Page Welcomes You! </p>

</body>

</html>

1.2 DHTML (Dynamic HTML)

DHTML, Microsoft Dynamic HTML uses a number of technologies such as HTML, script, a Document Object Model, multimedia players/components, absolute page positioning, dynamic styles, data binding to a page, and so forth to give your Microsoft Internet Explorer browser the ability to interactive with all elements of a Web page and to allow it to manipulate

ƒ dynamic contents

ƒ dynamic styles

ƒ dynamic positioning

(3)

1.3 eXtensible Markup Language (XML)

The XML is standard language from World Wide Web Consortium for putting structured document and data in a text file for use on the Web. It uses tags and attributes like

HTML, but XML allows users to define their own tags for delimit pieces of data, and leave the interpretation of data completely up to other applications. Features of XML include:

• Another file format for storing information in hierarchical formats

• XML documents can describe both themselves and their content

ƒ Meta-language that allows you to create and format your own document markups

ƒ XML specification: http://www.w3.org/XML

1.4 JavaScript

JavaScript is a scripting language developed by Netscape for used in delivering dynamic Web pages, and enabling client-side programming for interactivity. JScript is a Microsoft version of JavaScript. ECMAScript (European Computer Manufacturer's Association:

www.ecma.ch/stand/ecma-262.htm) ) is a standardized JavaScript/JScript. A dynamic Web page may contain JavaScript code, which is placed inside a <script> element and will be executed as the Web page is loaded into a Web browser. It may be used to monitor various user events and response to various user requests. Typical JavaScript applications may include

• Customizing Web pages

• Creating dynamic Web page

• Validating user form for CGI

• Manipulating cookies

• Interacting with frames

• Calling Java program

1.5 VBScript

(4)

VBScript, a scaled down version of Microsoft' Visual Basic, allows active scripting to be added on Web client (IE 3.0 and up), and Web server scripting in Microsoft Internet Information Server (version 3.0 and up).

1.6 Perl

Perl (Practical Extraction Report Language) is a portable, interpreted language used primarily as a tool for writing scripts that perform such functions as:

ƒ Manipulate text in files

ƒ Manipulate files and processes

ƒ Extract data from files

ƒ Write reports

ƒ Perform networking tasks

ƒ Write CGI scripts to generate dynamic pages for form processing

ƒ Interface to databases

1.7 Microsoft Visual C++

Visual C++ include many MFC library classes for supporting Internet and Web programming:

ƒ CGI programming

ƒ Winsocket

ƒ WinInet is a higher-level API than Winsock supporting only HTTP, FTP and gopher client programs.

ƒ IIS's API or the MFC (Microsoft Foundation Classes) ISAPI server extensions classes

ƒ ODBC (Open Database Connectivity) for SQL Database access and DAO (Database Access Objects)

ƒ MFC support for ActiveX document servers

ƒ ActiveX controls

1.8 Java

(5)

A general purpose programming language that can be used to create Applets that execute after the Web page is loaded. It is also used for writing server side applications.

Features of Java

Secure - virus-free, tamper-free Robust - not memory overwrite

Portable - run on different machine without change Java Components

ƒ The Java compiler - translate Java code to byte code

ƒ The Java interpreter - reading and executing Java byte code

ƒ The applet viewer Terms

ƒ Byte Code - A highly portable machine language for an imaginary Java computer

ƒ Java Virtual Machine (JVM) - a computer that runs Java byte code

ƒ Just-In-Time (JIT) compilation - some JVM can translate byte code into machine language

Java Programs

ƒ Java stand alone applications (console or window-based)

ƒ Java applets

Java applet

ƒ Small Java programs that run in a JVM and is incorporated into a Web Browser

ƒ An applet runs inside a Web browser or an applet viewer

ƒ An applet cannot manipulate the computer file system

ƒ An applet is launched from HTML page

ƒ Java class extends java.applet.Applet

ƒ Defined in the java.awt package

Java Applications

ƒ Network programming (java.net)

ƒ Applet for dynamic Hypertext Markup Language document (Java.Applet)

(6)

ƒ Graphical User Interface

Stand-Alone Programs

ƒ Programs that runs on the computer in the same manner as any other window- based application

References

Related documents

Fuente  de  datos   InCites™  (Web  of  Science™,  Thomson  Reuters).  Otras  Ciencias  Médicas)   porque  están  contenidas  en  las  restantes  39

The experimental system consists of a high-pressure hydrogen feed system, pressure vessel assembly, a tube-in-tube heat exchan- ger for removal of heat from the metal hydride by

The understanding of what constitutes a ‘‘good’’ production schedule is central to the development and evaluation of automated scheduling systems and their implementation

Policy makers, considering the positive associations between institutional change, based on a process of democratization, and paths of technological innovation, can

Topics include design of a web site and web pages, Hypertext Markup Language (HTML), style sheets, scripting languages, dynamic web pages, database connectivity, web servers,

In this prospective study, the author aimed to test real-time in-plane ultrasound-guided supraclavicular subclavian vein cannulation technique during elective cardiac surgical

Feature 3 The University of Loughborough, a service-oriented institution 35 Feature 4 Leveraging income through property management 35 Feature 5 Increasing high

However, unlike private university trustees, public university trustees often do not have final control over the tuition levels that their institutions charge or their state