CSC 235 Server-Side Development Lessons 7 & 8
According to Jared Spool from User Interface Engineering, what are three dimensions or perspectives that developers should consider when working on a design? The client's specs, the users' needs, and the overall cost The technology, the client's specs, and the user's experience The clients, the users, and the accountants The technology, the users' experience, and how the design fits into the business requirements
The technology, the users' experience, and how the design fits into the business requirements
In contemporary American culture, it is considered important to make eye contact with the person to whom you are talking. True False
True
Which of the following symbolizes the best way for modern developers to develop an application? A line with a series of branches coming off it Boxes connected like a crossword puzzle A series of interconnected loops A straight line
A series of interconnected loops
As a data format, what does JSON accomplish? Allows fast communication between a client (browser) and a server Is human-readable and a computer can easily parse it Is language-independent (any operating system can use it) Is similar to XML with many different data types and complex structures
Allows fast communication between a client (browser) and a server Is human-readable and a computer can easily parse it Is language-independent (any operating system can use it)
What does the server status 200 signify? The data requested has been assigned a new URI. It is a successful response to the browser's original request. The request had bad syntax or was inherently impossible to be satisfied. The server has received the request, but there is no information to send back.
It is a successful response to the browser's original request.
Which of the following are important steps in prototyping? Begin every prototype session with a disclaimer that it is a mockup, not the actual solution. Use the prototype to discover new features and special requests from the client. It is a collaborative process. Ask for feedback often. Reuse, reuse, reuse. Save reusable templates, stencils, patterns, and widgets for other projects.
Begin every prototype session with a disclaimer that it is a mockup, not the actual solution. It is a collaborative process. Ask for feedback often. Reuse, reuse, reuse. Save reusable templates, stencils, patterns, and widgets for other projects.
PHP can extract data from a database using SQL. Once that data is extracted, what is the correct way to convert it into JSON data? Echo the results of the json_encode( ) function using the data object returned from the SQL query( ). Write a function that reformats the data object from the SQL query( ) into JSON-formatted text. Create an array from the data object returned from the SQL query( ) and echo the results of json_encode( ) using the array. Use the SQL keyword JSON to output the results as JSON-formatted data.
Create an array from the data object returned from the SQL query( ) and echo the results of json_encode( ) using the array.
True or false: Paying attention to detail is important when prototyping. Attempt to make the prototype as close to the finished application as you can.
False
Mirroring another person ___________. Helps build rapport Is a technique where you copy the posture of the person to whom you are listening Can be misconstrued if done blatantly Can make another person feel more connected to you, building trust
Helps build rapport Is a technique where you copy the posture of the person to whom you are listening Can make another person feel more connected to you, building trust
In regard to prototyping, what does the term "fidelity" mean? How closely the prototype resembles the final solution High fidelity would be like a movie theater and low fidelity would be like YouTube. The resolution of the prototype and the color palette How accurately the prototype matches the client's needs and expectations
How closely the prototype resembles the final solution
Which of the following are benefits to using JSON-formatted data? It is plain text so any computer program can read it. It is more compact than a data format such as XML and easy to load in JavaScript. It is a simple, easy-to-read format. It is easier to work with in languages such as JavaScript, Python, and PHP than XML-formatted data.
It is plain text so any computer program can read it. It is more compact than a data format such as XML and easy to load in JavaScript. It is a simple, easy-to-read format. It is easier to work with in languages such as JavaScript, Python, and PHP than XML-formatted data.
What is the best way to comment JSON-formatted data? You can add comments to JSON using the JavaScript single-line comment marker //. You can add comments to JSON using the HTML comment markers <!-- and -->. JSON does not provide or allow any sort of comment syntax. You can add comments to JSON using the JavaScript and CSS multi-line comment markers /* */.
JSON does not provide or allow any sort of comment syntax.
Which is the best tool to validate and format JSON data? JSLint The Networking tab in the developer tools that are built into Firefox and Google Chrome The Source tab in developer tools that are built into Firefox and Google JSONLint
JSONLint
When communicating with another person, the most effective ways to show you are actively listening is to __________________. Keep your arms open and relaxed Use a relaxed posture without slouching Keep your back straight, almost as if you are at attention Hold your hands behind your head and your elbows out in rapt attention
Keep your arms open and relaxed Use a relaxed posture without slouching
What is the most valuable skill to bring to a meeting with a client? Note taking Visual presentation skills Listening skills Verbal skills
Listening skills
Which PHP technique do programmers use to preserve information across many server requests, such as maintaining a shopping cart? Session variables The value=" " attribute in the hidden object of an HTML form POST variables GET variables
Session variables
Which tools can a developer use to monitor an AJAX action while a Web page is running? The status bar at the bottom of the browser window The "Console" tab in the browser's developer tools The AJAX tab in the browser's developer tools The "Network" tab in the browser's developer tools The "Sources" tab in the browser's developer tools
The AJAX tab in the browser's developer tools The "Network" tab in the browser's developer tools
After the readystatechange event triggers, which two states should be in place before handling the data? The readyState should be 2 and the server status should be 200. The readyState should be 0 and the server status should be 300. The readyState should be 4 and the server status should be 200. The readyState should be 1 and the server status should be 400.
The readyState should be 4 and the server status should be 200.
If you have an array of items on a page and want the server to calculate how many items are in the list, what would be an appropriate PHP technique to use? You could use the .length( ) of the array as the value of a hidden field on the form, which the server could read after it received the request. You could use the count( ) of the array as the value of a hidden field on the form, which the server could read after it received the request. You could add the count( ) of the array as part of the URL. You could add the .length of the array as part of the URL
You could use the count( ) of the array as the value of a hidden field on the form, which the server could read after it received the request. You could add the count( ) of the array as part of the URL.
What are the correct punctuation characters for JSON data? comma , separating multiple items angle brackets < > designating data types curly braces { } defining objects square brackets [ ] defining arrays semicolon, designating the end of a line colon : as the separating key, value pairs
comma , separating multiple items curly braces { } defining objects square brackets [ ] defining arrays colon : as the separating key, value pairs
Which PHP function can redirect a page to another website? redirect( ) location( ) header( ) callURL( )
header( )
If you have an AJAX object named httpReq, what line of code is used to send a request with data to the server? httpReq.open("POST", "jsonServer.php", true); JSON.parse("fname=" + userName); httpReq.send("fname=" + userName); httpReq.onreadystatechange("fname=" + userName); httpReq.setRequestHeader("fname=" + userName);
httpReq.send("fname=" + userName);
What will this code: document.write(widgetInfo.widget.image.src); generate from this JSON code? sun1 image/smile.png image/text.png image/logo.png
image/smile.png
Which attribute can add an automatic tooltip to an HTML hyperlink? tip=" " alt=" " title=" " name=" "
title=" "
Which line of code correctly creates a new AJAX object named thisRequest? var thisRequest = setRequestHeader("Content-type", "application/json", true); var thisRequest = new JSONHttpRequest(); var thisRequest = new HttpRequest(); var thisRequest = new XMLHttpRequest();
var thisRequest = new XMLHttpRequest();
