Wiki: Subdivision - a tiny library for building highly decoupled and modular web apps
For agents: Markdown version · Wiki index · Explore
- Speaker: Boris Kozorovitzky
- Event: Reversim Summit 2016
- Video: https://www.youtube.com/watch?v=fZy1tO3SGW4
- Transcript: /transcripts/2016/11-fZy1tO3SGW4.md
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: Software Engineering, Architecture, Frontend, JavaScript
Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.
Summary
The speaker introduces Subdivision, a small open-source JavaScript library designed to help structure and decouple complex web applications. The talk highlights architectural challenges in growing front-end apps, such as managing menus, module dependencies, and applying solid principles. The speaker demonstrates how the library uses add-in trees, registries, and topological sorting to organize code cleanly. Ultimately, audience members learn an alternative approach to modularizing client and server JavaScript applications.
Key points
- 0:10 The speaker introduces Subdivision, a tiny JavaScript library for Node.js and browsers designed to help organize application code.
- 1:12 Complex web applications often face architectural challenges when menus and UI components need to know about all system modules.
- 2:18 Applying Robert Martin’s Solid principles helps create extensible and maintainable software architecture.
- 3:19 The Open-Closed Principle states that entities should be open for extension but closed for modification.
- 4:24 Using a generic registry helps decouple modules from UI elements like menus, but managing order and feature flags still requires better patterns.
- 5:25 Subdivision is inspired by the add-in tree concept found in platforms like SharpDevelop and brings an opinionated structure to JavaScript.
- 6:30 The library is built around registries, topological sorting for ordering, builders for transformations, and manifests.
- 7:30 The project includes additional utilities like services and commands, high unit test coverage, and complete documentation.
Takeaways
- Apply the Open-Closed Principle to prevent modifying core components every time a new feature is added.
- Use a registry pattern to decouple UI components from the underlying application modules.
- Consider add-in tree architectures and topological sorting when managing ordered extensions in complex web apps.
Questions this talk answers
- How can I decouple navigation menus from feature modules in a large front-end application?
- What is an add-in tree pattern and how can it be applied to JavaScript web apps?
- How does topological sorting help manage module ordering and extensions dynamically?
Technologies
JavaScript, Node.js, React, Angular
Tags
architecture, front-end, javascript, modularity, open source, solid principles