User Tools

Site Tools


mvc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mvc [2007/10/16 20:40] – created roumanimvc [2008/08/29 19:09] (current) roumani
Line 1: Line 1:
 ====== MVC ====== ====== MVC ======
  
-This lecture covers the MVC design pattern for web applications in the context of a mini-project. +This lecture covers the MVC design pattern for web applications in the context of a mini-project. This includes writing servlets to control and dispatch, models to model the data and the business rules, and JSP pages to author the view.
  
 ===== Outline ===== ===== Outline =====
Line 10: Line 9:
   * State can be captured using the session object. Its API allows us to detect the start of new sessions.   * State can be captured using the session object. Its API allows us to detect the start of new sessions.
   * The model is best packaged as a Java package.   * The model is best packaged as a Java package.
-  * The model uses beans and POJOs.+  * The model uses beans and POJOs. It is compiled (using ''javac'') and tested outside Tomcat. 
 +  * The servlet's ''init'' method is responsible for instantiating the model and storing it in the application scope. 
 +  * Jasper translates a JSP page to a servlet upon receiving the first reference to it (typically from a servlet forward). 
 +  * Jasper allows us to embed three things in the JSP page in addition to template (e.g. HTML) code: Expression Language EL, Directives, and Actions. These will be evaluated by Jasper and their values are served as part of the response. 
 +  * EL uses a number of built-in, implicit objects. 
 +  * Actions are either standard (JSTL) or custom. 
 + 
 + 
  
 ===== To Do ===== ===== To Do =====
  
   * Read the rest of Chapter 6.   * Read the rest of Chapter 6.
-  * Do Lab 4.+  * Read Chapter 8 up to Section 8.4.1 but omit 8.3.2-8.3.3. 
 +  * Look at ''ELdemo.jspx'' and ''JSTLdemo.jspx'' in the //Resource Directory//
 +  * Do [[http://www.cse.yorku.ca/~roumani/warp/labs/lab4.htm|Lab-4]]. 
 + 
 +===== Slides from Lecture ===== 
 + 
 +{{:44jsp.swf?505x383}}
mvc.1192567251.txt.gz · Last modified: 2007/10/16 20:40 by roumani

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki