MVC is our foundation - don't mix apples and oranges
MVC is a very important concept for WEB for many-many years and there are many reasons why it is kind standard for backend development.
I want everybody to agree that we all want to follow MVC (at least for backend at the moment).
And here is a list of some rules to follow and to apply to any new code for Vanilla:
- No
echoor other output functions should be used in most functions. Until the class itself is a rendering or templating class. I don't want to explain when it is acceptable. But can we just agree that functions in 99% of cases can and should just return a string instead of output it to stdout?! - Any html template should include none or minimum calculations and/or transformation. It should have only html and var names to apply with some var types rules to escape and sanitize output. Some special constructions like
if ...; foreach...are acceptable - Data Models same as basic service libraries should generally have 0 html.
Please vote for this as a general idea. i'll create few more polls about MVC for some specific cases.
0
Comments
-
We generally recognize our muddling of views was a mistake. I think it would be hard to argue with any of those rules, given how much pain those things have caused in our code.
0 -
But so far not that many votes ;-)
0