PHP GET/POST Requests vs. crVCL MVC Events - CR-Solutions.net

0 downloads 185 Views 21KB Size Report
Apr 11, 2011 - provides a clean separation with consistent workflow. • easier to test code. • promotes better code o
Montag, 11. April 2011

default PHP GET/POST Requests vs. crVCL MVC Events

GET/POST Request

Web-Browser

Request processing in PHP

HTML Output

Application Logic and Controlling is mixed with Database requests and the generation of HTML output. The consequence is a confusing fault-prone and not maintainable code.

MVC Event

Controller

via GET/POST (AJAX)

Generally Application Logic

Web-Browser

Model Database requests

HTML Output

Viewer

Sub-Controller

Prepare HTML Output

Application Page Logic

· · · · ·

provides a clean separation with consistent workflow easier to test code promotes better code organization, extensibility, scalability and code re-use facilitates de-coupling the application's layers work with method calls like in Java or .NET Copyright (c) 2003-2011, CR-Solutions (http://www.cr-solutions.net), Ricardo Cescon