<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div></div><div><br class="khtml-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>I really liked the ideas with actions as classes... and was playing with syntax, for a router and app layout ... attached should be a prettymuch barebones app with some comments if anyone is interested.</div><div><br class="webkit-block-placeholder"></div><div>My routing idea basically hands over most of the routing logic to the app developer and simply provides a frame to say </div><div><br class="webkit-block-placeholder"></div><div>"if a url matches this regex"..."run this block"... "I expect to get an action class back"</div><div><br class="webkit-block-placeholder"></div><div>this would make the router code in any framework very small/fast and easy to follow, and put all the routing power in the hands of the dev, who wouldn't have to learn any special syntax.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div>Regards</div><div><br class="khtml-block-placeholder"></div><div>Farms.</div><div><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><span class="Apple-style-span" style="font-size: 10px; "><span class="Apple-style-span" style="font-size: 10px; "><span class="Apple-style-span" style="font-size: 10px; ">Design &amp; Dev</span></span></span></span></font></div><div><font class="Apple-style-span" size="2"><span class="Apple-style-span" style="font-size: 10px;"><br class="khtml-block-placeholder"></span></font></div><div><br class="khtml-block-placeholder"></div><font class="Apple-style-span" color="#494949" face="Georgia" size="6"><span class="Apple-style-span" style="font-size: 24px;; color: rgb(73, 73, 73); font-family: Georgia; "><span class="Apple-style-span" style="color: rgb(73, 73, 73); font-family: Georgia; font-size: 24px; "><span class="Apple-style-span" style="color: rgb(73, 73, 73); font-family: Georgia; font-size: 24px; "><span class="Apple-style-span" style="color: rgb(73, 73, 73); font-family: Georgia; font-size: 24px; ">Oxygen.</span></span></span></span></font><div><font class="Apple-style-span" color="#605E5F" size="2"><span class="Apple-style-span" style="font-size: 10px;"><a href="http://www.oxdi.eu">http://www.oxdi.eu</a></span></font></div><div><font class="Apple-style-span" color="#BDBDBD" size="3"><span class="Apple-style-span" style="font-size: 12px;"><br></span></font></div><div><font class="Apple-style-span" color="#BDBDBD" size="3"><span class="Apple-style-span" style="font-size: 12px;; color: rgb(189, 189, 189); "><br class="khtml-block-placeholder"></span></font></div><br class="Apple-interchange-newline"></span></span></span></span> </div><br><div><div>On 22 Sep 2007, at 13:34, Chris Farmiloe wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div><br class="webkit-block-placeholder"></div><div><br class="Apple-interchange-newline"></div><br><div><div>On 21 Sep 2007, at 21:22, Duane Johnson wrote:</div><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" style="font: 14.0px Helvetica"> With this architecture, we could take  </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" style="font: 14.0px Helvetica">advantage of inheritance in the OO way (as well as map exceptions to  </font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="4" style="font: 14.0px Helvetica">actions the OO way):</font></div></blockquote></div><div><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div><br class="khtml-block-placeholder"></div><div>I think this is an interesting point! </div><div><br class="webkit-block-placeholder"></div><div><br></div><div><br class="webkit-block-placeholder"></div><div>With more of my projects taking the REST view on the world, I'll often have a base controller with common create/update/show/delete methods, that I then overide if they need modifying.</div><div><br class="webkit-block-placeholder"></div><div>By taking an approach where actions are classes, this situation might be improved.</div><div><br class="webkit-block-placeholder"></div><div>Worth thinking about ... but is quite a step away from the current "way" that it's not going to be an easy switch.</div><div><br class="webkit-block-placeholder"></div><div>might the idea maybe be to have:</div><div><br class="webkit-block-placeholder"></div><div>app/controllers/users/index.rb</div><div><br class="webkit-block-placeholder"></div><div>class Users::Index &lt; Users::Action</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>def to_html<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>render<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>end<br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>def to_xml<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>'&lt;xml/&gt;'<br class="webkit-block-placeholder"></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>end</div><div>end</div><div><br class="webkit-block-placeholder"></div><div>which then renders the template at</div><div><br class="webkit-block-placeholder"></div><div>app/views/users/index.html.erb</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>where Users::Action is the base "action" class for users (where you would put all your methods that all user actions require) and Users::Action is inherited from Application::Action (where all the app-level methods are) which is a Merb::Action</div><div><br class="webkit-block-placeholder"></div><div>I think the GetAction idea is poor and all that sort of logic should stay in the router code.</div><div><br class="webkit-block-placeholder"></div><div>I like the ideas of the matching up of the action.rb file and the template.erb, but I'm not entirly convinced, the directory structures in /controller and /views would be nicely mirrored.</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>anyway this is all very theoretical, more things for the _ry-experimental-playground-branch ;)</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div><br class="khtml-block-placeholder"></div><div>Regards</div><div><br class="khtml-block-placeholder"></div><div>Farms.</div><div><font class="Apple-style-span" color="#BDBDBD" size="3"><span class="Apple-style-span" style="font-size: 12px;; color: rgb(189, 189, 189); "><br class="khtml-block-placeholder"></span></font></div></span></span></span></span></div><br></blockquote></div><br></body></html>