Hi,
As I gather that you know very little or maybe nothing at all about
PHP and ASP, I will first give you bits of information that will give
you a general picture of what both technologies actually are. After
that, I will give you some information about the differences between
PHP and ASP.
Last but not least, I will give you some links to good tutorials for
beginners about PHP and ASP.
About PHP in general:
"PHP (officially "PHP: Hypertext Preprocessor") is a server-side
HTML-embedded scripting language.
At the most basic level, PHP can do anything any other CGI program can
do, such as collect form data, generate dynamic page content, or send
and receive cookies.
Perhaps the strongest and most significant feature in PHP is its
support for a wide range of databases. Writing a database-enabled web
page is incredibly simple."
PHP Online.biz
http://www.phponline.biz/php/whatisphp.php
"PHP is a server-side, cross-platform, HTML embedded scripting
language."
That's a mouthful, but if we break the definition down into smaller
pieces, it is easier to understand.
-server-side: This means that PHP scripts execute on the Web server,
not within the browser on your local machine.
-cross-platform: Cross-platform means that PHP scripts can run on many
different operating systems and Web servers. PHP is available for the
two most popular Web server configurations (IIS running on Windows NT
and Apache running on UNIX).
-HTML embedded scripting language: This means that PHP statements and
commands are actually embedded in your HTML documents. When the Web
server sees the PHP statements in the Web page, the server executes
the statements and sends the resulting output along with the rest of
the HTML. PHP commands are parsed by the server much like Active
Server Pages or Cold Fusion tags.
Like most server-side scripting languages, PHP is excellent for
creating dynamic Web sites based on database content or different
characteristics of browsers. Through the use of external libraries and
functions, PHP can:
-build templates to ease site maintenance
-create graphics on the fly
-serve different content to users based on their browser, IP address,
date and time, or numerous other chacteristics
-conduct online surveys
-connect databases like Oracle or MySQL to the Web
-communicate with external Web sites
-build discussion forums or Web-based e-mail programs
-read and process XML
TeamWeb
http://www.utexas.edu/learn/php/whatcanido.shtml
PHP is a scripting language, like JavaScript, that works on the
server-end of web pages rather than the browser end. PHP works much
like server-side includes. It is a full programming language, however,
and allows you to do much more with your web pages than server-side
includes. At its most basic, though, PHP is just another server-side
language.
PHP is also optimized for forms and accessing databases."
What is PHP?
http://www.hoboes.com/html/NetLife/PHP/index-WHAT.html
About ASP in general:
The following is something a website owner wrote about a ASP site he
has:
"The web page you are reading does not really exist. You might expect
there to be an HTML document (i.e. web page) on my web server which
was sent to your web browser...but that's not the case at all. What
actually happened when you requested this page was far more
interesting. The file you requested was an ASP file which I wrote and
placed on my web server, but this file is not a web page...it is a
script which is designed to build a web page. The page you're reading
was built mere milliseconds before it was sent to your web
browser.
Therefore, it is possible to build truly dynamic web
pages.
In that case, it's possible for a single ASP file to have
millions of different "faces", if the database has that many records!
Active Server Pages
http://www.davesabine.com/web/asp.asp
"Active Server Pages or ASP, as it is more commonly known, is a
technology that enables you to make dynamic and interactive web pages.
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 extesion .asp instead of .htm, 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, no
server, no active pages.
As ASP was first introduced by Microsoft on it's web server, Internet
Information Server (IIS), that runs on Windows 2000/XP Pro/NT4, it is
this web server that ASP pages usually run best on."
Web Wiz Guide
http://www.webwizguide.info/asp/tutorials/what_is_asp.asp
"ASP basically allows me to dynamically generate the HTML that your
browser sees. Using server-side JavaScript I can write code that can
display information from a database, and even based on your browser
send out completely different HTML.
Maintenance of an ASP site is much simpler because of SSI (Server-Side
Includes). This allows me to have a Header() function in one file that
every page on the site includes. If I want to change the page header I
just change that one file - try that with HTML!
As far as you or your browser is concerned it's a plain-jane HTML
page. View the source HTML for this page and you'll see another
advantage - although I'm looking at perfectly formatted and easy to
read code, all you see is virtually unintelligible HTML with no spaces
or comments.
This dramatically speeds up my pages too since I'm sending less data
to your browser. When converting the site from FrontPage to ASP I saw
some pages shrink from 40kb to 3kb, which translates to a speed
improvement on a typical modem from 12 seconds to less than 1!"
Cover Your ASP
http://coveryourasp.com/AboutASP.asp
"ASP can be defined as code which can be put into an html page to make
it respond dynamically to user requests. It is written in a mixture of
vbscript (server side) and javascript (client side). If the server is
able to decode it, it can replace ASP code with HTML code and send
back to the user a plain HTML page. If the user clicks view-source, he
won't see the ASP code, he will see the HTML code that the ASP code
produced. For an example, view our online catalogue from the link on
the left. The ASP page opens a database of our products, formats an
html page and displays the items. It turns the item code into a
clickable link to another ASP page. When you click the link, that ASP
page formats another HTML page with information about the specific
item. The benefit to you: At no time did you have to download any
application to connect to our database. ASP sent it all to you in a
format your browser could handle. The benefit to us: We no longer have
to create a new page every time we add a product to our line. We no
longer have to review our pages to make sure it reflects the latest
pricing. All it takes is an entry in our database and ASP does the
rest."
What Is (Are) ASP?
http://www.ygoodman.com/asp.asp
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
What can ASP do for you?
-Dynamically edit, change or add any content of a Web page
-Respond to user queries or data submitted from HTML forms
-Access any data or databases and return the results to a browser
-Customize a Web page to make it more useful for individual users
-The advantages of using ASP instead of CGI and Perl, are those of
simplicity and speed
-Provides security since your ASP code can not be viewed from the
browser
-Since ASP files are returned as plain HTML, they can be viewed in any
browser
-Clever ASP programming can minimize the network traffic
Introduction to ASP
http://www.w3schools.com/asp/asp_intro.asp
About differences between PHP and ASP:
"First of I don't think there is much difference between PHP and ASP-
both accomplish the same- get and manipulate data and write to
browser."
http://www.devshed.com/Server_Side/XML/XMLwithPHP/XMLwithPHP1/comments/993170112/993508937/994166093/994242641
"I much prefer PHP, obviously... But posting to a PHP list isn't going
to
get you a very objective answer. I find PHP more versatile and easy to
use, but an ASP programmer may tell you the same thing about ASP."
Neohapsis Archives
http://archives.neohapsis.com/archives/php/2001-08/0003.html
"I'm a (former) ASP programmer who just made the leap from ASP to PHP
about 2 weeks ago. A week ago I got my entire web-portal recoded to
use PHP, a move that experience tells me can't be done as quickly and
easily with ASP. All religious arguments aside, one must admit that
(1) PHP is well documented and VBScript isn't (period); (2) PHP has
many more USEFUL functions built-in that are already debugged and
working; (3) the examples one finds on php.net, phpbuilder.net, or any
other knowledge base actually WORK and are usually pretty clear; (4)
there is absolutely no question that PHP's notion of security is truly
secure, 100% in diametric opposition to IIS/ASP. I've tested that to
destruction and am confident enough in it to release PHP as an
alternative language for my web-hosting customers.
..
Now, if a paying customer insists that I do work for them using ASP,
of course that's what I'll use. But I strongly advise against it now,
given the points above. With only a couple of weeks of PHP under my
belt, I'm still confident enough in the language itself and the
documentation around it that I will be able to do any web job that
comes along."
Neohapsis Archives
http://archives.neohapsis.com/archives/php/2001-08/0003.html
"Both ASP and PHP are server-side scripting environments. ASP is
Microsoft's solution and utilizes its scripting languages -- VBScript
and JScript. PHP implements its own scripting language, which is
placed "in-line" in the document. The primary difference is that ASP
is a Microsoft technology that was designed to run on IIS and Windows
NT. This has change with the introduction of other ASP
implementations. PHP is an open-source (GPL) option that can be used
with almost any Web server, because its interpreter can be run as a
standard CGI."
Bandwith Market
http://www.bandwidthmarket.com/resources/newsletter/update.networkcomputing.com/nwc_online/20010926.NetworkComputingOnline.nwconline.update_networkcomputing_com.txt
Concluding:
Both PHP and ASP can be used to dynamically create web pages from
various sources, most notably being databases. That is they biggest
plus they have when seen in relation to HTML: your website can
automatically be updated and you can automatically personalize your
website for each visitor.
The drawbacks of course are that PHP and ASP are more difficult than
HTML and one might be overwhelmed by all the information and
possibilities that are available. I hope some of the tutorials I'll
give you will help here though!
Another drawback of ASP is that it cannot be used on every server.
Although PHP is more flexible, it's difficult to say which of the two
is better. I would suggest that you try some of the different
tutorials and then decide which you are going to use.
Tutorials:
PHP:
Some good PHP tutorials can be found here:
Introduction to PHP, Zend.com:
http://www.zend.com/zend/art/intro.php
PHP Tutorial, Zorka.com:
http://www.zorka.com/index.php/phptutorial/main/event=lesson/intro
ASP:
Some good ASP tutorials can be found here:
Web Wiz Guide:
http://www.webwizguide.info/asp/tutorials/default.asp
Introduction to ASP:
http://www.w3schools.com/asp/asp_intro.asp
Kathi's Active Server Pages:
http://www.web-savant.com/users/kathi/asp/start.html
ASP Tutorial, Advantage.com:
http://www.advantage.co.nz/ur/aspquiz.htm
Other:
At the following link you can download PHP:
PHP.net:
http://www.php.net/downloads.php
Here, you can find instructions on how to install ASP:
Introduction to ASP:
http://www.w3schools.com/asp/asp_install.asp
Search strategy:
Google:
+what is PHP OR +what is ASP
://www.google.com/search?hl=en&ie=UTF-8&oe=UTF-8&q=%2B%E2%80%9Dwhat+is+PHP%E2%80%9D+OR+%2B%E2%80%9Dwhat+is+ASP%E2%80%9D+
difference between ASP and PHP
://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=%E2%80%9Cdifference+between+ASP+and+PHP%E2%80%9D+&btnG=Google+Search
I hope this answer is to your satisfaction! If you have any more
questions or if something is not clear, please ask for a
clarification.
Kind regards,
paul_b_18-ga |