Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Web framework

From Wikipedia, the free encyclopedia
(Redirected fromJavaScript framework)
Software framework to support the development of websites

Aweb framework (WF) orweb application framework (WAF) is asoftware framework that is designed to support the development ofweb applications including web services,web resources, andweb APIs. Web frameworks provide a standard way to build and deploy web applications on theWorld Wide Web. Web frameworks aim to automate the overhead associated with common activities performed inweb development. For example, many web frameworks providelibraries fordatabase access,templating frameworks, andsession management, and they often promotecode reuse.[1] Although they often target development ofdynamic web sites, they are also applicable tostatic websites.[2]

History

[edit]
Further information:Rich web application

As the design of theWorld Wide Web was not inherently dynamic, earlyhypertext consisted of hand-codedHTML text files that were published onweb servers. Any modifications to published pages needed to be performed by the pages' author. In 1993, theCommon Gateway Interface (CGI) standard was introduced for interfacing external applications with web servers, to provide adynamic web page that reflected user inputs.[3]

Original implementations of the CGI interface typically had adverse effects on the server load however, because each request started a separateprocess.[4] More recent implementations utilize persistent processes amongst other techniques to reduce the footprint in the server's resources and offer a general performance boost.[citation needed]

In 1995, fully integrated server/language development environments first emerged and new web-specific languages were introduced, such asColdFusion,PHP, andActive Server Pages.[citation needed]

Although the vast majority of languages for creating dynamic web pages havelibraries to help with common tasks, web applications often require specific libraries for particular tasks, such as creatingHTML (for example,Jakarta Faces).[citation needed]

In the late 1990s, mature, "full stack" frameworks began to appear, that often gathered multiple libraries useful forweb development into a single cohesivesoftware stack for web developers to use.[citation needed]

Types of framework architectures

[edit]

Most web frameworks are based on themodel–view–controller (MVC)pattern.[citation needed]

Model–view–controller (MVC)

[edit]
Main article:Model–view–controller

Many frameworks follow the MVCarchitectural pattern to separate thedata model intobusiness rules (the "controller") and theuser interface (the "view"). This is generally considered a good practice as itmodularizes code, promotescode reuse, and allows multiple interfaces to be applied. In web applications, this permits different views to be presented, for example serving differentweb pages for mobile vs. desktop browsers, or providing machine-readableweb service interfaces.

Push-based vs. pull-based

[edit]

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.[5] 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.

Three-tier organization

[edit]

Inthree-tier organization, applications are structured around three physical tiers: client, application, and database.[6][7][8][9] The database is normally anRDBMS. The application contains the business logic, running on a server and communicates with the client usingHTTP.[10] The client on web applications is a web browser that runs HTML generated by the application layer.[11][12] 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".[13][14]

Framework applications

[edit]

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 ascontent management systems (CMS), some mobile development tools and some portal tools.[15]

General-purpose website frameworks

[edit]

Web frameworks must function according to the architectural rules of browsers andprotocols such asHTTP, which isstateless. Webpages are served up by aserver and can then be modified by the browser usingJavaScript. Either approach has its advantages and disadvantages.[citation needed]

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.[16] Applications which make heavy use of JavaScript and only refresh parts of the page, are calledsingle-page applications and typically make use of a client-side JavaScript web framework to organize the code.[citation needed]

Server-side

[edit]

Client-side

[edit]
Main article:Single-page application

Examples includeBackbone.js,AngularJS,Angular,Ember.js,ReactJS,jQuery UI,Svelte, andVue.js.[17]

Capabilities and Trade-offs in Modern Frameworks

[edit]

JavaScript-based web application frameworks, such as React and Vue, provide extensive capabilities but come with associated trade-offs. These frameworks often extend or enhance features available through native web technologies, such as routing, component-based development, and state management. While native web standards, including Web Components, modern JavaScript APIs like Fetch and ES Modules, and browser capabilities like Shadow DOM, have advanced significantly, frameworks remain widely used for their ability to enhance developer productivity, offer structured patterns for large-scale applications, simplify handling edge cases, and provide tools for performance optimization.[18][19][20]

Frameworks can introduce abstraction layers that may contribute to performance overhead, larger bundle sizes, and increased complexity. Modern frameworks, such as React 18 and Vue 3, address these challenges with features like concurrent rendering, tree-shaking, and selective hydration. While these advancements improve rendering efficiency and resource management, their benefits depend on the specific application and implementation context. Lightweight frameworks, such as Svelte and Preact, take different architectural approaches, with Svelte eliminating the virtual DOM entirely in favor of compiling components to efficient JavaScript code, and Preact offering a minimal, compatible alternative to React. Framework choice depends on an application’s requirements, including the team’s expertise, performance goals, and development priorities.[18][19][20]

A newer category of web frameworks, including enhance.dev, Astro, and Fresh, leverages native web standards while minimizing abstractions and development tooling.[21][22][23] These solutions emphasizeprogressive enhancement,server-side rendering, and optimizing performance. Astro renders static HTML by default while hydrating only interactive parts. Fresh focuses on server-side rendering with zero runtime overhead. Enhance.dev prioritizes progressive enhancement patterns using Web Components. While these tools reduce reliance on client-side JavaScript by shifting logic to build-time or server-side execution, they still use JavaScript where necessary for interactivity. This approach makes them particularly suitable for performance-critical and content-focused applications.[18][19][20]

Features

[edit]

Frameworks typically set thecontrol flow of a program and allow the user of the framework to "hook into" that flow by exposing various events.[24] 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.[24] For example, some popular "microframeworks" such as Ruby'sSinatra (which inspiredExpress.js) 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.[25]

Web template system

[edit]
Main article:Web template system

Caching

[edit]
Main article:Web cache

Web caching is thecaching ofwebdocuments in order to reducebandwidth usage,serverload, 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.[citation needed]

Security

[edit]
Main article:Web application security

Some web frameworks come withauthentication andauthorization frameworks, that enable theweb 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.[citation needed]

Database access, mapping and configuration

[edit]

Many web frameworks create a unifiedAPI 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, someobject-oriented frameworks contain mapping tools to provideobject-relational mapping, which mapsobjects totuples.[26]

Some frameworks minimize web application configuration through the use ofintrospection and/or following well-known conventions. For example, many Java frameworks useHibernate 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 asRuby on Rails can also work in reverse, that is, define properties of model objects at runtime based on a database schema.[26]

Other features web frameworks may provide includetransactional support[27] anddatabase migration tools.[26]

URL mapping

[edit]
See also:Front controller andURL redirection

A framework'sURL 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 usingregular expressions, while some others userewriting techniques to translate the provided URL into one that the underlying engine will recognize. Another technique is that ofgraph traversal such as used byZope, where a URL is decomposed in steps that traverse an object graph (of models and views).[citation needed]

A URL mapping system that uses pattern matching or rewriting to route and handle requests allows forshorter more "friendly URLs" 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".[citation needed]

AJAX

[edit]
Main article:Ajax framework

Ajax, shorthand for "AsynchronousJavaScript andXML", 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, andusability.[28]

Due to the complexity of Ajax programming in JavaScript, there are numerousAjax frameworks that exclusively deal with Ajax support. Some Ajax frameworks are even embedded as a part of larger frameworks. For example, thejQueryJavaScript library is included in Ruby on Rails.[citation needed]

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 wasMorfik followed byGoogle Web Toolkit, with ports to Python and Ruby in the form ofPyjs 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.[citation needed]

Web services

[edit]
Main article:Web service

Some frameworks provide tools for creating and providing web services. These utilities may offer similar tools as the rest of the web application.[29]

Web resources

[edit]
Main article:Web resource

A number of newerWeb 2.0RESTful frameworks are now providingresource-oriented architecture (ROA) infrastructure for building collections of resources in a sort ofSemantic Webontology, based on concepts fromResource Description Framework (RDF).[citation needed]

See also

[edit]

References

[edit]
  1. ^Multiple (wiki)."Web application framework".Docforge. Archived fromthe original on 2015-07-23.
  2. ^"Top Open-Source Static Site Generators".StaticGen.
  3. ^"CGI: Common Gateway Interface". Archived fromthe original on 2009-04-09.
  4. ^"CGI".www.ibm.com. Retrieved2021-05-07.
  5. ^Thomson, Kris (2003-10-29)."Clarification on MVC= Pull and MVC Push". Retrieved2007-07-29.
  6. ^Microsoft."Three-tiered distribution". Retrieved2011-09-19.
  7. ^Oracle."clustering_concepts_10en"(PDF). Retrieved2011-09-19.
  8. ^Robert R. Perkoski."Introduction to Web Development". Archived fromthe original on 2013-11-07.
  9. ^IBM."Using Client Access Express in a three tier environment". Retrieved2011-09-19.
  10. ^Oracle."Understanding the Three-Tier Architecture". Retrieved2011-09-19.
  11. ^Microsoft."Pragmatic Architecture: Layering". Retrieved2011-09-19.
  12. ^Arokia."3-Tier Web Architecture". Retrieved2011-09-19.
  13. ^"ASP.NET MVC Controller Best Practices". Archived fromthe original on 2011-10-11. Retrieved2011-09-19.
  14. ^Jamis Buck."Skinny Controller, Fat Model". Archived fromthe original on 2015-05-16.
  15. ^"Getting Started With Web Frameworks".Wired Magazine. Retrieved2018-04-02.
  16. ^KLIMUSHYN, Mel (6 April 2015)."Web Application Architecture – Client-Side vs. Server-Side".Atomic Spin. Retrieved2016-03-06.
  17. ^"AngularJS vs. Backbone.js vs. Ember.js".www.airpair.com. Retrieved2016-06-04.
  18. ^abcUzayr, Sufyan bin; Cloud, Nicholas; Ambler, Tim (November 2019).JavaScript Frameworks for Modern Web Development: The Essential Frameworks, Libraries, and Tools to Learn Right Now. Apress.ISBN 978-1484249949.
  19. ^abcRojas, Carlos (13 November 2020).Building Native Web Components: Front-End Development with Polymer and Vue.js. Apress.ISBN 978-1484259047.
  20. ^abcHands-On JavaScript High Performance: Build faster web apps using Node.js, Svelte.js, and WebAssembly.ISBN 978-1838821098.
  21. ^"Enhance".GitHub.
  22. ^"Astro framework".GitHub.
  23. ^"Fresh".GitHub.
  24. ^abFowler, Martin."bliki: InversionOfControl".martinfowler.com. Retrieved2016-03-06.
  25. ^Xue, Qiang."Capital One Engineering – Philosophies that Shaped Successful Frameworks".www.capitalone.io. Retrieved2016-03-06.
  26. ^abc"Active Record Basics".Ruby on Rails. RetrievedMarch 20, 2021.Object Relational Mapping, commonly referred to as its abbreviation ORM, is a technique that connects the rich objects of an application to tables in a relational database management system...Active Record automatically creates methods to allow an application to read and manipulate data stored within its tables.
  27. ^"Active Record Transactions".Ruby on Rails. RetrievedMarch 20, 2021.
  28. ^"What is AJAX".www.dlsweb.rmit.edu.au. Retrieved2021-05-07.
  29. ^Maximilien, E. M. (2006). "Tutorial 4: Web Services on Rails: Using Ruby and Rails for Web Services Development and Mashups".2006 IEEE International Conference on Web Services (ICWS'06). pp. xliii.doi:10.1109/ICWS.2006.139.ISBN 0-7695-2669-1.
.NET
C++
ColdFusion
Common Lisp
Haskell
Java
JavaScript
Perl
PHP
Python
Ruby
Rust
Scala
Smalltalk
Other languages
Protocols
Server APIs
Apache modules
Topics
Browser APIs
Web APIs
WHATWG
W3C
Khronos
Others
Topics
Related topics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Web_framework&oldid=1300797229"
Category:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp