CSC/ECE 517 Fall 2010/ch3 3a SN: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 14: Line 14:


Before we move on to the web frameworks in different languages, it is imperative for us to understand the basic structure of a web framework.
Before we move on to the web frameworks in different languages, it is imperative for us to understand the basic structure of a web framework.
===The Model-View-Controller Architecture===
The MVC architecture is a way of demodulizing an application or a part of its interface into three constituent parts
====The Model====
To manage information and notify the observers when that information changes. As such, a model can contain only data and functionality that are related. So two unrelated groups of data and functionality need two different models
====The View====
Typically deals with how the user will be able to see the output. A view attaches itself to the model and renders its contents to the display surface. Changes in the model will automatically be incorporated and displayed in the views
====The Controller====
Mainly responsible for mapping user end action to the application response. It typically accepts input from the user and instructs the model and the views to perform actions based on that action
        Input --> Processing --> Output
        Controller --> Model --> View
                                    [5]. Diagram for MVC

Revision as of 01:43, 7 October 2010

Web Frameworks in Object Oriented Languages

An Introduction To Web Frameworks

We, like many others, came to this topic with merely a fuzzy notion of what constitutes a “web framework.” We were not alone. We are confident a framework is not a language with which to write a web site, or a tool to help generate website content. Combing a number of comments from [1], we offer the following:

“A framework is a supplementary, extendable and tested layer built atop a programming language. It implements common design patterns (oft recurring procedures) thereby allowing programmers to focus on higher-level tasks.”

The balance of this page explores some common, and not so common instantiations of this concept.The advantage of web frameworks is that the developer does not have to handle the low level details like protocols, sockets or process and thread management. Frameworks primarily provide libraries for database access, templates for frameworks and also session management. They also focus on code reuse.


Previously, web frameworks were mostly server side technology. But nowadays, with the introduction of interrelated web developement techniques like AJAX, web frameworks have increased their domain to the client side development also. As an example of this new trend, web frameworks can now use the browser at the client side as a full blown execution environment.

Web Framework Architecture:

Before we move on to the web frameworks in different languages, it is imperative for us to understand the basic structure of a web framework.

The Model-View-Controller Architecture

The MVC architecture is a way of demodulizing an application or a part of its interface into three constituent parts

The Model

To manage information and notify the observers when that information changes. As such, a model can contain only data and functionality that are related. So two unrelated groups of data and functionality need two different models

The View

Typically deals with how the user will be able to see the output. A view attaches itself to the model and renders its contents to the display surface. Changes in the model will automatically be incorporated and displayed in the views

The Controller

Mainly responsible for mapping user end action to the application response. It typically accepts input from the user and instructs the model and the views to perform actions based on that action

        Input --> Processing --> Output
        Controller --> Model --> View
                                    [5]. Diagram for MVC