Assignment 1
Submission
- Due: Feb 8, 2017, Midnight,
Outline
- Your job is to create the Restaurant Mash application.
- Starter code can be found here, which includes admin.txt as well as features.txt.
- My sample is the minimal submission allowed, you should add more to it, as outlined in features.txt or others you can think of.
Marking
We will be looking for (among other things)...see features.txt
- Simple, clean, clear MVC PHP code. The code does not repeat itself unnecessarily.
- Validation of inputs client side (see HTML validation)
- Effecive use of HTML5
- Validation server side (look into turning off client side validation in the browser to test this).
This will include re-population of form fields when appropriate.
- Prepopulation of forms where appropriate, for example when updating the profile.
- Simple DB schema and effective use of SQL (simple clear queries)
- Use of prepared statements
- Use of some advanced techniques, for example, to template your website, so there
is less repeated code in the views.
- Great use of form inputs, and of different types.
- 10% of your mark on this assignment will be as a result of competition between groups.
For this, you should add additional features, and clearly identify
them in features.txt. Your marks for this part will be based on how interesting,
difficult and effective your additional features are.
- Your pages should display well under all current browsers, FireFox, Safari, Edge.
- An update to the setup.sh script so we can simply install your application
in our cs website, using our own postgresql db. We should be able
to unzip your application, enter our database location and credentials in one spot,
load your schema and run.
Postgresql
You will be using postgresql for this assignment. Andrew Wang has this setup on
a special database server for you. You can only reach this server from cs or cslinux.
Postgresql database credentials:
utorid/last 5 digits of barcode, excluding last two control digits.
So for 21761012413912000 ... the password is 39120
ssh -Y [UTORID]@cslinux.utm.utoronto.ca
psql -h mcsdb.utm.utoronto.ca -d [UTORID]_309 -U [UTORID]
drop table appuser;
create table appuser (
username varchar(20) primary key,
password varchar(20),
otherinfo varchar(20)
);
\dt
select * from appuser;
insert into appuser (username, password, otherinfo) values('arnold', 'spiderman', 'something');
insert into appuser (username, password, otherinfo) values('jane', 'wonderwoman', 'another thing');
select * from appuser;
select otherinfo
from appuser
where username='arnold';
select *
from appuser
where username='arnold' and password='zzzz';
select count(*)
from appuser
where username='arnold' and password='spiderman';
to quit
References
Questions and Answers