19 ms·
Looking pretty good. Nice one. :-) I can't claim much credit for the design of Kelpie, it's mostly a direct port of Ruby's Thin web server. I guess there's a c
by dhotson 16y ago
Looking pretty good. Nice one. :-)
I can't claim much credit for the design of Kelpie, it's mostly a direct port of Ruby's Thin web server. I guess there's a couple of notes I'd make:
- I'd recommend using the mongrel http parser rather than implementing your own. I wrote a PHP extension for it - http://github.com/dhotson/httpparser-php http://github.com/dhotson/httpparser-php
Also, some cosmetic stuff (feel free to ignore):
- I prefer camelCase for methods
- public/private access control on methods
- PHP namespaces look and act weird to me so I don't use them
- I prefer using underscores in names and a classloader to avoid require statements
- luciferous 16y agoThanks for that! I was looking at your PHP extension a few months ago, but didn't come to a decision on integrating something that users would need to install in addition to the standard PHP package. I'm definitely thinking a lot about the cosmetics of the code, especially since looks different from PEAR etc...
- dhotson 16y agoAh yep, I guess it'd be good to have a pure PHP fallback for HTTP parsing. Also, I've pretty much developed my own PHP style. I don't follow PEAR conventions.. I go with what looks clearest to me. So obviously you'll want to take my advice with a grain of salt.