<?xml version="1.0" encoding="UTF-8"?>
<wiki>
  <body>&lt;p&gt;Much as with Ruby on Rails, Turbinado uses &amp;#8220;routes&amp;#8221; to direct traffic to particular Controllers.  Routes are configured in &lt;a href=&quot;http://github.com/alsonkemp/turbinado-website/tree/master/Config/Routes.hs.sample&quot;&gt;Config/Routes.hs&lt;/a&gt;.  A sample set of routes is in &lt;a href=&quot;http://github.com/alsonkemp/turbinado-website/tree/master/Config/Routes.hs.sample&quot;&gt;Config/Routes.hs.sample&lt;/a&gt;, which contains:&lt;/p&gt;
&lt;pre&gt;
module Config.Routes where

routes = [ &quot;/:controller/:action/:id&quot;
         , &quot;/:controller/:action.:format&quot;
         , &quot;/:controller/:action&quot;
         , &quot;/:controller&quot;
         ]
&lt;/pre&gt;
&lt;p&gt;Using these routes, a request to&lt;br /&gt;
&lt;pre&gt;&lt;br /&gt;
  /Page/Show/title&lt;br /&gt;
&lt;/pre&gt;&lt;br /&gt;
would:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Insert into the Settings:&lt;br /&gt;
          o &amp;#8220;controller&amp;#8221; =&amp;gt; &amp;#8220;Page&amp;#8221;&lt;br /&gt;
          o &amp;#8220;action&amp;#8221; =&amp;gt; &amp;#8220;Show&amp;#8221;&lt;br /&gt;
          o &amp;#8220;id&amp;#8221; =&amp;gt; &amp;#8220;title&amp;#8221;&lt;/li&gt;
	&lt;li&gt;Invoke the &amp;#8220;show&amp;#8221; function in /App/Controllers/Page.hs.  Presumably, the controller would want to getSetting &amp;#8220;id&amp;#8221;.&lt;/li&gt;
	&lt;li&gt;Invoke the &amp;#8220;markup&amp;#8221; function in /App/Views/Page/Show.hs&lt;/li&gt;
&lt;/ol&gt;</body>
  <created-at type="datetime">2009-11-25T15:03:42-08:00</created-at>
  <id type="integer">236272</id>
  <permalink>architecture-routes</permalink>
  <repository-id type="integer">76548</repository-id>
  <title>Architecture - Routes</title>
  <updated-at type="datetime">2009-06-09T17:48:57-07:00</updated-at>
  <user-id type="integer">34693</user-id>
</wiki>
