Download presentation
Presentation is loading. Please wait.
Published byJacob Harper Modified over 9 years ago
1
Advanced Web Technologies Lecture #3 By: Faraz Ahmed
2
Contents 0 Formal Notation Tool 0 MVC 0 References
3
Problem? A simple word processer would not be able to get those special set notations
4
LaTeX 0 A language 0 A specific ‘dialect’ of TeX for mathematicians/scientists
5
TeX 0 TeX is a system AND also a type setting language. 0 To “make” a TeX system, you need to install several components.
6
Installation Steps! 0 Daemon Tools ( or another similar tool). 0 Download ISO from the given link in notes. 0 Install MiKTeX (compiler) 0 Install TeXnic Center (for editing)
7
Relation
9
Design Patterns 0 Solutions to commonly occurring problems. 0 Templates on how a problem can be solved. 0 Half way through today I realized design patterns should have been there in the course!
10
An example to whet the appetite! 0 Singleton 0 Create a Public Class 0 Create a private constructor 0 Create a private static/shared variable 0 Initialize and expose that variable using a function/property
11
MVC- Motivation[1] 0 All applications contain data being manipulated by an interface. 0 That data should be disconnected with the interface.
12
Structure 0 Model 0 The data (ie state) 0 Methods for accessing and modifying state 0 View 0 Renders contents of model for user 0 When model changes, view must be updated 0 Controller 0 Translates user actions (ie interactions with view) into operations on the model 0 Example user actions: button clicks, menu selections
13
Basic MVC 0 Setup 0 Instantiate model 0 Instantiate view 0 Has reference to a controller, initially null 0 Instantiate controller with references to both 0 Controller registers with view, so view now has a (non-null) reference to controller 0 Execution 0 View recognizes event 0 View calls appropriate method on controller 0 Controller accesses model, possibly updating it 0 If model has been changed, view is updated (via the controller)
15
Extended MVC 0 Background: Observer pattern 0 One object is notified of changes in another 0 In extended MVC, view is an observer of model 0 Application within MVC 0 Asynchronous model updates 0 Associated view must be notified of change in order to know that it must update 0 A model may have multiple views 0 But a view has one model 0 All views have to be updated when model changes
17
C and C++
18
Disadvantages 0 Difficult to implement 0 Not suitable for smaller applications 0 Different, isolated development by UI developers, coders etc. could lead to more time. 0 Tightly coupled 0 Placing attributes that are not relevant to model e.g. popup
19
Advantages 0 Loose Coupling 0 Easy to unit-test 0 ??
20
Variants 0 The document-view Model 0 But tightly couples both view and controller.
22
References 1) “Model-View Controller Design Pattern”, http://www.cse.ohio- state.edu/~rountev/421/lectures/lecture23.pdf, visited on 18th Jan 2011http://www.cse.ohio- state.edu/~rountev/421/lectures/lecture23.pdf 2) “Model-View-Controller”, http://msdn.microsoft.com/en-us/library/ff649643.aspx, visited on 18th Jan 2011http://msdn.microsoft.com/en-us/library/ff649643.aspx
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.