Skip to content
Greg Bowler edited this page May 9, 2026 · 3 revisions
  • Explain dependency construction and shared services.
  • Explain why it reduces manual wiring in page logic.
  • Explain lazy loading only when dependencies are actually used.

Default Service Loader

  • Config.
  • Request and response state.
  • Input and URI data.
  • Database-related services.
  • Binding-related services.

Service loading strategy

  • Explain default service loading and application-provided service loaders.
  • Explain how custom services are registered.
  • Explain how to use the container to only ever have a single instance of each dependency.

Good uses for the container

  • Shared infrastructure services.
  • Configuration-backed helpers.
  • Application-level factories/repositories.

Pitfalls

  • Hiding arbitrary dependencies everywhere.
  • Treating it as a global registry for unrelated state.

Now we know how to load services in our page logic, learn how and where to build application classes.

Clone this wiki locally