Professional Documents
Culture Documents
Bcs Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT
Bcs Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT
Bcs Higher Education Qualifications BCS Level 6 Professional Graduate Diploma in IT
WEB ENGINEERING
The marks given in brackets are indicative of the weight given to each part of the question.
Section A
Answer Section A questions in Answer Book A
[N.B.: This question involves server-side scripting. The preferred language is PHP
but answers written in ASP or JSP are also accepted. Clearly state which server-
side scripting language you will be using for the whole question and make sure
all relevant files are named accordingly.]
ii) Add a basic form to your code: the form must send a single input
string parameter named email to a script named saveemail.php.
The parameter should not be visible in the resulting URL.
(3 marks)
Turn Over]
iii) Add a few more lines of code to display, in alphabetical order, all the
email addresses contained in the database. The result should appear
as an HTML table. Alternatively, relevant error messages should be
displayed if necessary.
(3 marks)
iv) When the script no longer needs to use the database, what action
should it take? Write the corresponding code.
(1 mark)
The following SQL syntax may be useful to accomplish some of these tasks:
INSERT INTO tbl_name (col1, ...) VALUES (val1, ...);
SELECT * FROM tbl_name WHERE col1 == val1;
(Where tbl_name, col1, val1 are to be replaced with appropriate values.)
iii) Checking the data entered via the front-end is in the expected format.
(3 marks)
Turn Over]
A2. HTML and CSS are major web standards.
a) What does HTML stand for? Explain precisely what the “HT” part means and
how it is implemented in HTML.
(2 marks)
c) What does CSS stand for and what is the purpose of this technology?
(1 mark)
d) Analyse the script in Figure 2.2 and state (with a brief justification) the colour
of each of the following 10 words when displayed:
Alligator, Beetle, Cat, Dolphin, Emu, Frog, Gazelle, Herring, Iguana, Jackal.
(5 marks)
e) Consider the HTML document in Figure 2.3. Without altering the appearance
of the resulting web page, rewrite the original code using CSS. Explain why
your modifications are an improvement over the original code.
(6 marks)
iii) How can web authors ensure their pages conform to standards?
(1 mark)
iv) Explain, illustrating your answer with relevant examples, why a web
page not conforming to standards can be a problem for its users.
(2 marks)
Section B
Answer Section B questions in Answer Book B
b) The XML document in Figure 3.2 contains a number of errors when validated
against the DTD in Figure 3.1. Identify all of the errors and provide a
correction for each.
[Note: the line numbers are for your benefit and are not part of the XML code.]
(3 marks)
the sequence of elements is as shown in the XML code, Figure 3.3 (i.e.
MagazineCatalogue is a container of Magazine elements);
the two attributes in Magazine are mandatory;
Magazine_url and Editor_email are optional;
Magazine_url must have a page attribute;
for each Magazine, exactly one Magazine_title, one Editor and
one Publisher element must be present;
for each Magazine, the Article element must be present one or more
times;
for each Article, exactly one Article_title and one or more
Author element must be present;
an Author has a Name and optionally an Occupation; and
a Name consists of both a First_name and a Last_name.
(6 marks)
ii) A cover image for each magazine that captures attributes of height,
width and location of the image.
(3 marks)
iii) To capture all images where they exist for any article with the same
attributes as in ii) above.
(2 marks)
Turn Over]
B4. a) Briefly explain how XPath expressions can manipulate an XML document.
(2 marks)
With reference to the XML file shown in Figure 4.1, state the output of the
evaluation of the following XPath expressions:
/ReadyMeals/*/*[@supplier='Coste']
(2 marks)
//quantity | //calories
(2 marks)
c) Modify the HTML template so that the books are displayed by subject field as
shown in Figure 4.5. Your answer should only show the changes and
additional code necessary to that which you wrote as part of your answer to
b).
(5 marks)
d) Write the code to display an image for each of the books as shown in Figure
4.6 and indicate where this would be placed in the HTML template.
(2 marks)
e) Write the code to display the website address as a hyperlink for a book if it
exists, as shown in Figure 4.7, and indicate where this would be placed in the
HTML template.
(2 marks)
f) Modify the code given as your answer for part e) so that the website address
is a descriptive link as shown in Figure 4.8.
(2 marks)
g) It has been decided that instead of having an extra column to display the
website for a book, if it exists, the book title should then be a hyperlink to
access the website as shown in Figure 4.9. What changes do you need to
make to the code to achieve this?
(2 marks)
B5. a) Briefly explain the statement that “the http is stateless” and the techniques
that address this.
(3 marks)
b) Briefly explain and compare the use of push and pull technologies with
suitable examples.
(4 marks)
Turn Over]
d) Compare and contrast the workings of web sockets with reverse AJAX.
(3 marks)
e) As a web engineer, identify at least FIVE major challenges in the design and
development of a real-time communication system for a client. For each of the
challenges identified, provide an outline solution including the technology to
be used. Your answer should be in the form of a PowerPoint™ presentation
to the client (5 slides with bullet points).
(10 marks)
BCS THE CHARTERED INSTITUTE FOR IT
Database: EMAILMANAGER
Subscribers
Emailaddress : varchar(64)
1 h1 { color: blue; }
1 <?xml version="1.0"?>
2 <?xml-stylesheet type="text/css" href="test.css"?>
3 <!DOCTYPE test SYSTEM "mcq.dtd">
4 <test>
5 <mcq answer=b>
6 <statements>
7 Which statement accurately describes a protocol:
8 </statement>
9 <a>is a device that controls the network card.</a>
10 <b>is a method of communication between computers.</b>
11 <c>is the address of a computer on the Internet.</c>
12 <d>is the software which controls the network card.</d>
13 </mcq>
14 </test>
Figure 3.2
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MagazineCatalogue SYSTEM "magazine.dtd">
<MagazineCatalogue>
<Magazine ISBN="10104571" Issue_no="4">
<Magazine_title>NewEconomy</Magazine_title>
<Magazine_url page="http://www.neweconmoy.co.uk" />
<Publisher>NewMove</Publisher>
<Editor>Rob Hood</Editor>
<Editor_email>rhood@newworld.com</Editor_email>
<Article>
<Article_title>BitCoin</Article_title>
<Author>
<Name>
<Last_name>Max</Last_name>
<First_name>Carl</First_name>
</Name>
<Occupation>Economist</Occupation>
</Author>
</Article>
<Article>
<Article_title>Crowdfunding</Article_title>
<Author>
<Name>
<Last_name>Kains</Last_name>
<First_name>Jon</First_name>
</Name>
<Occupation>Banker</Occupation>
</Author>
</Article>
</Magazine>
<Author>
<Name>
<Last_name>Baux</Last_name>
<First_name>Billy</First_name>
</Name>
<Occupation>Engineer</Occupation>
</Author>
<Author>
<Name>
<Last_name>Bali</Last_name>
<First_name>Gita</First_name>
</Name>
<Occupation>Physcist</Occupation>
</Author>
</Article>
</Magazine>
</MagazineCatalogue>
Figure 3.3
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<ReadyMeals>
<Food>
<lunch supplier="Coste" id="1">
<price>3.50</price>
<quantity>20</quantity>
<calories>1500</calories>
</lunch>
<dinner supplier="Daas" id="2">
<price>4.50</price>
<quantity>50</quantity>
<calories>2000</calories>
</dinner>
</Food>
<Drink>
<juice supplier="Coste" id="3">
<price>1.50</price>
<quantity>60</quantity>
<calories>180</calories>
</juice>
</Drink>
</ReadyMeals>
Figure 4.1
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE cbcatalogue SYSTEM "cbcatalogue.dtd">
<?xml-stylesheet type="text/xsl" href="cbbookxx.xsl"?>
<cbcatalogue>
<subject>
<field>Web Technology </field>
<book isbn="0137001312" edition="1st">
<title>JavaScript for Programmers</title>
<image src="xml.jpg" height="100" width="100" />
<author>
<name>
<Last_name>Deitel</Last_name>
<First_name>Paul</First_name>
</name>
<email>deitel@deitel.com</email>
<bio>Paul Deitel, Chief Technical Officer of Deitel and Associates.</bio>
</author>
<author>
<name>
<Last_name>Deitel</Last_name>
<First_name>Harvey</First_name>
</name>
<email>deitel@deitel.com</email>
<bio>Chairman and Chief Strategy Officer of Deitel and Associates.</bio>
</author>
<book_url page="http://www.deitel.com/books"/>
<book_url linkname="JavaScript for Programmers"/>
<publisher>Prentice Hall</publisher>
<review>Demonstrating use of commonly available tools to create dynamic webpages &
server side technologies.</review>
</book>
<book isbn="067232797" edition="3rd">
<title>Sams Teach Yourself XML in 24 Hours</title>
<image src="javascript.jpg" height="100" width="100" />
<author>
<name>
<Last_name>Morrison</Last_name>
<First_name>Michael</First_name>
</name>
<email>morrisonm@michaelmorrison.com</email>
<bio>Michael Morrison is a professional Java programmer.</bio>
</author>
<publisher>SAMS</publisher>
<review>As an introductory text on XML, it delivers.</review>
</book>
</subject>
<subject>
<field>Databases</field>
<book isbn="9781408007686" edition="2nd">
<title>Database Management Systems</title>
<image src="dbms.jpeg" height="100" width="100" />
<author>
<name>
<Last_name>Ward</Last_name>
<First_name>Patricia</First_name>
</name>
<email>emea.info@cengage.com</email>
</author>
<book_url page="http://www.cengage.co.uk/fasttrack"/>
<book_url linkname="Database Management Systems"/>
<publisher>Course Technology</publisher>
<review>Exactly what is required in an introductory database course.</review>
</book>
</subject>
</cbcatalogue>
Figure 4.2
Figure 4.3
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Figure 4.4
Figure 4.5
Figure 4.6
Figure 4.7
Figure 4.8
Figure 4.9