Download presentation
Presentation is loading. Please wait.
Published byAugust Russell Modified over 9 years ago
1
Model-View-Controller Architecture in a Systems Analysis and Design Course Dr. Robert F. Zant Illinois State University
2
The Plan Curriculum overview MVC Concepts Example MVC implementation
3
Curriculum Structure
4
Systems Development I Taken by all IS majors Covers Traditional and Object-Oriented SAD
5
Systems Development II Taken by IS majors in Systems Development/Analyst Sequence Covers Traditional SAD Includes Simulated Project
6
OO Systems Development Taken by IS majors in Web Application Development Sequence Covers Object Oriented SAD Includes Simulated Project
7
Directed Project in Information Technology Taken by IS majors in both sequences Includes Real-World Project
8
Curriculum Structure
9
MVC Architecture Used in both second level courses as a unifying theme Provides an architectural template for novice system developers Use is prevalent in industry
10
MVC Structure
11
MVC Controller - Interprets user requests and invokes Model and View Model - contains application logic and access logic for persistent data View - displays model results to user
12
Primary Data Flow
13
Server Side Programming
14
Client Side Interface Design
15
Guidelines All responses from users are processed first by a Front Controller Communication of user responses to the Front Controller is by name (e.g., field names on HTML forms) A Front Controller invokes a Page Controller, not a Model or View A Page Controller invokes one Model and one View
16
Guidelines (cont.) A Model executes application logic and accesses data stores (contains no HTML) A Model creates an XML file or an object containing its results Communication of Model results to a View are by name (e.g., tags in XML)
17
Guidelines (cont.) A View creates a presentation stream A View contains no application logic A View obtains all non-constant text data from the XML file or result object produced by the Model A View does not directly reference any data in a Model or URL for the site
18
Example Front Controller <% NOTE: This is the Front Controller ; DEFAULT pc = "menu", sys_base = $path_Translated_dir$"/", url_base = http:"//"$server_name$$path_info_dir$"/", home = $url_base$index.odb ; SESSION LOGIN = "login.odb?from=$pc$", TIMEOUT = 10 ; INCLUDE $sys_base$"c/"$pc$".c"; %>
19
Example Page Controller <% NOTE: Page Controller to List Products ; INCLUDE $sys_base$m/Products/table1.m ; INCLUDE $sys_base$v/Products/table1.v ; %>
20
Example Model <% NOTE: Model to List Products ; DATABASE "DSN=myProducts" ; SELECT Category, ProductID, Heading, Description, UnitPrice, UnitsOnHand FROM Products ORDER BY ProductID ; OUTPUT $xmlfile$ ; NOTE: xmlfile defined during login; %> $home$
21
Example Model (cont.) $ProductID$ $Category$ $Description$ $UnitPrice$ $UnitsOnHand$
22
Example XML File http://localhost/new/widgets/index.odb 3 Reinforced plastic 8 inch Plastic Widgets Oversized polyethelene with steel 10.0000 70
23
Example View SET xslt = $url_base$"v/Products/xslt/table1.xslt" ; INCLUDE $xmlfile$ ;
24
Example XSL <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> World Wide Widgets @import url(v/widgets.css);
25
Example XSL (cont.) World Wide Widgets [ Continue... ]
26
Example XSL (cont.) Products by Product ID Product ID Product Category Description Price On Hand
27
Example XSL (cont.) <xsl:value-of select="format-number (UnitPrice,'$###,##0.00')" />
28
Recommended Software ODB Script –http://odbscript.com/ Abyss Web Server –http://www.aprelium.com/ Cooktop –http://xmlcooktop.com/ TextPad –http://www.textpad.com/
29
Thank You Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.