For this homework, you will create simple Rails web app with (mostly) static web pages and practice using some features of Git and GitHub.
The tasks you will perform draw heavily from two demonstrations: one giving an overview of the software stack and another focusing on the MVC view in Rails.
Section 1 of the software stack demo shows similar steps to the ones you’ll use in this part.
First, you must
When perform the above tasks, follow these constraints:
hw3
.Settings
> Collaborators & teams
; use read-only permissions). The instructors GitHub usernames are as follows:
sdflem
kbridson
aashisghimire
Once you have completed this step, commit the current version of the code to your local repo, and push the changes to the remote GitHub repo. Make note of the commit has for this commit. You will need to report it in Step 4 below.
Section 2, steps 1 and 2 of the software stack demo show similar steps to the ones you’ll use in this part.
Next, you must create a controller PagesController
for the web pages you will be creating. The following command will do this for you:
rails generate controller Pages
Note that, unlike the demo video, you will not specify any controller actions (e.g., home
) at this point.
Once you have completed this step, commit the current version of the code to your local repo, and push the changes to the remote GitHub repo. Make note of the commit has for this commit. You will need to report it in Step 4 below.
The MVC view demo shows similar steps to the ones you’ll use in this part.
Next, you must create two web pages:
For each of your pages, the page must use each of the following HTML tags at least once (again, some creativity may be required on your part to work all of these in):
h1
– Level-1 headingh2
– Level-2 headingp
– Paragraphul
/li
– Unordered listFor each of your pages, the page must use each of the following Rails view helper methods:
link_to
- Hyperlinkimage_tag
- Image embedding (hint: by default, image files are loaded from app/assets/images/
, so you should save your images there)For the form part of your software-review page, you must use each of the following HTML tags:
form
– Input form containing the following elements:
input
- Text field (type=text
)textarea
- Text areainput
– Radio buttons (type="radio"
)datalist
– Dropdown list (doesn’t do anything other than let you choose an item)button
– Button (doesn’t do anything when pressed)Your two pages must use these tags in noticeably different ways (i.e., the two pages cannot look too similar). Also, all teammates’ pages must look noticeably different from each others’.
When you create your pages, add the appropriate routes, controller actions (i.e., in PagesController
), and ERB views.
Once you have completed this step, commit the current version of the code to your local repo, and push the changes to the remote GitHub repo. Make note of the commit has for this commit. You will need to report it in Step 4 below.
Before you can submit, you must have pushed all your commits into the master
branch of the remote GitHub repo. You may use the GitHub repo’s web interface to inspect the commit log to make sure that everything has been pushed.
To submit your work, you must create a release. You can do this using the GitHub repo’s web interface. From the main repo page, follow the releases
link to the create a new release. Set the tag version to hw3v1
and the release title to Homework 3, version 1
. In the release description, enter the following, replacing hash1, hash2, etc. with the appropriate commit hash:
Step 1: hash1
Step 2: hash2
Step 3: hash3
If you discover that you’ve made a mistake in your release, you may create additional releases, incrementing the version with each new release. For example, if the above release needed fixing, the fixed release would have the tag version hw3v2
and the release title Homework 3, version 2
.
Finally, you must submit the URL of your final release to the appropriate eCourseware dropbox.
To grade your work, I will download the appropriate release, and run it on my machine.
Total points: 100
Below, the top-level number is the items total point value. If an item is not submitted at all or it is irredeemably broken, 0 points will be awarded for that item. The sub-bullets indicate standard deductions for errors in a submitted item. The deduction list below may not be complete because there may be mistakes that we did not expect. The deduction for an unexpected mistake will be assessed at the time it’s discovered and will reflect how severe the instructor thinks the mistake is.
application.html.erb
: -5 (taken only once)ul
, but did use li
: -2 per instance