Permalink
Browse files

Started mapping out how to split week 4 into two weeks

  • Loading branch information...
1 parent 9b27076 commit 496fb0fb2ff80ce09cf5551b8e6d22e84febf335 @chadoh committed Jan 16, 2013
View
85 content/pages/sick-of-repeating-myself-sinatra-magical-trip-to-server.haml
@@ -0,0 +1,85 @@
+Summary: What's a server good for, anyhow?
+
+%h1 Week 4: I'm so sick of repeating myself! Sinatra takes us on a magical trip to the server
+
+:markdown
+ topics: [VirtualBox][vbox], Virtual Machines, ssh, [Sinatra][sntr], erb, [Heroku][hrku]
+
+ Outline
+ -------
+
+ ### By the end of class today, we're going to
+
+ * Deploy our app to [Github] so that other people can visit it online
+ * Get a Virtual Machine running on our computers and install Ruby!
+
+ ### Prep
+
+ At end of week 3, need to
+
+ * Go through the git tutorial on CodeSchool
+ * Install Vagrant
+
+ ### Homework
+
+ * Go through the [non-nerd's guide to the command line][non-nerds-guide] again
+ * Go through the [fledgling nerd's guide to the command line][fledgling-nerds-guide] (again?)
+ * Finish [TryRuby](tryruby.org)
+ * Keep making your website spiffy
+
+ [non-nerds-guide]: /a-non-nerds-guide-to-the-command-line
+ [fledgling-nerds-guide]: /a-fledgling-nerds-guide-to-the-command-line
+
+
+
+ # Week 5 Homework
+
+ * Go through the [Sinatra tutorial][Sinatra]
+
+ [Sinatra]: http://rubysource.com/just-do-it-learn-sinatra-i/
+
+ -----
+
+
+ * By the end of class today, we're going to
+ * Deploy our app to [Heroku][hrku] so that other people can visit it online
+ * Clean up our html so that we don't repeat ourselves anymore
+ * Singing with [Sinatra][sntr]
+ * learning about Virtual Machines
+ * run `vagrant ssh`—I set it up so you're automatically put in `/vagrant`. Run `ls`. It's all your files.
+ * type `foreman start`. It will say that Sinatra took the stage on 5000.
+ * In your browser, visit `localhost:5000`. That's the 5000 `foreman` was talking about.
+ * Pushing to [Heroku][hrku]
+ * Setup Heroku: go through [the first 3 steps here][hrku-start]
+ * [Deploy to the web][hrku-push]!
+ * Cleaning your code: Don't Repeat Yourself
+ * `git mv index.html views/index.erb`
+ * `git mv faq.html views/faq.erb`
+ * `git mv sightings.html views/sightings.erb`
+ * Create a new file, `views/layout.erb`, and put `<%= yield %>` in it
+ * Open app.rb and change the `get '/'` from the `redirect` to `erb :index`
+ * Restart your server in your VM; switch to that terminal window and hit Ctrl-C, then press up & Enter
+ * Visit `localhost:5000` again: It's your index page, without needing to put `/index.html` in the URL!
+ * Ok, copy and paste all of `index.erb` into `layout.erb`
+ * In `layout.erb`, remove all `<article class='indent'>`s and replace them with `<%= yield %>`
+ * In `index.erb`, remove everything _except_ the `<article class='indent'>`s
+ * Reload the page in your browser
+ * In `faq.erb` and `sightings.erb`, remove everything except `<article class='indent'>`s and `<article class='sighting'>`s
+ * In `app.rb`, add `get 'faq' do; erb :faq; end` and `get 'sightings' do; erb :sightings; end`
+ * Change `layout.erb` so that the links at the top point to `/`, `faq`, and `sightings` instead of their `.html` equivalents
+ * Change `layout.erb` so that it automatically adds `class='menu-current'` to the `<li>` for the current page, and _doesn't_ link to it
+ * Restart your server
+ * Now changes you make to the heading will show up on every page!
+
+ Assignment
+ ----------
+
+ * Next week we're going to use a database called MongoDB! Go ahead and [learn a little bit about it][mong] (click the "Try it out" link).
+
+ [vbox]: https://www.virtualbox.org/
+ [sntr]: http://www.sinatrarb.com/intro
+ [hrku]: http://www.heroku.com/
+ [hrku-start]: https://devcenter.heroku.com/articles/quickstart
+ [hrku-push]: https://devcenter.heroku.com/articles/ruby#deploy-to-herokucedar
+ [gthb]: https://github.com/
+ [mong]: http://www.mongodb.org/
View
19 content/pages/week-3-clapping-bells-blowing-whistles-your-brochure-gets-interactive.haml
@@ -203,22 +203,11 @@ Link text: Week 3: Clapping bells and blowing whistles; your brochure gets inter
%section
%h2 Prep For Next Week
:markdown
- * Download [VirtualBox][vbox] and [Vagrant][vgnt]
- * Download [these extra files][files], and copy them into your project's folder
- * Run the following commands _in your project's folder_ (that is, in your
- command line, make sure you're in your project's folder, then copy &
- paste all this)
- <br>
-
- git mv fonts images stylesheets index.html faq.html sightings.html public
- vagrant box add lucid32 http://bit.ly/sinatra-starter
- vagrant init
- vagrant up
- vagrant halt
-
- [vbox]: http://www.oracle.com/technetwork/server-storage/virtualbox/downloads/index.html#vbox
+ * Finally [get comfortable with git][git]
+ * Download [Vagrant][vgnt]
+
[vgnt]: http://vagrantup.com/
- [files]: https://github.com/downloads/chadoh/tree-octopus/tree-octopus%20sinatra%20files.zip
+ [git]: http://www.codeschool.com/courses/try-git
%section
%h2 Things To Play With Before Next Week

0 comments on commit 496fb0f

Please sign in to comment.