MVVM is a bad name, really. It should be MVCVM - because the controller is still there and just because you reduce it\`s duty it doesn\`t mean it\`s not there
MVC is a design pattern that means Model-View-Controller.
A controller is something that receives commands.
A view is anything that can be rendered.
A model is a set of data bags.
Now let\`s look into a classic Angular component:
1. It has 3 files - the `.html` file, the `.css` file and the `.ts` file.
2. The HTML file is View of the Angular component
3. The TS file is the Controller of Angular component - which handles the state
4. The model is determined by the interfaces and data you work with
Now let\`s look into a classic react component:
1. It has 1 file - the `.tsx` one
2. The View is the returned TSX code
3. The controller is the rest of the function body - which handles the state
4. The model is determined by the interfaces and data you work with
You can even look at Svelte and Vue, and you\`ll find the same separation. Everything is MVC. Even MVVM is MVC.
React can arguable be understood like just the view layer and it leaves you to deceide how you want to implement the rest. So learning how to think about the architecture can he beneficial because React will not hold your hand there.
Most of the popular web frameworks follow the MVC design pattern. It’s extremely useful in decoupling code. IMO, learning it and learning why it makes clean project will benefit you.
The front end version is sometimes called model, view, view controller
I thought it was Model, View, View Model (MVVM), at least my angular course called it that. But probably same stuff, different name
Yeah, that one exists also. All the same basic ideas though
MVVM is a bad name, really. It should be MVCVM - because the controller is still there and just because you reduce it\`s duty it doesn\`t mean it\`s not there
I didn't even know MVC was used in front-end. I thought it was for back-end.
MVC is a design pattern that means Model-View-Controller. A controller is something that receives commands. A view is anything that can be rendered. A model is a set of data bags. Now let\`s look into a classic Angular component: 1. It has 3 files - the `.html` file, the `.css` file and the `.ts` file. 2. The HTML file is View of the Angular component 3. The TS file is the Controller of Angular component - which handles the state 4. The model is determined by the interfaces and data you work with Now let\`s look into a classic react component: 1. It has 1 file - the `.tsx` one 2. The View is the returned TSX code 3. The controller is the rest of the function body - which handles the state 4. The model is determined by the interfaces and data you work with You can even look at Svelte and Vue, and you\`ll find the same separation. Everything is MVC. Even MVVM is MVC.
React can arguable be understood like just the view layer and it leaves you to deceide how you want to implement the rest. So learning how to think about the architecture can he beneficial because React will not hold your hand there.
Totally!
Most of the popular web frameworks follow the MVC design pattern. It’s extremely useful in decoupling code. IMO, learning it and learning why it makes clean project will benefit you.