Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Middleware Refactor #20

Open
dantleech opened this issue Jul 11, 2020 · 0 comments
Open

Middleware Refactor #20

dantleech opened this issue Jul 11, 2020 · 0 comments

Comments

@dantleech
Copy link
Contributor

dantleech commented Jul 11, 2020

  • All handlers should be session based
  • Dispatcher should be the extension point of the server
  • Handlers should be implemented as middlewares
  • Middlewares are however an implementation detail of the Dispatcher implementation.

Example:

  • The existing "system handlers" can be made into middlewares
  • The exisitng handler decorators transition well to middlewares.
  • The (for example) Phpactor implementation can be implemented as a middleware - replacing the "HandlerLoader" interface.

Consequences:

  • Middlewares can be instantiated per session with necessary dependencies: can stop passing special dependencies as method arguments.
@dantleech dantleech changed the title Refactor Middleware Refactor Jul 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant