4 ms·
> arguably... view is washed out across the stack Perhaps to argue this requires munging "view" with "front end"? MVC needn't mean database schema, front end,
by Terretta 3y ago
> arguably... view is washed out across the stack
Perhaps to argue this requires munging "view" with "front end"?
MVC needn't mean database schema, front end, and logic. It could, but then what is a "view" in the database?
Perhaps you're reinventing MVVM?
https://en.wikipedia.org/wiki/Model–view–viewmodel https://en.wikipedia.org/wiki/Model–view–viewmodel
- jmilloy 3y agoMVVM definitely came to mind as I was writing my comment. The model is clearly in the back end, the view clearly in the front, and the view model contains the explicit link between companyName and pageTitle and can live in either. Here the suggestion is to put it in the backend and serve it as JSON.
- Terretta 3y agoI'd say "kids these days" but all 3 of our accounts joined in 2010.
- hakunin 3y agoI'm suggesting to pass via JSON what we used to pass via HTML back when front-end was templates on the server. I still prefer those days, like I alluded to in the first paragraph of the article. It used to be: write your template by inserting database values into it. Now I'm saying: instead of a template, come up with a neat json structure that kinda represents that template, and insert your database values into it. Name the fields after what page needs, not what you have in the database (following standard practices of object construction). I'm not sure what I might be reinventing, or what it might've been called, because I'm just trying to explain a practice that saves time and reduces complexity in simple language. It's interesting if it already was a thing with a name, but doesn't really change the point.