Wiki: When S.O.L.I.D met front-end components
For agents: Markdown version · Wiki index · Explore
- Speaker: Shiri Haim
- Event: Reversim Summit 2018
- Video: https://www.youtube.com/watch?v=OlYURxvOReI
- Transcript: /transcripts/2018/11-OlYURxvOReI.md
- Language: Hebrew · Type: talk · Level: intermediate
- Topics: Frontend, Technical Debt, Software Engineering
Written by an LLM from machine transcripts. It can contain errors. Check the transcript before you quote it.
Summary
The speaker shares a practical journey of applying the S.O.L.I.D. design principles to front-end component architecture in a large enterprise application. Faced with messy, monolithic components under tight deadlines, the speaker refactored the code by separating responsibilities into modular sub-components, dedicated routers, and specific services. The audience learns how back-end architectural patterns can successfully solve front-end scalability and stability challenges.
Key points
- 0:12 The speaker introduces the challenge of improving front-end stability and maintainability at scale while keeping up a fast feature release pace.
- 3:22 The main project screen and its core requirements are presented, focusing on a dynamic action menu with conditional permissions and varied actions.
- 5:28 The speaker evaluates a typical monolithic component and explains how mixing multiple responsibilities leads to fragile code.
- 7:33 The single responsibility principle is applied by breaking down the large component into smaller, focused sub-components.
- 11:52 The open-closed principle is demonstrated by using a router to handle navigation while keeping module actions extensible.
- 14:04 Business logic is decoupled from UI components by splitting a general service into focused, action-specific services.
- 16:18 A complex new feature called dual control is successfully introduced into the refactored architecture without breaking existing components.
- 22:08 The speaker reveals that the applied patterns throughout the refactoring process are the S.O.L.I.D. principles.
Takeaways
- Break down large UI components into smaller ones that have a single, well-defined responsibility.
- Isolate business logic from UI components by moving it into dedicated, action-specific services.
- Use routing mechanisms to keep navigation logic separate from individual feature modules, enabling better lazy loading.
Questions this talk answers
- How can S.O.L.I.D. principles be applied to front-end component-based frameworks?
- What is the best way to separate business logic from UI components in large applications?
- How do you handle complex dynamic menus and permissions without creating monolithic components?
Technologies
Angular
Tags
component design, front-end architecture, maintainability, modular code, refactoring, solid principles