Server side web programming

Question 1 - Case Study - 50 marks.

Read the following scenario, and then answer this question by writing a report. Some of the following questions in this examination paper also refer to this scenario.

You have been commissioned to develop an ecommerce website called The system must provide features for selling and buying for business to consumer (B2C) and Consumer to consumer (C2C) customers. Other main features of selling include buy it items, auction items. Buyers can pay for their purchase by cheque, credit card or pay pal. However, at the moment only cheque is accepted. In future, there is an option for credit card and paypal.

  1. As a designer, what technologies would you recommend to implement this website? - 7 marks
  2. Include in your answer a brief discussion of the capabilities of each of these technologies. - 11 marks
  3. What are the alternative technologies available that could be used and why? - 7 marks
  4. At present, does not have any plans of online payments using credit/debit cards. If it wants to provide these services to their clients, how this could be implemented? Are there any changes needed for the code that already exist for the operation of the website. - 7 marks
  5. Design a home page and provide the html code. What features do you think are essential to keep the users interest in the website?- 13 marks
  6. All transactions online are said to be stateless. How is that maintained in an ecommerce website? - 5 marks

Ans: The expected answer should discuss the following different technologies

  1. HTML for front end presentation, Java Script for front end data entry validation and Perl programming or similar server side programming.
  2. Capabilities of all the above
  3. Alternate technologies; JSP, ASP, PHP, Cold Fusion etc and their explanation
  4. Implemented using secured transactions, for example SSL, SHTTP etc. The code doesn't have to be changed.
  5. This tests students' design and presentation skills. Main features include a search facility, a clickable navigation map, a FAQ, A variety of processing options.
  6. The client connects to the server and sends a request.

The server sends a response and connection is lost.

The server and client do not know each other after words.

With these points, student has to explain with examples.

PART B: Answer any TWO of the following.

Question 1 - 25 marks

  1. What are proxies? What is the purpose of setting up a proxy server? - 4 marks
  2. A server that sits between a client application, such as a Web browser, and a real server. It intercepts all requests to the real server to see if it can fulfil the requests itself. If not, it forwards the request to the real server.

    Proxy servers have two main purposes:

    Improve Performance

    Filter Requests

  3. How does a client browser send the data that contains reserved characters, for example the characters '/', ':' etc to the server. What does it do to interpret them in a different way. - 4 marks
  4. Ans:

    • Many characters must be encoded within a URL for a variety of reasons.
    • Certain characters such as?, # and / have special meaning within URLs and will be misinterpreted unless encoded.
    • Characters are encoded by representing them with a percent sign followed by the two-digit hexadecimal value for that character based upon the ISO Latin 1 character set or ASCII character set
  5. What is the difference between static and dynamic web pages? [2 marks]
  6. Static web pages are hard coded and retrieved by the server and sent to the client. The content remains same for the life of the page unless it is changed

    Dynamic web pages are generated by the CGI application and can the content can be changed

  7. Compare and contrast the server and client content side negotiation. [ 5 marks]
  8. In server-side negotiation, the client sends a header indicating the forms of content it accepts, and the server responds by selecting one of these options and returning the resource in appropriate format

    In client-side negotiation, the client requests a resource without special headers, the server sends a list of available contents to the client, the client then makes an additional request to specify the format of the resource.

  9. Consider the following table Item, which has the following structure and sample data.

The answer should discuss,

  • SSL, Secure Socket Layer,
  • Certifying Authorities,
  • Digital certificates
  • Symmetric and Asymmetric cryptography
  • HTTP Basic Authentication may be sufficient for the system. However, the student has to explain the disadvantages of Basic Authentication. If Video Rental System accepts credit card payments, then SSL or other more secured technology must be used.
  • HTTPS must be discussed as an alternative technology.

The above scenario occurs in many situations when row data is to be displayed as column data. This could be done by assigning all retrieved data into an array and then imploding the array to convert into text in suitable html format. For this the main data structure would be an array and PHP function called implode.

Main logic:

  • Create a new array to hold row data
  • Retrieve the rows from the database
  • Loop thro the data and assign it to an array embedding with suitable html tags like to format the data in suitable format
  • Convert the array data into a string using implode function
  • Display it as html tags

Please be aware that the free essay that you were just reading was not written by us. This essay, and all of the others available to view on the website, were provided to us by students in exchange for services that we offer. This relationship helps our students to get an even better deal while also contributing to the biggest free essay resource in the UK!