TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Dumbo – Hono inspired framework for PHP

76 pointsby notrab6 months ago
Hey HN, I last PHP professionally over 15 years ago, and I loved it. I switched to Ruby on Rails, then Node&#x2F;Go&#x2F;React&#x2F;GraphQL as there was a lot more demand for those roles. However, PHP is back!<p>In true JavaScript fashion, I decided to learn PHP again by building a framework to put all the pieces together in my brain.<p>I absolutely love Hono.dev, and decided to base the PHP framework on that. Dumbo isn&#x27;t intended to compete with Laravel, Symphony or Slim, if anything, it&#x27;s something people can use in production, but also contribute to and be used as a learning resource for others.

14 comments

jtreminio6 months ago
You&#x27;re requiring PHP 8.3 but not using some of the most powerful tools in 7+: strict types.<p>``` &#x2F;* @var array&lt;string, mixed&gt; Variables stored in the context *&#x2F; private $variables = []; ```<p>This should be typed as `array` (heck, I&#x27;d argue ArrayObject instead) and all your classes should have `declare(strict_types=1);` at the top.<p>Your `Dumbo\Helpers` classes are basically static mine traps that you are unable to mock in unit tests. Why does `BasicAuth` expose a single static method but then calls a bunch of other static methods? What ends up happening in any class that uses any of your `Dumbo\Helpers` classes will always run whatever code is defined in these helper classes.<p>I&#x27;m unsure where the bootstrapping process begins. What file does your webserver need to call to handle a new request? I am hoping it is within a root-level directory and not at the root level itself. In other words, `&#x2F;public&#x2F;index.php` vs `&#x2F;index.php`. Your quickstart in README.MD makes it pretty clear that you expect the latter, which is highly unsafe. See any number of poorly configured webservers that stop processing PHP for any reason but now show your site&#x27;s full contents to anyone passing by.<p>I would strongly argue against _any_ magic in your framework. Specifically, routes: they should be explicitly defined. I still work with a legacy Symfony 1 framework project and I can&#x27;t tell you how much I detest magic routing. For a modern example see how Symfony 2+ requires explicit route definition. Heck, how it requires explicit everything because magic should be left to magicians.<p>Your framework seems like it can only handle `application&#x2F;json` and `application&#x2F;x-www-form-urlencoded` requests, but not `multipart&#x2F;form-data`.<p>Take these as positive criticisms of your work. It&#x27;s &quot;fine&quot;. I wouldn&#x27;t use it, I would actively recommend against using it, but I would actively recommend against using anything that&#x27;s not Symfony (or Laravel if I were drunk). I do not think your project is at the &quot;Show HN&quot; level - it is still far too under-developed.
评论 #42174199 未加载
评论 #42174336 未加载
评论 #42184795 未加载
shikck2006 months ago
We actually target a HUGE legacy PHP codebase (its over 16 years old, with over 1M LOC) with Haxe. I would not EVER write vanilla PHP for anything else than a toy website, because there is no amount of testing that makes it stable enough.<p>We still have a lots of legacy PHP, but its slowly being refactored to Haxe. With Haxe we get a really nice typesystem, and a &quot;faster than Go&quot; compiler. It has pushed our productivity thru the roof.<p>We still need to use external dependencies tho, as PHP lacks any concurrency in the core language, so we also have a Go API for fetching data concurrently, and also use it as a BI directional socket for the frontend and as a queue server.<p>Otherwise, the stack is pretty much PHP7 from top to bottom.
评论 #42184627 未加载
评论 #42193913 未加载
crowcroft6 months ago
I don&#x27;t see myself ever using anything other than Laravel, but love these kinds of projects just to see what new ideas they might spark for the wider PHP community. Also interested in <a href="https:&#x2F;&#x2F;tempestphp.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;tempestphp.com&#x2F;</a>
评论 #42217686 未加载
评论 #42174144 未加载
评论 #42173748 未加载
dzonga6 months ago
I wish the market didn&#x27;t determine the technologies we get to work with. because at times the market can be wrong due to incentives.<p>e.g the market was wrong on graphQL.<p>btw Hono is cool, but found the api surface area insufficient for my node.js usecases.
评论 #42172914 未加载
评论 #42217711 未加载
cies6 months ago
I&#x27;ve went through a similar journey, with some PHP in the early days, then a lot of Merb&#x2F;Rack&#x2F;RoR experience. Though I&#x27;d not say PHP is back. I&#x27;d avoid it for new projects as there are --IMHO-- much better languages available for free.<p>What I really liked from webdevt in Ruby was Rack. <a href="https:&#x2F;&#x2F;github.com&#x2F;rack&#x2F;rack">https:&#x2F;&#x2F;github.com&#x2F;rack&#x2F;rack</a> (gosh I prefer the simplicity of the old logo)<p>And I found a Rack-like architecture in &quot;http4k&quot; <a href="https:&#x2F;&#x2F;www.http4k.org" rel="nofollow">https:&#x2F;&#x2F;www.http4k.org</a><p>In a way Kotlin can be looked at as a &quot;typed Ruby&quot;. Sure Ruby now has optional types, but I believe it&#x27;s not something easily bolted on later. The whole lang + stdlib should be built in an idiomatic way. Changing the language a lot later usually creates a mess in the stdlib.<p>The framework http4k delivers is very similar Hono&#x2F;Dumbo, but it has a Rack built in as well. Also, http4k is make by functional programming enthusiasts. So it clearly separates logic and data.<p>Small request: Please make Hono clickable in the README!
basilgohar6 months ago
If nothing else, I love the logo. A hyper-realistic take on the ElePHPhant [0].<p>[0] <a href="https:&#x2F;&#x2F;www.elephpant.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.elephpant.com&#x2F;</a>
评论 #42173785 未加载
campak6 months ago
Small world! Congrats on getting up there on Hacker News, too!
评论 #42181313 未加载
wink6 months ago
What&#x27;s your distinguishing point over Slim and Silex (rip) because from your example script I don&#x27;t see anything different. I mean, how would it, (un?)fortunately PHP syntax doesn&#x27;t let you play as much with DSLs as Ruby or other languages.
评论 #42172296 未加载
评论 #42173335 未加载
avinassh6 months ago
perfect. beautifully designed. I will try this for my next side project.
评论 #42181318 未加载
honorable_judge6 months ago
For a programming language mostly out of favor, the effort to get a framework right and find the right audience to use this over existing options will be tricky. Good luck!
slifin6 months ago
Reminded me of <a href="https:&#x2F;&#x2F;fatfreeframework.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;fatfreeframework.com&#x2F;</a>
eterps6 months ago
Are there any frameworks other programming languages (besides this one) that are directly inspired by Hono?
pftg6 months ago
Yeah, I believe Sinatra <a href="https:&#x2F;&#x2F;sinatrarb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;sinatrarb.com&#x2F;</a> or Padrino <a href="https:&#x2F;&#x2F;padrinorb.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;padrinorb.com&#x2F;</a> inspired Hono. So you are back to Ruby ;)
评论 #42181890 未加载
WORMS_EAT_WORMS6 months ago
Honestly beautifully designed. Really lives up to Hono name
评论 #42173740 未加载