Web Development Workshop May 24-25, 2008 Rajshahi University
1. Web Development Workshop May 24-25, 2008 Presenter: Md. Mahbubul Islam Lecturer Dept. of Computer Science and Engineering, University of Rajshahi. Organized By: Web Club, CSE, RU
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12. Accessing HTML Files Note: The file is just retrieved no code is executed on server Note2: HTML tags interpreted on client by browser. http protocol Your PC (Internet connected) Web Server (Internet connected) URL: www.myserver.com/ funstuff.html Web browser Find Web server at www.myserver.com Web server receives request Sends file with funstuff.html The file funstuff.html Here are some fun things to do: 1. Play baseball. 2. Go swimming. 3. Go to a concert. Web browser
13.
14.
15. Basic HTML Page <HTML> <HEAD> <TITLE> </TITLE> </HEAD> <BODY> </BODY> </HTML> All HTML pages require the following basic structured tags The text is added here These tags must appear at the end of the HTML page These basic structured tags should only appear once per HTML page i.e: only one <body> tag and one </body> tag etc
16. Basic HTML Page <HTML> <HEAD> <TITLE> My Dublin Homepage </TITLE> </HEAD> <BODY> Dublin is a city...... <center><u> This is a sample <b> HTML </b> line formatted </u></center> </BODY> </HTML>
38. How PHP Pages are Accessed and Interpreted 2. Send Request for PHP file 6. Return Results Please Enter A Phone Number Submit Erase 1. Web Browser Web Browser Phone Query Results: That is John Doe's Phone Number 7. Web Browser Your PC (Internet connected) WebServer (Internet connected) Web Server Software 3. Receive request, find file and read it. 4. Execute PHP statements 5. Send results back.
39. HTML in a PHP page <head> <title>PHP Info</title> <?php print("PHP Stats on the Server"); ?> </head> <body> <?php phpinfo(); ?> And print some more text here! </body> </html> <script> block in <head> <script> block in <body> Language we are using is PHP Generate HTML “ on the fly” with print(...);
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63. The for loop A counting loop is usually implemented with for for ($i=0; $i < $count; $i++) { print("<br>index value is : $i"); } initialize check for limit update loop control index shorthand for i=i+1 one or more statements in the loop body
143. Layered Architecture Database Web Browser Client Hardware Server Hardware Server-side Programming Interchange Language Client-side Programming (PC, Unix) (MySQL) (PHP) (HTML, XML) (JavaScript) (IE, Firefox) (PC) Business rules Interaction Design Interface Design
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
Editor's Notes
Almost from the beginning, the Internet allowed people to make files available for downloading. This was by means of ftp, the file transfer protocol, which you’ve already used. Ftp was developed over the years 1971-1974. But there was no mechanism for automatically fetching a document that was referred to in another document – a human had to run the ftp tool, log in on the remote machine, navigate to the directory, and request the file. Except for plain text documents, any formatting required having the correct application to display the particular format, and formats and applications were specific to each type of operating system. Even if automated linking of documents had existed, the only way to find out about a document would be for one person to tell another, or to find a link to some other document in a document one already had.
While working as a software engineer at CERN, the main European high-energy physics lab, Tim Berners-Lee called attention to the reference problem, and proposed a way of dealing with it: links embedded in documents that specify location of another document, automated retrieval, simple format for text documents, means of displaying them. Marc Andreessen and co-workers wrote Mosaic with public funding, then went off to form Netscape, which offered a browser based on Mosaic. This was the original no-apparent-business-model Internet company, because they offered their browser for free. No choice, as they were already taking flak for using a publicly funded tool as the basis for their product. The W3 Consortium is the semi-official standards organization for the Web – semi-official in the sense that it can’t enforce its standards. Certain large companies with a lot of market share tend to ignore the standards or the desire for interoperability when it is convenient for themselves. WebCrawler is often given credit for being the first crawler-based search engine. It was developed right here at the UW. Lycos, like Netscape, served as a model for later Internet companies. It holds the record for the fastest time from launch to IPO in the history of the NASDAQ. AltaVista was for years the main search site. It did not rank results, but had features available nowhere else that allowed the user to control the sort order for results. Only Ask Jeeves today has something similar.