Recitation-Lab Activities
Classes begin in this course on Tuesday, January 9, 2024. It is highly recommended that you be present for the first week of class and recitation/lab sessions.
Recitation-Lab Activities
Recitation-Lab sessions will generally involve some discussion of your
ongoing website development, and this will naturally also include discussion
of our programming environment, HTML and CSS markup, and/or programming
language features. In addition, these sessions will often involve a breakout
room activity in which participants will critique each other's website, and
the instructor will simultaneously be checking student websites to see if
certain criteria have been met as well.
This page will provide updates on what you must have ready for the next lab/recitation session in which your website will be evaluated.
In your uxx MySQL database create a table called Widget
that has the exact structure and exact content shown in the screen shot below. As you know by now there are several different ways you could do this ... how you do it does not matter ... only the end result. Indicate when you're ready for testing in the usual way.
If you have not already done so, create a subdirectory called sandbox in your public_html directory, and then put the directory path a/b in your sandbox. Now make a complete copy of your version 3 website in the b subdirectory and make any change(s) necessary so that the website continues to work properly in the new location. Note that when a user clicks on any link in the copied website, the new link should be a page in the copied version, not in the original.
Put into your u?? MongoDB database a collection called my_info that consists of a single document containing the following information that is specific to you:
firstName
lastName
smuEntryYear
currentCourses
haveJob
in which you must use the above names as keys for your key/value pairs. The firstName and lastName values must be strings, the smuEntryYear value must be a 4-digit integer, the currentCourses value must be an array containing one or more string values, and the haveJob value must be boolean (true or false). Also be sure to give your document a MongoDB _id identifier value of 1 as the first key/value pair.
Images: You must have at least a half-dozen product images in your images/products subdirectory. They may or may not yet be rotating on your home page.
Quotes: You must have at least a couple of dozen quotes in your resources/quotes.json file. They may or may not yet be randomly chosen every day at midnight.
Time and Date: The current date and time must display when your home page is loaded, but the updating-every-minute feature will not be checked. [However, that is obviously something that can be checked in the breakout rooms.]
No breakout room peer evaluation of websites this week, but an individual exercise in writing a short PHP script to read and parse a JSON file and produce some output based on the JSON content. In the recitation sessions this week we will first continue our discussion of the PHP/JSON examples and then everyone will have the chance to accumulate some points by completing an exercise which will be preview of what you will have to do in version 2 of your website for Submission 02. If you want to think about the exercise beforehand, you will be accessing a JSON file containing an array of spy objects that look like this:
{ "id": "007", "name": "James Bond", "license_to_kill": true }, { "id": "002", "name": "Felix Leiter", "license_to_kill": false }Your PHP script must run in the browser, read and parse a JSON file containing an array of objects like those above, and produce output that looks like this:
James Bond (007) may apply lethal force. Felix Leiter (002) may not apply lethal force.Here are the steps that you will need to perform:
sandbox
in your uxx/public_html directory.
student_data_web.php
to your sandbox
directory but call it spies.php
.
spies.php
to change the file name in the comment to spies.php
and the title content to Process Spy Data
, and delete any body code that you don't need.
/home/course/u00/public/spies.json
uxx ready
in the Zoom chat window.
Images: Both logo and business-related image must appear on home page
Footer: Must contain business name, version, copyright, year and owner name
Validation: business.php must pass HTML5 validation
my_business.php and other pages
Directories: common, css, images, pages,
Files: readme.txt, my_business.php
my_business.php