chapter2.doc - Document Server

towerdevelopmentData Management

Dec 16, 2012 (4 years and 9 months ago)

261 views


2. Web Application Development

2.1 Introduction

2.1.1 Web Applications

A web application is a website that contains pages with partly or entirely undetermined
content. The final content of a page is determined only when the visitor requests a page
from th
e web server. Because the final content of the page varies from request to request
based on the visitor’s actions, this kind of page is called a dynamic page.

2.1.1.1 Common uses for web applications

Web applications have many uses for both site visitors
and developers, including the
following:



Let visitors find information quickly and easily on a content
-
rich website. This
kind of web application gives visitors the ability to search, organize, and navigate
content

as

they see fit. Examples include compan
y intranets, Microsoft MSDN
(
www.msdn.microsoft.com
), and Amazon.com (
www.amazon.com
).




Collect, save, and analyze data provided by site visi
tors. In the past, data entered
in HTML forms was sent as e
-
mail messages to employees or CGI applications
for processing. A web application can save form data directly into a database and
also extract the data and create web
-
based reports for analysis. Ex
amples include
online banking pages, store check
-
out pages, surveys, and user
-
feedback forms.



Update websites that have constantly changing content.

A web application frees the web designer from continually updating the site’s
HTML. Content

providers such

as news editors provide the web application with
content, and the web

application updates the site automatically. Examples include
the Economist (
www.economist.com
) and CNN (
www.cnn.com
).


In general, a web application is a software program, which uses a database to deliver its
dynamic content to the user on the Internet or its corporate intranet and extranet.


2.1.1.2
Processing dynamic pages

Web s
erver is software that supports HTTP to handle multiple Web re
quests, and is
responsible for user authentication in case of intranet and

extranet applications.

An
application server performs most of the application processing log
ic and enforces
business ru
les. It is also in charge of maintaining the state

management and session
control logic required for an online transactiona
l system. The database server hosts the
database management system

(DBMS) and provides data access and management
capabilities. In a
typ
ical session, the Web server processes client requests and sends
HTML

pages back to the client. When needed, a Web server connects to an ap
plication
server to process business logic (e.g., for credit authorization or

checking inventory
status).

The data
base server performs database query and sends the result

back to the
Web server. Such multi
-
tier architecture provides high system

scalability. When the
system demand increases, workload can be distrib
uted on additional application or
database servers. How
ever, this layout

does not mean that one must have an application
server for the Web ap
plications, nor does it imply that the Web server and application
server

or database server cannot be located on the same machine. The decision

on
architectural componen
ts is affected by the requirements of the ap
plication, the business
strategy, and the existing and future technology

infrastructure.


2.1.2 The Internet

The Internet can be defined as a large interconnection of regional networks that
co
mmunicate with each other.

To accomplish this all the computers on the Internet have
to use a common set of rules for communication. Those rules are called protocols, and the
Internet uses a set of protocols called TCP/IP (Transmission Control Protocol/Int
ernet
Protocol). Many people equate the World Wide Web with the Internet. In fact, the
Internet is like the highway, and the World Wide Web is like a truck that uses that
highway to get from place to

place.

The Internet is essentially a communication infra
structure consisting of 4 elements:



Network Computers:

forming the physical platform to process, store and transfer
data;



Users:

who are the providers and requesters of information;



Services:
protocols and standards used to organize, access and transmit
in
formation; and



Information:

which is formatted data with meaningful content.

The Internet started in 1969 as a project developed by the United States Department of
Defence. Since then, the Internet has grown from connecting 6 computers on its starting
year

to more
than 6 million computers by 1995
.Due to its number of users and the
amount of information and services provided, the Internet is considered the most
sophisticated client
-
server computer architecture available. One of the factors that has
fostered
its wide acceptance has been the implementation of mechanisms to integrate
dissimilar operating systems into a common communication environment. Such
environment has been found to be suitable for the transmission of knowledge supplied by
multiple sources,
regarding multiple areas of expertise.

.

www.zoom.com/dsl/glossary1.html
(ref)


The Internet incorporates several mechanisms that support distributed and collaborative
communities of users and provides
access to diverse information resources and services.
From the available services, the Web has become the primary standard for information
retrieval and exchange, surpassing leading services such as FTP (File Transfer Protocol)
on the volume of information

handled (
Gaines, Shaw and Chen, 1996).
The exponential
growth of the Internet has lead to the development of E
-
commerce (the buying and
selling of goods by use of the Internet).


2.1.3 Internet

Intranets are 'internal' networks within organizations using T
CP/IP as the host protocol
for data transmission, and employing the same analogy as with web servers, to share and
dispense information within a company.


To deploy an Intranet, a company must have: A
local/wide area network in place (a core requirement);
a web server up and running (this
can be a freeware or an expensive solution
-

depending on a company's needs); and
clients using browsing software to access the Intranet.


2.1.4 Extranet

An extranet is a private network that uses the Internet protocols an
d the public
telecommunication system to share a business’s information, data or operations with
external suppliers, vendors or customers. An extranet can be viewed as the external part
of a company’s Intranet.

2.1.5 The Word Wide Web (WWW)


Since its impl
ementation in 1989, the Web has performed as a stateless client
-
server
retrieval
-
information service for the Internet. It provides conventions that encompass
virtually all Internet services, allowing members to access information on a hypermedia
environmen
t using a constant interface.

WWW or "Web" is system of Internet servers that uses HTTP to transfer specially
formatted documents. The documents are formatted in a language called HTML
(Hypertext Mark
-
up Language) that supports links to other documents, as

well as
graphics, audio, and video files. One can jump from one document to another simply by
clicking on hyperlinks. Not all Internet servers are part of the World Wide Web
.


2.1.6 Universal Resource Locator (URL)

Universal Resource Locators are text str
ings used to address resources. They are
essential for the system to scale and for the information space to be independent of
the network and server topology. URL addresses have the following structure
(
Berners
-
Lee, Masinter, and McCahill, 1994):

<
scheme
>
:

<
scheme
-
specific
-
part
>

where
scheme

represents an Internet protocol (such as FTP, HTTP or GOPHER),
and
scheme
-
specific
-
part

specifies a string whose interpretation is dependent on
the scheme applied. For schemes that use IP
-
based protocols, the scheme
-
sp
ecific
-
part will be compliant with the following syntax:

//

[ <
user
> [
:

<
password
> ]
@

] <
host
> [
:

<
port
>]
/

[ <
URL
-
path
> ]

where the double forward slash indicates that the string conforms with the Internet
syntax; <
user
>:<
password
> indicates optional v
alues representing a user id and
password (if required by the service requested);
host

denotes a fully qualified
domain name of a network host;
port

indicates a port to request a connection (this
argument is optional on services that specify a default port

to connect); and
URL
-
path
, which specifies the details to access a specific resource on the host (e.g.,
path for locating a file).

One of the advantages of the actual URL syntax is that it allows not just
accommodation to existing schemes, but also, to an
y other that might be
developed in the future.

2.1.7 Hypertext Transfer Protocol (HTTP)


Rather than just a protocol to transfer hypertext, HTTP is a protocol to transmit any
information while providing the efficiency necessary to make hyperlink jumps. Alt
hough
comprehension of the Hypertext Markup Language is required for Web clients, HTTP is
used to retrieve documents in an extensive and unbounded set of formats. To achieve this
goal, the client sends a list of data formats and the server replies with dat
a in any of those
formats it can produce
(Berners
-
Lee, Cailliau, Frystyk, Secret, 1994).

2.1.8 Hypertext Markup Language (HTML)

HTML is one of three fundamental concepts on which the WWW rests.
(The other two are the HTTP protocol and the URL addressing/na
ming
scheme.) Consequently, it is important to understand not just how to use
HTML but also its role within the web, its capabilities and limitations, and
possible future directions it may take.

Currently, HTML provides three primary capabilities. First,
it provides
facilities for describing how information should be represented or
displayed. Second, it provides a mechanism for including within a
document links or references to other documents; this mechanism includes
a concept of behaviour, so that when a

user "selects" a link, the document
associated with that link is accessed. Third, HTML allows a document to
include other forms of data, such as images, that are displayed within the
document. Other capabilities, such as providing forms that can be filled

out and, in turn, used to invoke an associated process, can be viewed as
extensions of these three basic functions. Future developments, such as
passing active program from server to browser/interpreter (Java/HotJava),
will extend this list of basic capab
ilities, but for now, the three capabilities
noted above are
fundamental
.

The reason HTML is important within the Web architecture is that it
serves as a
de facto

standard for describing, in general terms, how
information is structured and/or should be di
splayed. Thus, it permits
different vendors to develop a variety of browsers that can run on different
hardware and software platforms, but display data in approximately the
same way. This support for heterogeneity is consistent with the overall
concept of

global scale that runs through web thinking. However, the
consistency provided by HTML comes at a cost: it is currently very
limited in its formatting capabilities, far more so than what most users
have come to expect from their word processing and page l
ayout software.
The temptation
--

and, indeed, current practice
--

is for individual vendors,
such as Netscape, to implement new, non
-
standard features in their
systems. In some cases, such innovations have been incorporated into
standard versions of HTML,

but keeping HTML sufficiently coherent and
consistent across platforms so that the web remains heterogeneous will be
a

major challenge over the next few years.

2.1.9 Dynamic Hypertext Markup Language (DHTML)

Dynamic Hypertext Markup Language (DHTML) is a
ctually a combination of
HTML, style sheets and a scripting language such as JavaScript.

DHTML is a way to override HTML's static nature. By using scripting language,
it is possible to modify properties of some HTML tags and in some cases you can
change t
he content of the tags themselves.

2.1.10 Extensible hypertext markup Language (XHTML)

(put)

2.1.11
Extensible Markup Language (XML)

Extensible Markup Language is to the document content (data) while HTML is to
the document layout. XML is a simple, standa
rd way to delimit text data... It is
structured such that you can formally describe the syntax you have devised and
share it with anyone using any other computing platform.

XML describes a document's content rather than it's layout information. As we
have
seen above with HTML, it is impossible to know what a paragraph of text is
talking about. The only thing that we know is that we are dealing with a
paragraph, and nothing distinguishes that paragraph from another. Like HTML,
XML uses tags to describe the c
ontent. For example, with XML it is possible to
know if a given paragraph is the introduction or the conclusion.



2.2 Development Tools And Technologies


Web application Development Tools and Technologies include programming
languages and server technolog
ies designed by different vendors.

2.2.1 Programming languages


In this section we will discuss general purpose programming languages such as
Visual Basic and Java, scripting languages such as VBScript and JavaScript, and
usage
-
specific languages such as
SQL.

Virtually all
-
programming

languages
can be use to develop web applications but
some languages are more suitable for particular tasks and situations. Also the
resourses available to develop a particular web application can influence the type of
languag
e to be used for the job.


2.2.1.1

Non Scripting languages

When developing web applications using traditional languages, like C, CGI
technology is used.
CGI
.

(Common Gateway Interface)
--

A set of rules that
describe how a Web Server communicates with another piece

of software on the
same machine, and how the other piece of software (the 'CGI program') talks to
the web server. Any piece of software can be a CGI program if it handles input
and output according to the CGI standard. Usually a CGI program is a small
pro
gram that takes data from a web server and does something with it, like putting
the content of a form into an e
-
mail message, or turning the data into a database
query. CGI "scripts" are just scripts which use CGI. CGI is often confused with
Perl, which is

a programming language, while CGI is an interface to the server
from a particular program. Perl is an application of CGI, as well as MIVA,
Python, PHP3, and other scripting languages


2.2.1.1.1

Java:

Java is Open Source programming language with Open Source compile
rs and
debuggers. Open Source means that it is possible for anyone to use and modify.
Anybody can download source code from the Internet and use it without paying
anything. Anybody so inclined can study the source code and change it to fit their
needs. Sy
stem uses the GPL (GNU General Public License)
http://www.gnu.org
, to
define what you may and may not do with the software system in different situations


Java was invented by Sun, makers of UNIX workstations. The idea be
hind Java
is to create a portable programming language that would work on a wide variety
of different hardware platforms.

Java application

is a standalone Java program
--

a program written in the Java language that runs independently of any browser.
The co
de is downloaded to the client workstation, then compiled and run.

A Java application running in a browser window is called an Applet. The
Microsoft implementation of Java for Internet Explorer extends it to allow
interaction between ActiveX components and

visual basic script, meaning that
VB script code can interact with the Java Applet in the browser, thus controlling
its behavior.

When Sun Microsystems introduced Java in 1995, it promised to deliver a simple,
object
-
oriented, high
-
performance, platform
-
i
ndependent programming language.
It was exactly what the booming Internet needed.

Java is relatively simple as it takes a lot from the C/C++ syntax. Java removes
many of the complexities inherent to these languages. For example, in Java there
is no need to

manipulate pointers, as the language handles them automatically.

Unlike C++, Java was designed to be an object
-
oriented language. An object
-
oriented application is the sum of multiple components (objects) that
communicate through interfaces. Each object p
erforms only one function well and
this is done independently of other objects. A given object knows only how to
pass information to other objects and it is not aware of what the other object is
doing with the information.

The power of object
-
oriented lan
guage is that it allows the development of
flexible and extensible applications. With objects, if the requirements for an
application change, you need to replace the functionality of specific objects
instead of modifying the entire application.

Object
-
orie
ntation also promotes code reuse. Since each object performs a well
-
defined task, each time this task is needed you simply need to call the object and
get the desired result.

Java can be platform
-
independent. Programmers write code to the Java Virtual
Mach
ine (JVM) rather than to a specific operating system. Although it is possible
to write non
-
portable programs, Java makes it very easy to implement what Sun
calls "Write Once, Run Anywhere" code.

JDBC:

Java Data Base Connectivity (JDBC), is the most promine
nt and mature approach
for accessing relational DBMS from java. It was modelled after the Open Data
Connectivity (ODBC). The JDBC package defines a database access API
(Application Programmers Interface) That support basic SQL functionality and
enables acc
ess to a wide range of relational DBMS products. With JDBC java
can be use as a host language for writing database application

2.2.1.1.2 Visual Basic (VB)

Microsoft's Visual Basic is one of the most popular programming languages
available. Its success co
mes from its rapid application development approach and
its relative simplicity when developing complex applications.VB is suitable for
the development of applications that don't need to be close to the operating system
to perform well. Because VB is shiel
ds the developer from the intricacies of the
system, it allows fast application development. In the context of web applications,
it is the primary choice for the development of COM objects. In most situations,
the performance gains by using lower level lan
guages such as C/C++ do not
justify the added complexity and cost of development. How ever it is proprietary
language which means that the corresponding compilers must be procured at a
cost.



2.2.1.2 Scripting languages

Scripting languages are languages t
hat are not compiled but interpreted by
scripting engines built in web browsers. They complement HTML by giving a
web pages its dynamic nature.



2.2.1.2.1 JavaScript:


A scripting language from Netscape that is only marginally related to Java. Java
and
JavaScript is not the same thing. JavaScript was designed to resemble Java,
which in turn looks a lot like C and C++. The difference is that Java was built as a
general
-
purpose object oriented language, while JavaScript is intended to provide
a quicker and

simpler language for enhancing Web pages and servers.

There are
two types of JavaScript:



Navigator JavaScript, also called client
-
side JavaScript



LiveWire JavaScript, also called server
-
side JavaScript


2.2.1.2.2 JavaScript in LiveWire

LiveWire is an a
pplication development environment that uses JavaScript for
creating server
-
based applications similar to CGI (Common Gateway Interface)
programs. In contrast to Navigator JavaScript, LiveWire JavaScript applications
are compiled into bytecode executable f
iles. These application executables are run
in concert with a Netscape server (version 2.0 and later) that contains the
LiveWire server extension.

The LiveWire server extension generates HTML dynamically; this HTML (which
may also include client
-
side Java
Script statements) is then sent by the server over
the network to the Navigator client, which displays the results.


In contrast to standard CGI programs, LiveWire JavaScript is integrated
directly into HTML pages, facilitating rapid developmen
t and easy maintenance.
LiveWire JavaScript contains an object framework that you can use to maintain
data that persist across client requests, multiple clients, and multiple applications.
LiveWire JavaScript also provides objects and methods for database
access that
serve as an interface to Structured Query Language (SQL) database servers.

JavaScript in Navigator

Netscape Navigator 2.0 (and later versions) can interpret JavaScript statements
embedded in an HTML page. When Navigator requests such a page, th
e server
sends the full content of the document, including HTML and JavaScript
statements, over the network to the client. The Navigator then displays the HTML
and executes the JavaScript, producing the results that the user sees. This process
is illustrat
ed in the following figure.




JavaScript is embedded as a small program in a web page that is interpreted and
executed by the Web client. The scriptor controls the time and nature of the
execution, and JavaScript functions can be called from within a Web

document,
often executed by mouse functions, buttons, or other actions from the user.
JavaScript can be used to fully control Netscape and Microsoft Web browsers,
including all the familiar browser attributes.

JavaScript is not a cut
-
down version of any
other language (it is only distantly and
indirectly related to Java, for example), and it is not a simplification of anything.
It is, however, limited. You cannot write standalone applications in it, for
example, and it has little capability for reading or

writing files. JavaScript scripts
can run only in the presence of an interpreter, either in a Web server or a Web
browser. If a web server or a browser used to interpret JavaScript is Open Source,
then java script can be considered as free tool.


2.2.1.2.
2 VBScript and VB for Application (VBA)


VBScript and VBA are subsets of Visual Basic. They both use syntax similar to
VB, but they don't support all of its features. VBA was designed to bring scripting
ability to desktop applications. With VBA, applicatio
ns can be extended,
customized and integrated to meet specific business needs. VBScript is designed
to offer lightweight scripting capabilities for low
-
memory environments, such as
web browsers and web servers, and is most commonly used in creating HTML
We
b pages. VBScript's built
-
in limitations come from its lightweight
requirements and the necessity to satisfy the Internet security needs. It doesn't
support functions that directly access the client's operating system or file system.
For example, you canno
t do file Input/Output or read the registry on the client's
machine.
The Scriptor controls the time and nature of the execution, and VBScript
functions can be called from within a Web document, often executed by mouse
functions, buttons, Active X controls,

or other actions from the user. VBscript can
be used to fully control compatible browsers, including all the familiar browser
attributes.

These functions are limited to the server side applications.

Microsoft tried to impose VBScript as the default clien
t
-
side scripting for the
World Wide Web, but its lack of support by Netscape resulted in the dominance
of JavaScript.


2.2.1.2.3 Perl

Perl(Practical Extraction and Report Language) is a high level interpreted
programming language with extensive easy
-
to
-
us
e text processing capabilities. It
combines features of ‘C’ and Unix utilities. It is one of the most widely use
languages for server side programming. It is cross platform, so it can be
implemented on Unix and Windows platforms.

2.2.1.2.4 PHP

PHP(Hyperte
xt Processor) is a popular open source HTML
-
embedded scripting
language that is supported by many web servers including Apache web server
and Microsoft Internet Information Server ,and it is the preferred Linux web
scripting language. The development of P
HP has been influenced by a number of
other languages such as Perl, ‘C’ java and to some extent Active Server pages. It
supports
untyped
variables to make development easy. The goal of the language is
to allow web developers to develop dynamically generate
d pages quickly. One of
the advantages of PHP is its extensibility and a number of modules have been
developed for free to support such things like database connectivity mail and
XML.

PHP has a favourable leaning curve; new learners take shorter time to l
earn it. It
was basically developed for web application development. It is currently used by
thousands of web sites.

In his book “ Core PHP programming, third edition” Prentice H.(2003) claims
that, during PHP Web site tracking, the popularity of PHP by m
easuring how
many different Web sites use the PHP module. The results seemed really exciting
that PHP had grown from 100,000 sites to 350,000 sites during 1999 and most
recent data showed more than 10 million domains using PHP!

2.2.1.2 Structured Query Lan
guage (SQL)

Since the '80s, a standard for Structured Query Language (SQL) has been defined
by the American National Standards Institute (ANSI). This standard is the ANSI
-
SQL. Today, most Relational Database Management Systems (RDBMS) are at
least complian
t with entry
-
level ANSI
-
SQL.

SQL is used to retrieve and manipulate information stored into relational
databases. With SQL one can add, edit, retrieve, delete, filter, sort, and aggregate
data stored into Relational Database Management Systems.

To add fl
exibility and power, most vendors extend ANSI
-
SQL with their own
functionalities. For instance, Microsoft SQLServer calls its version of SQL,
Transact
-
SQL (T
-
SQL) and Oracle calls its version PL/SQL. Most of these
extensions add to ANSI
-
SQL logic operators

and specific calls to the Relational
Database Management Systems.

2.2.2

Server Technologies

2.2.2.1

Java Servlets

A servlet is an extension to a server that enhances the server's functionality. The most
common use for a servlet is to extend a web server by providing dy
namic web content.
Web servers display documents written in HyperText Markup Language (HTML) and
respond to user requests using the HyperText Transfer Protocol (HTTP). HTTP is the
protocol for moving hypertext files across the internet. HTML documents cont
ain text
that has been marked up for interpretation by an HTML browser such as Netscape.


Servlets are are programs that run on java enabled Web Server and build web
pages analogous to CGI programming. How ever, servelets have a number of
advantages over
CGI with regards to:



improved performance,



portability, extensibility,



improved session management,



improved security and reliability.



2.2.2.1 Active Server Pages (ASP)


This technology, created by Microsoft, runs on Internet Information Server v3 or

greater from Microsoft.
Active Server Pages (ASP),

is an open, compile
-
free
application environment in which you can combine HTML pages, scripts, and
ActiveX server components to create powerful Web
-
based business solutions.

Scripts are added to HTML pag
es, and when these pages are changed, the scripts
are automatically re
-
compiled when the page is next accessed. Scripts provide
similar functionality to externally provided extensions like CGI (common
gateway interface) programs, without the performance de
gradation normally
experienced with running CGI programs.

Active server pages support Active X scripting, supporting both VBScript and
Microsoft JavaScript. These scripts can execute on either the client or the server.
An active server page is a simple tex
t file saved with the .ASP extension. These
pages can access standard HTTP server variables and thus support or replace CGI
based programs.

In addition, they can keep track of individual users, which makes implementation
of shopping systems easy. The outpu
t from the server is standard HTML, the user
does not see the ASP scripts, thus it supports any browser, in addition, using the
scripts you can tailor the page to take advantage of features found in specific
browsers.

Active X also provides support for Ser
ver Side Includes and Database
Connectivity. This allows Web forms to be created that query a database and
return the results back to the client as an HTML document.

2.2.2.2

ASP.NET

The Web authoring portion of the NET phenomenon, ASP.NET is a powerful ne
w
technology that holds a lot of promise for rapid, powerful Web development. Like its
predecessor ASP, it runs on any Microsoft IIS server that has the free NET extensions
installed. But ASP.NET is conceptually and architecturally different from classic A
SP,
ColdFusion, and PHP? Whether you know only HTML, or you have experience with
JavaScript or even ASP, you will need to do some adjusting to work with ASP.NET
effectively. ASP.NET supports numerous development languages, but by far the two
most prevalent

are VisualBasic.NET and vicualC++.

.NET Framework

The .NET Framework is a managed, type
-
safe environment for application development
and execution. The framework manages all aspects of the execution of your program: it
allocates memory for the storage of

data and instructions, grants or denies the appropriate
permissions to your application, initiates and manages application execution, and
manages the reallocation of memory for resources that are no longer needed. The .NET
Framework consists of two main c
omponents: the common language runtime and the
.NET Framework class library.

The common language runtime can be thought of as the environment that manages code
execution. It provides core services, such as code compilation, memory allocation, thread
manag
ement, and garbage collection. Through the common type system (CTS), it
enforces strict type safety, and it ensures that code is executed in a safe environment by
enforcing code access security.

The .NET Framework class library provides a collection of us
eful and reusable types that
are designed to integrate with the common language runtime. The types provided by the
.NET Framework are object
-
oriented and fully extensible, and allow you to seamlessly
integrate your applications with the .NET Framework.

La
nguages and the .NET Framework

The .NET Framework is designed for cross
-
language compatibility. Simply put, this
means that .NET components can interact with each other no matter what language they
were originally written in. So, an application written in

Microsoft Visual Basic .NET
might reference a DLL file written in Microsoft C#, which in turn might access a
resource written in managed Microsoft C++ or any other .NET language. This language
interoperability extends to full object
-
oriented inheritance.
A Visual Basic .NET class
might be derived from a C# class, for example, or vice versa.



2.2.2.3 ADO.NET


ADO.NET provides the tools to implement data access easily and efficiently. Previous
versions of data access technologies have provided continuously

connected data access
by default. In such a model, an application creates a connection to a database and keeps it
open for the life of the application or at least for the amount of time that data is required.
As applications become more complex and databa
ses begin to serve more and more
clients, a connected data access technology becomes impractical for a variety of reasons.
For example:



Open database connections are expensive in terms of system resources. The more
open connections, the less efficient sys
tem performance becomes.



Applications with connected data access are very difficult to scale up. An
application that can maintain connections with two clients might do poorly with
10, and might be completely unusable with 100.

ADO.NET addresses these iss
ues by implementing a disconnected database access model
by default. In this model, data connections are established and only left open long enough
to perform the requisite action. For example, if data is being requested from a database by
an application,
the connection is opened just long enough to load the data into the
application, and then it is closed. Likewise, if a database is being updated, the connection
is opened to execute the UPDATE command, and then closed again. By keeping
connections open onl
y for the minimum required time, ADO.NET conserves system
resources and allows data access to be scaled up with a minimal impact on performance.

ADO.NET Data Architecture

Data access in ADO.NET relies on two components: the
DataSet
, which stores data on
the local machine, and the
Data Provider
,

which mediates interaction between the
program and the database.

The DataSet

The
DataSet

is a disconnected, in
-
memory representation of data. It can be thought of as
a local copy of the relevant portions of the d
atabase. Data can be loaded into a
DataSet

from any valid data source, such as a Microsoft SQL Server database, a Microsoft Access
database, or an XML file. The
DataSet

is persisted in memory, and the data therein can
be manipulated and updated independent

of the database. When appropriate, the
DataSet

can then act as a template for updating the central database.

The
DataSet

object contains a collection of zero or more
DataTable

objects, each of
which is an in
-
memory representation of a single table. The s
tructure of a particular
DataTable

is defined by the DataColumns collection, which enumerates the columns in a
particular table, and the Constraint Collection, which enumerates the constraints on the
table. Together, these two collections make up the
schem
a

of the table. A
DataTable

also
contains a DataRows collection, which contains the actual data in the
DataSet
.

The
DataSet

contains a DataRelations collection. A
DataRelation

object allows you to
create associations between rows in one table and rows in
another table. The
DataRelations collection enumerates a set of
DataRelation

objects that defines these
relationships between tables in the
DataSet


The Data Provider

The link to the database is created and maintained by the
Data Provider
. A Data Provider

is not actually a single component, but a set of related components that work together to
provide data in an efficient, performance
-
driven manner. The Microsoft .NET
Framework currently ships with two data providers: the
SQL Server .NET Data Provider
,
whi
ch is designed specifically to work with Microsoft SQL Server 7.0 or later, and the
OleDb .NET Data Provider
, which connects with other types of databases. Each Data
Provider consists of similar versions of the following generic component classes:



The
Con
nection

object provides the connection to the database.



The
Command

object is used to execute a command against a data source. It can
execute either non
-
query commands, such as INSERT, UPDATE, or DELETE, or
return a
DataReader

with the results of a SELECT

command.



The
DataReader

object provides a forward
-
only, read
-
only, connected recordset.



The
DataAdapter

object populates a disconnected
DataSet

or
DataTable

with data
and performs updates.


2.2.2.4 Java server Pages (JSP)

JSP is the Java
-
based solution

to dynamic Web site development, requiring a Java server
(such as a J2EE server) to interpret the code. JSP is fast, providing impressive response
times.
It
is also extremely powerful certainly the most powerful solution until the
appearance of .NET, and
certainly powerful enough to compete head
-
on with NET But
its code, once again, is daunting for those new to dynamic Web site development







2.2.2.5
ColdFusion Markup Language (CFML)


ColdFusion MX is a powerful web application server that lets you cre
ate robust sites and
applications without a long learning curve. ColdFusion MX does not require coding in
traditional programming languages (for example, C/C++, Java, XML), although it
supports these traditional programming languages
.

ColdFusion MX consist
s of the following core components:



ColdFusion server



ColdFusion Markup Language (CFML)

2.2.2.6 PHP

Apart from being a programming language, PHP is considered as a technology
.(more)

PHP is faster to code and faster to execute. The same PHP code runs una
ltered on
different Web servers and different operating systems. Additionally, functionality that is
standard with PHP is an add
-
on in other environments.

PHP is free. Anyone may visit the PHP Web site
<
http://www.php.net/
>

and download
the complete source code, licensed under a BSD
-
style license
<
http://www.php.net/license/
>
. Binaries are also available for Windows. The result is
e
asy entry into the experience. There is very little risk in trying PHP, and its license
allows the code to be used to develop works with no royalties. This is unlike products
such as Allaire's Cold Fusion, which costs thousands of dollars for the software
to
interpret and serve scripts. PHP runs on UNIX, Windows, and Macintosh OS X. PHP is
designed to integrate with the Apache Web server. Apache, another free technology, is
the most popular Web server on the Internet and comes with source code for UNIX and
Windows. PHP works with other Web servers, including Microsoft's Internet Information
Server. Scripts may be moved between server platforms without alteration. PHP supports
ISAPI to allow for the performance benefits of tight coupling with Microsoft Web
se
rvers.

PHP is modifiable. PHP is designed to allow for future extension of functionality. PHP is
coded in C and provides a well
-
defined application
-
programming interface (API).
Capable programmers may add new functionality easily. The rich set of functions

available in PHP is evidence that they often do. Even if you aren't interested in changing
the source code, it's comforting to know you can inspect it. Doing so may give you
greater confidence in PHP's robustness.

PHP was written for Web page creation. Pe
rl, C, and Java are very good general
languages and are certainly capable of driving Web applications. The unfortunate
sacrifice these alternatives make is the ease of communication with the Web experience.
PHP applications may be rapidly and easily develo
ped because the code is encapsulated
in the Web pages themselves.

Support for PHP is free and readily available. Queries to the PHP mailing lists are often
answered within minutes. A custom bug
-
tracking system on the PHP site shows each
problem along with
its resolution. Numerous sites, such as
phpbuilder.com

and
zend.com
,
offer original content to PHP developers.

PHP is popular. Int
ernet service providers find PHP to be an attractive way to allow their
customers to code Web applications without the risks exposed by CGIs. Developers
worldwide offer PHP programming. Sites coded in PHP will have the option of moving
from one host to ano
ther as well as a choice of developers to add functionality.

Programming skills developed in other structured languages can be applied to PHP. PHP
takes inspiration from both Perl and C. Experienced Perl and C programmers learn PHP
very quickly. Likewise,
programmers who learn PHP as a first language may apply their
knowledge toward not only Perl and C, but other C
-
like languages such as Java.




Server technology language used

ColdFusion

ColdFusion Markup Language (CFML)

ASP.NET

Visual Basic

C++

Active Server Pages (ASP)

VBScript

JavaScript

JavaServer Pages (JSP)

Java

PHP

PHP




XML Technology.

When XML is considered as a technology it can be used to perform a variety of functions
including developing web applications. Althou
gh this technology is in its infancy stage, it
can prove worthwhile in future.

XML and XSLT

Extensible Markup Language (XML) is to the document content (data) what
HTML is to the document layout.

XML is a simple, standard way to delimit text data... It i
s structured such that you
can formally describe the syntax you have devised and share it with anyone using
any other computing platform.

XML describes a document's content rather than it's layout information. As we
have seen above with HTML, it is impossi
ble to know what a paragraph of text is
talking about. The only thing that we know is that we are dealing with a
paragraph, and nothing distinguishes that paragraph from another. Like HTML,
XML uses tags to describe the content. For example, with XML it is

possible to
know if a given paragraph is the introduction or the conclusion.

The Extensible Style sheet Language: Transformation (XSLT) is used in
conjunction with Cascading Style Sheets (CSS) to render the XML into other
formats such as HTML and PDF. XSL
T is often referred to as being the query
language for XML documents, as it can take the raw XML and retrieve, sort and
aggregate the data to get the desired output. XSLT is fairly new and the W3C
standard has not yet been implemented by many XML parsers.

Before XSLT you could only process XML via custom applications that would
interact with an Application Programing Interface (API) defined by the parser.
The two most common APIs are the Simple API for XML (SAX) and the
Document Object Model (DOM).

XSLT do
esn't transform the document itself but rather its representation. XSLT
relies on a SAX or a DOM parser to build a tree structure that represents the data,
and then applies its rules to transform the tree. XSLT provides the language to
manipulate and navig
ate through the tree.


Transforming documents with XSLT


The Extensible Stylesheet Language Transformation (XSLT) technology transforms an
XML document into another format or representation. For example, one common use of
XSLT is to convert XML documents i
nto HTML for display in a browser. XSLT has
many other uses, including converting XML data to another format, such as converting
XML in a vocabulary used by an order entry application into a vocabulary used by an
order fulfillment application.

XSLT transfo
rms an XML document by applying an Extensible Stylesheet Language
(XSL) stylesheet. (When stored in a file, XSL stylesheets typically have the suffix xsl.)


XML is well
-
suited for describe both simple and complex data formats. It is especially
well
-
suited
to describing data that uses dynamic/complex/nested structures


such as
docbook. Databases are well
-
suited to storing and retrieving 'linear' data structures that
can be represented in a table
-
type format. Parsing/using XML data is resource intensive.
The

simplicity/flexibility of the format reduces performance. Databases are much faster
at writing and retrieving data. The structured nature of the data improves performance at
the loss of flexibility. XML is very easy to transport. Databases are more diffic
ult to
move. XML can be written and read by humans


although an XML editor is very handy.

Database

Databases are well
-
suited to storing and retrieving 'linear' data structures that
can be represented in a table
-
type format. Databases are much faster at w
riting and
retrieving data. The structured nature of the data improves performance at the loss of
flexibility. Databases are more difficult to move. Few humans can manually read and
write database files.

XML and a database can be used together to get the
best of both worlds. XML can be
stored in the database as a BLOB (Binary Large OBject) or a CLOB (Character Large
OBject) column type, or as text. By doing this, we get the performance of a database and
the flexibility of XML.

If the software you are deve
loping needs a very high degree of flexibility and
customisability in how it stores its data, you should consider a pure XML database or a
traditional RDBMS which can be extended with XML inside the database itself, for
example Oracle.

Xquery


This is th
e query language for XML.An XML file can be used as a database that can be
queried depending on client needs .The language, which can do, so is called Xquery. It
was developed to query un structured data like XML data.

2.3 Databases

There are several type

of databases. Today, most popular systems with businesses are the
Relational Database Management Systems (RDBMS). Relational Database Management
Systems attempt to model a system by storing data in various tables and keeping track of
the relationship betw
een the data in each table.

Databases experience is mostly of two types open source (free) and proprietary
(commercial).

2.3.1 Proprietary DBMS

2.3.1.1 Access

Microsoft Access is not a Relational Database Management System but rather a file
based databas
e that is disguised as one. Access is part of Microsoft Office and is very
popular on desktops. It is relatively inexpensive, easy to use, and robust enough for many
business applications.

One big reason for Access dominance is that it is allows to build s
elf
-
supporting
applications. Access integrates the user interface or forms, the data storage or tables, the
reporting tool or reports, scripting via Visual Basic for Applications, and a visual query
builder into one package. Using this tool it is possible
to build complete data driven
applications.

Access can also be used for small scale web applications. Even if it can't handle many
concurrent connections to the data and that it is considered less secure than enterprise
scale Relational Database Management

Systems, Access successfully handles low
budget, low traffic web sites.



2.3.1.2 SQL Server



SQL Server 2000 is a relational database management


system (RDBMS)

SQLServer is Microsoft's Relational Database Management System (RDBMS), which
can process
transactions, provide data and storage facilities, and build new

applications. With the increase of reliability of the Windows server’s platform,
SQLServer is getting very popular in the business world for mid to large
-
scale database
requirements. For the

past few years SQLServer has been eating away market share from
Oracle
,
Informix
,
DB2

and
Sybase
.

Unlike Access, SQLServer is designed with a multi
-
user environment in mind, and thus it
is a much more robust database system for the web. SQLServer can hand
le many
simultaneous connections and enable multiple access levels enhancing security.

The beauty of SQLServer is that it integrates very smoothly with the rest of Microsoft
tools and can considerably simplify development and administration needs.

SQLServ
er is the main database system used for the development web based
applications from Microsoft tools.

2.3.1.3 DB2:

DB2

DBMS is a product supported by IBM(international Business machine).It is object
-
relational DBMS
and it supports unique features like
large objects, triggers, user
-
defined functions, user
-
defined data types,
and more.



2.3.1.4 Oracle

Oracle is one of the most popular relational databases in the world. It is an industrial
-
strength engine preferred by large corporations using databases of

exceeding complexity.
Oracle database administrators are scarce and command high salaries. A full explanation
of working with Oracle is far beyond the scope of this text. Fortunately, you will find
many books about

Oracle DBMS is a product supported by Or
acle Corporation which is the world’s leading
supplier of software for information management. It earns annual revenues of more than
US$ 10 billions from its database, tools, application products and related services.
Oracle 9i is the latest version of

Oracle Database With the following futures



Oracle Database 10
g

Oracle Database 10
g

is the first database designed for enterprise grid computing, the most
flexible and cost
-
effective way to manage enterprise information. It cuts costs of
management while

providing the highest possible quality of service. In addition to
numerous quality and performance enhancements, Oracle Database 10
g

significantly
reduces the costs of managing the IT environment, with a simplified install, greatly
reduced configuration a
nd management requirements, and automatic performance
diagnosis and SQL tuning. These and other automated management capabilities help
improve DBA and developer productivity and efficiency.
(
http://otn.oracle.com/products/database/oracle10g/index.html)


2.
3.2 Open source DBMS

2.3.2.1 Mysql


What is MySQL?

MySQL is a Relational Database Management System. A relational database adds speed
and flexibility, by storing data in separate tables rather than putting all the data in one
area. These tables are linked

by defined relations making it possible to combine data from
several tables upon request. Using a RDMS means it is possible to add, access, and
process the data stored in your database. 'SQL' stands for "Structured Query Language"
-

the most common standa
rdised language used to access databases. MySQL is Open
Source software and is freely available at www.mysql.com. Open Source software means
that the source code can easily be manipulated and modified by anyone. It is very simple
to use.

MySQL is a relati
onal database with a license that allows you to use it cost
-
free for most
noncommercial purposes. It shares many features with mSQL because it was originally
conceived as a faster, more flexible replacement. Indeed, MySQL has delivered on these
goals. It e
asily outperforms even commercial databases. Not surprisingly, MySQL is the
database of choice for many PHP developers


Why use MySQL?


MySQL is very fast, reliable, and easy to use. MySQL also has a very practical set of
features developed in close coope
ration with its users. It is also Open Source and
therefore freely accessible. MySQL is used to access databases on the internet due to its
connectivity, speed and security. It was originally developed to manage large databases at
a much faster speed than
the solutions that previously existed. MySQL has for several
years, been thriving in the challenging areas of production.


and capable relational database with a C API that is compatible with
Mini SQ
L

from
Hughes Technologies. It offers
Perl
,
Python
,
TCL
, C, C++, JDBC and ODBC i
nterfaces.

Its features include:



Support fixed length and dynamic length table formats for optimization of speed
or size.



Extremely fast load and store to/from text files with the most common format.



Auto increment and timestamp columns



Lots of column

types. Supports all ODBC types and also TEXT, BLOB, SET,
ENUM, MEDIUMINT (24 bits) and BIGINT (64 bits)



All integer types can be signed or unsigned.



CHAR() and VARCHAR() fields can be case sensitive or case insensitive.



Bit operations: WHERE (flags & 7
) = 2 and bit_count(flags)=3



New summary functions: STD(), BIT_OR() and BIT_AND().



5 different optimizers with a one
-
pass
-
join gives outstanding performance.



Searching with regular expressions.



Extended ALTER TABLE with possibilities to change columns.




Lots of new string functions.



Scalable: Works with 2M RAM to 4G RAM.



Uses files to store tables.



Automatic conversions of values between number and string, like perl.


2.3.2.2 Postgress:

PostgreSQL is a sophisticated Object
-
Relational DBMS, supportin
g almost all
SQL constructs, including subselects, transactions, and user
-
defined types and
functions. It is the most advanced open
-
source database available anywhere

developed at the University of California at Berkeley

.
http://www.cs.wisc.edu/csl/doc/in
fo/unix
-
software/databases/



It was developed in order to over come the sort comings encountered when using
relational DBMS. So in this DBMS more futures, which included classes,
inheritance, types, functions, constraints, triggers, rules and transaction
integrity,
were incorporated. Although Postgres has some object
-
oriented features, it is
firmly in the relational database world.

Postgres was originally developed at the University of California, Berkeley. It
introduced many of the advanced object
-
relatio
nal concepts becoming popular in
commercial databases. PostgreSQL is the most current incarnation of Postgres. It
implements almost all of the SQL specification. Best of all, it's free




2.3.2.3 Hypersonic SQL (Hsql)

General Features:


Hsql is a free DB
MS having capabilities similar to that of SQLsever DBM with:



100% Java



A full RDBMS (Relational Database Management System), with the Object
capabilities of Java



Switchable source code

to support JDK 1.1.x, JDK 1.2.x, JDK (SE) 1.3.x, JDK
(SE) 1.4.x.



Sta
ndard SQL (Structured Query Language) syntax




Correlated subqueries, inner and outer joins are possible, but not complete



Views, Temp tables



Text Tables (with external file data sources such as csv files)



Primary key and unique constraints on single or
multiple

columns





ORDER BY and GROUP BY are supported



COUNT, SUM, MIN, MAX, AVG and other functions



Transaction support


2.4 Operating Systems


2.4.1 Unix/Linux


Main Features of UNIX

This section contains a brief overview of the main features of UNIX
. At the time UNIX
was introduced, some of these features set the UNIX operating system apart from other
systems available at that time. Today, many of these features are common place.



multi
-
user

more than one user can use the machine at a time

supported v
ia terminals (serial or network connection)



multi
-
tasking, more than one program can be run at a time



hierarchical directory structure, to support the organisation and maintenance of
files



portability

only the kernel ( <10%) written in assembler. This m
eant the operating system
could be easily converted to run on different hardware



tools for program development, a wide range of support tools (debuggers,
compilers


2.4.2 Windows

2.4.3 Macintosh

2.5 Servers

There are two types of servers:



Web servers and



Application servers.

Web servers are programs that run on top of the operating system and are designed to
respond to Hyper Text Transfer Protocol (HTTP) requests and to return HTML pages
to the browsers. We will present two web servers:



the Microsoft In
ternet Information Server (IIS) and



the Open Source Apache web server from the Apache software foundation.

Application servers are technologies that run in conjunction with a web server.
Application servers allow us to add interactivity and "intelligence
" to regular web
sites.

Application servers are often add
-
ons to web servers that allow the developer to write
logic written with a server side scripting language. A group of scripts working together to
perform a specific task is called a web application.
The application interacts with the
user via the web server that sends regular HTML pages which the application generates
on the fly. Each server technology supplies its own application server which is
responsible for handling and interpreting the scripts
written in scripting languages.

Scripts that run on the server rather than on the client (the browser) offer flexibility and
added security. Web applications add flexibility as they are shielded from the browsers'
limitations. For instance, web application
s can deliver a web page specifically catered to
different web browsers. If a user is using Netscape, the HTML she will receive from the
application might be very different than the one she will receive if she uses Internet
Explorer. Server
-
side scripts ad
d security, as the script on the server remains invisible to
the user. The user sees only the HTML that is the output of the script running on the
server. In this model things such as passwords, and intellectual properties are protected.

2.5.1 Apache

Apach
e is the leading web server. Apache can run on, among others, Windows, UNIX,
Linux, Macintosh operating systems.

Most applications developed on Apache use either the Common Gateway Interface (CGI)
combined with Perl for scripting, use a JSP application se
rver or PHP.

Like most UNIX friendly environments, Apache administration is mostly done through
the command line interface.

2.5.2 Internet Information Server (IIS)

Internet Information Server is bundled with Windows servers. Active Server Page (ASP)
is th
e default web application technology on IIS, but it's possible to use any other
application server such as JRun or ColdFusion.

IIS is more than just an HTTP server. It includes a File Transfer Protocol (FTP) server, a
Simple Mail Transfer Protocol (SMTP) s
erver, and a Network News Transfer Protocol
(NNTP) server.

The administration of IIS is greatly simplified by the Internet service manager. Most of
the operations can be done through the graphical user interface and will feel familiar to a
Windows administ
rator.

As with any web server, it's very important to make sure that the latest patches are
installed on IIS. Microsoft is regularly releasing these patches to fix security breaches
that are discovered on the server.


2.6 Conclusion

Web Applications are c
lient sever applications which can be implemented by a
combination of tools and technologies. Some of which implements the client, business
logic application, server and others for the storage.

The client can be implemented by any browser be it Internet ex
plorer (Microsoft) or
Netscape Navigator which is Open Source. It can be down loaded free from Netscape.

The use of Netscape Navigator during application development can contribute to
development costs reducing costs for non Microsoft application technolog
ies.



The application sever is developed by the language developers. Application servers are
responsible for the interpretation of the coding language. The cost of these application
servers vary from $0 to thousands of dollars depending on whether propri
etary or open
source. For cost effective development, cost is considered a critical factor provided other
factors remain constant. PHP is the defector language for Apache web server and Linux.

A Web server is responsible for serving web pages to the client
. The common ones are
IIS and Apache IIS is commercial while Apache is free. More over PHP is use by
--------
in the word.


A database is used to store data. Some DBMS are commercials and others Open Source.
The most popular DBMS among the open source is MY
SQL competing with SQLserver
a commercials DBMS. Its benchmark against other DBMS is below.


Reading 2000000 rows by index


Seconds


Seconds


mysql

367

249

mysql_odbc

464


db2_odbc

1206


informix_odbc

121126


ms
-
sql_odbc

1634


oracle_odbc


20800


solid_odbc

877


sybase_odbc

17614


Inserting (350768) rows


Seconds


Seconds


mysql

381

206

mysql_odbc

619


db2_odbc

3460


informix_odbc

2692


ms
-
sql_odbc

4012


oracle_odbc

11291


solid_odbc

1801


sybase_odbc

4802



In the above test MySQL was run with a 8M index cache.

http://www.mysql.com/information/benchmarks.html
.

It was run by the benchmark suite, downloaded from a MySQL source distribution,

install the perl DBI driver, the perl DBD driver.

From the benchmark in the above table MYSQL is the best in the whole list so there is no
need of going in for a commercial DBMS for the same purpose.





Linux is a free Operating system, which is renow
n of its security and robustness. There is
no need for spending any coin for purchasing the operating system.


3. Development Life Cycle


3.1.Introduction

Complex Web

applications handle sophisticated business transactions online, such as

online banking,

stock trading, and interactive database queries. They

may be full
-
blown
Java applications running on the client side (fat client), but its

code is automatically
downloaded from the server, with multi
-
tiered cli
ent/server architecture. Alternatively,
they
could be applications based

on ActiveX technology and Active Forms, which
executes on both the cli
ent and the server, or PHP server technology running on server
only (thin client).

Complex Web database systems are the cornerstone technology for E
-

commerce
. Development of such industrial
-

strength Web applications needs through
planning like developing database applications.

Selecting appropriate Application Development Tools and Technologies, is not the only
activity that enables one to develop cost effec
tive web application systems. Software
engineering procedures play a big role in this aspect. Determining an appropriate system
life cycle is critical to the reduction of system maintenance cost, and development time.

3.2 Waterfall model

3.3 V
-

modal

3.4
Bohr spiral modal

3.5 Prototyping methods

3.5.1 Rapid prototyping


3.5.2 Modified prototyping

3.6 Extreme programming



4.Property Brokerage system(PBS)

In view of this research, the property brokerage system was develop using modified
prototyping method (
described is section 3.6).

4.1 Definition

PBS is a generic system which will be used by property brokers to acquire property and
customers online by use of the Internet.

4.2 Analysis

Analysis of requirements was done particularly by reading news
-
paper
adverts of the
property brokerage companies (appendix)

4.3 Design

Design was done by using Universal Modelling Language (UML), use of Entity Relation
Modelling (ERM) with use case.

4.4Implementation

(Documentation and screen shots)

4.5 Platform selection

T
he operating system is open source and it is.

Linux. For the web server the choice is apache, it is open source and compatible with
Linux.

4.6 Technology selection

Three
-
tyre architecture is selected because of the use of the Internet clients computer
spec
ifications are not known.

4.7 Language selection

Languages considered
open source

for cost effective ness

Choices java and PHP, but PHP takes the show because of its simple learning curve and
the current number of sites built using it.

4.8 DBMS selection

The open source DBMS are mysql, Hsql, postages, but mysql takes the show because of
its outstanding bench mark with others.



4.8 Documentation

user manual (
appendix)

code (appendix)

4.9 Maintenance


(Done after the first deployment
)