Akshat Dubey
Rupali Roy Choudhury
Suranjana Sengupta
Anand Sundaram
NUSMODS

Text
Application Architecture

Presentation Layer
Application Layer
Business Logic
Data Access
- User Interface Architecture
- Separation of Concerns

Model
Presenter
View

Model
Presenter
View
Module
ModulePresenter
ModulesView
ModuleItemView
ModulesListingView

Mediator Pattern
Uses Backbone.js and Marionette


Lot of components interacting with each other
High coupling
Solution?
Mediator Pattern
"An object that encapsulates how a set of objects interact"
Mediator Pattern
- No direct communication, only through Mediator Object
- Reduced Dependencies
- Lower Coupling

ModuleSearch
TimeTable
ModuleList
Mediator
(listens for events)
Register
Calls
functions
addModule
removeModule
displayLesson
Make
changes
A Similar App

Thank You!
References
- NUSMods on GitHub: https://github.com/nusmodifications/nusmods/
- BackboneJS: http://backbonejs.org/
- MarionetteJS: http://marionettejs.com/
- Mediator Pattern In Marionette: http://www.slideshare.net/matt-briggs/marionette-structure-with-modules
- Model-View-Presenter: https://en.wikipedia.org/wiki/Model–view–presenter
Copy of CS3219 Seminar
By Anand Sundaram
Copy of CS3219 Seminar
- 828