forked from nesquena/sinatra_more
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ROADMAP
88 lines (68 loc) · 2.71 KB
/
ROADMAP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Working with lipsiadmin:
1) Proof of concept for the Sinatra Framework
2) Adding in additional features to the current sinatra_more (more generators, helpers, etc)
3) Split plugin up into individual gems for better organization
4) Porting of lipsiadmin over to sinatra
5) First produciton application
6) Build Sinatra Framework Website
Use Bundler for managing dependencies:
* http://github.com/wycats/bundler
* http://www.engineyard.com/blog/2009/using-the-rubygems-bundler-for-your-app/
Framework structure:
* sinatra-core (the existing sinatra framework) <= from Sinatra
* sinatra-gen (easy generation of and for sinatra apps) <= from Generator
* sinatra-helpers (adds the markup and renderer helpers) <= from MarkupPlugin, RenderPlugin
* sinatra-mailer (mail handling for sinatra applications) <= from MailerPlugin
* sinatra-routing (sinatra route mapping system) <= from RoutingPlugin
* sinatra-cache (page and fragment caching support)
* sinatra-admin (admin management dashboard for content) <= from Lipsiadmin (ported)
Additional wish-list features (integrate existing plugin) (?)
* Reloading Support - http://github.com/alexch/rerun
* Internationalization - http://r18n.rubyforge.org/#sinatra
* Asynchronous Commands - http://github.com/deadprogrammer/spork
* Capistrano Deployment - http://github.com/nakajima/capinatra (?)
* Job Queue - http://github.com/adamcooke/resque (or http://github.com/bmizerany/sinatra-dj)
'sinatra-cache' Caching concept:
# in models
class Person
def something_expensive
Sinatra::Cache.get('key')
Sinatra::Cache.set('key', value)
Sinatra::Cache.fetch('key') { 'value' }
end
end
# fragment in route
get '/cache2' do
cache 'cache2', :expiry => 10 do
'Hello Cache2'
end
end
# fragment in view
# /views/test.haml
- cache 'test', :expiry => 10 do
= partial 'item', :collection => @items
# page
get '/example', :cache => true do
haml_template 'accounts/index'
end
'sinatra-routing' Routing Concept:
namespace :admin do
get :show do
...
end
end
get :accounts do
...
end
map(:admin, :show).to("/my-admin/:id/show")
map(:accounts).to("/show-me-my/accounts")
# or
map :admin do |namespace|
namespace.map(:show).to("/my-admin/:id/show")
end
# and to use
link_to "Show Admin", url_for(:admin, :show, :id => 5)
link_to "Accounts", url_for(:accounts)
'commands' Concept: (console (?) http://github.com/sickill/racksh)
$ sinatra_more console # loads console for sinatra
$ sinatra_more test # runs all test using specified testing framework