<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pamberk</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Pamberk"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Pamberk"/>
	<updated>2026-06-25T23:14:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Facade_eg.png&amp;diff=68252</id>
		<title>File:Facade eg.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Facade_eg.png&amp;diff=68252"/>
		<updated>2012-10-26T21:04:32Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: Illustration of the facade pattern &amp;quot;1-click&amp;quot; system&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Illustration of the facade pattern &amp;quot;1-click&amp;quot; system&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=67586</id>
		<title>CSC/ECE 517 Fall 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=67586"/>
		<updated>2012-10-19T18:21:07Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Fall 2012/ch1 n xx]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w1 rk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w20 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w5 su]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w6 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w4 aj]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w7 am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w8 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w9 av]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w10 pk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w11 ap]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w12 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w14 gv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w17 ir]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w18 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w22 an]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 wi]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w31 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w16 br]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w23 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w24 nr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w15 rt]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w3 pl]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w32 cm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w5 dp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w37 ss]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w67 ks]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w27 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w29 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w33 op]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w19 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w34 vd]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w35 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w30 rp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w58 am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w47 sk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w69 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w44 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w45 is]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w53 kc]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 ar]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w39 sn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w54 go]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w56 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w64 nn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w66 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w42 js]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w46 sm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w71 gs]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w63 dv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w55 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w57 mp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w52 an]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch1b 1w38 nm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w60 ac]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w62 rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w29 st]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch 2w30 an]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w17 pt]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w31 up]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w9 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w19 is]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w5 dp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w16 dp]]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65196</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65196"/>
		<updated>2012-09-19T07:37:41Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Ruby on Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
===[http://rubyonrails.org/ Ruby on Rails]===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
===[http://jakarta.apache.org/struts/index.html Struts framework]===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65195</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65195"/>
		<updated>2012-09-19T07:33:33Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Struts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
===[http://rubyonrails.org/ Ruby on Rails]===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
[http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65194</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65194"/>
		<updated>2012-09-19T07:29:58Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Ruby on Rails Ruby on Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
===[http://rubyonrails.org/ Ruby on Rails]===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65193</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65193"/>
		<updated>2012-09-19T07:29:36Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Ruby on Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
=== Ruby on Rails [http://rubyonrails.org/ Ruby on Rails]===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65192</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65192"/>
		<updated>2012-09-19T07:25:25Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
=== Ruby on Rails ===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65191</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65191"/>
		<updated>2012-09-19T07:21:52Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
=== Ruby on Rails ===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65190</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65190"/>
		<updated>2012-09-19T07:21:23Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
=== Ruby on Rails ===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12.[http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65189</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65189"/>
		<updated>2012-09-19T07:19:15Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80's saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
 1. The controller loads/modifies model objects&lt;br /&gt;
 2. It then passes the model to a view&lt;br /&gt;
 3. Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
=== Ruby on Rails ===&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
=== Struts ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
==='''Spring framework'''===&lt;br /&gt;
&lt;br /&gt;
The Spring Framework is an open source application framework and Inversion of Control container for the Java platform.&lt;br /&gt;
&lt;br /&gt;
[[File:Spring-mv.jpg]]&lt;br /&gt;
&lt;br /&gt;
* '''Model classes'''&lt;br /&gt;
&lt;br /&gt;
'''‎WEB-INF/src/springmvc/model/Brand.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.model;&lt;br /&gt;
  public class Brand {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private String name;&lt;br /&gt;
  private String country;&lt;br /&gt;
 &lt;br /&gt;
  public String getCountry() {&lt;br /&gt;
   return country;&lt;br /&gt;
  }&lt;br /&gt;
  public void setCountry(String country) {&lt;br /&gt;
   this.country = country;&lt;br /&gt;
  }&lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public String getName() {&lt;br /&gt;
   return name;&lt;br /&gt;
  }&lt;br /&gt;
  public void setName(String name) {&lt;br /&gt;
   this.name = name;&lt;br /&gt;
  }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/model/Car.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.model;&lt;br /&gt;
 import java.math.BigDecimal;&lt;br /&gt;
 &lt;br /&gt;
 public class Car {&lt;br /&gt;
  private Long id;&lt;br /&gt;
  private Brand brand;&lt;br /&gt;
  private String model;&lt;br /&gt;
  private BigDecimal price;&lt;br /&gt;
 &lt;br /&gt;
  public Long getId() {&lt;br /&gt;
   return id;&lt;br /&gt;
  }&lt;br /&gt;
  public void setId(Long id) {&lt;br /&gt;
   this.id = id;&lt;br /&gt;
  }&lt;br /&gt;
  public Brand getBrand() {&lt;br /&gt;
   return brand;&lt;br /&gt;
  }&lt;br /&gt;
  public void setBrand(Brand brand) {&lt;br /&gt;
   this.brand = brand;&lt;br /&gt;
  }&lt;br /&gt;
  public String getModel() {&lt;br /&gt;
   return model;&lt;br /&gt;
  }&lt;br /&gt;
  public void setModel(String model) {&lt;br /&gt;
   this.model = model;&lt;br /&gt;
  }&lt;br /&gt;
  public BigDecimal getPrice() {&lt;br /&gt;
   return price;&lt;br /&gt;
  }&lt;br /&gt;
  public void setPrice(BigDecimal price) {&lt;br /&gt;
   this.price = price;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/service/CarManager.java'''&lt;br /&gt;
&lt;br /&gt;
  package springmvc.service;&lt;br /&gt;
 &lt;br /&gt;
  import java.math.BigDecimal;&lt;br /&gt;
  import java.util.LinkedList;&lt;br /&gt;
  import java.util.List;&lt;br /&gt;
  import springmvc.model.Brand;&lt;br /&gt;
  import springmvc.model.Car;&lt;br /&gt;
 &lt;br /&gt;
 public class CarManager {&lt;br /&gt;
 &lt;br /&gt;
  private static List&amp;lt;Car&amp;gt; carList;&lt;br /&gt;
 &lt;br /&gt;
   static {&lt;br /&gt;
    Brand brand1 = new Brand();&lt;br /&gt;
    brand1.setId((long)1);&lt;br /&gt;
    brand1.setName(&amp;quot;Mercedes&amp;quot;);&lt;br /&gt;
    brand1.setCountry(&amp;quot;Germany&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Brand brand2 = new Brand();&lt;br /&gt;
    brand2.setId((long)2);&lt;br /&gt;
    brand2.setName(&amp;quot;Peugeot&amp;quot;);&lt;br /&gt;
    brand2.setCountry(&amp;quot;France&amp;quot;);		&lt;br /&gt;
 &lt;br /&gt;
    Car car1 = new Car();&lt;br /&gt;
    car1.setId((long)1);&lt;br /&gt;
    car1.setBrand(brand1);&lt;br /&gt;
    car1.setModel(&amp;quot;SL 500&amp;quot;);&lt;br /&gt;
    car1.setPrice(new BigDecimal(40000));&lt;br /&gt;
 &lt;br /&gt;
    Car car2 = new Car();&lt;br /&gt;
    car2.setId((long)2); &lt;br /&gt;
    car2.setBrand(brand2);&lt;br /&gt;
    car2.setModel(&amp;quot;607&amp;quot;);&lt;br /&gt;
    car2.setPrice(new BigDecimal(35000));&lt;br /&gt;
 &lt;br /&gt;
    carList = new LinkedList&amp;lt;Car&amp;gt;();&lt;br /&gt;
    carList.add(car1);&lt;br /&gt;
    carList.add(car2);		&lt;br /&gt;
    }&lt;br /&gt;
 &lt;br /&gt;
    public List&amp;lt;Car&amp;gt; getCarList() {&lt;br /&gt;
     return carList;&lt;br /&gt;
    }	&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
'''In 'WEB-INF/springmvc-servlet.xml', we declare a new URL:'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;bean name=&amp;quot;/list_cars.html&amp;quot; class=&amp;quot;springmvc.web.CarListController&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* '''Controller'''&lt;br /&gt;
&lt;br /&gt;
'''WEB-INF/src/springmvc/web/CarListController.java'''&lt;br /&gt;
&lt;br /&gt;
 package springmvc.web;&lt;br /&gt;
 &lt;br /&gt;
 import javax.servlet.http.HttpServletRequest;&lt;br /&gt;
 import javax.servlet.http.HttpServletResponse;&lt;br /&gt;
 &lt;br /&gt;
 import org.springframework.web.servlet.ModelAndView;&lt;br /&gt;
 import org.springframework.web.servlet.mvc.Controller;&lt;br /&gt;
 &lt;br /&gt;
 import springmvc.service.CarManager;&lt;br /&gt;
 &lt;br /&gt;
 public class CarListController implements Controller {&lt;br /&gt;
 &lt;br /&gt;
  public ModelAndView handleRequest(HttpServletRequest arg0,&lt;br /&gt;
   HttpServletResponse arg1) throws Exception {&lt;br /&gt;
 &lt;br /&gt;
  CarManager carManager = new CarManager();&lt;br /&gt;
 &lt;br /&gt;
  ModelAndView modelAndView = new ModelAndView(&amp;quot;carList&amp;quot;);&lt;br /&gt;
  modelAndView.addObject(&amp;quot;carList&amp;quot;, carManager.getCarList());&lt;br /&gt;
 &lt;br /&gt;
  return modelAndView;&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''jsp/carList.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;c&amp;quot; uri=&amp;quot;http://java.sun.com/jsp/jstl/core&amp;quot; %&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
  &amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;c:forEach items=&amp;quot;${carList}&amp;quot; var=&amp;quot;car&amp;quot;&amp;gt;&lt;br /&gt;
     ${car.brand.name} ${car.model}: ${car.price}&lt;br /&gt;
    &amp;lt;/c:forEach&amp;gt;&lt;br /&gt;
  &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Java Server Faces(JSF)===&lt;br /&gt;
&lt;br /&gt;
JavaServer Faces (JSF) is a UI component based Java Web application framework. JSF is serverbased, e.g. the JSF UI components and their state are represented on the server with a defined life-cycle of the UI components. JSF is part of the Java EE standard.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
JSF is based on the following configuration files:&lt;br /&gt;
&lt;br /&gt;
*'''web.xml - General web application configuration file'''&lt;br /&gt;
&lt;br /&gt;
You must specify in web.xml that a &amp;quot;FacesServlet&amp;quot; is responsible for handling JSF applications. &amp;quot;FacesServlet&amp;quot; is the central controller for the JSF application. &amp;quot;FacesServlet&amp;quot; receives all requests for the JSF application and initializes the JSF components before the JSP is displayed.&lt;br /&gt;
&lt;br /&gt;
*'''faces-config.xml - Contains the configuration of the JSF application.'''&lt;br /&gt;
&lt;br /&gt;
&amp;quot;faces-config.xml&amp;quot; allows to configure the application, managed beans, convertors, validators, and navigation.&lt;br /&gt;
&lt;br /&gt;
* '''Model'''&lt;br /&gt;
&lt;br /&gt;
 package jsf.first.model;&lt;br /&gt;
 public class TemperatureConvertor {&lt;br /&gt;
  private double celsius; &lt;br /&gt;
  private double fahrenheit;&lt;br /&gt;
  private boolean initial= true; &lt;br /&gt;
  &lt;br /&gt;
 public double getCelsius() {&lt;br /&gt;
  return celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public void setCelsius(double celsius) {&lt;br /&gt;
  this.celsius = celsius;&lt;br /&gt;
  }&lt;br /&gt;
 public double getFahrenheit() {&lt;br /&gt;
  return fahrenheit;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public boolean getInitial(){&lt;br /&gt;
  return initial;&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
 public String reset (){&lt;br /&gt;
  initial = true;&lt;br /&gt;
   fahrenheit =0;&lt;br /&gt;
   celsius = 0; &lt;br /&gt;
   return &amp;quot;reset&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
 public String celsiusToFahrenheit(){&lt;br /&gt;
  initial = false; &lt;br /&gt;
  fahrenheit = (celsius *9 / 5) +32;&lt;br /&gt;
  return &amp;quot;calculated&amp;quot;;&lt;br /&gt;
 } &lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
* '''View'''&lt;br /&gt;
&lt;br /&gt;
'''Convertor.jsp'''&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;%@ page language=&amp;quot;java&amp;quot; contentType=&amp;quot;text/html; charset=ISO-8859-1&amp;quot; pageEncoding=&amp;quot;ISO-8859-1&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;f&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/core&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;%@ taglib prefix=&amp;quot;h&amp;quot;  uri=&amp;quot;http://java.sun.com/jsf/html&amp;quot;%&amp;gt;&lt;br /&gt;
 &amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;html&amp;gt;&lt;br /&gt;
 &amp;lt;head&amp;gt;&lt;br /&gt;
 &amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=ISO-8859-1&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;title&amp;gt;Celsius to Fahrenheit Convertor&amp;lt;/title&amp;gt;&lt;br /&gt;
 &amp;lt;/head&amp;gt;&lt;br /&gt;
 &amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;f:view&amp;gt;&lt;br /&gt;
  &amp;lt;h:form&amp;gt;&lt;br /&gt;
   &amp;lt;h:panelGrid columns=&amp;quot;2&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;h:outputLabel value=&amp;quot;Celsius&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
    &amp;lt;h:inputText  value=&amp;quot;#{temperatureConvertor.celsius}&amp;quot;&amp;gt;&amp;lt;/h:inputText&amp;gt;&lt;br /&gt;
   &amp;lt;/h:panelGrid&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.celsiusToFahrenheit}&amp;quot; value=&amp;quot;Calculate&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:commandButton action=&amp;quot;#{temperatureConvertor.reset}&amp;quot; value=&amp;quot;Reset&amp;quot;&amp;gt;&amp;lt;/h:commandButton&amp;gt;&lt;br /&gt;
    &amp;lt;h:messages layout=&amp;quot;table&amp;quot;&amp;gt;&amp;lt;/h:messages&amp;gt;&lt;br /&gt;
  &amp;lt;/h:form&amp;gt;&lt;br /&gt;
  &amp;lt;h:panelGroup rendered=&amp;quot;#{temperatureConvertor.initial!=true}&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;Fahrenheit &amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;h:outputLabel value=&amp;quot;#{temperatureConvertor.fahrenheit}&amp;quot;&amp;gt;&amp;lt;/h:outputLabel&amp;gt;&lt;br /&gt;
  &amp;lt;/h:panelGroup&amp;gt;&lt;br /&gt;
 &amp;lt;/f:view&amp;gt;&lt;br /&gt;
 &amp;lt;/body&amp;gt;&lt;br /&gt;
 &amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework Web Application Frameworks]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller Model-View-Controller(MVC)]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ Ruby on Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html MVC: &amp;quot;Introduction and History&amp;quot; ]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html Struts framework]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails http://en.wikipedia.org/wiki/Ruby_on_Rails ]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Spring_Framework http://en.wikipedia.org/wiki/Spring_Framework]&lt;br /&gt;
&lt;br /&gt;
10. [http://www.springsource.org/ Spring framework]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.javaserverfaces.org/ Java Server Faces(JSF)]&lt;br /&gt;
&lt;br /&gt;
12. [http://www.oracle.com/technetwork/articles/javase/index-142890.html]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65036</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65036"/>
		<updated>2012-09-15T01:27:06Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Web frameworks using MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65033</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65033"/>
		<updated>2012-09-15T01:26:36Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Web frameworks using MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Recently MVC has become very popular for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
Struts for Java, Maypole for Perl and Rails for Ruby are some to name a few.&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65022</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65022"/>
		<updated>2012-09-15T01:21:37Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Disadvantages of MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent updates may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65021</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=65021"/>
		<updated>2012-09-15T01:20:57Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Disadvantages of MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests as frequent requests may increase the cost significantly.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64959</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64959"/>
		<updated>2012-09-15T00:39:48Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Ruby on Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
Ruby on Rails is an open source full-stack web application framework for the Ruby programming language.&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64956</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64956"/>
		<updated>2012-09-15T00:38:31Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org/wiki/Ruby_on_Rails]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64934</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64934"/>
		<updated>2012-09-15T00:26:38Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Ruby on Rails */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64932</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64932"/>
		<updated>2012-09-15T00:26:18Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Web frameworks using MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
== Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
'''Model (ActiveRecord ) :'''&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
'''View ( ActionView )'''&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
'''Controller ( ActionController ):'''&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Struts ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
'''Model:'''&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
'''View:'''&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
'''Controller:'''&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64927</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64927"/>
		<updated>2012-09-15T00:25:24Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* MVC pattern in web application development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI  are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Ruby on Rails&lt;br /&gt;
Model (ActiveRecord ) :&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
View ( ActionView )&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
Controller ( ActionController ):&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
Struts&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
Model:&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
View:&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
Controller:&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64918</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64918"/>
		<updated>2012-09-15T00:22:07Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Web frameworks using MVC pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
Ruby on Rails&lt;br /&gt;
Model (ActiveRecord ) :&lt;br /&gt;
Maintains the relationship between Object and Database and handles validation, association, transactions, and more.&lt;br /&gt;
This subsystem is implemented in ActiveRecord library which provides an interface and binding between the tables in a relational database and the Ruby program code that manipulates database records. Ruby method names are automatically generated from the field names of database tables, and so on.&lt;br /&gt;
View ( ActionView )&lt;br /&gt;
A presentation of data in a particular format, triggered by a controller's decision to present the data. They are script based templating systems like JSP, ASP, PHP and very easy to integrate with AJAX technology.&lt;br /&gt;
This subsystem is implemented in ActionView library which is an Embedded Ruby (ERb) based system for defining presentation templates for data presentation. Every Web connection to a Rails application results in the displaying of a view.&lt;br /&gt;
Controller ( ActionController ):&lt;br /&gt;
The facility within the application that directs traffic, on the one hand querying the models for specific data, and on the other hand organizing that data into a form that fits the needs of a given view.&lt;br /&gt;
This subsystem is implemented in ActionController which is a data broker sitting between ActiveRecord (the database interface) and ActionView (the presentation engine).&lt;br /&gt;
&lt;br /&gt;
Struts&lt;br /&gt;
&lt;br /&gt;
Struts is a set of Java classes and JSP tag libraries that uses a model-view-controller (MVC) design pattern to provide a framework for developing Web applications. Struts is an open source subproject of the Apache Software Foundation's Jakarta project.&lt;br /&gt;
&lt;br /&gt;
Model:&lt;br /&gt;
The Enterprise JavaBeans (EJB), Java Data Objects(JDO) and JavaBeans can be use as a model. Struts frame work doesn't limit you to one particular model implementation.&lt;br /&gt;
&lt;br /&gt;
View:&lt;br /&gt;
The View portion of a Struts-based application is most often constructed using JavaServer Pages (JSP) technology. The framework includes a set of custom tag libraries that facilitate creating user interfaces that are fully internationalized and interact gracefully with ActionFormbeans. ActionForms capture and validate whatever input is required by the application.&lt;br /&gt;
&lt;br /&gt;
Controller:&lt;br /&gt;
The primary component of the Controller in the framework is a servlet of class ActionServlet. This servlet is configured by defining a set of ActionMappings. An ActionMapping defines a path that is matched against the request URI of the incoming request and usually specifies the fully qualified class name of an Action class.&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64913</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64913"/>
		<updated>2012-09-15T00:20:57Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* MVC pattern in web application development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64912</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64912"/>
		<updated>2012-09-15T00:20:31Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* MVC pattern in web application development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]    [[File:mvc-for-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-for-web.jpg&amp;diff=64907</id>
		<title>File:Mvc-for-web.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-for-web.jpg&amp;diff=64907"/>
		<updated>2012-09-15T00:19:34Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64900</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64900"/>
		<updated>2012-09-15T00:13:45Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64895</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64895"/>
		<updated>2012-09-15T00:11:19Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
                                    [[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64894</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64894"/>
		<updated>2012-09-15T00:10:56Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
                         [[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64893</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64893"/>
		<updated>2012-09-15T00:10:29Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]][[File:Mvc-structure-generic.gif]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-structure-generic.gif&amp;diff=64891</id>
		<title>File:Mvc-structure-generic.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-structure-generic.gif&amp;diff=64891"/>
		<updated>2012-09-15T00:10:00Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64851</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64851"/>
		<updated>2012-09-14T23:53:29Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* MVC pattern in web application development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64850</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64850"/>
		<updated>2012-09-14T23:53:12Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* MVC pattern in web application development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
[[File:mvc-web.jpg]]&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-web.jpg&amp;diff=64847</id>
		<title>File:Mvc-web.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvc-web.jpg&amp;diff=64847"/>
		<updated>2012-09-14T23:51:26Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64832</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64832"/>
		<updated>2012-09-14T23:44:33Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64828</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64828"/>
		<updated>2012-09-14T23:43:22Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64825</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64825"/>
		<updated>2012-09-14T23:42:40Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller              &lt;br /&gt;
are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64816</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64816"/>
		<updated>2012-09-14T23:40:20Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller               [[File:classical-mvc.jpg]]&lt;br /&gt;
are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64807</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64807"/>
		<updated>2012-09-14T23:39:04Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view [[File:classical-mvc.jpg]]updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      &lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64783</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64783"/>
		<updated>2012-09-14T23:33:35Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.                                                                      [[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64780</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64780"/>
		<updated>2012-09-14T23:33:00Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64779</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64779"/>
		<updated>2012-09-14T23:32:30Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]] In a classic MVC model the View is supposed to learn by observing the relevant model as the View and Controller are transparent to each other. The view updates itself through observing the relevant model. Therefore the model needs to implement the observer pattern. Controller handles the user inputs and delegates the user actions to method calls in the models.&lt;br /&gt;
&lt;br /&gt;
A complete screen can be understood as a collection of widgets - each widget element consisting of its own View and Controller object.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64768</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64768"/>
		<updated>2012-09-14T23:29:51Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64766</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64766"/>
		<updated>2012-09-14T23:29:22Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
[[File:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64761</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64761"/>
		<updated>2012-09-14T23:27:49Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
[[Media:classical-mvc.jpg]]&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Classical-mvc.jpg&amp;diff=64756</id>
		<title>File:Classical-mvc.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Classical-mvc.jpg&amp;diff=64756"/>
		<updated>2012-09-14T23:26:08Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64736</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64736"/>
		<updated>2012-09-14T23:19:56Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64733</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64733"/>
		<updated>2012-09-14T23:19:36Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
    to instructions from the controller to change state.&lt;br /&gt;
  * '''View''' :The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64732</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64732"/>
		<updated>2012-09-14T23:19:20Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
         to instructions from the controller to change state.&lt;br /&gt;
  * '''View''' :The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64730</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64730"/>
		<updated>2012-09-14T23:19:06Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
                to instructions from the controller to change state.&lt;br /&gt;
  * '''View''' :The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64726</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64726"/>
		<updated>2012-09-14T23:18:23Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model'''  :The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
                 to instructions from the controller to change state.&lt;br /&gt;
  * '''View'''   :The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64723</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64723"/>
		<updated>2012-09-14T23:17:26Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
             to instructions from the controller to change state.&lt;br /&gt;
  * '''View:''' The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller:''' The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64722</id>
		<title>CSC/ECE 517 Fall 2012/ch1 1w20 pp</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1_1w20_pp&amp;diff=64722"/>
		<updated>2012-09-14T23:17:08Z</updated>

		<summary type="html">&lt;p&gt;Pamberk: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller (MVC)''' pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user interface(view),and responds &lt;br /&gt;
                 to instructions from the controller to change state.&lt;br /&gt;
  * '''View:''' The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller:''' The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
The invention of MVC is attributed to Trygve Reenskaug, who was working at Xerox PARC at the time. The 80s decade saw the first implementations of the MVC framework in the form of smalltalks-80. MVC, which was a key feature of the language (Smalltalk) was designed for desktop applications with the main concern being the separation of the presentation from the domain model.&lt;br /&gt;
&lt;br /&gt;
==MVC pattern in web application development==&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI a are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again.&lt;br /&gt;
The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews.&lt;br /&gt;
&lt;br /&gt;
A MVC Framework for web applications therefore normally works this way:&lt;br /&gt;
*The request that is sent from the browser to the web server goes to a front controller, which then builds a request object and starts processing the request.&lt;br /&gt;
*This is followed by “dispatching” .The Controller objects call the action methods that belong to the current request and are responsible to return the correct response. This can be roughly summarized as:&lt;br /&gt;
  *The controller loads/modifies model objects&lt;br /&gt;
  *It then passes the model to a view&lt;br /&gt;
  *Next it calls the view &amp;quot;render()&amp;quot; method to get the response.&lt;br /&gt;
*Normally the view that is returned to the browser consist of a hierarchy of subviews and/or widgets.&lt;br /&gt;
&lt;br /&gt;
==Web frameworks using MVC pattern==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Advantages and disadvantages of MVC pattern==&lt;br /&gt;
==='''Advantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* You can distribute development effort to some extent, so that implementation changes in one part of the Web application do not require changes to another. The developers responsible for writing the business logic can work independently of the developers responsible for the flow of control, and Web-page designers can work independently of the developers.&lt;br /&gt;
* You can more easily migrate legacy programs, because the view is separate from the model and the control and can be tailored to platform and user category.&lt;br /&gt;
* Isolation of business logic from the user interface&lt;br /&gt;
* Ease of keeping code DRY&lt;br /&gt;
* Making it clear where different types of code belong for easier maintenance&lt;br /&gt;
* Since MVC separates the application into the model, view and controller components, it increases the maintainability of the application&lt;br /&gt;
* Testing is easier since the components are independent.&lt;br /&gt;
* Multiple views can reuse the same model objects, thus facilitating code reusability.&lt;br /&gt;
* MVC architecture helps in developing loosely coupled systems&lt;br /&gt;
* The modularity of MVC enables easier changes to the user interface.&lt;br /&gt;
&lt;br /&gt;
==='''Disadvantages of MVC pattern'''===&lt;br /&gt;
&lt;br /&gt;
* Using MVC initially can feel a bit restrictive.&lt;br /&gt;
* It MVC pattern introduces new levels of indirection and therefore increases the complexity of the solution. &lt;br /&gt;
* It also increases the event-driven nature of the user-interface code, which can become more difficult to debug.&lt;br /&gt;
* Developers cannot completely ignore the view of the model even if they are decoupled. If the model undergoes frequent changes, the views could be   flooded with update requests.Views like graphical displays may take some time to render. As a result, the view may fall behind update requests.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;br /&gt;
1. [http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html  http://heim.ifi.uio.no/~trygver/themes/mvc/mvc-index.html]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Web_application_framework http://en.wikipedia.org/wiki/Web_application_framework]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Model-view-controller http://en.wikipedia.org/wiki/Model-view-controller]&lt;br /&gt;
&lt;br /&gt;
4. [http://rubyonrails.org/ http://rubyonrails.org/]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html http://www.typo3-media.com/blog/mvc-mvp-typo3-introduction.html]&lt;br /&gt;
&lt;br /&gt;
6. [http://jakarta.apache.org/struts/index.html http://jakarta.apache.org/struts/index.html]&lt;br /&gt;
&lt;br /&gt;
7. [http://www.careerride.com/MVC-disadvantages.aspx]&lt;/div&gt;</summary>
		<author><name>Pamberk</name></author>
	</entry>
</feed>