author: Myles Byrne company: Duck New Media date: 2006-11-13 ---(first) h1. Camping, a Microframework ---(why) h1. _Why Camp? --notes-- * The best way to think about it is PHP for ruby * Not an industrial app framework * Just a simple way to write scripts for the web ---(going) h1. Going camping --notes-- * Camping is really easy ---(controllers) h1. Controllers
module Nuts::Controllers
class Index < R '/'
def get
Time.now.to_s
end
end
end
--notes--
* Controller _is_ the response object
* Renders the last thing in the method
---(views)
h1. Markaby
module SomeApp::Views
# If you have a `layout' method like this, it
# will wrap the HTML in the other methods. The
# `self << yield' is where the HTML is inserted.
def layout
html do
title { 'My HomePage' }
body { self << yield }
end
end
# The `index' view. Inside your views, you express
# the HTML in Ruby. See http://code.whytheluckystiff.net/markaby/.
def index
p 'Hi my name is Charles.'
p 'Here are some links:'
ul do
li { a 'Google', :href => 'http://google.com' }
li { a 'A sample page', :href => '/sample' }
end
end
end
--notes--
* HTML in Ruby
* You could render erb if you want
* Irrational people hate this stuff, it's like Mac & Windows, or religion. Don't bother.
---(models)
h1. Models
module SomeApp::Models
class Companies
has_many :people
end
class People
belongs_to :company
end
end
--notes--
* Optional
* Used just like rails, it's the same library
---(issues)
h1. Issues
* Don't trust the errors
* Forget the breakpointer
--notes--
* Eval is used all over the place so a syntax error in your templates can show up as a routing error.
---(future)
h1. Two future uses
* Desktop like apps by web programmers
* Small web apps that mostly mash up existing APIs
--notes--
* A couple of small apps like a wiki and S3 clone
* There's a camping server now, shares the one sqlite db
* A camping launcher is probably the next step
* Then a camping browser
* The the world
---(s5)
h1. *S*imple *S*tandards-based *S*lide *S*how *S*ystem
--notes--
* A standard file format that's an extension of HTML (microformat?)
* Some javascript to render the show
* It's pretty cool in the sense that's its free, runs on any computer
* It also has the keynote-like second screen feature
---(s5-camping)
h1. S5 goes camping
* Simple Slide DSL
* DCSS support
* Does not modify S5 (probably will in future versions)
---(s5-camping)
h1. S5 goes camping
* Simple Slide DSL
* DCSS support
* Does not modify S5 (probably will in future versions)
--notes--
* HTML is verbose
* DCSS is awesome
* File Save still gives you a static presentation
* Need a better name
* It's a really quick way to prepare presentations, I wrote this in about 45min
* You presentations can be source controlled and diffed
--notes--
* HTML is verbose
* DCSS is awesome
* File Save still gives you a static presentation
* Need a better name
* It's a really quick way to prepare presentations, I wrote this in about 45min, including the styles and hacking the software
* You presentations can be source controlled and diffed
---(future-plans)
h1. Future Plans
* One slide per request
* Slideshow from writeboard
* Keynote export
---(last)
h1. Thanks
http://svn.ducknewmedia.com.au/public/presenter/