Web Presentation Flashcards
(21 cards)
Advantages of a user interface
1- No software needed to install
2- Universal access
What is a web server
Interprets requested URLs (passes control to the corresponding web application)
What are the main structural elements and what’s the difference between them?
1- Script: a program that processes HTTP requests and generates HTML output
2- Server Page : combines HTML with code templates to generate dynamic content
Difference: scripts are used to process requests while server pages are used to format responses
What is a model view controller?
Controller: receives the HTTP request then determines the appropriate model to send the request to
Model: Contains the business logic, it queries data sources and processes any required operations
View: After the model processes the request, the controller selects the appropriate view, the view receives the response using HTTP session object and displays it
What are the three view patterns?
1- Transform view
2- Template view
3- Two step view
What is a transform view?
It is based on transformation languages, the controller selects and applies the transformation to XML generated from the model
How many stages does a transform view has?
One stage, it directly processes and presents the data
Advantages of a transform view
Flexible
Adaptable to different presentation formats
Disadvantages of a transform view
Complex
What is a template view?
The page structure defines presentation, it has markers to include executable code for dynamic content
How many stages does a template view have?
One pattern because usual pattern for server pages
Advantage of a template view
Easy development
Disadvantages of template view
Messier code
Mixed with other templates
Harder to maintain
What are the features of a Two Steps View?
1- First step for each display (data is processed)
2 - Second step for the entire application
Advantages of a Two Steps View
1- Any changes to the HTML can be made globally and applied across the entire app
2- Consistency across screens
Disadvantage of a two steps view
More complex
Difference between 1 stage views and 2 stage views
1 Stage view: directly processes data into its display in one step
2 Stage View: first logical processing then generating the final display
What are the types of controller patterns?
1- Page Controller
2- Front Controller
What is a page controller?
There’s a controller object for every single page of the website or even every action
What is a front controller?
A single entry point for all HTTP requests that routes them to specific handlers or controllers.
Advantage of a front controller
Centralizes request management