7401ICT eservice Technology. (Some of) the actual examination questions will be more precise than these.

Similar documents
A WEB BASED OFFICE MARKET. CS 297 Project Report Presented to Dr. Christopher Pollett San José State University

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

Web Frameworks MMIS 2 VU SS Denis Helic. March 10, KMI, TU Graz. Denis Helic (KMI, TU Graz) Web Frameworks March 10, / 18

Shankersinh Vaghela Bapu Institue of Technology

Alpha College of Engineering and Technology. Question Bank

CS50 Quiz Review. November 13, 2017

CSCE 120: Learning To Code

WEBSITE INSTRUCTIONS

Get in Touch Module 1 - Core PHP XHTML

INSTITUTE OF AERONAUTICAL ENGINEERING (Autonomous) Dundigal, Hyderabad

Create and Manage Partner Portals

Client Side Scripting. The Bookshop

Pro ASP.NET MVC 2 Framework

Programming the World Wide Web by Robert W. Sebesta

Developer Internship Opportunity at I-CC

IT2353 WEB TECHNOLOGY Question Bank UNIT I 1. What is the difference between node and host? 2. What is the purpose of routers? 3. Define protocol. 4.

CONTENTS IN DETAIL INTRODUCTION 1 THE FAQS OF LIFE THE SCRIPTS EVERY PHP PROGRAMMER WANTS (OR NEEDS) TO KNOW 1 2 CONFIGURING PHP 19

WEBSITE INSTRUCTIONS. Table of Contents

Homework 9: Stock Search Android App with Facebook Post A Mobile Phone Exercise

Developing ASP.NET MVC 4 Web Applications

Static Webpage Development

JAVASCRIPT JQUERY AJAX FILE UPLOAD STACK OVERFLOW

Backend Web Frameworks

Remote Health Service System based on Struts2 and Hibernate

Security and Privacy. SWE 432, Fall 2016 Design and Implementation of Software for the Web

Developing ASP.Net MVC 4 Web Application

SmartList Senior Project Paper

COURSE 20486B: DEVELOPING ASP.NET MVC 4 WEB APPLICATIONS

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Overview

RESTful Services. Distributed Enabling Platform

Microsoft Developing ASP.NET MVC 4 Web Applications

Delivery Options: Attend face-to-face in the classroom or remote-live attendance.

Software Design Document

Web development using PHP & MySQL with HTML5, CSS, JavaScript

Tooling for Ajax-Based Development. Craig R. McClanahan Senior Staff Engineer Sun Microsystems, Inc.

20486-Developing ASP.NET MVC 4 Web Applications

A Guide to CMS Functions

Client Side Injection on Web Applications

All India Council For Research & Training

Developing ASP.NET MVC 5 Web Applications. Course Outline

CS Final Exam Review Suggestions - Spring 2018

CS Homework 12

USER MANUAL. SEO Hub TABLE OF CONTENTS. Version: 0.1.1

Open Source Library Developer & IT Pro

20486: Developing ASP.NET MVC 4 Web Applications (5 Days)

django-openid Documentation

Full Stack Web Developer

Pixelsilk Training Manual 8/25/2011. Pixelsilk Training. Copyright Pixelsilk

Developing ASP.NET MVC 5 Web Applications

Accessibility of EPiServer s Sample Templates

Masters in Web Development

Delivery Options: Attend face-to-face in the classroom or via remote-live attendance.

Accelerating Information Technology Innovation

Building a Web-based Health Promotion Database

Introduction to Web Application Development Using JEE, Frameworks, Web Services and AJAX

Web Engineering (CC 552)

Digitized Engineering Notebook

Index. C CakePHP framework, 232 Cascading Style Sheets (CSS)

Manual Html Image Src Url Path Not Working

Improve and Expand JavaServer Faces Technology with JBoss Seam

Create-A-Page Design Documentation

20486: Developing ASP.NET MVC 4 Web Applications

Workspace Administrator Help File

Databases/JQuery AUGUST 1, 2018

Using the Control Panel

widgets, events, layout loosely similar to Swing test browser, or plugin for testing with real browser on local system

National College of Ireland BSc in Computing 2017/2018. Deividas Sevcenko X Multi-calendar.

BIG-IP Access Policy Manager : Portal Access. Version 12.1

AJAX Workshop. Karen A. Coombs University of Houston Libraries Jason A. Clark Montana State University Libraries

Evaluation Guide for ASP.NET Web CMS and Experience Platforms

Outline. AJAX for Libraries. Jason A. Clark Head of Digital Access and Web Services Montana State University Libraries

Lecture : 3. Practical : 2. Course Credit. Tutorial : 0. Total : 5. Course Learning Outcomes

Web Hosting. Important features to consider

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul

Web Development & SEO (Summer Training Program) 4 Weeks/30 Days

P a g e 1. Danish Tecnological Institute. Developer Collection Online Course k Developer Collection

Excerpts of Web Application Security focusing on Data Validation. adapted for F.I.S.T. 2004, Frankfurt

Creative Niche Manager User's Guide Section / Module: Advertising. By JP Schoeffel - 1 -

Birkbeck (University of London)

Fundamentals of Web Development. Web Development. Fundamentals of. Global edition. Global edition. Randy Connolly Ricardo Hoar

Programming for Digital Media. Lecture 7 JavaScript By: A. Mousavi and P. Broomhead SERG, School of Engineering Design, Brunel University, UK

Lesson 12: JavaScript and AJAX

Application Security through a Hacker s Eyes James Walden Northern Kentucky University

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Passwords. Twitter UN: IDANRV Twitter PW: idanrv1. Thank You

CERTIFICATE IN WEB PROGRAMMING

Robust Defenses for Cross-Site Request Forgery Review

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Lesson 14 SOA with REST (Part I)

Google & the Cloud. GData, Mashup Editor, AppEngine. Gregor Hohpe Software Engineer Google, Inc. All rights reserved,

SSC - Web applications and development Introduction and Java Servlet (I)

TUTORIAL QUESTION BANK

Simple AngularJS thanks to Best Practices

Web Programming Paper Solution (Chapter wise)

Developing ASP.NET MVC 4 Web Applications

20486 Developing ASP.NET MVC 5 Web Applications

Nick Terkay CSCI 7818 Web Services 11/16/2006

Client-side Development using HTML, Javascript and CSS

Classroom Blogging. Training wiki:

Transcription:

SAMPLE EXAMINATION QUESTIONS (Some of) the actual examination questions will be more precise than these. Basic terms and concepts Define, compare and discuss the following terms and concepts: a. HTML, XHTML b. CSS (i) Ways of using CSS in an HTML document (ii) Advantages of using CSS in Web application development c. HTML attributes: action, method, id, class,... d. JavaScript e. Required elements in an HTML 4.01 strict document f. Defining standards of the World Wide Web g. Components of the standard three-tier Web application architecture h. When to use methods GET and POST i. Other HTTP methods and when to use them j. Difference between HTTP and HTTPS k. Application requirements provided by HTTPS l. Cookies m. Methods of maintaining state in Web applications n. Input validation (i) When on client, when on server? o. Security threats (i) Cross-site scripting (ii) Cross-site request forgery (iii) SQL query injection p. One-way (hash) function q. Required meta-data for (uploaded) images r. DOM, XML, XPath, JSON page 1 of 10 Continued next page...

s. Ajax: JavaScript, DOM, XMLHttpRequest t. Ajax frameworks: Dojo Toolkit, JQuery, Prototype u. Java EE frameworks: Struts 2, Hibernate, App Fuse v. PHP, ASP.Net, Java EE, Django, Rails w. Design patterns: MVC, MVT x. Big Web Services: SOAP, WSDL, UDDI y. RESTful Web Services: examples, concepts, properties z. Horizontal and vertical scaling Framework comparison and selection Desirable components of a good framework for Web application development? Describe properties of and relationships between: a. PHP (Smarty) b. ASP.Net c. Java EE (Struts 2, Hibernate, Ant, IntelliJ) d. Django e. Ruby on Rails For example, which of the above frameworks is most suitable to an individual developer, and which is most suitable for a large organisation, and why? For example, which pair of the above frameworks is most similar and why? For example, of PHP, ASP.Net, Java EE and Django, which two pairs are most similar to each other, and why? Briefly describe the purpose of Struts 2, Hibernate, Ant and IntelliJ in Java EE Web development. Briefly describe three important criteria in choosing a framework for Web development in a small to medium-sized organisation. page 2 of 10 Continued next page...

Basic (Django) programming Relationships between: a. URL configurations b. Models c. Views d. Templates Performing standard tasks: a. Using (Python) lists and dictionaries b. Defining models ( unicode (), get absolute url()) c. Using the admin interface d. Processing form data e. Rendering a template f. Redirecting to a URL g. Reusing the same URL to render a form and process a form h. Advantages and disadvantages of doing this i. Using generic views j. Using django.contrib.auth k. Using (Python) decorators l. Avoiding URL patterns in views and templates: why? how? m. Using contributed libraries User interface issues, e.g., 3 ways of presenting an HTML page with header, 3 columns and footers. Model design and querying Describe criteria for good model (database) designs Identify faults in bad model (database) designs Construct good model (database) designs How to express database queries in: a. SQL page 3 of 10 Continued next page...

b. Django API Consider the following database design for an IMDB-like movie database application. from django.db import models class Person(models.Model): name = models.charfield(max_length=80) birthday = models.datefield() gender = models.charfield(max_length=1) class Movie(model.Model): title = models.charfield(max_length=80) director = models.foreignkey(person) year = models.integerfield() cast = models.manytomanyfield(person, through="role") class Role(models.Model): movie = models.foreignkey(movie) actor = models.foreignkey(person) role = models.charfield((max_length=80) # character played by actor in movie What assumptions does this model make? Write Django statements using the database API that express the following queries. For example, the statement movies = Movie.objects.all() expresses the query What are all the movies. a. What is the name of the director who directed the movie Raiders of the Lost Ark? director_name = Movie.objects.get(title="Raiders of the Lost Ark"). director.name b. What are the titles of all movies directed by Steven Spielberg? director = Person.objects.get(name="Steven Spielberg") movie_titles = [movie.title for movie in Movie.objects.filter(director=director)] c. What are the names of all female actors who starred in movies containing the character Indiana Jones? page 4 of 10 Continued next page...

roles = Role.objects.filter(role="Indiana Jones").values() actors = Person.objects.filter(id in=[ role["actor"] for role in roles ], gender="f") names = [ actor["name"] for actor in actors.values() ] d. Find the titles of all movies made between 2001 and 2005 (inclusive). e. Find the names of all actors who performed in the movie Star Wars. f. Find all actors who starred in Star Wars, listed in order of increasing age. Suppose you are designing a Web application that allows different registered users to contribute timestamped articles to a single Web log (or blog). All readers of the blog may add one or more comments to each article. Consider the following database design for such an application. from django.db import models class Article(models.Model): author_name = models.charfield(max_length=80) author_email = models.emailfield() article_title = models.charfield(max_length=160) article_text = models.textfield() article_date = models.datetimefield() comment_author = models.charfield(max_length=80) comment_text = models.textfield() Give two main reasons why this is a bad database design. Give a better database design for this application. What is an atomic database transaction? Briefly describe one situation in which something can go wrong if transactions are not executed atomically. Briefly describe how to ensure transactions are executed atomically in Django. Application design Question 1 Suppose you have to design a content management system for an online newspaper. Such a system should operate as follows. Readers may view current, published articles and photos. Readers may also comment on published articles, and such comments may be read by any reader. Journalists (who may also be readers) may login and submit articles for publication. To submit an article, a journalist has to provide the text of the article and one or more related photos. All submitted articles are retained indefinitely. page 5 of 10 Continued next page...

Editors (who may also be journalists or readers) may login and review submitted (but not yet published) articles. An editor may reject or accept a submitted article. If the editor accepts an article, he or she adds a headline, edits the text of the article, and accepts one or more of the related photos. The editor then publishes the edited article and the accepted photos. Published articles are current until they are a week old. a. The data model: Describe all database models required, the meaning of the fields, and any constraints required. b. The URL patterns: Describe the set of URL patterns required and the (Django) view each pattern is associated with. The views may be either user-defined or (Django) library views. c. The views: Describe the key (server-side) views that will be required, the transactions that they implement, and the models they access and update. Distinguish between views that return HTML pages and views that are executed only for their effect. d. The transition diagram: Describe the transitions the application makes between scripts, where each node of the diagram is associated with a URL pattern whose view either generates an HTML page or updates the database. Include all possible (directed) transitions between nodes in the diagram and indicate what data if any is transferred on each transition. Provide separate entry nodes for readers, journalists and editors. For simplicity, do not provide nodes and transitions associated with user login. Do not show nodes for HTML templates. Clearly state any assumptions you make to resolve possible ambiguities. Question 2 Suppose you are asked to design an online, Web-based, auction system (like ebay). The system should operate as follows. Articles advertised for sale have a category, a description, a current highest price, and a closing date for the auction. Categories are strings such as books, movies, electronics,.... Vendors (i.e., sellers) may login and advertise articles for sale. To advertise an article for sale, a vendor must provide the article s category, description, starting price and the auction s closing date. Purchasers may login and bid for an advertised article until the auction s closing date. Each bid must be strictly higher than the previous highest bid for the article. Users may browse the articles currently advertised for sale, i.e., the articles whose auctions have not yet closed, by category. Users may also search for articles by words in their description. Users may also register if they have not already done so and login so they can act as vendors or purchasers. a. The data model: Describe all database models required, the meaning of the fields, and any constraints required. page 6 of 10 Continued next page...

b. The URL patterns: Describe the set of URL patterns required and the (Django) view each pattern is associated with. The views may be either user-defined or (Django) library views. c. The views: Describe the key (server-side) views that will be required, the transactions that they implement, and the models they access and update. Distinguish between views that return HTML pages and views that are executed only for their effect. d. The transition diagram: Describe the transitions the application makes between scripts, where each node of the diagram is associated with a URL pattern whose view either generates an HTML page or updates the database. Question 3 Describe informally how you would design an application to provide a simple online community server. Such a server (e.g., Yahoo! Groups) manages groups, messages and members. Each group is concerned with a particular topic, has a summary describing its purpose, is created by some member, and contains a simple (chronological) sequence of messages on that topic. Users may browse the list of groups and search the list of groups by topic. Users may also enter and leave groups, browse and search the sequence of messages in a group, and read individual messages. Users may become members by registering. Members may login. After logging in, members may do everything arbitrary users can do, and may also create new groups and write new messages in a group. Members may store personal information about themselves, may view personal information of other members, may send private messages to other members, may subscribe and unsubscribe from one or more groups, and can browse just those groups to which they are currently subscribed for convenient access. For this question, you only need to consider the most important fields of each entity, but you should consider all relevant constraints (e.g., you can only unsubscribe from a group if you are currently subscribed to it). Your description should include the following aspects of the implementation: a. The data model: Describe all database models required, the meaning of the fields, and any constraints required. b. The URL patterns: Describe the set of URL patterns required and the (Django) view each pattern is associated with. The views may be either user-defined or (Django) library views. c. The views: Describe the key (server-side) views that will be required, the transactions that they implement, and the models they access and update. Distinguish between views that return HTML pages and views that are executed only for their effect. d. The transition diagram: Describe the transitions the application makes between scripts, where each node of the diagram is associated with a URL pattern whose view either generates an HTML page or updates the database. page 7 of 10 Continued next page...

Outline solution to Question 1 Database design. Here is one possible design. It assumes a single model Employee for journalists and editors with a category field that describes their role (and permissions). from django.db import models class Employee(models.Model): name = models.charfield(max_length=80) username = models.charfield(max_length=80) password = models.passwordfield(max_length=80) category = models.charfield(max_length=1) class Article(models.Model): author = models.foreignkey(employee) headline = models.charfield(max_length=80) text = models.textfield() photos = models.manytomanyfield(photo) submission_date = models.datetimefield(default=datetime.datetime.now) publication_date = models.datetimefield(default=datetime.datetime.now) status = models.charfield(max_length=1) editor = models.foreignkey(employee) class Photo(models.Model): image = models.imagefield(upload_to= images, blank=true, height_field= height, width_field= width ) height = models.integerfield(blank=true, null=true) width = models.integerfield(blank=true, null=true) class Comment(models.Model): article = models.foreignkey(article) author = models.charfield(max_length=80) text = models.textfield() This database design defines its own user class (Employee). This requires extra work but avoids having to extend the library class User with a profile containing the user s category. Similarly, the design defines its own comment class, for clarity. It allows the same photo to be used in different articles, which seems no more difficult than restricting each photo to occur in a single article. Solutions that clearly explained how to use the library classes User and Comment would be fine. Field category in class Employee has values j (journalist) or e (editor). You need a different representation if you want to allow the same user to be both a journalist and an employee. It s necessary to have both submission and publication date fields in class Article. Field status in class Article has values s (submitted), a (accepted) or r (rejected). URL pattern design. page 8 of 10 Continued next page...

articles/ - list current (accepted) article headlines articles/\d+/ - display detail of article with given id articles/\d+/comment/ - add a comment to the article with given id submit/ - submit an article for publication (requires journalist to be logged in) submitted/ - list submitted articles (requires editor to be logged in) submitted/\d+/ - display and edit submitted article with given id (ditto) submitted/\d+/accept/ - accept submitted article with given id (ditto) submitted/\d+/reject/ - reject submitted article with given id (ditto) login/ - login as journalist or editor (requires no-one to be logged in) logout/ - logout (requires user to be logged in) It s important to ensure that every requirement in the specification is associated with some URL, that each URL is associated with a well-defined task (view), and that the set of URLs is somehow clear and consistent. This design assumes articles are identified by positive integers (not by slugs). Views. Only a few view descriptions are shown. def article_list(request): Displays a list of all current, published article headlines. Each headline is a link to the article details, including comments. The view accesses the models Article and does not update the database. It renders an HTML template. def article_detail(request, article_id): Displays the details of the article with the given article_id. The details include any photos and comments, and provides a form for the reader to add new comments. The view accesses the models Article and Photo. It renders an HTML template. def article_comment(request, article_id): Adds a posted comment to the article with the given id. The view updates the model Comment. It redirects back to the URL pattern /articles/article_id/. Transition diagram. Not provided. Other topics a. Briefly describe two main differences between HTML and XML. page 9 of 10 Continued next page...

Briefly describe two main differences between the XML query languages XPATH and XSLT. b. What is the difference between a news feed and a news aggregator. Briefly describe (a) Atom and (b) AtomPub. c. Name three main components of industry-standard ( big ) Web Services, and briefly describe the purpose of each component. d. Briefly describe the main concepts behind RESTful Web Services. Give two examples of existing RESTful Web Services. page 10 of 10 End