You are on page 1of 17

Internet

Application Individual assignment

Table of Contents
1. Introduction to the assignment....................................................................................2

2. What is Scripting Language?......................................................................................3

3. ASP..............................................................................................................................4

3.1. Abilities of ASP file.............................................................................................5

3.2. Why ASP is much important than other Scripting languages..............................5

3.3. How Does ASP Differ from HTML?...................................................................6

3.4. Advantages of ASP and where to use ASP..........................................................6

3.5. Example where ASP is performed.......................................................................8

3.6. Disadvantages of ASP..........................................................................................8

4. PHP..............................................................................................................................9

5. Comparisons of ASP Vs PHP...................................................................................11

5.1. Price....................................................................................................................11

5.2. Capability...........................................................................................................11

5.3. Speed..................................................................................................................11

5.4. Open Source.......................................................................................................11

5.5. PHP is platform-agnostic...................................................................................12

5.6. All else being equal, PHP is faster than ASP.....................................................12

5.7. PHP is secure......................................................................................................12

5.8. Coding in PHP is more efficient than in ASP....................................................12

6. Perl Scripting.............................................................................................................13

7. ASP, PHP & Perl Comparison..................................................................................14

8. Conclusion.................................................................................................................15

9. Reference...................................................................................................................16

Discussion on Server Side Scripting - ASP | 1


Internet
Application Individual assignment

Introduction to the assignment


In this assignment, we are to select a title for our own interest. And complete the
assignment. The objectives for this assignment are,

 Develop an awareness of Internet-enabling technologies in the area of Internet


applications;
 Introduce student to the current and latest technical issues in the area of the
Internet applications and technologies;
 Develop the students’ practical ability to report on current uses of the Internet
applications and technologies;

According to the given instructions I chose,

“Discussion on Server Side Scripting – ASP”.

Following is my work done for the


assignment regarding the title I chose.

Discussion on Server Side Scripting - ASP | 2


Internet
Application Individual assignment

What is Scripting Language?


A Script is a program that works in user’s browser, which triggers/response for the
user’s actions. It is a form of programming language that is usually interpreted.
Scripting is an ActiveX programming language. (W3Schools. 2000) Scripting
languages are simple and small when comparing to full-featured languages. Early days,
browsers allowed only the user of server-side script. Scripting language is used to
enhance web page design-requires the incorporation of scripts. (Russell Jones .A 2000).

It is easier to write the code in a scripting language than in a compiled language.


However, scripting languages are slower. Scripting languages can be used to create
specialized GUIs (graphical user interfaces) and forms that enhance the convenience of
search engines, Web-based e-mail and e-commerce. Many Web sites require that the
user's browser be set to run scripts to take advantage of all the features of the site. In
some cases, Web sites are practically useless unless the user's computer is set to run
programs locally in a scripting language.

Some of Scripting Languages are,

 VBScript  JScript
 XSL  Lotus Script
 DSSSL  Perl
 ECMA Script  PHP
 JCL  Python
 Java Script

(Anon. 2000)

Discussion on Server Side Scripting - ASP | 3


Internet
Application Individual assignment

ASP.
ASP stands for Active Server Pages.ASP is built by Microsoft Technologies.
ASP is a program that runs inside IIS. IIS stands for Internet Information Services. ASP
uses server-side scripting to dynamically produce web pages that are not affected by the
type of browser the web site visitor is using. The default scripting language used for
writing ASP is VBScript, although you can use other scripting languages like JScript
(Microsoft's version of JavaScript).
ASP pages have the extension .asp instead of .html, when a page with the
extension .asp is requested by a browser the web server knows to interpret any ASP
contained within the web page before sending the HTML produced to the browser. This
way all the ASP is run on the web server and no ASP will ever be passed to the web
browser.
Any web pages containing ASP cannot be run by just simply opening the page
in a web browser. The page must be requested through a web server that supports ASP,
this is why ASP stands for Active Server Pages.
As ASP was first introduced by Microsoft on its web server, Internet
Information Services (IIS), which runs on Windows 2000/XP Pro/NT4, it is this web
server that ASP pages usually run best on. (Anon. 2000)

Discussion on Server Side Scripting - ASP | 4


Internet
Application Individual assignment

(Anon, 2003)

• Abilities of ASP file.


As mentioned above dynamically edit, change, or add any content of a Web page.
Respond to user queries or data submitted from HTML forms. It can access to any data
set or databases and return the results to a browser. ASP will customize a Web page to
make it more useful for individual users. (Anon, 2000)

• Why ASP is much important than other Scripting languages.


Scripting language exposes an interface compatible with the Windows Scripting
Host. The two most common scripting languages for Microsoft Applications are
VBScript and JavaScript. Although there are other compatible scripting languages
(Pearl as example). For some software production companies, script means JavaScript
that runs on the server as JavaScript Pages.

First, VBScript is a subset of the visual basic language. In contrast, JavaScript


isn’t a sub-set of Java, though the two languages share much of the same syntax.
Netscape invented JavaScript because they needed a safe way to run inside a browser.
Jscript and JavaScript aren’t quite identical but they will evolve to become identical
over time, due to the ECMA standards. Almost all the browsers can execute JavaScript.
IE is the only browser that can execute VBScript. ASP is a server-side technology, All
ASP codes that will ever use runs on the server, not in the browser. The language you
use on the server doesn’t affect the browser one way or the other.

Second, VBScript is the default language that Microsoft chose to deliver with
Active Server pages. That means that most of the example code that comes with Asp is
in VBScript. (Russell Jones .A 2000)

Discussion on Server Side Scripting - ASP | 5


Internet
Application Individual assignment

• How Does ASP Differ from HTML?


When a browser requests an HTML file, the server returns the file. When a browser
requests an ASP file, IIS passes the request to the ASP engine. The ASP engine reads
the ASP file, line by line, and executes the scripts in the file. Finally, the ASP file is
returned to the browser as plain HTML

• Advantages of ASP and where to use ASP


ASP can perform many backend processing tasks for a web site, same way it can't do
many things particularly the client end operations. So there are many advantages of
using ASP to manage web pages. By using server side scripting language like ASP, we
can manage the content of any page and such dynamic code (or content) for the web
browsers. Users are more interested in design, content, speed etc. So there is no point in
asking ASP engine to work when there is simple html content to be displayed at
browser end. This will also improve the loading speed of the page. The user browser
does not understand scripts we run at server. Brower understands JavaScript (if
enabled), html, CSS etc. So whatever output sent to the browser has to be written using
these languages. So the task to be performed at client end can't be written at server end
using ASP.

ASP engine finishes its job of processing the code and then send the codes to users
browser. From this point on words till again the page request comes back to server,
there is no control of ASP on the page. ASP could not expect to perform some tasks
which are likely to happen at the client browser end. (Plus2net)

Discussion on Server Side Scripting - ASP | 6


Internet
Application Individual assignment

Enterprise Software Small Business Software


Advantages ASP delivery Onsite Installation Onsite Installation
Initial Software Cost None High Medium
Hardware to Server & Terminals,
Basic PC's Advanced PC's
Buy and Maintain Network
Done for you Usually done onsite
Custom Configuration Done onsite, expensive
remotely - -
& Software Upgrades or left to do it yourself
affordable expensive
Done for you - media
held offsite Do it yourself, Do it yourself,
Data Back-Up
in controlled you store media you store media
environment
System Reliability Advanced Unix Server, Enterprise Quality Windows based PC
From any PC on the Maybe
Home/Remote Access -
Internet
Features Complete Limited
Bar Coding,
Cash Drawers Yes Maybe
or Special Printers
Multiple Store Support Yes Unlikely
Move to onsite
installation is Must move data to, and
Transition to next level -
simple - nothing new learn, a new system
to learn
Monthly cost Low - -
Overall cost Lowest Highest Medium
Overall Functionality High Low
(Russell Jones .A 2000)

Discussion on Server Side Scripting - ASP | 7


Internet
Application Individual assignment

• Example where ASP is performed


There are many tasks which performed by ASP and we will try to understand what type
of job we should do at server end and what we will delegate to client end JavaScript or
HTML. Let us start with some tasks we want our web page to do. Here are some of the
common jobs we will discuss to get an idea on what to use for different tasks a web
page perform,

 Displaying Alert message in a small window


 Authenticating user before entering to members only area
 Validating data entered by user in a text box
(http://www.plus2net.com/javascript_tutorial)

• Disadvantages of ASP
The data security is one of the biggest problems which inhibit the further application of
the ASP platform. An ASP-oriented intrusion detection model was also proposed, and
the intrusion detection subsystem function was analyzed in detail as well as the
flowchart of the intrusion detection model. Finally the CA application model for the
ASP platform was studied. The security strategy proposed in this paper will efficiently
improve the function of ASP platform and enlarge its application scope.

(Linzhen Zhou , Defang Liu , Bin Wang, 2008)

Discussion on Server Side Scripting - ASP | 8


Internet
Application Individual assignment

PHP
PHP is a server side scripting language, widely used in internet programming. Formerly
referred to as “Personal Home Page Tools,” Hypertext Preprocessor is an open source
server side scripting language. It is very popular for developing web based software
applications because programmers can use it easily to create web pages with dynamic
content that interact with databases. PHP scripts are executed on the server. Users can
develop pages with dynamic content by using PHP. By using PHP users can interact
with database servers and manage the page content accordingly. The difference between
a static page like HTML and dynamic page like PHP is the way the server interpret the
request. PHP is a open source software, supports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.). the file extensions of PHP
files are “.php” or “.phtml”. PHP combined with MySQL are cross-platform (users can
develop in Windows and serve on a Unix platform). PHP runs on different platforms
(Windows, Linux, Unix, etc.)

(Anon, 2003)(PHP Introduction: What is PHP?, plus2net ) (W3School, 2000)

(Anon, 2003)

Discussion on Server Side Scripting - ASP | 9


Internet
Application Individual assignment

(Anon, 2003)

Discussion on Server Side Scripting - ASP | 10


Internet
Application Individual assignment

Comparisons of ASP Vs PHP

• Price
PHP is cheaper to implement that ASP.

• Capability
PHP gives us additional capability than if we were to code with ASP.

(Stephan Spencer, 2003)

• Speed
PHP is relatively much faster and stable than ASP, ASP is built on a COM-based
architecture so whenever a program tries to connect to a database or he calls a COM
object there is an overhead on the server, all this COM overhead adds up and slows
things down. Under PHP, everything runs in PHP's memory space. This means that PHP
code will run faster because there is no overhead of communicating with different COM
objects in different processes. Again ASP is slower and more memory intensive
applications than PHP's model because each ASP language compiler runs in its own
process. (Anon, 2004)

• Open Source
Open source software is a collaborative effort amongst a worldwide community of
volunteer programmers with a passion for technology. Programmers disparate
backgrounds and experiences join together to solve problems in new ways, thus
resulting in better software. Open source software is free to use, copy, and modify,
which makes it a great deal for our clients. It is also highly flexible, because it allows us
to extend the software and customize it for our clients’ requirements. Users don’t have
to reinvent the wheel when we embark on a project for a client, as there is an amazingly

Discussion on Server Side Scripting - ASP | 11


Internet
Application Individual assignment

extensive library of software written in PHP that’s free and available in source code
form. Whenever possible, users can repurpose their own extensive code library. But if
they haven’t already built a similar web application before, the best open source
software to meet the functional requirements and pick up where that software left off.
(Stephan Spencer, 2003)

• PHP is platform-agnostic
It will run on Linux, Solaris, Windows, and other operating systems as well. With ASP,
users also forced down a path that is very costly and painful to extricate their selves. For
example, what if a user wanted to switch web hosting providers to one that was more
reliable and had better customer service built based by Linux? ASP only runs reliably
on Microsoft Windows-based web servers.

• All else being equal, PHP is faster than ASP


ASP supports multiple programming languages. This architecture is inherently slower
and more memory intensive that PHP’s model because each ASP language compiler
runs in its own process. So when ASP detects a Begin ASP tag () it will do a context
switch back to the HTML parser. (Stephan Spencer, 2003)

• PHP is secure
IIS Server is notorious for its security holes. (Stephan Spencer, 2003)

• Coding in PHP is more efficient than in ASP


Typically the same functionality can be accomplished in less code with PHP than with
ASP. This is because the HTTP GET and POST variables are created automatically by
PHP as global variables, thus eliminating the step of extracting them from the ASP

Discussion on Server Side Scripting - ASP | 12


Internet
Application Individual assignment

Request object. PHP’s HTTP header manipulation functions are easier to use than in
ASP. (Stephan Spencer, 2003)

Perl Scripting
Perl is a “glue” language /“duct tape" language that combines features and syntax from
several common languages, most notably C, UNIX command shells, and even a bit of
Visual Basic. Perl is written in C and was developed on UNIX systems which most
noticeably define Perl Scripting roots and personality. However, Perl Scripting is a lot
like the English language in that it freely borrows key words, operators, and syntax
from other languages. The current version of Perl is quite large and complex compared
to earlier versions. Perl is an interpreted language like many other contemporary
interpreted languages, Perl Scripting compiles its source code (an ASCII text file) into
an intermediate "byte code" language after scanning for syntax errors, than interprets
the compiled byte code. Unlike traditional compiled languages, however, the
intermediate binary code is not written and saved as a machine readable object file. One
of the disadvantages of interpreted languages commonly given is the translation time
penalty each time the program is run. While this is generally true, Perl is quite fast and
efficient on contemporary operating systems. On the other hand a commonly cited
advantage of interpreters is their use as quick and (relatively) easy prototyping tools, an
area where Perl excels.

(Michael B. Huffman, 2005)

Discussion on Server Side Scripting - ASP | 13


Internet
Application Individual assignment

ASP, PHP & Perl Comparison


Past days web was only about HTML. Then ASP, PHP, Perl and ColdFusion
were built to help make web pages dynamic. Shortly after HTML took off, users wanted
to modify their HTML - like showing the current date and time, working with cookies
etc. Straight HTML tags couldn’t do so. So a language was invented, called PERL
(explained above). Perl was good, but it took memory too much. And it needed a huge
system to support it.
As the web took off, people realized that they needed a dynamic language that
was coded from scratch, which could run very quickly, with multiple users using it at
once, with very low memory and processor usage. With most corporate websites
running Windows, Microsoft worked on coding for a language that worked extremely
well with their web server, was quick and efficient. This was ASP. ASP was well
integrated with the IIS web server and was much better than PERL. Many corporate
sites began doing their coding in ASP.
But this didn't immediately help the non-Windows sites out there. They
struggled on with Perl. Forums in particular needed help, with many users all doing
things at once. That is when PHP was created. Most forums on the web were coded in
PHP. Many non-Windows website designers began to convert from Perl to PHP for
those memory gains.
As both languages gained in popularity, the inevitable crossover began, with
users on all platforms choosing from the languages based on their past knowledge.
Others changed in to bandwagon, and ColdFusion was introduced as a third party
solution. It was not really a programming language but a markup language like HTML.
This made it easier for non-programmers to add dynamic ability to their code without
concerning about advanced concepts and features.
Then users start to strongly defend their chosen language choice as "the best".
But really, just about anything you can do in one language; you can do in the others. It
all comes down to which you are personally most comfortable with.
Any language can be coded poorly - and create slow, memory-hogging websites.

Discussion on Server Side Scripting - ASP | 14


Internet
Application Individual assignment

Likewise, any language can be coded well - creating fast, efficient, dynamic sites that
do incredible things. It is always the responsibility of the programmer to take the
courses, learn the language as well as possible, and create code that shines.

Conclusion
By doing this research on ASP scripting language I can come to conclusion that ASP is
a good scripting language which runs on many platforms with ability to perform many
backend processing tasks for a web site, same way it can't do many things particularly
the client end operations than other scripting languages like PHP and Perl.

Discussion on Server Side Scripting - ASP | 15


Internet
Application Individual assignment

Reference

 Russell Jones, A.2000, Mastering Active Server Pages 3, BPB Publications,


Presswork, Delhi.

 SearchWinDevelopment, 06 Aug 2007.definitions, [Online], Available.


WorldwideWeb:URL:http://searchwindevelopment.techtarget.com/sDefinition/0,
,sid8_gci1265167,00.html [Accessed 30 July 2009]

 W3Schools, 2003. [Online], Available. WorldwideWeb:URL:


http://www.w3schools.com/ASP/asp_intro.asp [Accessed 29 July 2009]

 Plus2net, [Online], Available. Worldwide Web: URL:


http://www.plus2net.com/javascript_tutorial [Accessed 28 July 2009]

 Stephan Spencer, PHP versus ASP comparison, February 16th, 2003, [Online],
Available. WorldwideWeb:URL: http://www.netconcepts.com/php-versus-asp/
[Accessed 5 August 2009]

 PHP vs. ASP, 2003, [Online], Available. WorldwideWeb:URL:


http://www.phpbuddy.com/sub_articles.php?other_articles=9 [Accessed 2
August 2009]

Discussion on Server Side Scripting - ASP | 16


Internet
Application Individual assignment

 Michael B. Huffman, 08 MAR 2005, Perl Introduction, [Online], Available.


WorldwideWeb:URL:http://www.mhuffman.com/notes/language/perl_intro.htm
#STATE [Accessed 2 August 2009]

 Linzhen Zhou , Defang Liu , Bin Wang, December 20-December 22-2008,


Research on ASP-Based Information Security System, [Online], Available.
WorldwideWeb:URL:http://www2.computer.org/portal/web/csdl/doi/10.1109/IS
CSCT.2008.338/ [Accessed 4 August 2009]

 PHP Scripts, [Online], Available. WorldwideWeb:URL:


http://www.scripts.com/php-scripts/ [Accessed 10 August 2009]

 PHP Introduction, [Online], Available. WorldwideWeb:URL:


http://www.w3schools.com/php/php_intro.asp [Accessed 10 August 2009]

 PHP Introduction: What is PHP ?, [Online], Available. WorldwideWeb:URL:


http://www.plus2net.com/php_tutorial/php_introduction.php [Accessed 10
August 2009]

 Lisa Shea, 2009, ASP, PHP, Perl and ColdFusion, [Online], Available.
WorldwideWeb:URL: http://www.bellaonline.com/articles/art28533.asp
[Accessed 10 August 2009]

Discussion on Server Side Scripting - ASP | 17

You might also like