-
-
Notifications
You must be signed in to change notification settings - Fork 363
Description
I'm been thinking about having a react js based version of userfrosting.
The main reason for this being performance and code quality.
Both Reactjs and Vue.js allow Jquery based plugins to be used in a wrapper which we might be useful if we cant find a native alternative.
Both also use web complements which would be a bit like how we use twig templates currently.
Both are also just view frameworks so to implement ajax for data handling axios seems to be the best option. https://github.com/axios/axios
Userfrosting is often used in large applications which means we should probably use redux for react or vuex for Vue.js.
Redux and vuex make it simpler for components to talk to each other which gets really messy otherwise.
As I understand its basically like a middleware that stores any data needed by components and detects any changes to update the dom. All ajax communications would also sit there.

Saying that if we use a multi page structure we might not need a state manger at all.
Where I would most appreciate feedback is on what structure to use, a single page , multi page or a hybrid. I think uf could ship as a single page but with hybrid support though it would require a more work to allow sprinkles to extend pages. Maybe even keep twig and have twig-js templates so that twig combines everything rather then having to do do it in the sprinkle manger.
Keeping twig would also make it easier to create multi page hybrids if single page would be too large for applications like an online shop for example.
The structure would also affect how we use routers. A single page would use the vue or react router while a multi page would continue using a server side router. A hybrid would obviously use both.
A single page structure would still require a server side router for the api's regardless.
I am no expert on react or vue by any means so any feedback or suggestions are welcome.
Vue.js has a lot of nicer features and supports pug which might be a nice solution for templating.
On the other hand React has wider support and a bigger attraction from a marketing point of view.
Also using react js might make it somewhat easier to create mobile app using react native.
https://hackernoon.com/code-reuse-using-higher-order-hoc-and-stateless-functional-components-in-react-and-react-native-6eeb503c665
https://medium.com/@aakashns/sharing-components-between-react-and-react-native-f6ce3713658a
Vue.js have a good comparison between its self and react.
https://vuejs.org/v2/guide/comparison.html
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
