Semester Project: Stage One is due today. 

Box will stay open until 11/19 @5pm. 

Anything submitted after 11/17 @5pm is marked late. 

Stage One is the simplest. 

There was an exam last week. 

You submitted your work in class. 

In the same box you have until tonight to submit corrections. 

Wednesday I will post raw scores and will adjust them by Saturday. 

This means I will use the corrections that you are working on. 

The box accepts corrections (if any) until Tue @5pm and then (late) until Wed @5am when it closes. 

I said this week we will have a lab assignment. 

The lab assignment is to be turned in in person in lab this week or later.

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/a.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/c.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/d.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/x.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/e.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/b.pdf

CGI/Perl, Apache, HTTP, Netscape, MySQL, Tomcat (server-side Java)

Java was originally exciting because of applets. 

Many features of Java were revolutionary (Java RMI). 

They became less interesting because of other developments (XML for RMI). 

The equivalent of CGI for server side Java were Java servlets. 

Soon mid-90s someone wrote a CGI script that was behaving differently.

The script was called Personal HomePage and acted as if pages in htdocs had code in them.

This idea became a standalone module/language in Apache. It's now called PHP. 

PHP is different from CGI (inside-out page with code, executed server-side). 

Java Server Pages were invented to emulate PHP.

Tomcat is a server providing the standard servlet container. 

Tomcat is a production server Oncourse is built on Sakai which is built on Tomcat. 

Ruby on Rails came and took everybody by surprise. They offered a framework. 

MVC is a pattern, which is used in our examples too. 

With a framework:

  (a) you need more time to become proficient 

  (b) you become more productive quickly

The success of Rails generated similar frameworks like CakePHP, Django, Grails. 

Grails is an MVC framework for the JVM. 

Grails was originally named Groovy on Rails. 

Groovy is a scripting language based on Java for Java. 

Groovy on Rails was not allowed so they shortened it to Grails. 

In your lab you will take a quick tour of Web Programming with Grails.

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/griffin/f.pdf

https://www.cs.indiana.edu/classes/c212-dgerman/spr2015/hwSix.html

Now let's go throug the stages. 

I want to work in somebody's acount: 

Caulin, Longhua, Chris, Aaron, Brian W, Mitch, Tyler, Sara, 
Xinhui, Yiming, Daozhen, Yufan, John, Roy, 

In this lab you will need to run a server. 

A server will have to use a dedicated port. 

I am nsshipma and my port is 31415. 

To find out if the port has been taken you can run:

  netstat -a | grep 31415

I check and it seems to be free.

I will be distributing ports and you should use those. 

Here's what I do in Nate's account:

   95  ls
   96  ls -l
   97  netstat -a
   98  netstat -a | grep 31415
   99  netstat -a | grep 8346
  100  clear
  101  cp /l/www/classes/c212/software/grails-2.3.4.zip ~
  102  ls -l
  103  unzip grails-2.3.4.zip
  104  clear
  105  ls -l
  106  cd grails-2.3.4/
  107  ls -l
  108  clear
  109  pwd
  110  ls -l
  111  pico -w .grails-setup
  112  ls /usr/lib/jvm/java-1.7.0-openjdk.x86_64
  113  which java
  114  ls -ld /usr/bin/java
  115  ls -ld /etc/alternatives/java
  116  pico -w .grails-setup
  117  which grails
  118  clear
  119  ls -l
  120  ls -ld .gra*
  121  echo $JAVA_HOME
  122  cat .grails-setup
  123  source .grails-setup
  124  echo $JAVA_HOME
  125  which grails
  126  clear
  127  cp /l/www/classes/c212/software/graina2-master.zip ~
  128  cd
  129  ls -l
  130  unzip graina2-master.zip
  131  clear
  132  ls -l
  133  cd graina2-master/
  134  ls -l
  135  cd ch01
  136  ls
  137  cd qotd
  138  ls
  139  clear
  140  ls -l
  141  cat application.properties
  142  which grails
  143  grails -Dserver.port=31415 run-app
  144  history
[nsshipma@silo qotd]$

| Compiling 10 source files

| Compiling 142 source files

| Running Grails application
Picked up _JAVA_OPTIONS: -Xms512m -Xmx512m
| Server running. Browse to http://localhost:31415/qotd

--