INFS7202 Web Information Systems Semester One Final Examinations, 2018
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
School of Information Technology and Electrical Engineering
EXAMINATION
Semester One Final Examinations, 2018
INFS7202 Web Information Systems
Question 1 (3.5 Marks)
Three-tier (or Three-layer) architecture is widely used in web information system development
1.1 Write down the name of each tier and its main functionality. (1.5 Marks)
1.2 Compared to the traditional one-layer architecture, what are the major advantages of
Three-tier architecture? Please give the explanations from two aspects. (2 Marks)
Question 2 (2 Marks)
Which strategy was applied for the client-side design in your group project, a thin client or a fat client? Provide the justification on why this design is suitable for your project.
Question 3: Internet Protocol Suite (4.5 Marks)
3.1 The TCP/IP protocol architectural model has four abstraction layers, where Link
Layer is the bottom one. Write down the names of the other three layers in a top-down order. (1.5 Marks)
1: |
2: |
3: |
4: Link Layer |
3.2 Provide the full names of the following protocols and indicate which layers they
belong to. (3 Marks)
Protocol |
Full name |
Layer (the name of the layer) |
TCP |
|
|
IP |
|
|
FTP |
|
|
UDP |
|
|
Question 4: Cloud Computing (3 Marks)
4.1 Briefly explain the Cloud Computing Paradigm and list its main characteristics. (2 Marks)
4.2 List two major limitations of Cloud Computing. (1 Mark)
Question 5: Mobile Application Development (3 Marks)
5.1 Briefly explain what a native application is and what a hybrid application is in mobile application development. ( 1 Mark)
5.2 Comparing native and hybrid mobile application development, which one is better or they both have advantages and limitations? Give your opinion with justifications.
(2 Marks)
Question 6: XML and JSON (4 Marks)
6.1 Assume there are two files, an XML file “course.xml” and a DTD file “course.dtd” , in the same directory.
|
course.dtd
<?xml version="1 .0" encoding="utf-8"?> <!DOCTYPE course SYSTEM "course .dtd"> <course type="INFS"> <name>Web Information Systemsname> <year>2018year> <lecturer> <firstname>Peterfirstname> <lastname>Williamslastname> </lecturer> <books> <book>Learning PHP, MYSQL and JavaScriptbook> <book>Is 2>1 always true?book> <book>C# in a Nutshellbook> </books> </course> |
course.xml
Please determine whether “course.xml” is a valid XML document. If it is invalid, please explain why and correct the error(s) to represent the same content in a valid way. (1.5 Marks)
6.2 Given an XML document “cinema.xml”, answer the following questions. (2.5 Marks)
<cinema> <address>Indooroopillyaddress> <name>Eventname> <movies> <movie> <moviename>Avengers Infinity Warmoviename> <year>2018year> </movie> <movie> <moviename>Peter Rabbitmoviename> <year>2018year> </movie> <movie> <moviename>The Shape of Watermoviename> <year>2017year> </movie> movies> cinema> |
cinema.xml
6.2.1 Write the corresponding JSON object of “cinema.xml” in JavaScript.
var cinema =
6.2.2 Write a JavaScript statement to access the second “movie” element stored in the JSON object “cinema” that is created in Question 6.2.1 and assign the value of its element “year” to a variable “y” .
var y =
Question 7: PHP Programming (11 Marks)
7.1 Multiple file uploading (4 Marks)
The following two scripts “upload_multi.html” and “multi_file_uploading.php” allow users to select multiple files from the local disk to the folder “/upload” on the server. Complete the code below by filling in the blanks (write down your answers on next page).
upload_multi.html
ody> <form action="multi_file_uploading.php" method= ___①___ enctype= ___②___> Select files: <input type= ___③___ name= ___④___ __⑤___>
form> <p>Try selecting more than one file when browsing for files.
body> html> |
multi_file_uploading.php
<?php $count = 0; foreach ($_FILES['img'][ ___①___ ] as $filename) { $tmp=$_FILES['img'][ ___②___ ][$count]; //the destination of the uploaded file $target ='upload/'.basename($filename); //Saving the uploaded file to the destination ___③___ ($tmp,$target); $count = $count+1; } ?> |
Note: you can onlyfill in one statementfor one blank.
upload_multi.html
①
②
③
④
⑤
multi_file_uploading.php
①
②
③
7.2 AJAX and MySQL (7 Marks)
Assume that the following table “Restaurant” is created with a number of restaurant records, where each record is associated with four attributes, including ResName, Address, Est, and Category. You are required to complete the scripts below to perform a dynamic restaurant search by using AJAX. Certain information of selected restaurants is expected to be displayed on the Web page after clicking the “search” button, as illustrated by Search_Example_ 1 and Search_Example_2. Write down your answers on Page 15.
ResName |
Address |
Est |
Category |
Nando’s |
Kenmore Plaza |
1987 |
restaurant |
Sake |
Eagle Street Pier Brisbane |
2010 |
restaurant |
Lakeside Cafe |
Bldg 49, UQ |
2014 |
cafe |
… |
Restaurant
|
Search_Example_ 1
|
2023-06-03