A web framework (WF) or web application framework (WAF) is a
software framework
In computer programming, a software framework is an abstraction in which software, providing generic functionality, can be selectively changed by additional user-written code, thus providing application-specific software. It provides a standard ...
that is designed to support the development of
web application
A web application (or web app) is application software that is accessed using a web browser. Web applications are delivered on the World Wide Web to users with an active network connection.
History
In earlier computing models like client-serve ...
s including web services,
web resource
A web resource is any identifiable resource (digital, physical, or abstract) present on or connected to the World Wide Web.[< ...](_blank)
s, and web
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
s. Web frameworks provide a standard way to build and deploy web applications on the
World Wide Web
The World Wide Web (WWW), commonly known as the Web, is an information system enabling documents and other web resources to be accessed over the Internet.
Documents and downloadable media are made available to the network through web se ...
. Web frameworks aim to automate the overhead associated with common activities performed in
web development
Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications ...
. For example, many web frameworks provide
libraries
A library is a collection of materials, books or media that are accessible for use and not just for display purposes. A library provides physical (hard copies) or digital access (soft copies) materials, and may be a physical location or a vir ...
for
database
In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases sp ...
access,
templating frameworks, and
session management, and they often promote
code reuse
In software development (and computer programming in general), code reuse, also called software reuse, is the use of existing software, or software knowledge, to build new software, following the reusability principles.
Code reuse may be achiev ...
. Although they often target development of
dynamic web sites, they are also applicable to
static websites.
History
As the design of the
World Wide Web
The World Wide Web (WWW), commonly known as the Web, is an information system enabling documents and other web resources to be accessed over the Internet.
Documents and downloadable media are made available to the network through web se ...
was not inherently dynamic, early
hypertext
Hypertext is E-text, text displayed on a computer display or other electronic devices with references (hyperlinks) to other text that the reader can immediately access. Hypertext documents are interconnected by hyperlinks, which are typi ...
consisted of hand-coded
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
text files that were published on
web servers. Any modifications to published pages needed to be performed by the pages' author. In 1993, the
Common Gateway Interface (CGI) standard was introduced for interfacing external applications with web servers, to provide a
dynamic web page that reflected user inputs.
Original implementations of the CGI interface typically had adverse effects on the server load however, because each request started a separate
process. More recent implementations utilize persistent processes amongst other techniques to reduce the footprint in the server's resources and offer a general performance boost.
In 1995, fully integrated server/language development environments first emerged and new web-specific languages were introduced, such as
ColdFusion
Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. (The programming language used with that platform is also commonly called ColdFusion, though is more accurately known as CF ...
,
PHP, and
Active Server Pages.
Although the vast majority of languages for creating dynamic web pages have
libraries to help with common tasks, web applications often require specific libraries for particular tasks, such as creating
HTML
The HyperText Markup Language or HTML is the standard markup language for documents designed to be displayed in a web browser. It can be assisted by technologies such as Cascading Style Sheets (CSS) and scripting languages such as JavaScri ...
(for example,
Jakarta Server Faces).
In the late 1990s, mature, "full stack" frameworks began to appear, that often gathered multiple libraries useful for
web development
Web development is the work involved in developing a website for the Internet (World Wide Web) or an intranet (a private network). Web development can range from developing a simple single static page of plain text to complex web applications ...
into a single cohesive
software stack for web developers to use. Examples of this include
ASP.NET
ASP.NET is an open-source, server-side web-application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, applications and services. The name stan ...
,
Java EE,
WebObjects,
web2py,
OpenACS,
Catalyst,
Mojolicious,
Ruby on Rails,
Laravel,
Grails,
Django,
Zend Framework
Laminas Project (formerly Zend Framework or ZF) is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packag ...
,
Sails.js
Sails.js (or Sails) is a model–view–controller (MVC) web application framework developed atop the Node.js environment, released as free and open-source software under the MIT License. It is designed to make it easy to build custom, enterpris ...
,
Yii
Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or i:and in Chinese it means "simple and evolutionary" and it can be an acronym for "Yes It Is!".
History
Yii started ...
,
CakePHP, and
Symfony
Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT license.
Goal
Symfony aims to speed up the creati ...
.
Types of framework architectures
Most web frameworks are based on the
model–view–controller
Model–view–controller (MVC) is a software architectural pattern commonly used for developing user interfaces that divide the related program logic into three interconnected elements. This is done to separate internal representations of infor ...
(MVC)
pattern.
Model–view–controller (MVC)
Many frameworks follow the MVC
architectural pattern
An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. The architectural patterns address various issues in software engineering, such as computer hardware perform ...
to separate the
data model into
business rules (the "controller") and the
user interface (the "view"). This is generally considered a good practice as it
modularizes code, promotes
code reuse
In software development (and computer programming in general), code reuse, also called software reuse, is the use of existing software, or software knowledge, to build new software, following the reusability principles.
Code reuse may be achiev ...
, and allows multiple interfaces to be applied. In web applications, this permits different views to be presented, for example serving different
web pages for mobile vs. desktop browsers, or providing machine-readable
web service interfaces.
Push-based vs. pull-based
Most MVC frameworks follow a push-based architecture also called "action-based". These frameworks use actions that do the required processing, and then "push" the data to the view layer to render the results.
Django,
Ruby on Rails,
Symfony
Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT license.
Goal
Symfony aims to speed up the creati ...
,
Spring MVC
Spring(s) may refer to:
Common uses
* Spring (season), a season of the year
* Spring (device), a mechanical device that stores energy
* Spring (hydrology), a natural source of water
* Spring (mathematics), a geometric surface in the shape of a he ...
,
Stripes,
Sails.js
Sails.js (or Sails) is a model–view–controller (MVC) web application framework developed atop the Node.js environment, released as free and open-source software under the MIT License. It is designed to make it easy to build custom, enterpris ...
,
CodeIgniter
CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP.
Popularity
CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller c ...
are good examples of this architecture. An alternative to this is pull-based architecture, sometimes also called "component-based". These frameworks start with the view layer, which can then "pull" results from multiple controllers as needed. In this architecture, multiple controllers can be involved with a single view.
Lift,
Tapestry,
JBoss Seam,
Jakarta Server Faces, and
Wicket are examples of pull-based architectures.
Play,
Struts, RIFE, and
ZK have support for both push- and pull-based application controller calls.
Three-tier organization
In
three-tier organization, applications are structured around three physical tiers: client, application, and database. The database is normally an
RDBMS
A relational database is a (most commonly digital) database based on the relational model of data, as proposed by E. F. Codd in 1970. A system used to maintain relational databases is a relational database management system (RDBMS). Many relation ...
. The application contains the business logic, running on a server and communicates with the client using
HTTP. The client on web applications is a web browser that runs HTML generated by the application layer. The term should not be confused with MVC, where, unlike in three-tier architecture, it is considered a good practice to keep business logic away from the controller, the "middle layer".
Framework applications
Frameworks are built to support the construction of internet applications based on a single programming language, ranging in focus from general purpose tools such as Zend Framework and Ruby on Rails, which augment the capabilities of a specific language, to native-language programmable packages built around a specific user application, such as
content management system
A content management system (CMS) is computer software used to manage the creation and modification of digital content (content management).''Managing Enterprise Content: A Unified Content Strategy''. Ann Rockley, Pamela Kostur, Steve Manning. New ...
s, some mobile development tools and some portal tools.
General-purpose website frameworks
Web frameworks must function according to the architectural rules of browsers and
protocols such as
HTTP, which is
stateless. Webpages are served up by a
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
and can then be modified by the browser using
JavaScript. Either approach has its advantages and disadvantages.
Server-side page changes typically require that the page be refreshed, but allow any language to be used and more computing power to be utilized. Client-side changes allow the page to be updated in small chunks which feels like a desktop application, but are limited to JavaScript and run in the user's browser, which may have limited computing power. Some mix of the two is typically used. Applications which make heavy use of JavaScript and only refresh parts of the page, are called
single-page application
A single-page application (SPA) is a web application or website that interacts with the user by dynamically rewriting the current web page with new data from the web server, instead of the default method of a web browser loading entire new pages. ...
s and typically make use of a client-side JavaScript web framework to organize the code.
Server-side
*
Apache Wicket
*
ASP.NET Core
ASP.NET Core is a free and open-source web framework and successor to ASP.NET, developed by Microsoft. It is a modular framework that runs on both the full .NET Framework, on Windows, and the cross-platform .NET. However, ASP.NET Core version 3 on ...
*
CakePHP
*
Catalyst
*
CodeIgniter
CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP.
Popularity
CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller c ...
*
CppCMS
CppCMS is an open-source web application framework for the C++ programming language developed by Artyom Beilis. The primary goal of CppCMS is building performance-demanding web applications. It may also be used for embedded web applications for ...
*
Django
*
Flask
*
Jam.py
*
Yii
Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or i:and in Chinese it means "simple and evolutionary" and it can be an acronym for "Yes It Is!".
History
Yii started ...
*
Laravel
*
Mojolicious
*
Ruby on Rails
*
Sails.js
Sails.js (or Sails) is a model–view–controller (MVC) web application framework developed atop the Node.js environment, released as free and open-source software under the MIT License. It is designed to make it easy to build custom, enterpris ...
*
Symfony
Symfony is a free and open-source PHP web application framework and a set of reusable PHP component libraries. It was published as free software on October 18, 2005, and released under the MIT license.
Goal
Symfony aims to speed up the creati ...
*
Spring MVC
Spring(s) may refer to:
Common uses
* Spring (season), a season of the year
* Spring (device), a mechanical device that stores energy
* Spring (hydrology), a natural source of water
* Spring (mathematics), a geometric surface in the shape of a he ...
*
Wt (web toolkit)
Wt (pronounced ''"witty"'') is an open-source widget-centric web framework for the C++ programming language. It has an API resembling that of Qt framework (although it was developed with Boost, and is incompatible when mixed with Qt), also usin ...
*
Zend Framework
Laminas Project (formerly Zend Framework or ZF) is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packag ...
Client-side
Examples include
Backbone.js
Backbone.js is a JavaScript rich-client web app framework based on the model–view–controller design paradigm, intended to connect to an API over a RESTful JSON interface. Backbone is known for being lightweight, as its only hard dependency i ...
,
AngularJS
AngularJS is a discontinued free and open-source JavaScript-based web framework for developing single-page applications. It was maintained mainly by Google and a community of individuals and corporations. It aimed to simplify both the development ...
,
Angular,
EmberJS
Ember.js is an open-source JavaScript web framework that utilizes a component-service pattern. It allows developers to create scalable single-page web applications by incorporating common idioms, best practices, and patterns from other single-p ...
,
ReactJS,
jQuery UI,
Svelte
Svelte is a free and open-source front end component framework or language created by Rich Harris and maintained by the Svelte core team members. Svelte is not a monolithic JavaScript library imported by applications: instead, Svelte compiles H ...
, and
Vue.js.
Discussion forums, wikis and weblogs
*WikiBase/
WikiWikiWeb
Features
Frameworks typically set the
control flow of a program and allow the user of the framework to "hook into" that flow by exposing various events.
This "
inversion of control" design pattern is considered to be a defining principle of a framework, and benefits the code by enforcing a common flow for a team which everyone can customize in similar ways.
For example, some popular "microframeworks" such as Ruby's
Sinatra (which inspired
Express.js
Express.js, or simply Express, is a back end web application framework for building RESTful APIs with Node.js, released as free and open-source software under the MIT License. It is designed for building web applications and APIs. It has been ...
) allow for "middleware" hooks prior to and after HTTP requests. These middleware functions can be anything, and allow the user to define logging, authentication and session management, and redirecting.
Web template system
Caching
Web caching is the
caching
In computing, a cache ( ) is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewher ...
of
web
Web most often refers to:
* Spider web, a silken structure created by the animal
* World Wide Web or the Web, an Internet-based hypertext system
Web, WEB, or the Web may also refer to:
Computing
* WEB, a literate programming system created by ...
documents
A document is a writing, written, drawing, drawn, presented, or memorialized representation of thought, often the manifestation of nonfiction, non-fictional, as well as fictional, content. The word originates from the Latin ''Documentum'', w ...
in order to reduce
bandwidth usage,
server
Server may refer to:
Computing
*Server (computing), a computer program or a device that provides functionality for other programs or devices, called clients
Role
* Waiting staff, those who work at a restaurant or a bar attending customers and su ...
load
Load or LOAD may refer to:
Aeronautics and transportation
*Load factor (aeronautics), the ratio of the lift of an aircraft to its weight
*Passenger load factor, the ratio of revenue passenger miles to available seat miles of a particular transpo ...
, and perceived "
lag
Lag, or similar, may refer to:
Lag
* Łąg, Poland
* Lag (company), a French guitar maker
* Lag (cue sports), a brief pre-game competition to determine which player will go first
* Latency (engineering), a slower response time in computing, commu ...
". A web cache stores copies of documents passing through it; subsequent requests may be satisfied from the cache if certain conditions are met. Some application frameworks provide mechanisms for caching documents and bypassing various stages of the page's preparation, such as database access or template interpretation.
Security
Some web frameworks come with
authentication and
authorization frameworks, that enable the
web server
A web server is computer software and underlying hardware that accepts requests via HTTP (the network protocol created to distribute web content) or its secure variant HTTPS. A user agent, commonly a web browser or web crawler, initiate ...
to identify the users of the application, and restrict access to functions based on some defined criteria.
Drupal
Drupal () is a free and open-source web content management system (CMS) written in PHP and distributed under the GNU General Public License. Drupal provides an open-source back-end framework for at least 14% of the top 10,000 websites worldwide ...
is one example that provides role-based access to pages, and provides a web-based interface for creating users and assigning them roles.
Database access, mapping and configuration
Many web frameworks create a unified
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
to a database backend, enabling web applications to work with a variety of databases with no code changes, and allowing programmers to work with higher-level concepts. Additionally, some
object-oriented frameworks contain mapping tools to provide
object-relational mapping, which maps
objects
Object may refer to:
General meanings
* Object (philosophy), a thing, being, or concept
** Object (abstract), an object which does not exist at any particular time or place
** Physical object, an identifiable collection of matter
* Goal, an ...
to
tuples.
Some frameworks minimize web application configuration through the use of
introspection and/or following well-known conventions. For example, many Java frameworks use
Hibernate
Hibernation is a state of minimal activity and metabolic depression undergone by some animal species. Hibernation is a seasonal heterothermy characterized by low body-temperature, slow breathing and heart-rate, and low metabolic rate. It most ...
as a persistence layer, which can generate a database schema at runtime capable of persisting the necessary information. This allows the application designer to design business objects without needing to explicitly define a database schema. Frameworks such as
Ruby on Rails can also work in reverse, that is, define properties of model objects at runtime based on a database schema.
Other features web frameworks may provide include
transactional support and
database migration tools.
URL mapping
A framework's
URL
A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identifie ...
mapping or routing facility is the mechanism by which the framework interprets URLs. Some frameworks, such as Drupal and Django, match the provided URL against pre-determined patterns using
regular expressions, while some others use
rewriting
In mathematics, computer science, and logic, rewriting covers a wide range of methods of replacing subterms of a well-formed formula, formula with other terms. Such methods may be achieved by rewriting systems (also known as rewrite systems, rewr ...
techniques to translate the provided URL into one that the underlying engine will recognize. Another technique is that of
graph traversal such as used by
Zope, where a URL is decomposed in steps that traverse an object graph (of models and views).
A URL mapping system that uses pattern matching or rewriting to route and handle requests allows for
shorter more "
friendly URL
Clean URLs, also sometimes referred to as RESTful URLs, user-friendly URLs, pretty URLs or search engine-friendly URLs, are URLs intended to improve the usability and accessibility of a website or web service by being immediately and intuitivel ...
s" to be used, increasing the simplicity of the site and allowing for better indexing by search engines. For example, a URL that ends with "/page.cgi?cat=science&topic=physics" could be changed to simply "/page/science/physics". This makes the URL easier for people to remember, read and write, and provides search engines with better information about the structural layout of the site. A graph traversal approach also tends to result in the creation of friendly URLs. A shorter URL such as "/page/science" tends to exist by default as that is simply a shorter form of the longer traversal to "/page/science/physics".
AJAX
Ajax, shorthand for "''
Asynchronous
Asynchrony is the state of not being in synchronization.
Asynchrony or asynchronous may refer to:
Electronics and computing
* Asynchrony (computer programming), the occurrence of events independent of the main program flow, and ways to deal with ...
JavaScript and
XML''", is a web development technique for creating web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change. This is intended to increase a web page's interactivity, speed, maintainability, and
usability
Usability can be described as the capacity of a system to provide a condition for its users to perform the tasks safely, effectively, and efficiently while enjoying the experience. In software engineering, usability is the degree to which a soft ...
.
Due to the complexity of Ajax programming in JavaScript, there are numerous
Ajax frameworks that exclusively deal with Ajax support. Some Ajax frameworks are even embedded as a part of larger frameworks. For example, the
jQuery JavaScript library is included in Ruby on Rails.
With the increased interest in developing "
Web 2.0"
rich web application
A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
s, the complexity of programming directly in Ajax and JavaScript has become so apparent that compiler technology has stepped in, to allow developers to code in high-level languages such as Java, Python and Ruby. The first of these compilers was
Morfik followed by
Google Web Toolkit
Google Web Toolkit (GWT ), or GWT Web Toolkit, is an open-source set of tools that allows web developers to create and maintain JavaScript front-end applications in Java. It is licensed under the Apache License 2.0.
GWT emphasizes reusable ...
, with ports to Python and Ruby in the form of
Pyjs and RubyJS following some time after. These compilers and their associated widget set libraries make the development of rich media Ajax applications much more akin to that of developing desktop applications.
Web services
Some frameworks provide tools for creating and providing web services. These utilities may offer similar tools as the rest of the web application.
Web resources
A number of newer
Web 2.0 RESTful frameworks are now providing
resource-oriented architecture In software engineering, a resource-oriented architecture (ROA) is a style of software architecture and programming paradigm for supportive designing and developing software in the form of Internetworking of System resource, resources with "Represen ...
(ROA) infrastructure for building collections of resources in a sort of
Semantic Web ontology, based on concepts from
Resource Description Framework The Resource Description Framework (RDF) is a World Wide Web Consortium (W3C) standard originally designed as a data model for metadata. It has come to be used as a general method for description and exchange of graph data. RDF provides a variety of ...
(RDF).
See also
*
Comparison of JavaScript-based web frameworks (client-side)
*
Comparison of server-side web frameworks
*
Application server
An application server is a server that hosts applications or software that delivers a business application through a communication protocol.
An application server framework is a service layer model. It includes software components available to a ...
*
Application framework
*
Application security
*
Convention over configuration
*
Don't repeat yourself
"Don't repeat yourself" (DRY) is a principle of software development aimed at reducing repetition of software patterns, replacing it with abstractions or using data normalization to avoid redundancy.
The DRY principle is stated as "Every piece o ...
(DRY)
*
List of web service frameworks
*
Rich web application
A rich web application (originally called a rich Internet application, or RIA or installable Internet application) is a web application that has many of the characteristics of desktop application software. The concept is closely related to a sing ...
(obsolete)
**
List of rich web application frameworks : ''For a list of mobile only frameworks see Multiple phone web based application framework''.
Below is a list of rich web application frameworks:
{, class="wikitable sortable" style="width: auto; table-layout: fixed; text-align: center;"
, - s ...
*
Solution stack
In computing, a solution stack or software stack is a set of software subsystems or components needed to create a complete Computing platform, platform such that no additional software is needed to support applications. Applications are said to " ...
*
Mobile development framework
A mobile development framework is a software framework that is designed to support mobile app development. It is a software library that provides a fundamental structure to support the development of applications for a specific environment.
Fra ...
References
{{DEFAULTSORT:Web Framework