The document discusses Model-View-Controller (MVC), an architectural pattern that separates application logic from presentation, improving modularity and loose coupling between components. MVC divides applications into three components - the model, the view, and the controller, with the controller receiving input and calling methods on model objects that change their state, and the view being updated based on changes in the model. Several popular web frameworks that implement the MVC pattern are also listed.
1 of 10
1
2
3
4
5
6
7
8
9
10
More Related Content
What is MVC?
1. What is MVC? A Primer in 10 Slides Dominique Gerald M Cimafranca [email_address] http://villageidiotsavant.com By
7. Without MVC Client database db=connect(database); var1=$_POST[“data1”]; var2=$_POST[“data2”]; db.query(“insert into db values var1,var2”); print “<HTML><H1>Success</H1></HTML>”; http://myapp/create.php http://myapp/read.php http://myapp/update.php http://myapp/delete.php database application presentation All in one program! delete.php update.php read.php create.php
24. Return combination as HTML $header $sidebar for($item in $data) { echo $item; } Our Customers : : : : Charlie Brown Lucy Van Pelt Linus Van Pelt
25. Or we could do it with XML Client customer (controller) function create() { : : } function read() { : : } function update() { : : } function delete() { : : } function read($id) { Customer->get($id); $data=Customer->read(); : : render($data,”template.tpl”); } name category quantity : read() save() : Customer XML request XML response $xml->serialize($data) Whatever... Java C / C++ JavaScript Client does not need to be a web browser
38. License You are free: to Share: to copy, distribute and transmit the work
39. to Remix: to adapt the work Under the following conditions: Attribution: You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work).
40. Share Alike: If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one. With the understanding that: Waiver: Any of the above conditions can be waived if you get permission from the copyright holder.
41. Public Domain: Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights: In no way are any of the following rights affected by the license: Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations;
43. Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice: For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page .