These are our slides from IN/Clojure 2019 where we shared our journey of using the Component framework in Production and solved the issues faced with multiple dependencies and problems faced when there is no clear boundary.
starting from scratch. • Larger projects need better understanding of what could be defined as a “component”. • PRO - Using components made us think of a project as a whole, and hence bring about some structure from start.
starting from scratch. • Larger projects need better understanding of what could be defined as a “component”. • PRO - Using components made us think of a project as a whole, and hence bring about some structure from start. • CON - Clojure does not force such architectural rules, so the transition seems challenging.
starting from scratch. • Larger projects need better understanding of what could be defined as a “component”. • PRO - Using components made us think of a project as a whole, and hence bring about some structure from start. • CON - Clojure does not force such architectural rules, so the transition seems challenging. • Hacking -> Use Global Vars; Engineering -> Use Components!
starting from scratch. • Larger projects need better understanding of what could be defined as a “component”. • PRO - Using components made us think of a project as a whole, and hence bring about some structure from start. • CON - Clojure does not force such architectural rules, so the transition seems challenging. • Hacking -> Use Global Vars; Engineering -> Use Components! • Other alternatives? Mount, Integrant?
starting from scratch. • Larger projects need better understanding of what could be defined as a “component”. • PRO - Using components made us think of a project as a whole, and hence bring about some structure from start. • CON - Clojure does not force such architectural rules, so the transition seems challenging. • Hacking -> Use Global Vars; Engineering -> Use Components! • Other alternatives? Mount, Integrant? • Finally, YMMV!
return the Component. 2. The component record should be indicative of all the required dependencies in fields. 3. Start & Stop methods should be idempotent. 4. Have Constructors; they should create the record, not do state creation. 5. Cyclic dependencies is not allowed (by design). Plan for it.