ICS 325
Chapter 9 Approaches to Web
Application Development (Shklar)
Common Application
Functionality
·
Accept user
requests
·
Interpret user
requests
·
Authenticate
requestors
·
Authorize requestors
·
Access data
·
Transform data
·
Construct
responses
·
Transmit
responses
Categories of Web Application
Approaches
·
Scripting or
programmatic approaches (CGI, Java Servlets code
centric)
·
Template
approaches uses a source object (template) with formatting structures and
limited embedded constructs for programming (SSI
server side includes, Cold Fusion, WebMacro/Velocity)
·
Hybrid approaches
combine scripting elements with template structures (PHP,
ASP=>.NET, JSP)
·
Frameworks
Web Application Frameworks
·
Provide a
consistent architecture for building and accessing request context elements
that can be embedded within the web page (p. 246)
·
Support state and
session management and authentication
·
Support for data
access and transformation
·
Separates content
from presentation
·
Patterns support
frameworks
Buzzwords
·
JSP Java server pages (Sun)
·
ASP Active
server pages (Microsoft)
·
OLE - Object
linking and embedding
·
ODBC Open
database connectivity
·
COM Component
Object Model
·
IIS Internet Information Server (Microsoft)
·
LDAP Lightweight Directory Access Protocol
Developers vs. Designers
·
Separate content
from presentation
·
Different skill
sets
·
Some tools favor
the developer; some favor the designer
Model-View-Controller (MVC) Pattern (see fig. 9.9)
·
Data model should
be usable by a variety of views
·
Some controlling
mechanism should be the glue that hooks up retrieved content with the
presentation format
·
Controller
receives a user request
·
Controller
constructs the Model that fulfills this request
·
Controller
selects a view to present the results
·
The View
communicates with the model to determine its contents
·
The View presents
the contents to the user in the desired format
·
The View acts as
the interface for transmitting further requests from the user to the Controller
·
Facilitates
separation of content from presentation
·
Allows
applications to dynamically tailor the view based on user preference, device
capabilities and business rules
·
Controller
developer
·
View designer
Other Important Patterns (see
pg. 263)
·
Front Controller
a module acting as a centralized entry point into a Web application, managing
request processing, performing authentication and authorization services,
selecting the view
·
Service-to-Worker
and Dispatcher View strategies for MVC applications
where the front controller module defers processing to a dispatcher that is
selected based on the request context
·
Dispatcher View
dispatcher performs static processing to select the ultimate presentation view
·
Service-to-Worker
dispatchers processing is more dynamic; logical task names are translated
into concrete task modules; complex processing determines presentation view
·
Intercepting
Filter allows for pluggable filters to be inserted
into the request pipeline; performs pre and post processing
·
Value List
Handler a mechanism for caching results from database queries, presenting
discrete subsets of the results and providing iterative traversal through the
sequence of subsets
·
Data Access
Object (DAO) a centralized mechanism for abstracting and encapsulating access
to complex data sources; DAO acts as an adapter allowing the external interface
to remain the same even when the structure of the underlying data source
remains the same
·
Struts uses MVC, Front Controller and Service-to-Worker patterns; allows
the use of configurable application components
XML
·
·
Self-defining
data structures
Web Application Development
Approaches Compared
·
See Table 91. on
page 267