Discover Functional JavaScript was named one of the best new Functional Programming books by BookAuthority!
“发现功能JavaScript”被BookAuthority评为最佳新功能编程书籍之一 !
A common way to split responsibilities in an application is to separate them into the three principal layers:
在应用程序中划分职责的一种常见方法是将职责分为三个主要层:
- UI (aka Presentation) 用户界面(又名演示)
- domain (aka Business) 域(又名业务)
- data access 资料存取
Some of the benefits of doing so are:
这样做的一些好处是:
- a better understanding of the layer’s purpose 更好地了解层的目的
- the layer implementation can be replaced. For example we can switch between AngularJS, VueJS, and ReactJS in the UI layer. 层实现可以替换。 例如,我们可以在UI层中的AngularJS,VueJS和ReactJS之间切换。
- multiple UI Layers can be implemented over the same domain layer 可以在同一域层上实现多个UI层
- the UI can be hard to test. By moving the logic to other layers, it becomes easier to test. 用户界面可能很难测试。 通过将逻辑移到其他层,测试变得更加容易。
Read Functional Architecture with React and Redux and learn how to build apps in function style.
阅读具有React和Redux的功能架构,并学习如何以函数样式构建应用程序。
Discover Functional JavaScript was named one of the best new Functional Programming books by BookAuthority!
发现功能JavaScript被称为 BookAuthority最好的新功能编程书籍 !
For more on applying functional programming techniques in React take a look at Functional React.
有关在React中应用函数式编程技术的更多信息,请查看 Functional React 。
You can find me on Medium and Twitter.