TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Sinatra clone in PHP

35 点作者 flapjack超过 14 年前

7 条评论

codeguy超过 14 年前
Looks promising! I've actually been developing my own Sinatra clone in PHP5. I've called it "Slim". It has RESTful GET, POST, PUT, DELETE routing. It has before and after callbacks. It has Page Not Found handling, halting, helpers to set custom response codes, and easy-to-extend templating (use Smarty, Twig, or whatever you want). See more at:<p>Documentation: <a href="http://slim.joshlockhart.com/" rel="nofollow">http://slim.joshlockhart.com/</a><p>GitHub (with Download): <a href="http://github.com/codeguy/Slim" rel="nofollow">http://github.com/codeguy/Slim</a><p>Still very much a work in progress, but thought I'd go ahead and get the word out.<p>Enjoy! Josh
Argorak超过 14 年前
Aside from this being "Sinatra clone" #100, I think most people do not understand that Sinatra is about much more than its query and before/after-filter DSL: Its about its plugin API, its great integration into Rack (which PHP doesn't have, middleware solutions or not), its ability to host multiple apps in one process and its large and well-written documentation.<p>It is easy to implement the query API in any language that supports anonymous functions, but that doesn't make it Sinatra.<p>This one is not even a good example of a clone: its really bare, only implements the minimal set to "look like sinatra". It doesn't even have a good request or response object.
评论 #1711637 未加载
TamDenholm超过 14 年前
<a href="http://www.sinatrarb.com/" rel="nofollow">http://www.sinatrarb.com/</a><p>For those (like me) that had no clue what sinatra was before this.
leftnode超过 14 年前
I've written one too called Hoboken, the city where Sinatra was bron. I don't have a complete set of docs, but it's definitely useable.<p><a href="http://github.com/leftnode/Hoboken" rel="nofollow">http://github.com/leftnode/Hoboken</a><p>My personal site uses it: <a href="http://leftnode.com" rel="nofollow">http://leftnode.com</a><p>I'll have to check this out to see how it competes :).
评论 #1711067 未加载
jwpage超过 14 年前
Some other ones:<p><a href="http://github.com/sofadesign/limonade" rel="nofollow">http://github.com/sofadesign/limonade</a><p><a href="http://github.com/jim/fitzgerald" rel="nofollow">http://github.com/jim/fitzgerald</a><p><a href="http://github.com/fabpot/Silex" rel="nofollow">http://github.com/fabpot/Silex</a> (based on Symfony 2)
评论 #1711366 未加载
seldo超过 14 年前
This is pretty early but nifty, and might help us in our ongoing efforts to move away from our Ruby prototypes. Needs helpers and halting to be properly useful, but will definitely keep an eye on it.
评论 #1711036 未加载
c00p3r超过 14 年前
What those PHP guys are unable to understand, is that all the coolness and beauty of Sinatra comes from the lack of () {} $ and other meaningless (it this context) symbols and words, like function and echo.<p>The same effect is in Clojure, but it is a little bit more difficult to explain.<p>They're lost the beauty of Lisp (especially Scheme) when they broke the clarity and unambiguity of the syntax pushing all those foreign symbols into it. Moreover, they also renamed and broke most of common idioms, using words that could be better as a variable names instead of keywords.<p>So, it is not a Lisp dialect, even not so-called Lisp-1. It is just yet another JVM-targeted pseudo-functional language, which, OK, looks like lisp to those who never seen a Lisp before.<p>But, its cool (and ugly), I must admit. ^_^
评论 #1711433 未加载
评论 #1711638 未加载