Templates and Forms

5th lecture, May 13, 2019

Projects in Information Technology II

http://www.sw.it.aoyama.ac.jp/2019/Projects2/lecture5.html

Martin J. Dürst

AGU

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

ミニテスト

 

Today's Schedule

 

3年生対象大学院進学説明会

  

Last Lecture's Exercises

(see handouts)

  

Last Lecture's Homework

  

Course Overview

 

Some Problems of CGI

 

Some Problems of CGI

 

Templates

 

ERB Template Syntax

 

Comparing CGI and ERB

CGI 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