Umeå University Department of Computing Sciences se-01 87 umeå sweden index



Download 81.64 Kb.
Date conversion28.01.2017
Size81.64 Kb.



PHP vs HTML


Abubakr Saeed : ens03asd@cs.umu.se

Khurram Ali Khan : ens03kkn@cs.umu.se

Assignment #2


May 5, 2005

New Media tdbd07

Supervisior : Thomas Person

top@cs.umu.se



Umeå University

Department of Computing Sciences

SE-01 87 UMEÅ

SWEDEN


INDEX


Index

TOPIC

Page

1

HTML History

2

2

HTML introduction

2

3

PHP History

3

4

PHP introduction

3

5

The way PHP work in back ground

4

6

HTML structure and comparison

5

7

PHP structure and comparison

9

7.1

PHP vs PERL

9

7.2

PHP vs Cold Fusion

10

7.3

PHP vs ASP

11

7.4

PHP vs ASP.net

11

7.4.1

PHP & ASP.net comparision

11

8

Future of PHP

12

8.1

PHP popular Score bord

12

8.2

Organization using PHP

12

9

Conclusion

12

10

Reference

13
1. HTML History

The origin of html took place with the birth of internet more precisely world wide web, before 1994 there were multiple informal HTML standards use by the computer community so till that time there is no official HTML 1.0 specification.The need to standardized the html is that During 1993 and early 1994, lots of browsers had added their own bits to HTML dragging the language to becoming ill-defined.

In early 1994, an Internet Engineering Task Force (World Wide Web community) working group was set up to deal with HTML, then called 'HTML+', designed originally to be "A superset of HTML. In an effort to make sense of the chaos, Dan Connolly and colleagues collected all the HTML tags that were widely used and collated them into a draft document that defined the breadth of what Tim Berners-Lee called HTML 2. The draft was then circulated through the Internet community for comment. Dan took into account numerous suggestions from HTML enthusiasts far and wide, ensuring that all would be happy with the eventual HTML 2 definition. He also wrote a Document Type Definition for HTML 2, a kind of mathematically precise description of the language.The first formal specification was therefore given the version number 2.0 in order to distinguish it from unofficial "standards". Works on HTML+ continued, but this never became a standard.

in March, 1995, the newly formed W3C porposed HTML 3.0 standard , this version of html provide many new capabilities such as support for tables, text flow around figures and the display of complex math elements. It was designed to be compatible with HTML 2.0 version, but the new version of html was too complex and was not supported by many browsers.The draft of html 3.0 expired in September 1995.

HTML 3.1 was never officially proposed, and the next standard proposal was HTML 3.2,

The version of html that adopted many browser-specific elements ,attributes that’s been created for netscape and Mosaic browsers.

HTML 4.0 has adopted many browser-specific elements and attributes, but at the same time began to try to 'clean up' the standard by marking some of them as 'deprecated'.There will no longer be any new versions of HTML. However, HTML lives on in XHTML, which is based on XML. [Www, 002]
2. HTML Introduction

H-T-M-L are initials that stand for Hyper Text Markup Language

HTML need a rendring software called an HTML user agent, the most common example of which is a web browser. HTML provides a means by which the document's main content can be annotated with various kinds of metadata(data about data) and rendering hints. The rendering that is oriented toward the presentation of text documents with minor text decorations, such as specifying certain word be underlined or that an image be inserted, imagemaps, and form definitions that control web browsers. The metadata may include information about the document's title and author, structural information such as an expression of how the content is segmented into arbitary divisions, headings, paragraphs, lists, etc, and information that allows the document to be linked to other documents to form a hypertext web.

HTML is a text based format that is designed to be both readable and editable by humans using a text editor. However writing and updating all your pages by hand in this way is time consuming, requires a good knowledge of HTML and can make consistancy difficult to maintain.For that purpose there are many html editors which makes work easy for those who willing to build a web page from scratch,those editors are Macromedia, Dreamweaver, Microsoft FrontPage and many more which allow web pages to be treated much like word processor documents.

The web pages that is purely made by using HTML are static ,the developer of the web community realized that html is very restricted and slow and they need tools to build dynamic web pages.

The outcome is the combination content and presentation by using a server-side scripting system (PHP, ASP, etc) to make the final HTML web page. The complexity of this may range from just pulling a text file of content into a html framework with all the page styling to complex processing done by content management systems

HTML is also used in email. In this case the message will be composed with something built into the mail client that is similar to a gui HTML editor then it is wrapped with the mime headers and sent to the receiving mail client which renders the HTML generally by using some form of browser control. Use of HTML in email is quite controversial and many mailing lists deliberately block it. [Www, 002]



3. PHP History

PHP was originally designed as a small set of Perl scripts, followed by a rewritten set of CGI binaries written in C by the Danish-Canadian programmer Rasmus Lerdorf in 1994. In 1995, when Lerdorf had combined it with his own Form Interpreter to create PHP/FI. Zeev Suraski and Andi Gutmans, two Israeli developers of the Technion - Israel Institute of Technology, rewrote the parser in 1997 and formed the base of PHP. After months in beta, the development team officially released PHP/FI 2 in November 1997. Public testing of PHP 3 began immediately and the official launch came in June 1998. Suraski and Gutmans then started a new rewrite of PHP's core, producing the Zend engine(The Zend Engine is an open-source scripting engine, commonly known for the important role it plays in the web automation language PHP) in 1999 . They also founded Zend Technologies in Ramat Gan, Israel which has since overseen the PHP advances. In May 2000, PHP 4, powered by the Zend Engine 1.0, was released. On July 13, 2004, PHP 5 was released, powered by Zend Engine II (formerly known as Zend Engine 2). [Www, 01]



4. PHP Introduction

Preprocessor Hypertext PHP is a server-side scripting language for creating dynamic Web pages. You create pages with PHP and HTML. When a visitor opens the page, the server processes the PHP commands and then sends the results to the visitor's browser, just as with ASP or Cold Fusion. Unlike ASP or Cold Fusion, however, PHP is Open Source and cross-platform. [David, 2002]

PHP is easy to use and is similar to the most common structured programming languages (which are based on splitting programs into sub-sections, each with a single point of entry and of exit)most notably C and Perl (and from version 5, Java) allows most experienced programmers to start developing complex applications with a minimal learning curve.

It also enables experienced developers to get involved with dynamic web content applications without having to learn a whole new set of functions and practices. The most attractive parts of PHP is that it is more than just a scripting programming language (are computer programming languages designed for "scripting"or “connecting diverse pre-existing components to accomplish a new related task” the operation of a computer).

Due to its modular design, PHP is also used to develop GUI applications (using PHP-GTK), and can be used from the command line just like Perl or Python. PHP allows interaction with a large number of relational database management systems( which is based on the relational model), such as MySQL, Oracle, IBM DB2, Microsoft SQL Server, PostgreSQL and SQLite while maintaining a simple and straightforward syntax. PHP runs on most major operating systems, including UNIX, Linux, Windows, and Mac OS X, and can interact with many major web servers.

The Linux, Apache, MySQL, PHP (LAMP) architecture has become popular in the Web industry as a way of deploying inexpensive, reliable, scalable, secure web based applications.

When built as an Apache module, PHP is especially lightweight and speedy. Without any process creation overhead, it can return results quickly, but it doesn't require the tuning of mod_perl to keep your server's memory image small. [Www, 01]

5. The Way PHP works in BACK GROUND
Php is a web specific and its implementations are mostly web based application, The way php works in a background can be easily understood by the example in which we have MySQL server as a database server ,Apache as web server ,PHP and of course web browser.

The whole idea of a database-driven Website is to allow the content of the site to reside in a database, and for that content to be pulled from the database dynamically to create Web pages for people to view with a regular Web browser.

Let say, that we have a visitor on one end of the system who uses a Web browser to request a page, and expects to receive a standard HTML document. On the other end we have the content of our site, which sits in one or more tables in a MySQL database that understands only how to respond to SQL queries (commands).

Figure 1. PHP retrieves MySQL data to produce Web pages.[ref1]

As, Figure 1




  1. The visitor’s Web browser requests the Web page using a standard URL.

  2. The Web server software (Apache) recognizes that requested file.php, so the server interprets the file using its PHP plug-in .

  3. Certain PHP commands mysql_connect(‘host’,’user’,’pw’) connect to the MySQL database and request the content that belongs in the Web page.

  4. The MySQL database responds by sending the requested content to the PHP .

  5. The PHP stores the content into one or more PHP variables, output the content as part of the Web page.

  6. The PHP plug-in finishes up by handing a copy of the HTML it has created to the Web server.

  7. The Web server sends the HTML to the Web browser as it would a plain HTML file.


6. HTML Structure and Comparison

An HTML 4 document is composed of three parts:



  1. a line containing HTML version information,

  2. a declarative header section (delimited by the HEAD element),

  3. a body, which contains the document's actual content. The body may be implemented by the BODY element or the FRAMESET element.

White space (spaces, newlines, tabs, and comments) may appear before or after each section. Sections 2 and 3 should be delimited by the HTML element.

Here's examples of simple HTML document:




... contents of the HTML header ...
... content consisting of all visible elements here ...


The database is protected by copyright ©ininet.org 2016
send message

    Main page