advanced web technologies
DESCRIPTION
Advanced Web Technologies. Lecture #3 By: Faraz Ahmed. Contents. Formal Notation Tool MVC References. Problem?. A simple word processer would not be able to get those special set notations. LaTeX. A language A specific ‘dialect’ of TeX for mathematicians/scientists. TeX. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/1.jpg)
Advanced Web Technologies
Lecture #3By: Faraz Ahmed
![Page 2: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/2.jpg)
Contents
0Formal Notation Tool0MVC0References
![Page 3: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/3.jpg)
Problem?
A simple word processer would not be able to get those special set notations
![Page 4: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/4.jpg)
LaTeX
0 A language
0 A specific ‘dialect’ of TeX for mathematicians/scientists
![Page 5: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/5.jpg)
TeX
0TeX is a system AND also a type setting language.
0To “make” a TeX system, you need to install several components.
![Page 6: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/6.jpg)
Installation Steps!
0Daemon Tools ( or another similar tool) .
0Download ISO from the given link in notes.
0 Install MiKTeX (compiler)
0 Install TeXnic Center (for editing)
![Page 7: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/7.jpg)
Relation
![Page 8: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/8.jpg)
![Page 9: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/9.jpg)
Design Patterns
0Solutions to commonly occurring problems.
0Templates on how a problem can be solved.
0Half way through today I realized design patterns should have been there in the course!
![Page 10: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/10.jpg)
An example to whet the appetite!
0Singleton
0 Create a Public Class0 Create a private constructor0 Create a private static/shared variable0 Initialize and expose that variable using a
function/property
![Page 11: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/11.jpg)
MVC- Motivation[1]
0All applications contain data being manipulated by an interface.
0That data should be disconnected with the interface.
![Page 12: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/12.jpg)
Structure
0 Model0 The data (ie state)0 Methods for accessing and modifying state
0 View0 Renders contents of model for user0 When model changes, view must be updated
0 Controller0 Translates user actions (ie interactions with view) into
operations on the model0 Example user actions: button clicks, menu selections
![Page 13: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/13.jpg)
Basic MVC
0 Setup0 Instantiate model0 Instantiate view0 Has reference to a controller, initially null0 Instantiate controller with references to both0 Controller registers with view, so view now has a (non-null) reference
to controller
0Execution0 View recognizes event0 View calls appropriate method on controller0 Controller accesses model, possibly updating it0 If model has been changed, view is updated (via the controller)
![Page 14: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/14.jpg)
![Page 15: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/15.jpg)
Extended MVC
0Background: Observer pattern0One object is notified of changes in another0 In extended MVC, view is an observer of model
0Application within MVC0Asynchronous model updates
0Associated view must be notified of change in order to know that it must update
0A model may have multiple views0But a view has one model0All views have to be updated when model changes
![Page 16: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/16.jpg)
![Page 17: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/17.jpg)
C and C++
![Page 18: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/18.jpg)
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
![Page 19: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/19.jpg)
Advantages
0Loose Coupling
0Easy to unit-test
0 ??
![Page 20: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/20.jpg)
Variants
0The document-view Model
0But tightly couples both view and controller.
![Page 21: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/21.jpg)
![Page 22: Advanced Web Technologies](https://reader035.vdocument.in/reader035/viewer/2022070421/56816150550346895dd0d962/html5/thumbnails/22.jpg)
References1) “Model-View Controller Design Pattern”, http://www.cse.ohio-state.edu/~
rountev/421/lectures/lecture23.pdf , visited on 18th Jan 20112) “Model-View-Controller”, http://msdn.microsoft.com/en-us/library/ff649643.aspx , visited on 18th Jan
2011