Clojure's Reloaded Workflow: Managing Resources and Dependencies
The article discusses Clojure's reloaded workflow and how it helps developers manage resources and dependencies in their applications. The author highlights the slow start time of Clojure projects and the need for a REPL to reload sources. They mention that hot code reloading can cause issues with threads and cleaning up the state. To address this, Stuart Sierra introduced the Reloaded Workflow, which involves containing resources within a single system object and disposing of it before reloading. The author also mentions the Component framework, which is popular for dependency injection in Clojure. However, some developers find it intrusive and prefer alternative libraries. The article explores the capabilities of Clojure's built-in tools, such as the Lifecycle protocol and the Closeable interface, for managing resources. Overall, it provides insights into managing the lifecycle and dependencies of Clojure applications.