On Thu, Apr 1, 2010 at 12:19 PM, Michael Snoyman <span dir="ltr"><<a href="mailto:michael@snoyman.com">michael@snoyman.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Minor update: I think that YAML syntax for these kinds of routes is a little bit verbose; any thoughts on this syntax:<div><br></div><div><div><font face="'courier new', monospace">/ Home GET</font></div>
<div><font face="'courier new', monospace">/user/#userid User GET PUT DELETE</font></div><div><font face="'courier new', monospace">/static Static StaticRoutes staticRoutes</font></div>
<div><font face="'courier new', monospace">/foo/*slurp Foo</font></div><div><font face="'courier new', monospace">/bar/$barparam Bar</font></div>
<div><br></div>First column is the pattern, second is the constructor name, and after that you have three possibilities:</div><div><br></div><div>Nothing is a handler function for any request method. Above, the fourth and fifth entries.</div>
<div>A list of request methods will allow a handler function for each request method. Above, the first and second entries.</div><div>A datatype and function name, allowing a subsite datatype and subsite function. Above,the third entry. I'll need to develop this one a bit more.</div>
</blockquote><div><br></div><div>How would this pattern be translated to the new scheme ?</div><div><br></div><div> /entries/$entryId/$filename:</div><div> GET: media</div><div><br></div><div>I am guessing:</div><div><br>
</div><div>/entries/$entryId/$filename Media GET</div><div><br></div><div>And the Media constructor would be:</div><div> </div><div> | Media String String </div><div><br></div><div>?</div><div><br></div><div>- jeremy</div>
<div><br></div><div> /entries/$entryId/$filename:</div><div><br></div></div>