Templates and Forms

5th lecture, May 13, 2019

Projects in Information Technology II


Martin J. Dürst


© 2019 Martin J. Dürst 青山学院大学



Today's Schedule




Last Lecture's Exercises

(see handouts)


Last Lecture's Homework


Course Overview


Some Problems of CGI


Some Problems of CGI




ERB Template Syntax


Comparing CGI and ERB

Web page contents explicit output direct
Web page markup explitic output direct
Program code direct <% ... %>
Program results direct calculation, explicit output <%= ... %>


Web Forms


URIs, URLs, and IRIs


Query Part Syntax


Form Fields


Ruby Iterators: Loops with Steps

There are many ways to loop with steps.

Example: Loop from 0 to 20 with steps of 2:

Make sure you know at least one of these.


Exercise 5a: A Template to Convert Marks


Exercise 5b: A Form to Convert Marks


Exercise 5c: A Table of Students


Homework: Sqlite Installation