- Flux Architecture
- Adam Boduch
- 354字
- 2021-07-16 10:49:00
Flux isn't another framework
Now that we've explored some of the high-level patterns of Flux, it's time to revisit the question: what is Flux again? Well, it is just a set of architectural patterns we can apply to our frontend JavaScript applications. Flux scales well because it puts information first. Information is the most difficult aspect of software to scale; Flux tackles information architecture head on.
So, why aren't Flux patterns implemented as a framework? This way, Flux would have a canonical implementation for everyone to use; and like any other large scale open source project, the code would improve over time as the project matures.
The main problem is that Flux operates at an architectural level. It's used to address information problems that prevent a given application from scaling to meet user demand. If Facebook decided to release Flux as yet another JavaScript framework, it would likely have the same types of implementation issues that plague other frameworks out there. For example, if some component in a framework isn't implemented in a way that best suits the project we're working on, then it's not so easy to implement a better alternative, without hacking the framework to bits.
What's nice about Flux is that Facebook decided to leave the implementation options on the table. They do provide a few Flux component implementations, but these are reference implementations. They're functional, but the idea is that they're a starting point for us to understand the mechanics of how things such as dispatchers are expected to work. We're free to implement the same Flux architectural pattern as we see it.
Flux isn't a framework. Does this mean we have to implement everything ourselves? No, we do not. In fact, developers are implementing Flux libraries and releasing them as open source projects. Some Flux libraries stick more closely to the Flux patterns than others. These implementations are opinionated, and there's nothing wrong with using them if they're a good fit for what we're building. The Flux patterns aim to solve generic conceptual problems with JavaScript development, so you'll learn what they are before diving into Flux implementation discussions.
- The DevOps 2.3 Toolkit
- Python從入門到精通(精粹版)
- Learning Neo4j 3.x(Second Edition)
- 機械工程師Python編程:入門、實戰與進階
- Reactive Programming With Java 9
- Learning Apache Kafka(Second Edition)
- Microsoft System Center Orchestrator 2012 R2 Essentials
- Mastering KnockoutJS
- The Complete Coding Interview Guide in Java
- 計算機應用基礎實踐教程
- Statistical Application Development with R and Python(Second Edition)
- 零代碼實戰:企業級應用搭建與案例詳解
- 人工智能算法(卷1):基礎算法
- 百萬在線:大型游戲服務端開發
- Python程序設計教程