Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann, 30.04.2007.

Slides:



Advertisements
Similar presentations
Designing Web Applications. client server architectures design patterns model 2 web applications.
Advertisements

1 CGICGI Common Gateway Interface Server-side Programming Lecture.
DT228/3 Web Development WWW and Client server model.
Web Applications Development Using Coldbox Platform Eddie Johnston.
Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,
Do We Really Need Rich-Interface Technologies? Yifan Zhang
Design of Web-based Systems IS Development: lecture 10.
Vending Machine FSM Benjamin Welton 03/20/2010 CS 480.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
Cloud Computing Lecture #7 Introduction to Ajax Jimmy Lin The iSchool University of Maryland Wednesday, October 15, 2008 This work is licensed under a.
Multiple Tiers in Action
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
CS 290C: Formal Models for Web Software Lecture 1: Introduction Instructor: Tevfik Bultan.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Introduction to Web Applications Instructor: Enoch E. Damson.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development I” Course materials.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Web Application Architecture: multi-tier (2-tier, 3-tier) & mvc
WEB DESIGN SOME FOUNDATIONS. SO WHAT IS THIS INTERNET.
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
UNIT-V The MVC architecture and Struts Framework.
ITM352 PHP and Dynamic Web Pages: Server Side Processing.
Web Applications Harry R. Erwin, PhD University of Sunderland CIT304/CSE301.
Web 2.0: Concepts and Applications 11 The Web Becomes 2.0.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
DATABASE PROGRAMMING Lecture on 16 – 05 – PREVIOUS LECTURE QUIZ: - Some students were very creative in transforming 2NF to 3NF. Excellent! - Some.
M1G Introduction to Database Development 6. Building Applications.
Lecture 19 Web Application Frameworks Boriana Koleva Room: C54
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Felipe Pollola Paulo Vitor. MVC (Model-View-Controller); About TurboGears; TurboGears Installation; Creating a Project; Starting a Project; Implementing.
Web Interfaces, Forms & Databases Databases Snyder p HTML Basics Snyder p JavaScript Snyder Chapter 18.
Web Applications BIS4430 – unit 8. Learning Objectives Explain the uses of web application frameworks Relate the client-side, server-side architecture.
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
SE-02 COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require.
INTRODUCTION TO WEB APPLICATION Chapter 1. In this chapter, you will learn about:  The evolution of the Internet  The beginning of the World Wide Web,
CS CS 5150 Software Engineering Lecture 13 System Architecture and Design 1.
Web Development Process The Site Development Process Site Construction is one of the last steps.
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
Ajax VS Flex A comparison based on shopping cart implementation PoHsu Yeh py2157.
Web-Applications: TurboGears BCHB Lecture 25 12/02/2015BCHB Edwards.
Web 2.0: Concepts and Applications 11 The Web Becomes 2.0.
The basics of knowing the difference CLIENT VS. SERVER.
Overview Web Technologies Computing Science Thompson Rivers University.
1 LM 6 Database Applications Dr. Lei Li. Learning Objectives Explain three components of a client-server system Describe differences between a 2-tiered.
The Internet Salihu Ibrahim Dasuki (PhD) CSC102 INTRODUCTION TO COMPUTER SCIENCE.
Presented by Alexey Vedishchev Developing Web-applications with Grails framework American University of Nigeria, 2016 Intro To MVC Architecture.
Best Institutes offering Software Development courses.
CX Introduction to Web Programming
Web Programming Language
Web Technologies Computing Science Thompson Rivers University
Design Patterns Source: “Design Patterns”, Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides And Created.
JavaScript and Ajax (Ajax Tutorial)
Recipes for Use With Thin Clients
Chapter 2 Client/Server Applications
MVC and other n-tier Architectures
Software Design and Architecture
An example of a pilot project as part of USP course:
Database Driven Websites
Lecture 1: Multi-tier Architecture Overview
Web Application Architectures
Web Application Architectures
MORE ON ARCHITECTURES The main reasons for using an architecture are maintainability and performance. We want to structure the software into reasonably.
WPS - your story so far Seems incredible complicated, already
COMPONENTS – WHY? Object-oriented source-level re-use of code requires same source code language. Object-oriented source-level re-use may require understanding.
Architecture of the web
Web Technologies Computing Science Thompson Rivers University
UFCEUS-20-2 Web Programming
Web Application Architectures
Presentation transcript:

Introduction to Model-View-Controller (MVC) Web Programming with TurboGears Leif Oppermann,

WPS - your story so far –xhtml x2 –css –javascript –dom, dynamic html –java applets –cgi/perl –php x2 –web usability x2 –xml x2 Seems incredible complicated, already But still not everything (by far not!) How to possibly get it all under one hood? What did you like?

Course of this lecture What is web programming? What is model-view-controller? Introducing TurboGears

1. Web programming The non-design bits Developing web applications of all scales “In software engineering, a Web application or webapp is an application that is accessed with a Web browser over a network such as the Internet or an intranet. Web applications are popular due to the ubiquity of the browser as a client, sometimes called a thin client. The ability to update and maintain Web applications without distributing and installing software on potentially thousands of client computers is a key reason for their popularity. Web applications are used to implement Webmail, online retail sales, online auctions, wikis, discussion boards, Weblogs, MMORPGs, and many other functions.” – Wikipedia.org

Webapps summary Accessed with a Web Browser (client) Over a network Code is mainly run on server Exception: Javascript (also: Java, Flash,..) Code is loaded from server Data is mainly stored on server Webapps can be updated easily…..without updating the clients!

General 3 tiered structure First tier: client side code (web-browser) Second tier: server side code, e.g. CGI/Perl, PHP, Java, Rails, Turbogears Third tier: server side database

Architectural Pattern from Smalltalk (1979) Decouples data and presentation Eases the development 2. Model View Controller

First thought (ok, but not far enough): –Tier 1: View (Client) –Tier 2: Controller (Server) –Tier 3: Model (Database) Database ClientServer

Presentation: –View is the user interface (e.g. button) –Controller is the code (e.g. callback for button) Data: –Model is the database Database Presentation Data

Example Control Flow in MVC User interacts with the VIEW UI CONTROLLER handles the user input (often a callback function attached to UI elements) CONTROLLER updates the MODEL VIEW uses MODEL to generate new UI UI waits for user interaction

MVC – general example

3. Introduction to TurboGears JavaScript Library XHTML template engine Easy to use Python webserver ORM Database Interface (e.g. for MySQL, SQLite, etc.) VIEW CONTROLLER MODEL

> tg-admin quickstart NewDemo Enter package name [newdemo]: Do you need Identity (usernames/passwords) in this project? [no] [lots of output] > cd NewDemo >./start-newdemo.py 3. Introduction to TurboGears

Let‘s get started by watching a video (20 Minute Wiki)

Summary Web applications –Client, Server, Database –Easy to maintain, harder to write Model – View – Controller –Eases web application development TurboGears –MVC WebApp Framework written in Python

Thanks for your attention Next lecture: Thursday (03.05.), 9 AM More on TurboGears (example project) Questions / Comments: –Now, or via