CapMousse/React-Restify — pull request #1 by igorw (2012-10-14 21:53:05+00:00)
Title: Suggestions

Hey there. You are damn fast! Glad to see some alternatives to React/Espresso, since it's almost unusable at this point.

Here's a first set of suggested changes. Feel free to cherry-pick the ones you want. In addition to the changes contained in this PR, some more points:

* Might be better to not use the react namespace (both composer package name and actual code namespace) since it is not part of the react project itself
* The ugliness of my proposed Runner class can probably be improved in the future by using an async DI container (see react-php/react#66)
* The custom Response class is not ideal because it does not implement the WritableStreamInterface. It also does not conform to Response type hints which might hurt interop. I have some ideas to improve this: Having a ResponseInterface in core. Or at least making the creation of the response object configurable, so that you can use a custom implementation.
* Write some tests? :)

I hope this feedback is useful to you.