13 Homework

Homework for the Final

  1. Update website with suggestions from the peer review. State how effective the peer review was in making you reconsider aspects of your site.
  2. Write review and hand in to the person whose website you reviewed right after you reviewed it.

Homework for the Unit

  • The final project is to have a form on it.

13 Forms / Peer Review

Week 13
12/3
(Note: This class will be rescheduled)

Forms and Peer Review. HTML forms are a standard way to collect information from the user. Activity: Create a simple form. Your final project should be a functional web site by this time. Activity: Peer Review: Students split up into pairs and review each other’s web sites. I will also be reviewing everyone’s website.

Homework

1) For the class: Create a form to collect user information for your site. 2) Write up the web site you reviewed and hand that in both to the person whose site you reviewed and to me. Read: chapter 16. 3) For the final: Use the feedback from the peer review to finish your website. Due: The following week.

Materials

Additional materials for this unit can be found by following these links:

Goal

The goal of this unit is to:

  • Be able to incorporate forms into the final website.
  • Understand how to critically review web site design and execution.
  • Have your web site reviewed by a peer.
  • Critique and review a peer’s web site.
  • Have me review your web site.

Outcomes

At the end of this unit, students will have:

  • Learned how to construct forms in HTML.
  • Activated forms on the server side using a PHP script.
  • Implemented forms on their own website.
  • To have been a user and test a peer’s web site
  • Critiqued and reviewed that website.
  • Had their web site critiqued and reviewed.
  • Used the feedback to finish web site.

Step-by-Step

20 Review homework and answer questions.
20 Forms
20 Implement Forms and PHP script on server.
20 How to peer review a website
10 Break
20 User test partner’s site
30 Peer review partner’s site
40 Switch Roles

News and External Resources

Sources of information that will enrich your knowledge about web design and will help you to stay current:

  1. Opera Developer Blog
  2. Safari Developer Blog
  3. Mozilla Hacs

There are, of course, many more resources, but Safari, Firefox and Opera are the standards compliant browsers that have carried web forward. Microsoft is also becoming a player, but all of you use Macs.

Talking Points

LYNDA.COM is available to all Newschool students by logging in, going to the library page, clicking on databases and search for lynda.com. You will have to sign up and activate an account, but this will will give you access to both the video and the supplementary exercise files.

LYNDA.COM video Series: Validating and Processing Forms with JavaScript and PHP

Validating web forms is a critical skill for any web developer, ensuring that the data that’s submitted is complete, accurate, and not malicious before it’s sent off to the server. Join author Ray Villalobos in this course as he shows how to validate input from site visitors with HTML5, JavaScript, and jQuery and then process the data with PHP. Plus, learn how to email form data and save it in a MySQL database so that it’s ready for other applications.

Assignment Links

Links that I expect to be up and the end of the semester:

Example of landing page from a previous semester.

    Week 2

  1. Assignment 1 (5 pages marked up)

    Week 3

  2. Index.html landing page— these links and a picture next to your name.
  3. Worksheet: behind the scenes on creative process.
  4. NY Times Wireframe
  5. Portfolio Photoshop Comp

    Week 4

  6. Portfolio exhibiting the CSS selections

    Week 5

  7. Portfolio Photoshop comp to HTML/CSS.

    Week 6

  8. Portfolio: rough, including SEO, Google Analytics and Styled Navigation

    Week 7

  9. Midterm Quiz
  10. Midterm: Portfolio (can be the same link as week 6)

    Week 8

  11. Typography Poster
  12. Final Worksheet with topic

    Week 9

  13. Responsive Redesign of Portfolio

    Week 10

  14. CSS3 Collateral ( and post the exercise you did in class)

    Week 11

  15. CSS3 Animatics (and post the exercise you did in class)

    Week 12

  16. Final: Rough

    Week 12

  17. Multimedia Demonstration

    Week 13

  18. Final: Modular Navigation

    Week 14

  19. Final: User Testing

    Week 14

  20. Final: Peer Review

    Week 14

  21. Forms

    Week 15

  22. WordPress CMS

    Week 15

  23. Link to Final

    The final website sells something. It does not have to be lots of pages, but the quality has to be ready for public scrutiny. It should have many of the topics we covered, like CSS3, Multimedia, PHP, forms media queries, etc.

Definitions

These are the terms that participants should be familiar with during this unit:

6 & 13 Peer Review

Peer review is an important life skill. Do it effectively and with tact.

Constructive Criticism

Be positive, let your partner know what you liked. Praise, comment, and correct in that order. Make positive comments about the design, its execution and overall effectiveness of the site before explaining what does not meet with expectations. Look at the code to see if it is properly annotated, well organized and correct. If you can help the person achieve their goals, do that.

Critical Review Examples

Detailed critical review feedback can be found on Web Standards Sherpa, a website dedicated to constructive criticism, to highlight standards compliant solution that solve real world problems. You can see articles that review the headlines of the New York Times and there are many others, including a critique of their own site.

The goal of WebStandardsSherpa.com is to provide web professionals the opportunity to receive feedback, glean advice and learn best practices from experts in the field to help improve the quality of their own work. It’s very instructive to see professional and pedagogically useful critique at work.

Reacting to Criticism

You do not have to incorporate your classmate’s suggestions. Trust your own judgement about your design, determine which issues are most important, though pay attention to comments if they are made by more than one peer, and get another opinion if you aren’t sure about something.

User Testing

One way to get feedback is to user test your site. You will use the SilverBack application to record the user test. Download the application, which is free for 30 days.

Doing a user test is straight forward. Create a project, and create a session which will record the your peer review partner’s “user interaction” as they go through your website. When you are finished, export the files at 50% size and low resolution, which is still acceptable, and reduces the file size to around 4mb/minute.

Take notes as your peer review partner “user tests” your site. If you are doing the user testing, try to verbalize your reaction and decision making as you go through the site to make it easier for the site’s owner to note how the site user experience works, or what does not work.

Watch the video of your partner going through your site. I do not see these taking more than a minute or two, which can easily be compressed and emailed to me, or posted on your site. If you go over two minutes, you can place it on your server with a link so I can download it.

The user testing experience will not be under ideal and pristine conditions. Ideally, a user test is done the first time a user uses the site. That may not be possible at school. Set up Silverback as the first thing and do a user test with as few preconceived expectations as possible before revealing anything about your site except who its target audience is and what you are selling.

Though this is not a pristine user experience test — the video isn’t representative of an industry standard user test — it will be a good lesson in highlighting the role of testing user interactivity nonetheless.

Tasks your peer review partner should perform.

  1. Find the product/service/idea that is being sold on the site.
  2. Find out additional information about the product/service/idea.
  3. Contact the seller with a question.
  4. Check the entire site to for completeness.

Here is an example. To see it at full resolution, right -click to open the video in its own window:

Peer Review Check Lists

Two lists of questions. The first is a core list every review has to cover. Be constructive, not just “yes” or “no”. Everyone should go through the second list before handing in your final web site or publishing it on the web. I will use the same lists to check to see if you’ve dotted your “i”s and crossed your “t”s, so to speak.

Don’t worry about browser compatibility. That is included because it is a criteria the real world uses, but note that it is no longer of much consequence, as IE 6-8 usage is below 10%.

You use of the HTML5 boilerplate should make your site work for even the most prehistoric browsers, though they will miss the CSS3 goodness.

These lists are resources for you to ask pertinent questions. Use them to help formulate your critique. They are meant to be helpful to you and your partner.

I will use these lists as my measure for evaluating how well you analyzed your partner’s web site, as well as in grading your final project.

Help Your Partner

Everyone has learned a lot, but in this little time, not everyone will have learned everything equally well. You will have the opportunity of helping your partner fix at least three issues in their website where they may not have figured out the best way to do something.

We are in this all together, and being able to

Core Peer Review Questions

  • Intuitive reaction

    1. Take the five-seconds test. What’s your immediate response? Your split second intuition is often canny in its ability to present an accurate picture that can get lost in more deliberated responses.
    2. How dos the site make you feel?
  • Clarity of Communication

    1. Does the site convey a clear sense of its intended audience?
    2. Does it use language in a way that is familiar to and comfortable for its readers?
    3. Is it conversational in its tone?
    4. Is the experience seamless?
    5. Do the pictures and the design facilitate the communication?
  • Accessibility

    1. Is load time appropriate to content?
    2. Is there an easily discoverable means of communicating with the author or administrator?
    3. Is the HTML semantic (can screen readers to navigate the site)?
  • Consistency

    1. Does the site have a consistent and clearly recognizable “look-&-feel”?
    2. Does it make effective use of repeating visual themes to unify the site?
    3. Is it consistent even without graphics or external style sheet? (it can happen)
  • Navigation

    1. Are the links obvious in their intent and destination?
    2. Is there a convenient, obvious way to maneuver among related pages, and between different sections?
  • Design & maintenance

    1. Does the site make effective use of hyperlinks to tie related items together?
    2. Are there dead links? Broken scripts? Pages that are not completed or look unfinished?
    3. Is page length appropriate to site content?
  • Visual Presentation

    1. Is the site worthy of a design student in its communication?
    2. Does it use distracting animations?
    3. Does it provide feedback? Using Javascript frameworks can enhance user experience, or detract from it.
  • Code

    1. Is the code clean and well documented?
    2. Is it optimized for Search Engines (SEO)?
    3. Does it have Google’s Analytics code?
    4. Does the HTML validate? Use the Unicorn Unified Validator Service and Check the HTML and CSS. You are to report your findings in your conclusion.
  • HTML5 and CSS3 goodness

    1. List the CSS3 features used. Were they used to good effect?
    2. Explain how well the document followed a semantically correct HTML5 document structure.
    3. Is the website future proof? Do they use media queries? Does it work on the iPhone/Android?
  • Overall Assessment?

    A list of fixes, suggestions and possible solutions to any issue that came up when assessing the website using the aforementioned considerations.

    Send this report to your partner later today, if you need more time to write it up than class provides, and send a copy to me.

Detail Checklist

  1. All text free from spelling errors?
  2. Content has been placed consistently?
  3. Page & Content formatting has been tested?
  4. Meta data has been included and is appropriate?
  5. Page titles are descriptive and SEO friendly?
  6. Images have appropriate alt text?
  7. Title attributes are appropriate and SEO friendly?
  8. Favicon has been created and displays correctly?
  9. Footer includes copyright and link to site creator?
  10. HTML has passed validation?
  11. CSS has passed validation?
  12. There are no broken links?
  13. JavaScript is error free?
  14. Displays & functions correctly in ie6? 5% of market share.
  15. Displays & functions correctly in ie7? 10% of market share.
  16. Displays & functions correctly in ie8? 40% of market share.
  17. Displays & functions correctly in Firefox 4 (Mac & PC)?
  18. Displays & functions correctly in Chrome 11 (Mac & PC)?
  19. Displays & functions correctly in Safari 5 (Mac & PC)?
  20. Displays & functions correctly in Opera 11 (Mac & PC)?
  21. Tested on the iPhone?
  22. Tested at 1024 x 768 resolution?
  23. Tested at larger resolutions?
  24. Web Statistics package installed and operational?
  25. 404 page exists and informative?

13 Forms

Forms are vital tools for collecting information from users, such as their name, email address, opinions, etc. A form will take input from the user and may store that data into a file, place an order, gather user statistics, register the person or subscribe them to a newsletter.

HTML

The form itself is created in HTML, and starts with the <form>element and ends when that element closes. All the form elements are within the form element, mostly consisting of various input elements.

The input element changes according to its attributes. If there are no attributes, it provides a one line text field:

HTML Code:

<form>
	<input>
</form>

Result:


Attributes

You add the type="text" or type="submit" attributes to the <input> tag to specify if it is text or a submit button. Add a name="name" attribute to reference the form element when it is sent. The size attribute sets the width, measured in blank spaces, and the number of characters can be limited using the maxlength="" attribute.

The submit button is created by using the input tag with a type attribute set to submit. The value="Send" attribute provides the text for the button, so the value send will label the submit button as “send”. Pressing the button engages the <form> action.

There has to be a mechanism for the form to send the information it collects. The <form> element contains a method attribute method="post" that is usually set to post. It can also be set to get, which appends the form information to the URL.

The <form> also has an action attribute action="url.php", which specifies the URL the data is sent to. In this example, it is set to use the email client with the “mailto:” command.

HTML Code:

<form method="post" action="mailto:name@address.com">
	Name: <input type="text" size="30" maxlength="60" name="name"> <br />
	<input type="submit" value="Send">
</form>

Result:

Name:

Filling out your name and sending it will open up your email client, and create an email addressed to name@address.com. and the body of the email contains whatever name you’ve entered. This paring up of the name of the form element with the information entered needs to happen for each form element that gets sent.

Radio Buttons

Of the different types of input, the type=radio allows for only one choice out of a number of options. This is accomplished by using the same name for each of the options, so that only one can be chosen. Each option has its own value however, which is sent when that option is selected.

HTML Code:

<input type="radio" name="color" value="red"> Red
<input type="radio" name="color" value="green"> Green
<input type="radio" name="color" value="blue"> Blue

Result:

Additive Colors:

Red

Green

Blue

Check Boxes

Check boxes are similar to radio buttons but its possible to click on more than one option.

HTML Code:

<input type="checkbox" name="color" value="cyan"> C
<input type="checkbox" name="color" value="magenta"> M
<input type="checkbox" name="color" value="yellow"> Y
<input type="checkbox" name="color" value="black"> K

Result:

Subtractive Colors:

C

M

Y

K

Drop Down Lists

Another way to present the choices is as a drop down menu, which are especially good when there are lots of options. The drop down list is created by the <select> with each choice enclosed by an option tag.

HTML Code:

<select name="shade">
<option>white</option>
<option>light grey</option>
<option>grey</option>
<option>dark grey</option>
<option>black</option>
</select>

Result:

Shade?

HTML Text Area

All of the input fields have been single lines up to this point. The textarea provides a larger area to enter text, specified in rows and columns. A row is one line of text high while column unit is a character wide. Another setting is the wrap, which can be either virtual, which wraps the words for the person entering the text, but the text is sent without returns, or, physical, where the text is sent wrapped, just as it appears in the text area. You can also turn text wrap off.

HTML Code:

<textarea rows="5" cols="80" wrap="physical" name="comments">
Enter Comments Here:
</textarea>

Result:

Enter Comments Here:


If you enter text and press the send button, you can see that the words are concatenated (meaning added together) with plus signs and because the wrap is physical, the return is represented by the code: %0D%0A.

PHP script

Thus far the actions for all of these examples has been the “mailto:” which sent the text to the email client. Sending an email with PHP is easy enough. All you need is the PHP mail() function:

mail("recipient@domain.com", "This is the message subject", "This is the message body");

It gets more complicated when you need to connect up and receive the information, to add security measures, verify the form entry, and so on. Most hosting services have an email script that you can use, and all you need to do is send the form to that script in the action="email-script.php" attribute.

Setting Up Your Form

There are a lot of PHP email scripts on the web, and Free Contact Form is one that is simple and easy to set up. It has all the parts you need. See the demo.

  1. These instructions are for the first version of this script: Download the package.
  2. installation.txt contains basic instructions:
  3. METHOD 1 (Automated)
    1. Upload all files to your website.
    2. In your browser, open the file freecontactforminstall.php and install.
  4. METHOD 2 (Manual)
    1. Create the file ‘freecontactformsettings.php’ using a code/plain text Editor.
    2. Insert the following code into this file :
      <?php
      
      $email_to = "youremailaddress@yourdomain.com"; // your email address
      $email_subject = "Contact Form Message"; // email subject line
      $thankyou = "thankyou.htm"; // thank you page
      
      // if you update the question on the form -
      // you need to update the questions answer below
      $antispam_answer = "25";
      ?>
      
    3. Enter your email address in place of youremailaddress@yourdomain.com
    4. Change the email subject (if you like)
    5. Change your thank you page reference (if you like)
    6. Save the file.
    7. Copy ALL files onto your website using an FTP program
  5. Test it out. The thank you page has been redirected with the return button bringing you back here.


Fields marked with * are required.

Alternatives

You need not develop your own php file if you use Form Spree. This allows you to go beyond the options provided for in the php script.

Setting it up is easy and free. Here’s how: You don’t even have to register.

  1. Setup the HTML form

    Change your form’s action attribute to the action input given below. Replace “your@email.com” with your own email.

    <input type=”text” value=”http://formspree.io/your@email.com” />

  2. Submit the form and confirm your email address.

    Go to your website and submit the form once. This will send you an email asking to confirm your email address, so that no one can start sending you spam from random websites.

  3. All set, receive emails

    From now on, when someone submits that form, we’ll forward you the data as email.

HTML5 Forms

Before HTML5, forms had to be carefully vetted with JavaScript to make sure that the information the user input was fundamentally correct, like an email address actually had the form of an email address, and a URL actually had the form of a URL. With HTML5 greatly enhanced forms support, this can be taken care of by the browser. Though there are still some browser compatibility problems, the time is coming when form checking is built right in.

13 Homework

Homework for the Final

  1. Update website with suggestions from the peer review. State how effective the peer review was in making you reconsider aspects of your site.
  2. Write review and hand in to the person whose website you reviewed right after you reviewed it.

Homework for the Unit

  • The final project is to have a form on it.