Conventional Web Development Overview for PHP and MySQL
Conventional Web Development with PHP and MySQL – Part 1
Forward: This is part 1 of my series, Conventional Web Development with PHP and MySQL. This part of the series, gives you an overview of Conventional Web Development.
The use of the phrase, “Web Development” is rather vague. In this series, Web Development means, the production of an application, which uses a database in an Internet server and users of the application access the database with web pages.
For the past 10 years or so, you have been hearing of web development. Today, there is a new kind of application, very similar to Web Development; it is called Active Client Pages. So, I refer to Web Development as defined above as Conventional Web Development, which is what I teach in this series.
This part of the series, gives you an overview of Conventional Web Development.
The database resides in an Internet server. One of the databases used for conventional web development is MySQL. Other databases like MSSQL, Sybase and Oracle are used; but they are not free. MySQL is free. In this series I use MySQL 5.1.4.
A web page is the page displayed by the browser. The main computer language used to produce web pages is, HTML. You have other associated languages like, CSS and ECMAScript. You also have an enhancement to ECMAScript, called DOM. In this series, I use HTML, CSS, ECMAScript and DOM, for the production of web pages.
When data is sent to the database from a web page (browser) at the client computer, it goes to the server. At the server, it is received by a script first before being sent to the database. It is the script that has the capacity to interface the database. The reverse happens when data leaves the database to the browser at the client. Such scripts are called server scripts. A language for such a script is, PHP. In this series, I use PHP 5.
Before reaching here, you should have covered the series in this blog beginning with the following titles:
Major in Website Design
Referential Integrity in Database
Implementing Database in MySQL
Introduction to MySQL Programming for Events
MySQL Access Privilege Overview
MySQL Binary Log File
MySQL Regular Expressions
To reach any of the series, just type the title and my name Chrys in the Search Box of this page and click Search.
What the Client sends and what he receives
The client would normally click a link on his web page (or type a URL in the address bar and press Enter) or fill a form and click Submit. When this is done, information moves from the client computer to the server computer. In return, the client can receive a web page or a piece of text, from the Internet server. If it is a piece of text, then the technology called, Ajax, has to be used. I will not explain or use Ajax in this series. Ajax is explained in the course titled, Major in Website Design, indicated in the prerequisite section above.
When a client fills a form in a web page and clicks the Submit button, the data of the form goes to the server as a set of name/value pairs. A pair consists of the name of the control field and the datum (singular for data) of the control. In the phrase “name/value”, name, is the name of the control and value is the datum of the field. The set of name/value pairs is called the dataset.
There are two common methods by which the dataset can be sent. These methods are called GET and POST. With the GET method, the information sent is something like:
The href value of a hyperlink can be coded in this form. That is why I said above that the client could send information to the server either by clicking a hyperlink or filling a Form and clicking its Submit Button. With the POST method for the Form, the information is coded and sent when the Submit button is clicked; you do not need to worry how the POST method sends its data.
At the server, the server script receives the dataset, process it, before sending the data to the database. We shall see how this is done in PHP later.
In order to use the database of must web development sites, you have to register as a member first, in the organization that has the database. Membership can be in many forms: a registered customer for an ecommerce company is a member. A member (reader or writer) for a social network like this one; an email user for an email site like yahoo.com; are other forms of membership. A client needs a minimum of user name and password, to register as a member of a web development site.
Any web development organization deals with emails. To make things simple, let me talk here about email sent to the client when he registers. When the client registers, with his credentials, his credential data is recorded in the database. During registration an email should be sent to the client automatically, welcoming him to the organization. This email may indicate to him his privileges (rights) in the organization.
In most organization, before a member can use a database, he has to login. Login involves filling a form with the user name and password in one of the sites web page. At the Internet host (server), the database server checks if the user name and password are for one person. If yes, the database server allows the user to use the database for one session. A session is the use of the site (database), continuously, for a short period of time. It can be 10 minutes, 20 minutes, 1 hour, 2 hours, etc.
At the end of the session, the client logs out by clicking a logout button (or link) in one of the sites web page. After logging out, the client can no longer use the database again until he logs in again.
Examples of Web Development Websites
Examples of Web Development Websites are email sites (e.g. yahoo.com), social networks and ecommerce sites. In fact, the project we shall carry in this series is for a small ecommerce site.
At this point you have got an overview of Web Development. So, we stop here and continue in the next part of the series.
Related LinksConventional Web Development with PHP and MySQL
PHP Validation of HTML Form Data - Made Simple
Web Live Text Chart Application with PHP and MySQL
Searching a Social Network Site with PHP and MySQL
Page Views with Ajax and PHP and MySQL
More Related Links
Major in Website Design
Web Development Course