Web App Development 2 - 2016
1. What sequence of commands would you issue to upload and share your new source code in a GitHub repository? You can assume the added code won’t cause a conflict with existing code.
push, commit, add, pull
pull, commit, push, add
pull, add, commit, push
push, add, commit, pull
2. At a high-level, we have two kinds of architecture to consider in web application development: Information Architecture and System Architecture. Which of the follow statements best describes the role of Information Architecture. Information Architecture is concerned with:
The structural design of shared information; the searching and navigation of information; and logical design of the database.
The logical design of the database, the structural design of shared information, and the structural design of the application.
The organization and labeling of information, the structure and nature of the application, and building the interface.
The art and science of shaping the information experiences; designing the wireframes, and building the interface.
3. Building web applications involves an array of challenges and complexities, these include:
The composition of the development team, the immature and legacy technologies, and the low expectations of users.
The lack of an accepted development methodology, the hypertext structure, the homogeneous user populations.
The variety of devices, the simplicity of the HTTP protocol, and the composition of the development team.
The hypertext structure, the demand by users for instant availability, the variety of devices and the different web frameworks.
4. The responsibilities of the middleware include: (select option where all correctly apply):
handle incoming requests from servers, request data from the client, return an html/xml response to the server
handle incoming requests from clients and servers, request data from server, return a html/xml response to the client and server.
handle incoming requests from clients, request data from a database, return an html/xml response to the client
handle incoming request from clients, request data from a database, return a html/xml response to the server
5. When using HTTP, two methods are commonly used. Select the statement that best describes what each method does.
POST appends data to the URL as key-value pairs, PUSH sends the data as part of the message
GET sends data packaged as part of the message, POST appends data to the URL as key-value pairs
GET appends data to the URL as key-value pairs, POST sends data packaged part of the message
PUSH sends the data as part of the message, GET appends data to the URL key-value pairs
6. Asynchronous JavaScript and eXtensible Markup Language (also known as AJAX) is a useful combination of technologies, which enables the web app to: (select the statement that best applies).
make requests without reloading the page, to receive and work with data from the server, using any type data
make requests by reloading the page, to receive and work with data from the server, using only xml data
make requests by reloading the page, to receive and work with data from the server, using any type data
make requests without reloading the page, to receive and work with data from the server, using only xml data
7. Developing web applications typically involves developing distributed applications that run on web browsers. What are the problems and benefits associated with developing applications in such an environment?
difficult to tamper with the application, requires session management, no access to local file system, and high barrier to installation.
control over the client application version, flexible user interface, low entry barrier to installation, and application can be released often.
control over client application version, easy to update the application, performance issues, and needs to handle a variety of browser/devices.
low entry barrier to installation, application can be released often, requires session management, and there is no application container model.
8. Web Application Frameworks have both benefits and drawbacks, which of the following statements best enumerates the benefits and drawbacks:
Enables rapid development, reduces boilerplate code, introduces code bloat, and increased performance
steep learning curve, enables rapid development, typically poorly documented, and introduces code bloat
Enables rapid development, decreases code bloat, reduces boiler plate code and decreases performance
increases reliability, increased security, increased performance, and typically poorly documented
9. Most web application frameworks make use of the Model View Controller architecture (or some variant of). What are the advantages and disadvantages of the MVC architecture. Select the statement that best applies.
provides reusable models, but not reusable views, requires knowledge of design patterns, debugging can be problematic
easier to maintain, helps enforce logical separation of concerns, provides reusable models, debugging can be problematic
decreases the development overheads, requires knowledge of design patterns, provides reusable views, harder to maintain
easier to maintain, decreases the development overheads, provides reusable views and models, requires knowledge of design patterns
10. An N-Tier architecture creates a number of problems for developers, but also provides a number of benefits:
increases the scalability, increases the communication costs, and increases coupling
increases the scalability, increases the communication costs, and encapsulates the complexity
increases the scalability, decreases the communication costs, and increases coupling
decreases the scalability, decreases the communication costs, and encapsulates the complexity
11. CSS stands for:
Cascading Styling Sheet
Counterstrike Source Sheet
Cascading Style Sheet
Cascade Style Sheet
12. Which CSS selector applies to all h2 tags within a class called "yellow":
h2 #yellow
yellow h2
.yellow h2
$yellow h2
13. Which CSS selector applies to all div tags within the ID called "red":
$red div
red div
div #red
red blue
14. This question uses the following code: p {background-color: yellow; border: 1px solid black; } p #blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p><p id="blue">Hello World</p></p>
Hello world, with a solid border and a yellow background
Hello world, with no border and blue background
Hello world with no border and no background color
Hello world with a solid border and blue background
15. This question uses the following code: p { background-color: yellow; border: 1px solid black; } p #blue { background-color: blue; } Given the HTML code shown below how would the element be rendered: <p><p class="blue" style="background-color: green">Goodbye World</p></p>
Goodbye world, with no border and green background
Goodbye world with no border and no background color
Goodbye world with border and green background
Goodbye world, with border and yellow background
16. Which line of JQuery code selects the element with a class red and assigns an event to when the element is clicked:
$("#red").click()
$(".red").click()
$("#red").onclick()
$(".red").onclick()
17. Which line of code selects a paragraph element with the class "blue", and assigns a hover event to it, such that on hover the text turns "green", and off hover it turns "red".
$("p.blue").onhover( function() { $(this).css('color', ‘green’); }, function() { $(this).css('color', ‘red'); });
$("p#blue").hover( function() { $(this).css('color', ‘green’); }, function() { $(this).css('color', ‘red'); });
$("p.blue").hover( function() { $(this).css('color', 'green’); }, function() { $(this).css('color', ‘red’); };
$("p#blue").onhover( function() { $(this).css('color', 'green’); }, function() { $(this).css('color', 'red'); });
18. The structure of Uniform Resource Locator structure is as follows:
scheme://domain/path&query_string=val#fragment_identifier
scheme://domain/path?query_string=val #fragment_identifier
protocol://domain/path&query_string=val #fragment_identifier
protocol://domain/path?query_string=val #fragment_identifier
19. REST and SOAP provide different ways for exchanging structured information. However, they both have advantages and disadvantages. Select the statement that best applies.
SOAP and REST both build upon HTTP, but REST puts the burden on the developer to process the message
SOAP and REST are complicated, very verbose, slow and add lots of overheads
SOAP and REST are protocol specific, but SOAP is slow and very verbose
SOAP is reliable but very verbose, whereas REST is simple but adds lots of overheads.
20. What is the role of XML on the web? Select the statement that best describes the role of XML on the web.
to be mechanism for storing annotated data, to be a mechanism for sharing annotated data, and to be a mechanism for securing annotated data
to describe semi-structured documents, to be mechanism for storing annotated data, to be a mechanism for transporting annotated data
to describe semi-structured documents, to be a mechanism for storing annotated data, and to display data
to be mechanism for storing annotated data, to be a mechanism for sharing annotated data, and to display data
21.
View Question Context
What line of code should be inserted at P1:
name = models.CharField(default='', unique=True)
name = models.CharField(unique=True)
name = models.CharField(max_length=128, unique=True)
name = models.CharField(default='', max_length=128, unique=True)
22.
View Question Context
What line of code should be inserted at P2:
slug = models.SlugField()
slug = models.SlugField(default=‘',unique=True)
slug = models.SlugField(default=‘')
slug = models.SlugField(blank=False)
23.
View Question Context
What line of code should be inserted at P3:
slug = slugify(name)
self.slug = slugify(name)
slug = slugify(self.name)
self.slug = slugify(self.name)
24.
View Question Context
What line of code should be inserted at P4:
author = models.ForeignKey(Author)
story = models.ForeignKeyField(Story)
story = models.ForeignKey(Story)
author = models.ForeignKeyField(Author)
25.
View Question Context
What line of code should be inserted at P5:
return self.title
title
self.title
return title
Submit Quiz