1 / 22

Advanced Web Technologies

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.

abiba
Download Presentation

Advanced Web Technologies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Advanced Web Technologies Lecture #3 By: Faraz Ahmed

  2. Contents • Formal Notation Tool • MVC • References

  3. Problem? A simple word processer would not be able to get those special set notations

  4. LaTeX • A language • A specific ‘dialect’ of TeXfor mathematicians/scientists

  5. TeX • TeX is a system AND also a type setting language. • To “make” a TeX system, you need to install several components.

  6. Installation Steps! • Daemon Tools ( or another similar tool) . • Download ISO from the given link in notes. • Install MiKTeX (compiler) • Install TeXnic Center (for editing)

  7. Relation

  8. Design Patterns • Solutions to commonly occurring problems. • Templates on how a problem can be solved. • Half way through today I realized design patterns should have been there in the course!

  9. An example to whet the appetite! • Singleton • Create a Public Class • Create a private constructor • Create a private static/shared variable • Initialize and expose that variable using a function/property

  10. MVC- Motivation[1] • All applications contain data being manipulated by an interface. • That data should be disconnected with the interface.

  11. Structure • Model • The data (ie state) • Methods for accessing and modifying state • View • Renders contents of model for user • When model changes, view must be updated • Controller • Translates user actions (ieinteractions with view) into operations on the model • Example user actions: button clicks, menu selections

  12. Basic MVC • Setup • Instantiate model • Instantiate view • Has reference to a controller, initially null • Instantiate controller with references to both • Controller registers with view, so view now has a (non-null) reference to controller • Execution • View recognizes event • View calls appropriate method on controller • Controller accesses model, possibly updating it • If model has been changed, view is updated (via the controller)

  13. Extended MVC • Background: Observer pattern • One object is notified of changes in another • In extended MVC, view is an observer of model • Application within MVC • Asynchronous model updates • Associated view must be notified of change in order to know that it must update • A model may have multiple views • But a view has one model • All views have to be updated when model changes

  14. C and C++

  15. Disadvantages • Difficult to implement • Not suitable for smaller applications • Different, isolated development by UI developers, coders etc. could lead to more time. • Tightly coupled • Placing attributes that are not relevant to model e.g. popup

  16. Advantages • Loose Coupling • Easy to unit-test • ??

  17. Variants • The document-view Model • But tightly couples both view and controller.

  18. References • “Model-View Controller Design Pattern”, http://www.cse.ohio-state.edu/~rountev/421/lectures/lecture23.pdf , visited on 18th Jan 2011 • “Model-View-Controller”, http://msdn.microsoft.com/en-us/library/ff649643.aspx , visited on 18th Jan 2011

More Related