Today, a friend suddenly asked me: performance and data separation what ah.
In fact, the requirements of many companies to recruit will be written on the performance and data separation understanding degree, in fact, I feel more with the framework of the accumulation of more experience, the natural will form their own set of thinking template, a set of the most convenient template can be diversified, today I take this opportunity to express my own understanding, Not necessarily correct, but their own perception.
Performance: As the name suggests, is the expression of the phenomenon, in front of view, is html+css, is usually seen in the Web page shelves Bai;
Data: Usually from the back-end database or from where the data crawled over, and then displayed in the foreground, that is, the content of the various structures on the Web page;
In the front-end architecture language, I used only angularjs to put the data into JS, and then map the data content directly into the frame in HTML. In fact, this should be a complete separation of performance and data a framework, the advantage of this structure is to change the backend data, do not need to move these structures;
And this concept appears first or in the concept of MVC, Model-view-controller, that is, the data, performance and control separation, whether for development or later maintenance of the reading code has a good clarity and simplicity, the most used in the backend, In recent years in the front-end code also more and more introduced a variety of architectures, do not want the original front-end JS chaos, a variety of JS messy write;
This is also angularjs now in front of more and more widely promoted the root cause;