LoneStar RubyConf Presentation PDF
Posted by Brian Sam-Bodden
Here’s the PDF for my LoneStar RubyConf session on Trellis http://lonestarrubyconf.com/
Posted by Brian Sam-Bodden Sat, 29 Aug 2009 15:59:00 GMT
Here’s the PDF for my LoneStar RubyConf session on Trellis http://lonestarrubyconf.com/
Tags pdf, presentation, trellis
Posted by Brian Sam-Bodden Sat, 29 Aug 2009 15:37:00 GMT
The experimental code base for the Trellis framework is now on GitHUb at
http://github.com/bsbodden/trellis
git://github.com/bsbodden/trellis.git
It is rough around the edges but it embodies the general principles of what I want in a Ruby Component-based Web Framework. It is by no means production ready.
Pivotal Tracker
http://www.pivotaltracker.com/projects/24696
RubyForge Page
http://rubyforge.org/projects/trellis/
Install
gem install trellis
HelloWorld
The simple Hello World example consists of one Application and one Page. The Application defines its home page as the symbol :hello which is resolved to the Home page class. The Home page provides its markup via the template class method which takes a block of Markaby. Finally the application is launched by instantiating the Application object and using the start method (runs on port 3000 by default)
require 'rubygems'
require 'trellis'
module Hello
class HelloWorld < Trellis::Application
home :home
end
class Home < Trellis::Page
template do html { body { h1 "Hello World!" }} end
end
end
Hello::HelloWorld.new.start if __FILE__ == $PROGRAM_NAME
Tags helloworld, trellis
Older posts: 1 2
component conferences deployment helloworld heroku pdf presentation presentations routes routing ruby stateless trellis tutorial web
