Advanced Web Development Assignment
Advanced Web Development Assignment
A. With reference to the “automated teller machines{ATMs}”, explain the concept of the client-
server computing environment;
-The client are the ATM machines.
User interface
-Some simple application processing.
- The server is at the bank.
Most application processing;
Very large database of customer accounts.
B. Write a php code that will display the output shown below:
<html>
<body>
<?php
$P=php script(“P”)
If ($P== “php script”)
echo “This is php script!”;
else ($P== “not php script generated”)
Echo “This is not php script generated!”;
Elseif ($p== “php script”)
Echo “This is also php script!”;
?>
</body>
</html>
C. Discuss, stating examples where possible the following e-commerce models.
(i) Storefront model.
This model is essentially online shop. All of the products are listed on the site in an
online catalog. The buyer simply chooses what they want and pays. The product is then
shipped to them. Examples eBay, Amazon and Fiverr.
(ii) Shopping cart technology.
Is a piece of e-commerce software on a web server that allows visitors to have an
internet site to select items for eventual purchase. It allows customers to accumulate a
list of items for purchase. Example, Magento, Bigcommerce, X-CART.
(iii) The auction model.
Sellers offer products in an online auction and buyers buy on what they want to buy.
The buyer with the highest bid wins the product. Auction sites makes money by taking a
percentage of the selling price. Example eBay.
(iv) Name-Youth-Price Model.
Is a pricing strategy under which buyers make a suggestion for a product’s price. (unlike
the traditional way where sellers quotes a certain price) and the transaction occurs only
if a seller accepts this quoted price.
(v) The portal model.
Are online platforms where buyer-seller trading transaction are conducted.
Manufactures and distributors launch ecommerce portals to transit their buyers to an
online channel.
D. The figure below shows a php script that displays a list of books stored in a books MySQL
database;
(i) MySQL STATEMENT
(
Internet and wwwHow to Program 2e varchar (0-13-030897-8)
XML How to Program varchar (0-13-028417-3)
Perl How to Program varchar (0-13-028418-1)
Java How to Program varchar (0-13-012507-5)
Python How to Program varchar (0-13-092361-3)
)
(ii) php script
<html>
<body>
<?php
Function writeMyBook ($fname, $punctuation)
{
echo $fname . “Reference” . $punctuation . “<br />”;
}
echo “Name of the Book is”;
writeMyBookname(“Internet/ web XML”, “.” “.”, “.”)
echo “Name of the Book is”;
writeMyBookName(“Perl”, “!”);
echo “Name of the Book”;
writeMyBookName(“Java”, “!”);
echo “Name of the Book”;
writeMyBookName(“python”, “…”);
?>
</body>
</html>
E. Describe five various ways in through which the user can access a web server.
1. From URL IP addresses
The easiest way to access a website is to write the desired address into the address bar
located in the browser.
2. DNS server: a directory for IP addresses.
When a web address is entered into the search bar of the browser, the browser looks for
the requested domain in which cache.
3. The rooter as a link between computer and server.
The rooter is the interface between the internet and home network. It request data from
internet and distributes it to networking devices such as desktop computers, laptop and
tablets.
4. Data exchange via HTTP.
When the IP address of the chosen webpage is identified, the browser request the relevant
data for the page from appropriate web server. This takes place via HTTP in the form of data
package, which contains all the information the web server needs in order to deliver the
web page data.
5. Page rendering in web browsers.
Incoming data package from internet are finally forwarded from the rooter to the computer
on which the web page is accessed. The web browser then takes on the task of analyzing the
data packets.