BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING



Similar documents
XML WEB TECHNOLOGIES

Introduction to Web Technologies

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

Short notes on webpage programming languages

10CS73:Web Programming

WWW. World Wide Web Aka The Internet. dr. C. P. J. Koymans. Informatics Institute Universiteit van Amsterdam. November 30, 2007

HTML and CSS. Elliot Davies. April 10th,

Modern Web Application Framework Python, SQL Alchemy, Jinja2 & Flask

Last Week. XML (extensible Markup Language) HTML Deficiencies. XML Advantages. Syntax of XML DHTML. Applets. Modifying DOM Event bubbling

Contents. Downloading the Data Files Centering Page Elements... 6

Your Blueprint websites Content Management System (CMS).

WEB PROGRAMMING LAB (Common to CSE & IT)

4.2 Understand Microsoft ASP.NET Web Application Development

Programming exercises (Assignments)

Fast track to HTML & CSS 101 (Web Design)

Xtreeme Search Engine Studio Help Xtreeme

IT6503 WEB PROGRAMMING. Unit-I

Example for Using the PrestaShop Web Service : CRUD

AJAX and jmaki for Web 2.0 Development using Java. Inyoung Cho Java Technology Evangelist Sun Microsystems, Inc.

Course: CSC 224 Internet Technology I (2 credits Compulsory)

How To Create A Website Template On Sitefinity

XSL - Introduction and guided tour

DIPLOMA IN WEBDEVELOPMENT

Web Development CSE2WD Final Examination June (a) Which organisation is primarily responsible for HTML, CSS and DOM standards?

Advanced Web Development SCOPE OF WEB DEVELOPMENT INDUSTRY

Web Design Technology

Introduction to Web Design Curriculum Sample

Using Database Metadata and its Semantics to Generate Automatic and Dynamic Web Entry Forms

Introduction to Web Development

CS134 Web Site Design & Development. Quiz1

Joomla 1.0 Extension Development Training. Learning to program for Joomla

IT3504: Web Development Techniques (Optional)

4 Understanding. Web Applications IN THIS CHAPTER. 4.1 Understand Web page development. 4.2 Understand Microsoft ASP.NET Web application development

SUBJECT CODE : 4074 PERIODS/WEEK : 4 PERIODS/ SEMESTER : 72 CREDIT : 4 TIME SCHEDULE UNIT TOPIC PERIODS 1. INTERNET FUNDAMENTALS & HTML Test 1

WEB DEVELOPMENT IA & IB (893 & 894)

Web2CRM Honeypot Captcha Manual

Web Server Logs Analyze Using the XML Technologies

IT3503 Web Development Techniques (Optional)

Web Design Course. Home Page. Join in. Home. Objectives. Course Content. Assignments & Discussion. Grades. Help. Contact Me aab43@uakron.

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

ISI ACADEMY Web applications Programming Diploma using PHP& MySQL

Course Information Course Number: IWT 1229 Course Name: Web Development and Design Foundation

Dreamweaver CS3 THE MISSING MANUAL. David Sawyer McFarland. POGUE PRESS" O'REILLY 8 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Create interactive web graphics out of your SAS or R datasets

Chapter 1. Introduction to web development

II. PREVIOUS RELATED WORK

XML and Data Management

A Brief Introduction to MySQL

Differences between HTML and HTML 5

Secure Testing Service

By Nabil ADOUI, member of the 4D Technical Support team

Learnem.com. Web Development Course Series. Quickly Learn. Web Design Using HTML. By: Siamak Sarmady

Castro, Elizabeth. HTML, XHTML & CSS Visual Quick Start Guide. Peachpit Press. Edition: Sixth. Pages: 456. ISBN:

FOUNDATION OF INFORMATION TECHNOLOGY Class-X (TERM II)

Google Web Toolkit. Progetto di Applicazioni Software a.a. 2011/12. Massimo Mecella

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

Alkacon Software GmbH

Web Development using PHP (WD_PHP) Duration 1.5 months

Chapter 1 Introduction to web development and PHP

601/8498/X IAO Level 3 Certificate in Web Design and Development (RQF)

SimplyCast emarketing User Guide

XML Processing and Web Services. Chapter 17

shweclassifieds v 3.3 Php Classifieds Script (Joomla Extension) User Manual (Revision 2.0)

PHP and XML. Brian J. Stafford, Mark McIntyre and Fraser Gallop

CSET 3100 Advanced Website Design (3 semester credit hours) IT Required

An Newsletter Using ASP Smart Mailer and Advanced HTML Editor

WTP-101 Developing Rich Internet Applications with Java Web Frameworks

Maldives Pension Administration Office Republic of Maldives

Microsoft Expression Web

Overview. How It Works

Building A Very Simple Website

OPENTABLE GROUP SEARCH MODULE GETTING STARTED ADD RESERVATIONS TO YOUR WEBSITE

Agenda. 1. ZAPms Konzept. 2. Benutzer-Kontroller. 3. Laout-Aufbau. 4. Template-Aufbau. 6. Konfiguration. 7. Module.

MXSAVE XMLRPC Web Service Guide. Last Revision: 6/14/2012

Business & Computing Examinations (BCE) LONDON (UK)

Technical Specifications (Excerpt) TrendInfoWorld Web Site

deskspace responsive web builder: Instructions

Lesson Review Answers

HELP DESK MANUAL INSTALLATION GUIDE

Bitrix Site Manager 4.1. User Guide

Developers Guide. Designs and Layouts HOW TO IMPLEMENT WEBSITE DESIGNS IN DYNAMICWEB. Version: English

HTML Web Page That Shows Its Own Source Code

LABSHEET 1: creating a table, primary keys and data types

Introduction to Ingeniux Forms Builder. 90 minute Course CMSFB-V6 P

WordPress Security Scan Configuration

Introducing our new Editor: Creator

DTD Tutorial. About the tutorial. Tutorial

Introduction to web development and JavaScript

Unit 21 Web design and prototyping

Web Design Revision. AQA AS-Level Computing COMP2. 39 minutes. 39 marks. Page 1 of 17

Software Engineering I CS524 Professor Dr. Liang Sheldon X. Liang

MEDIAplus administration interface

SelectSurvey.NET User Manual

Transcription:

BCS THE CHARTERED INSTITUTE FOR IT BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT WEB ENGINEERING Wednesday 26 th March 2014 - Morning Answer any THREE questions out of FIVE. All questions carry equal marks. Time: THREE hours. Answer any Section A questions you attempt in Answer Book A Answer any Section B questions you attempt in Answer Book B The marks given in brackets are indicative of the weight given to each part of the question. Calculators are NOT allowed in this examination. The figures referenced in this question paper are provided in a separate booklet. Section A Answer Section A questions in Answer Book A A1. You are developing a simple web-based application to manage subscriptions to an electronic newsletter. [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 serverside scripting language you will be using for the whole question and make sure all relevant files are named accordingly.] a) First, you will build a basic front-end in a file named enteremail.html. i) Write HTML to construct the page as indicated in Figure 1.1. (1 mark) 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. b) You have access to a database called EMAILMANAGER, which contains a single table named Subcribers (as shown in Figure 1.2). The database is hosted remotely at example.com. The administrator username is admin and the password is abc123. i) Using the server-side scripting language of your choice, write code to establish an authorised connection with the database host and get access to the database itself. Display relevant error messages when necessary. ii) Add a few lines of code to save the email address john.smith@foo.net in the database. Display relevant messages (including, as a reminder, the value of the email being saved) depending on the failure or success of the operation. Turn Over]

iii) iv) 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. 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.) c) You will now write the back-end of your application. i) Reusing relevant code from b), write a function called savesubscription, which: - takes a single string called myemail as an input, - saves myemail in the database mentioned in b), - returns true if the operation was a success, false if it failed. The function will be saved in a file called myfunctions.inc. (1 mark) ii) Write the code for saveemail.php (from a) ii)). It should: - generate a full, valid web page entitled Saving Email - refer (via an appropriate mechanism) to the function savesubscription (from c) i)), - save the input parameter obtained from the form in enteremail.html (from a) ii)) in the database mentioned in b). - display an adequate error message if the input parameter is not set. d) Consider the following validation tasks. For each task: - explain why it is important (illustrating potential problems with a realistic example); - propose a solution (adding relevant code, with explanatory comments, to the code written so far). i) Catching typing mistakes via the front-end. ii) Avoiding storing duplicate information in the database. iii) Checking the data entered via the front-end is in the expected format. 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. b) Consider the HTML document in Figure 2.1. i) Is this valid HTML? If not, explain each error (which rule was broken and where) and propose a correction. (4 marks) ii) Explain the meaning and purpose of a tag such as: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> (1 mark) iii) Consider a tag such as: <meta http-equiv="content-type" content="text/html;charset=utf-8"> Where should it appear and what is its purpose? Explain what could happen when this tag is missing. (1 mark) 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) f) Standards have to be defined before they can be adopted. i) What is the name of the main international organisation responsible for developing technical standards for the World Wide Web? (1 mark) ii) iii) iv) What version of HTML is currently under development? Give one difference between the new version and an older version. (1 mark) How can web authors ensure their pages conform to standards? (1 mark) Explain, illustrating your answer with relevant examples, why a web page not conforming to standards can be a problem for its users.

Section B Answer Section B questions in Answer Book B B3. a) Briefly explain the importance of validating an XML document. 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.] c) Convert the DTD in Figure 3.2 to an XML schema. d) Explain the use of an EMPTY element in the construction of a DTD. e) Write an external DTD for a magazine catalogue, magazine.dtd that enforces the following constraints: 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) f) The magazine.dtd needs to be modified to enforce the following changes. State how this can be achieved and show where the changes must take place in the DTD you have written. i) All magazine information including editor, author and publisher details will be stored under a genre such as Lifestyle, Motoring, Technology, etc. A magazine will only be recorded once and cannot appear under additional genres. (4 marks) ii) iii) A cover image for each magazine that captures attributes of height, width and location of the image. To capture all images where they exist for any article with the same attributes as in ii) above. Turn Over]

B4. a) Briefly explain how XPath expressions can manipulate an XML document. 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'] //quantity //calories b) Textbooks for a computing catalogue are to be stored in an XML document as shown in Figure 4.2 and an XSLT style sheet will render this as a web page as shown in Figure 4.3. Using the HTML template provided in Figure 4.4, in your answer book provide the missing code (the section marked <!-- TO BE COMPLETED -->) to accomplish this. You can assume that the cbbook.css file exists and that no style code needs to be written. (6 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. 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. 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. 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? B5. a) Briefly explain the statement that the http is stateless and the techniques that address this. b) Briefly explain and compare the use of push and pull technologies with suitable examples. (4 marks) c) Briefly explain the use and management of an XMLHttpRequest in the construction of a web page. What are the implications of multiple occurrences of XMLHttpRequest on the same page? (5 marks) Turn Over]

d) Compare and contrast the workings of web sockets with reverse AJAX. 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 BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 6 Professional Graduate Diploma in IT FIGURES TO ACCOMPANY 2014 EXAMINATION PAPER IN WEB ENGINEERING Figure 1.1 - Sample web page Database: EMAILMANAGER Subscribers Emailaddress : varchar(64) Figure 1.2 Database Entity-Attribute diagram

1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> 2 <html> 3 <head><title> 4 Hello 5 </head></title> 6 </html> 7 <body> 8 <h3>text<h3> 9 <boldtext>example</boldtext> 10 </body> Figure 2.1 Valid HTML code?

--- File mystyle.css --- 1 h1 { color: blue; } --- File cssdemo.html --- 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> 2 <html> 3 <head> 4 <title>my CSS Demo</title> 5 <link rel="stylesheet" type="text/css" href="mystyle.css"> 6 <style> 7 body > p { color: cyan; } 8 #myselector { color: green; } 9.myselector { color: yellow; } 10 div h1 { color: pink; } 11 div div * { color: red; } 12 </style> 13 </head> 14 <body> 15 <div> 16 <h1>alligator</h1> 17 <div> 18 <h3>beetle</h3> 19 <p class="myselector">cat</p> 20 </div> 21 <h3>dolphin</h3> 22 <p id="myselector">emu</p> 23 </div> 24 <p>frog</p> 25 <div style="color:orange;"> 26 Gazelle 27 <h2 style="color:purple;">herring</h2> 28 <p>iguana</p> 29 </div> 30 <h1>jackal</h1> 31 </body> 32 </html> Figure 2.2 CSS colour demo

1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/tr/html4/loose.dtd"> 2 <html> 3 <head> 4 <title>my HTML Page</title> 5 </head> 6 <body> 7 <p align="center"><b>main title</b></p> 8 <p><font face="arial"><i>section 1</i></font></p> 9 <p>a paragraph</p> 10 <p><font face="arial"><i>section 2</i></font></p> 11 <p>another paragraph</p> 12 </body> 13 </html> Figure 2.3 HTML without CSS

1 <?xml version = "1.0" encoding="iso-8859-1"?> 2 <!ELEMENT test (mcq)+> 3 <!ELEMENT mcq (statement, a, b, c)> 4 <!ATTLIST mcq 5 answer (a b c) #REQUIRED> 6 <!ELEMENT statement (#PCDATA)> 7 <!ELEMENT a (#PCDATA)> 8 <!ELEMENT b (#PCDATA)> 9 <!ELEMENT c (#PCDATA)> Figure 3.1 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> <Magazine ISBN="10104890" Issue_no="7"> <Magazine_title>3D Technology</Magazine_title> <Publisher>3D Group </Publisher> <Editor>Sen Gupta</Editor> <Editor_email>sguptac@conv.com</Editor_email> <Article> <Article_title>3D Printing</Article_title> <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 <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/xsl/transform" version="1.0"> <xsl:template match="/"> <html> <head> <title> Computing Book Catalogue Text Only Version</title> <link rel="stylesheet" type="text/css" href="cbbook.css"/> </head> <body> <h2>computer Book Catalogue 2014 Text Only Version</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">isbn</th> <th align="left">title</th> <th align="left">author(s)</th> <th align="left">publisher</th> <th align="left">book Review</th> </tr> <!-- TO BE COMPLETED --> </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