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.
Web template system Caching Web caching is the
caching of
web documents in order to reduce
bandwidth usage,
server load, and perceived "
lag". 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 to identify the users of the application, and restrict access to functions based on some defined criteria.
Drupal 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 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 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 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. and
database migration tools. 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 applications, 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, 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 (ROA) infrastructure for building collections of resources in a sort of
Semantic Web ontology, based on concepts from
Resource Description Framework (RDF). ==See also==