-
Notifications
You must be signed in to change notification settings - Fork 8
Architecture Routes
alsonkemp edited this page Sep 13, 2010
·
1 revision
Much as with Ruby on Rails, Turbinado uses “routes” to direct traffic to particular Controllers. Routes are configured in Config/Routes.hs. A sample set of routes is in Config/Routes.hs.sample, which contains:
module Config.Routes where routes = [ "/:controller/:action/:id" , "/:controller/:action.:format" , "/:controller/:action" , "/:controller" ]
Using these routes, a request to
/Page/Show/title
would:
- Insert into the Settings:
o “controller” => “Page”
o “action” => “Show”
o “id” => “title” - Invoke the “show” function in /App/Controllers/Page.hs. Presumably, the controller would want to getSetting “id”.
- Invoke the “markup” function in /App/Views/Page/Show.hs