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.
- multiple UI Layers can be implemented over the same domain layer
- the UI can be hard to test. By moving the logic to other layers, it becomes easier to test.
For more on applying functional programming techniques in React take a look at Functional React.
Read more on Vue and Vuex in A Quick Introduction to Vue.js Components.
Learn how to apply the Principles of Design Patterns.