Sinatra


From Docunext Technology Wiki

Jump to: navigation, search

Contents

Summary

Another Ruby framework. In my investigations, I've only managed to fork the codebase:

http://www.mirrors.docunext.com/cgit.cgi/sinatra/

I've tried it out and I love it. Its actually very similar to Nexista in that the sitemap is the application. You start out with something like this:

require 'rubygems'
require 'xslt'
require 'sinatra'

sdoc = XML::Document.file('index.xsl')
stylesheet = XSLT::Stylesheet.new(sdoc)


get '/' do
    xml_doc = XML::Document.file('index.xml')
    blah = stylesheet.apply(xml_doc)
    "#{blah}"
end

I can imagine transforming an existing Nexista application sitemap into a Sinatra application with ease!

Learning How to Use Sinatra

I just found a blog post that suggested reading the Sinatra code. I've looked through it a bunch before, and its a good idea so I'm definitely going to do it again. I've also reviewed a bunch of other sinatra apps, like Git-wiki. That was very helpful.


Helpers

I'm writing some helpers for Sinatra:

Sinatra Apps

See Also

Links

General

Testing

Personal tools