language-server icon indicating copy to clipboard operation
language-server copied to clipboard

Middleware Refactor

Open dantleech opened this issue 4 years ago • 0 comments

  • 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 avatar Jul 11 '20 06:07 dantleech