h1. Trellis h2. What Trellis is an object-oriented, event-driven, page and component-based Web Application Framework written in Ruby. Its main goal is to bring component-driven development to the micro-framework world. The framework is a zero configuration framework. It draws inspiration from: Ruby Web Frameworks =================== * Rails * Camping * Merb * Iowa Java Web Frameworks =================== * Tapesty * Wicket * The good parts of JSF (components) * Seam (session per conversation) h2. Installing
sudo gem install trellish2. The basics A Trellis application consists of the Application class; a descendant of Trellis::Application and one or more pages; descendants of Trellis::Page. The Application at a minimum needs to declare the starting or home page:
module Hello class HelloWorld < Trellis::Application home :home end class Home < Trellis::Page template_as_markaby do html { body { h1 "Hello World!" }} end end endh2. Demonstration of usage To run the above application simply add the line:
Hello::HelloWorld.new.startThat will start the application on Mongrel running on port 3000 by default. To run on any other port pass the port number to the start method like:
Hello::HelloWorld.new.start 8282h2. Forum "http://groups.google.com/group/trellis":http://groups.google.com/group/trellis h2. How to submit patches Read the "8 steps for fixing other people's code":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/ and for section "8b: Submit patch to Google Groups":http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups, use the Google Group above. TODO - pick SVN or Git instructions The trunk repository is
svn://rubyforge.org/var/svn/trellis/trunk
for anonymous access.
OOOORRRR
You can fetch the source from either:
<% if rubyforge_project_id %>
* rubyforge: "http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>":http://rubyforge.org/scm/?group_id=<%= rubyforge_project_id %>
git clone git://rubyforge.org/trellis.git<% else %> * rubyforge: MISSING IN ACTION TODO - You can not created a RubyForge project, OR have not run
rubyforge config
yet to refresh your local rubyforge data with this projects' id information.
When you do this, this message will magically disappear!
Or you can hack website/index.txt and make it all go away!!
<% end %>
* github: "http://github.com/GITHUB_USERNAME/trellis/tree/master":http://github.com/GITHUB_USERNAME/trellis/tree/master
git clone git://github.com/GITHUB_USERNAME/trellis.gitTODO - add "github_username: username" to ~/.rubyforge/user-config.yml and newgem will reuse it for future projects. * gitorious: "git://gitorious.org/trellis/mainline.git":git://gitorious.org/trellis/mainline.git
git clone git://gitorious.org/trellis/mainline.gith3. Build and test instructions
cd trellis rake spec rake install_gemh2. License This code is free to use under the terms of the MIT license. h2. Contact Comments are welcome. Send an email to "Brian Sam-Bodden":mailto:bsbodden@integrallis.com email via the "forum":http://groups.google.com/group/trellis