This week we covered PHP strings and documenting web sites.
Web Programming Section
The assignment was to create a string with PHP code. My web page is located here:
http://jered.0fees.us/module8/index.php
I created some strings using both single quotes and double quotes, then output them as one sentence using concatenation. In the process of concatenating the strings I used str_replace() to replace a word, for the sake of including a string function.
The relevant code is:
$one_string = "<p>This is a waffle that's been"; $two_string = 'concatenated with PHP.</p>'; $output_string = str_replace("waffle", "sentence", $one_string)." $two_string"; echo $output_string;
Strings are values that can be manipulated with the instructions in functions. There are a number of functions associated with strings – that makes sense, given that strings comprise most of the information that will be communicated to a user from a web page or program.
Web Design Section
For this assignment we are to document the web site we’ll be creating for our final project.
Step 1. Define key stakeholders’ goals
The stakeholder is the farmer the site is created for. He wants to display his wares (vegetables), provide information about them to site visitors, and give those visitors the opportunity to purchase his vegetables.
Step 2. Identify your users’ goals and expectations
The users are site visitors who are interested in purchasing vegetables online. They’ll expect a site that lets them readily find information about what vegetables are for sale and purchase them easily.
Step 3. Define your site’s content areas
Pending a discussion with my eventual partner, I expect the site would be divided into a landing page, a main page to list the vegetables, pages for each vegetable on offer (turnips, radishes, and spinach), a page to check order status, and a page with information about the farmer.
Step 4. Organize the content areas
The landing page would be the first site in the hierarchy, and would link directly to the vegetable page and to the farmer information page. The vegetable page would in turn link to individual pages for each vegetable.