Difference between revisions of "Fundamentals of Web Applications (Winter 2015)"

From Soma-notes
Jump to navigation Jump to search
Line 2: Line 2:


[[Fundamentals of Web Applications: Winter 2015 Course Outline|Here]] is the course outline.
[[Fundamentals of Web Applications: Winter 2015 Course Outline|Here]] is the course outline.
==Course Software==
In this course we will be developing web applications using [http://nodejs.org/ node.js] and [http://www.mongodb.org/ mongoDB].  You are welcome to use whatever operating system and development tools you like; however, we will supporting the use of a course virtual machine appliance running [http://www.lubuntu.net/ Lubuntu], a low-resource variant of [http://www.ubuntu.com/ Ubuntu] Linux distribution.
===In the labs===
In the SCS labs you should be able to run the course VM by starting Virtualbox (listed in the Applications menu) and selecting the COMP 2406 virtual machine image.  After the VM has fully booted up you can login to the student account using the password "tneduts!".  This account has administrative privileges; in addition, there is the admin account in case your student account gets corrupted for any reason.  The password for it is "nimda!".
We highly recommend running your VM in full-screen mode (select from the menu, not by maximizing the window).  Do all of your work inside of the VM; it should be fast enough and you won't have any issues with sharing files or with firewalls/network connectivity.
You can save the work you do from the course VM (in the student account) to your SCS account and restore it to any other copy of the class VM (on your machines or in the labs) by running using the following commands:
  save2406 <SCS username>
  restore2406 <SCS username>
  compare2406 <SCS username>
If you use these commands, '''use them consistently'''.  That means run <tt>restore2406</tt> when you first log in, and run <tt>save2406</tt> just before logging out.  If you don't do this, you will '''erase''' the work that you had done previously when you save.
If you forgot to restore and you want to save, try running this:
  rsync -a -v --progress ~/ <SCS username>@access.scs.carleton.ca:COMP2406/
This is the same as the <tt>save2406</tt> command minus the options (--delete and --force) that deletes files in the destination that don't exist in the source.  As a check, you may want to add the <tt>-n</tt> option to do a dry run.
===Running the VM on your own machines===
If you want to run the VM appliance on your own system (running essentially any desktop operating system you want), just download the [https://onedrive.live.com/redir?resid=E6AC3A7CA1F6A174!1729&authkey=!AELr0qhKpw6qOsI&ithint=file%2cova COMP 2406.ova] virtual appliance file and import.  The SHA1 hash of this file is:
  3c0ad1c89d58b5b9b1225a3a7c876a500e0621a8  COMP 2406.ova
On Windows you can compute this hash for your downloaded file using the command <a href="http://support.microsoft.com/kb/889768"><tt>FCIV -sha1 COMP 2406.ova</tt></a>.  If the hash is different from above, your download has been corrupted.
If the application is not VirtualBox, you'll need to:
* Have the VM platform ignore any errors in the structure of the appliance found during the import process;
* Uninstall the VirtualBox guest additions by typing starting a terminal application and running
  sudo /opt/VBoxGuestAdditions-4.2.16/uninstall.sh
* Install your platform's own Linux guest additions, if available.
===Configuring Linux===
If you already run Linux and you want to use the same packages we do in class, you should do the following:
* Install the latest node.js version using [https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager a package manager].  (You generally don't use the version that comes with your distribution, it is probably too old.)
* Install [http://www.mongodb.org/ mongoDB] - it probably goes by mongodb in your package manager.  The version doesn't matter too much.
* For the same editing experience, install [http://www.geany.org/ Geany] (or just use your favorite editor).
Note that the binary of the node.js executable may be <tt>node</tt>, <tt>nodejs</tt>, or something similar.
That's it!
===Configuring Windows===
It is also possible to do everything in this class in Windows.  Here are some tips on getting things running.
* You can just install the [http://nodejs.org/download/ windows node package] to get basic node and npm functionality.
* [[Run MongoDB on Windows]].
* If you want to run Emacs on Windows, look at the [[Running Emacs on Windows|following tips]].

Revision as of 22:34, 6 January 2015

Course Outline

Here is the course outline.


Course Software

In this course we will be developing web applications using node.js and mongoDB. You are welcome to use whatever operating system and development tools you like; however, we will supporting the use of a course virtual machine appliance running Lubuntu, a low-resource variant of Ubuntu Linux distribution.

In the labs

In the SCS labs you should be able to run the course VM by starting Virtualbox (listed in the Applications menu) and selecting the COMP 2406 virtual machine image. After the VM has fully booted up you can login to the student account using the password "tneduts!". This account has administrative privileges; in addition, there is the admin account in case your student account gets corrupted for any reason. The password for it is "nimda!".

We highly recommend running your VM in full-screen mode (select from the menu, not by maximizing the window). Do all of your work inside of the VM; it should be fast enough and you won't have any issues with sharing files or with firewalls/network connectivity.

You can save the work you do from the course VM (in the student account) to your SCS account and restore it to any other copy of the class VM (on your machines or in the labs) by running using the following commands:

 save2406 <SCS username>
 restore2406 <SCS username>
 compare2406 <SCS username>

If you use these commands, use them consistently. That means run restore2406 when you first log in, and run save2406 just before logging out. If you don't do this, you will erase the work that you had done previously when you save.

If you forgot to restore and you want to save, try running this:

  rsync -a -v --progress ~/ <SCS username>@access.scs.carleton.ca:COMP2406/

This is the same as the save2406 command minus the options (--delete and --force) that deletes files in the destination that don't exist in the source. As a check, you may want to add the -n option to do a dry run.

Running the VM on your own machines

If you want to run the VM appliance on your own system (running essentially any desktop operating system you want), just download the COMP 2406.ova virtual appliance file and import. The SHA1 hash of this file is:

 3c0ad1c89d58b5b9b1225a3a7c876a500e0621a8  COMP 2406.ova

On Windows you can compute this hash for your downloaded file using the command <a href="http://support.microsoft.com/kb/889768">FCIV -sha1 COMP 2406.ova</a>. If the hash is different from above, your download has been corrupted.

If the application is not VirtualBox, you'll need to:

  • Have the VM platform ignore any errors in the structure of the appliance found during the import process;
  • Uninstall the VirtualBox guest additions by typing starting a terminal application and running
  sudo /opt/VBoxGuestAdditions-4.2.16/uninstall.sh
  • Install your platform's own Linux guest additions, if available.

Configuring Linux

If you already run Linux and you want to use the same packages we do in class, you should do the following:

  • Install the latest node.js version using a package manager. (You generally don't use the version that comes with your distribution, it is probably too old.)
  • Install mongoDB - it probably goes by mongodb in your package manager. The version doesn't matter too much.
  • For the same editing experience, install Geany (or just use your favorite editor).

Note that the binary of the node.js executable may be node, nodejs, or something similar.

That's it!

Configuring Windows

It is also possible to do everything in this class in Windows. Here are some tips on getting things running.