Today, I saw some notes from my shoes and put forward the idea that HTML + CSS + JS is an MVC. The idea is that html provides the data model, CSS is responsible for View display, and JS is responsible for controlling the logic, I listed that it is not convenient to copy CSS when writing part of HTML in JS. I also came up with the following sentence: "The front end is not as easy as the background to use a language, come up with some opinions for your judgment.
First:
There is no language in the backend. compared with the front-end multi-browser. the back-end is still very many domain languages must be mastered, the difference between multiple platforms (not a browser), the language T-SQL Access database, Shell management server, the interaction between multiple business platforms is even more complex (I often use python to call the C module as a small example. Why is XML used to be widely watched. isn't web service designed to solve this cross-platform tool)
Second:
HTML is not just a model. there are many view components in it. HTML has been criticized for a long time, because it contains too much content, CSS, JS, images, even flash, Java app... It cannot be mixed. even now HTML5 cannot change its view identity. Note that the browser parses HTML to generate pages, rather than CSS. Because HTML contains too many pages, it cannot only exist as a model.
The front-end does not have to be hardcoded into MVC. in addition, MVC has many problems, such as inflexible structures and poor cohesion. therefore, there will be multiple expansion modes such as MVP and mvvp. one thing to note is that MVC provides us with a layered approach, rather than a fixed view model and controller.
More MVC than HTML + CSS + JS should be XML + XSL + XPath. This combination is complete MVC. csdn is used in this set.
Third:
When some functions are independent, hesitate to include too much HTML, so we will still have to copy CSS, JS, and so on.
I have also encountered it. At that time, my solution was to dynamically load all resources and use Js. the benefit is that it serves as an independent module and can be introduced to JS. The disadvantage is that all modifications are made to JS in the form of strings, which is slightly troublesome without ide assistance, but who of them (HTML, CSS, and JS) Cannot edit any character at will?