MVC is our foundation - don't mix apples and oranges

Unknown
edited August 2018 in Dev & Ops

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:

  1. No echo or 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?!
  2. 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
  3. 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.

Comments