Putting Things Together

In Component, a system is a special component that can start and stop other components. The components in a system are started in an order such that dependencies are always started before a component. This requires that no cycles are in the component dependency graph. Similarly, when a system is stopped, components are stopped in the reverse order of the start.

A system is defined with the component/system-map function. The map defines a mapping from component name to component instance. When a component has component dependencies, this is specified with component/using, which takes either a vector of injected components (if the names are the same in the system and inside the component) or a mapping from the component ...

Get Clojure Applied now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.