Web Programming Language

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

 Recent researches show that predicative programming can be used to specify OO concepts including classes, objects, interfaces, methods, single and multiple.
Object-Oriented Design Patterns Composite Singleton State Observer … Autumn 2012UCN Technology: IT/Computer Science1.
CSE3308/CSC Software Engineering: Analysis and DesignLecture 5B.1 Software Engineering: Analysis and Design - CSE3308 Patterns CSE3308/CSC3080/DMS/2000/12.
OOP Design Patterns Chapters Design Patterns The main idea behind design patterns is to extract the high level interactions between objects and.
Plab – Tirgul 12 Design Patterns
CSE Software Engineering: Analysis and Design, 2005Lecture 8A.1 Software Engineering: Analysis and Design - CSE3308 Design and Analysis Patterns.
Observer Pattern Fall 2005 OOPD John Anthony. What is a Pattern? “Each pattern describes a problem which occurs over and over again in our environment,
Dept. of Computer Engineering, Amirkabir University of Tech. 1 Design Patterns Dr. Noorhosseini Introduction.
CSE Software Engineering: Analysis and Design, 2002Lecture 7B.1 Software Engineering: Analysis and Design - CSE3308 Patterns CSE3308/DMS/2002/15.
CS 290C: Formal Models for Web Software Lecture 9: MVC Architecture and Navigation Analysis Based on the MVC Architecture Instructor: Tevfik Bultan.
Copyright © Active Frameworks Inc. - All Rights Reserved.More On Behavioral Patterns - Page L9-1 PS95&96-MEF-L16-1 Dr. M.E. Fayad Creationa l.
Spring 2010CS 2251 Design Patterns. Spring 2010CS 2252 What is a Design Pattern? "a general reusable solution to a commonly occurring problem in software.
Chapter 22 Object-Oriented Design
PRESENTED BY SANGEETA MEHTA EECS810 UNIVERSITY OF KANSAS OCTOBER 2008 Design Patterns.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
Design Patterns Discussion of pages: xi-11 Sections: Preface, Forward, Chapter
Design Patterns.
MVC and MVP. References enter.html enter.html
1 Copyright © 2014 Atego. Patterns INCOSE MBSE WG – Simon A. Perry - Atego.
Comp2110 Software Design lecture 13Detailed Design (1)  detailed design contrasted with high level design  introducing the Observer Design Pattern 
January 12, Introduction to Design Patterns Tim Burke References: –Gamma, Erich, et. al. (AKA, The Gang of Four). Design Patterns: Elements of Reusable.
Creational Patterns CSE301 University of Sunderland Harry R Erwin, PhD.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 27. Review UML dynamic view – State Diagrams.
MVC Design Pattern Web Developer at Crimshield, Inc Application Developer at IBM Present - Delta Developer at Tides.
Software Design Patterns (1) Introduction. patterns do … & do not … Patterns do... provide common vocabulary provide “shorthand” for effectively communicating.
CSE 403 Lecture 14 Design Patterns. Today’s educational objective Understand the basics of design patterns Be able to distinguish them from design approaches.
Design Principle & Patterns by A.Surasit Samaisut Copyrights : All Rights Reserved.
ECE450S – Software Engineering II
Design Patterns: Elements of Reusable Object- Orientated Software Gamma, Helm, Johnson, Vlissides Presented By: David Williams.
Patterns Composite Pattern. Patterns All designers use patterns. Patterns in solutions come from patterns in problems. "A pattern is a solution to a problem.
Design Patterns in Context ©SoftMoore ConsultingSlide 1.
Chapter 8 Object Design Reuse and Patterns. More Patterns Abstract Factory: Provide manufacturer independence Builder: Hide a complex creation process.
L10: Model-View-Controller General application structure. User Interface: Role, Requirements, Problems Design patterns: Model – View – Controller, Observer/Observable.
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
GRASP – Designing Objects with Responsibilities
Design Patterns: MORE Examples
COMP2110 Software Design in lecture 14 Patterns(1) /Detailed Design
The Object-Oriented Thought Process Chapter 15
Software Design Patterns
MPCS – Advanced java Programming
Introduction to Design Patterns
A Brief Introduction to Design Patterns
Design Patterns Introduction
Observer Design Pattern
CMPE 135: Object-Oriented Analysis and Design October 24 Class Meeting
Introduction with a few design patterns
For University Use Only
Presented by Igor Ivković
Design Patterns - A few examples
Advanced Programming Behnam Hatami Fall 2017.
Design Patterns Outline
Informatics 122 Software Design II
Patterns.
Chapter 22 Object-Oriented Design
Observer Pattern 1.
CSE 403 Software Design.
DESIGNING YOUR SYSTEM.
DESIGN PATTERNS : Introduction
Design Patterns - An Introduction
CMPE 135 Object-Oriented Analysis and Design March 21 Class Meeting
Advanced ProgramMING Practices
Design Patterns Imran Rashid CTO at ManiWeber Technologies.
Advanced ProgramMING Practices
Informatics 122 Software Design II
CSC 480 Software Engineering
Chapter 8, Design Patterns Introduction
Web Programming Language
Presentation transcript:

269200 Web Programming Language Week 13 - MVC

So Far We’ve looked at HTML CSS PHP Jquery HTML5

This Week MVC Practical application of the Observer Design Pattern

OOP Designing OO software is not easy. Identifying appropriate objects Specifying complex interrelationships Designing Reusable OO software is even harder. Finding good objects Getting the right level of abstraction Defining appropriate interfaces Making relationships available Designs need to be specific enough to solve the current problem, but general enough to address future problems and requirements.

OO Evolution Getting it “Right” is not easy, if not impossible to do first time, So often objects evolve to their ideal state. Objects are “reused” many times, modified each time to get to the finished state.

Expert OO Designers Experts do come up with good designs. Invariably they reuse solutions that worked well for them in the past. You can find recurring patterns of classes and communicating objects across many systems and many domains. Patterns…

Patterns Design Patterns Solve specific design problems. Make OO Designs flexible and elegant. Help designers reuse successful patterns by basing new designs on prior experience. Being familiar with common patterns enables designers to design solutions quickly.

Analogy Books and Movies Common Plots Romance Action Hero Fantasy Cartoon… Rarely do new books or movies come up with a completely original genre. The most unique movies are normally those which integrate innovative techniques (camera angles etc.)

Design Patterns – The Book Elements of Reusable Object Oriented Software Gamma, Helm, Johnson & Vlissides The “Gang of Four” A catalog of common problems and their solution designs.

Christopher Alexander “Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice” (Alexander)

Christopher Alexander Was an Architect. He was talking about designing buildings and town planning. We are “Architects” But, we are talking about designing software. Comparison His “Walls” and “Doors” are our “Objects” and “Interfaces”.

Pattern Perspective Different designers have different views of what patterns are. One designers pattern is another designers primitive building block. Is a “Linked List” or a “Hash Table” a pattern? No… Patterns are descriptions of communicating objects and classes that are customized to solve a general design problem in a particular context.

Example: MVC MVC = Model View Controller Model – Application Object View – Screen Presentation Controller – Defines how the user interface reacts to user input MVC decouples view and models to increase flexibility and reuse. A communication protocol between the model and the view, ensures that the view reflects the state of the model.

MVC When the model’s data changes; The View is notified, to allow it to update itself. In this way multiple views can be attached to a model, independently allowing multiple presentations of the same data. New views can be added without affecting the model.

MVC A B C 50 35 15

MVC Patterns At first glance; More Generalised becomes; A design that decouples views from models. More Generalised becomes; Decoupling objects so that changes to one can affect any number of others without requiring the changed object to know the details of others. This is the “Observer Pattern”.

MVC Patterns (cont.) Actually MVC also uses other patterns; Composite Pattern Allowing objects to be grouped, and then treated as an individual object. Strategy Pattern The object represents an algorithm, which may need to be varied. Factory Method Pattern To specify a default controller for a view. Decorator To add scrolling to a view.

The Observer Pattern Structure Subject Observer ConcreteObserver observers Observer Attach(Observer) Detach(Observer) Notify() Update() for all o in observers { o->Update() } ConcreteObserver ConcreteSubject subject Update() observerState = subject->GetState() GetState() SetState() return subjectState observerState subjectState

MVC Frameworks PHP JS Ruby And MANY, MANY more… CakePHP Laravel Zend Angular.JS React Ruby Ruby on Rails And MANY, MANY more…

Frameworks? Abstraction providing generic functionality Not a library! The framework dictates the flow of control, not the caller. Default behaviour Extensible

Pretty URLs mod_rewrite (& .htaccess) What is mod_rewrite? Allows us to rewrite (change) the url… http://www.kencosh.com/post.php?id=1234 http://kencosh.com/semester-1-2015/269200-web-programming-language/