官术网_书友最值得收藏!

The MVC Pattern in Web Development

Web development has made great progress during the last few years. It began as a tedious task that involved using CGI for interfacing external programs with the web server. CGI applications used standard I/O facilities available to the C programming language in order to manually parse user input and produce page output. In addition to being difficult to work with, CGI required a separate copy of the program to be launched for each request, which used to quickly overwhelm servers.

Next, scripting languages were introduced to web development, and this inspired developers to create more efficient technologies. Languages such as Perl and PHP quickly made their way into the world of web development, and as a result, common web tasks such as cookie handling, session management, and text processing became much easier. Although scripting languages included libraries to deal with day-to-day web-related tasks, they lacked unified frameworks, as libraries were usually disparate in design, usage, and conventions. Therefore, the need for cohesive frameworks arose.

A few years ago, the model-view-controller pattern came for web-based applications was introduced. This software engineering pattern separates data (model), user interface (view), and data handling logic (controller), so that one can be changed without affecting the others. The benefits of this pattern are obvious. With it, designers can work on the interface without worrying about data storage or management. And developers are able to program the logic of data handling without getting into the details of presentation. As a result, the MVC pattern quickly found its way into web languages, and serious web developers started to embrace it in preference to previous techniques.

The diagram below shows how each of the components of the MVC pattern interact with each other to serve a user request:

The MVC Pattern in Web Development
主站蜘蛛池模板: 阜阳市| 沾化县| 东山县| 浦城县| 格尔木市| 关岭| 张家港市| 凯里市| 贺兰县| 汾阳市| 远安县| 会泽县| 桐柏县| 黑龙江省| 岚皋县| 会昌县| 贺兰县| 芜湖县| 上林县| 成安县| 肇庆市| 中卫市| 广西| 朝阳县| 奈曼旗| 宁乡县| 富顺县| 乌海市| 科技| 漳州市| 南岸区| 卢湾区| 定州市| 大名县| 革吉县| 德化县| 阿克苏市| 白银市| 扶绥县| 金乡县| 漠河县|