Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Dynamic web page

From Wikipedia, the free encyclopedia
Type of web page
Dynamic web page: example of server-side scripting (PHP andMySQL).

Adynamic web page is aweb page constructed at runtime (duringsoftware execution), as opposed to astatic web page, delivered as it is stored.

Aserver-side dynamic web page is aweb page whose construction is controlled by anapplication server processing server-side scripts.[1] Inserver-side scripting,parameters determine how the assembly of every newweb page proceeds, and including the setting up of more client-side processing.

Aclient-side dynamic web page processes the web page usingJavaScript running in the browser as it loads. JavaScript can interact with the page viaDocument Object Model (DOM), to query page state and modify it. Even though a web page can be dynamic on the client-side, it can still be hosted on a statichosting service such asGitHub Pages orAmazon S3 as long as there is not any server-side code included.

A dynamic web page is then reloaded by the user or by acomputer program to change some variable content. The updating information could come from the server, or from changes made to that page's DOM. This may or may not truncate thebrowsing history or create a saved version to go back to, but adynamic web page update usingAJAX technologies will neither create a page to go back to, nor truncate the web browsing history forward of the displayed page. Using AJAX, the enduser gets one dynamic page managed as a single page in theweb browser while the actualweb content rendered on that page can vary. The AJAX engine sits only on the browser requesting parts of its DOM,the DOM, for its client, from an application server. A particular application server could offer a standardizedREST style interface to offer services to the web application.[2]

DHTML is the umbrella term for technologies and methods used to create web pages that are notstatic web pages, though it has fallen out of common use since the popularization of AJAX, a term which is now itself rarely used. Client-side-scripting, server-side scripting, or a combination of these make for the dynamic web experience in a browser.

Basic concepts

[edit]

Classicalhypertext navigation, withHTML orXHTML alone, provides "static" content, meaning that the user requests a web page and simply views the page and the information on that page.

However, a web page can also provide a "live", "dynamic", or "interactive" user experience. Content (text, images, form fields, etc.) on aweb page can change, in response to different contexts or conditions.

There are two ways to create this kind of effect:

  • Using client-side scripting to change interface behaviorswithin a specificweb page, in response to mouse or keyboard actions, data received from aweb API,websocket or at specified timing events. In this case the dynamic behavior occurs within thepresentation.
  • Usingserver-side scripting to change the supplied page source codebetween pages, adjusting the sequence or reload of theweb pages orweb content supplied to the browser. Server responses may be determined by such conditions as data in a postedHTML form, parameters in theURL, the type of browser being used, the passage of time, or a database or serverstate.[3]

Web pages that use client-side scripting must use presentation technology broadly calledrich interfaced pages.Client-sidescripting languages likeJavaScript orActionScript, used forDynamic HTML (DHTML) andFlash technologies respectively, are frequently used to orchestrate media types (sound, animations, changing text, etc.) of the presentation. The scripting also allows use ofremote scripting, a technique by which the DHTML page requests additional information from a server, using ahidden Frame,XMLHttpRequests, or aweb service. It is also possible to use aweb framework to create aweb API, which the client, via the use of JavaScript, uses to obtain data and alter its appearance or behavior dynamically depending on the data.

Web pages that use server-side scripting are often created with the help ofserver-side languages such asPHP,Perl,ASP,JSP,ColdFusion and other languages. These server-side languages typically use theCommon Gateway Interface (CGI) to producedynamic web pages. These kinds of pages can also use, on the client-side, the first kind (DHTML, etc.).

History

[edit]

It is difficult to be precise about "dynamic web page beginnings" or chronology because the precise concept makes sense only after the "widespread development of web pages".HTTP has existed since 1989,HTML, publicly standardized since 1996. The web browser's rise in popularity started withMosaic in 1993. Between 1995 and 1996, multiple dynamic web products were introduced to the market, includingColdfusion,WebObjects,PHP, andActive Server Pages.

The introduction of JavaScript (then known as LiveScript) enabled the production of client-side dynamic web pages, with JavaScript code executed in the client's browser.[4] The letter "J" in the termAJAX originally indicated the use of JavaScript, as well asXML. With the rise of server side JavaScript processing, for example,Node.js, originally developed in 2009, JavaScript is also used to dynamically create pages on the server that are sent fully formed to clients.

MediaWiki, thecontent management system that powers Wikipedia, is an example for an originally server-side dynamic web page, interacted with through form submissions and URL parameters. Throughout time,progressively enhancing extensions such as thevisual editor have also added elements that are dynamic on the client side, while the original dynamic server-side elements such as the classic edit form remain available to be fallen back on (graceful degradation) in case of error or incompatibility.

Server-side scripting

[edit]
Main article:Server-side scripting
There are four steps in the client-server ecosystem: the browser, the HTTP request, the web server, and the response. Server-side scripting occurs when a dynamic web page or resource is processed and generated by the web server.
When a request to a dynamic web page or resource is made, theapplication server processes the request using its server-side language.

A program running on aweb server is used to generate the web content on various web pages, manage user sessions, and control workflow. Server responses may be determined by such conditions as data in a postedHTML form, parameters in theURL, the type of browser being used, the passage of time, or a database or serverstate.

Such web pages are often created with the help ofserver-side languages such asASP,ColdFusion,Java,JavaScript,Perl,PHP,Ruby,Python, and other languages, by asupport server that can run on the same hardware as the web server. These server-side languages often use theCommon Gateway Interface (CGI) to produce dynamic web pages. Two notable exceptions areASP.NET, andJSP, which reuse CGI concepts in their APIs but actually dispatch all web requests into a shared virtual machine.

The server-side languages are used to embed tags or markers within the source file of the web page on the web server.[5] When a user on a client computer requests that web page, the web server interprets these tags or markers to perform actions on the server. For example, the server may be instructed to insert information from a database or information such as the current date.

Dynamic web pages are oftencached when there are few or no changes expected and the page is anticipated to receive considerable amount of web traffic that would wastefully strain the server and slow down page loading if it had to generate the pages on the fly for each request.

Client-side scripting

[edit]

Client-side scripting is changing interface behaviors within a specific web page in response to input device actions, or at specified timing events. In this case, the dynamic behavior occurs within thepresentation. The client-side content is generated on the user's local computer system.[6]

Such web pages use presentation technology calledrich interfaced pages. Client-side scripting languages likeJavaScript orActionScript, used forDynamic HTML (DHTML) andFlash technologies respectively, are frequently used to orchestrate media types (sound, animations, changing text, etc.) of the presentation. Client-side scripting also allows the use ofremote scripting, a technique by which the DHTML page requests additional information from a server, using ahidden frame,XMLHttpRequests, or aWeb service.

The first public use of JavaScript was in 1995, when the language was implemented inNetscape Navigator 2, standardized asECMAScript two years later.[7]

Example

The client-side content is generated on the client's computer. The web browser retrieves a page from the server, then processes the code embedded in the page (typically written inJavaScript) and displays the retrieved page's content to the user.[8]

TheinnerHTML property (or write command) can illustrate the client-side dynamic page generation: two distinct pages, A and B, can be regenerated (by an "event response dynamic") asdocument.innerHTML = A anddocument.innerHTML = B; or "on load dynamic" bydocument.write(A) anddocument.write(B).

Combination technologies

[edit]

All of the client and server components that collectively build a dynamic web page are called aweb application. Web applications manage user interactions, state, security, and performance.[9]

Ajax uses a combination of both client-side scripting and server-side requests. It is a web application development technique for dynamically interchanging content, and it sends requests to the server for data in order to do so. The server returns the requested data which is then processed by a client-side script. This technique can reduce server load time because the client does not request the entire webpage to be regenerated by the server's language parser; only the content that will change is transmitted.Google Maps is an example of a web application that uses Ajax techniques.

Aweb client, such as a web browser, can act as its own server, accessing data from many different servers, such as Gopher, FTP, NNTP (Usenet) and HTTP, to build a page.HTTP supports uploading documents from the client back to the server. There are severalHTTP methods for doing this.

See also

[edit]

References

[edit]
  1. ^DeGroote, Sandy."Subject and Course Guides: Digital UIC: Static and Dynamic Websites".researchguides.uic.edu. Retrieved2023-12-12.
  2. ^Fielding, Roy Thomas (2000)."Chapter 5: Representational State Transfer (REST)".Architectural Styles and the Design of Network-based Software Architectures (Ph.D.). University of California, Irvine.
  3. ^Nelson, Anne; Nelson, William H. M. (2002).Building Electronic Commerce with Web Database Constructions. Addison Wesley.ISBN 9780201741308.
  4. ^Benson, Brent W. (1999)."JavaScript".ACM SIGPLAN Notices.34 (4):25–27.doi:10.1145/312009.312023.S2CID 10076062..
  5. ^Tatroe, Kevin (2013).Programming PHP: Creating Dynamic Web Pages (3 ed.). O'Reilly.ISBN 9781449365837.
  6. ^Doyle, Barry; Lopes, Cristina Videira (17 January 2008). "Survey of Technologies for Web Application Development".arXiv:0801.2618 [cs.SE].
  7. ^Okin, J. R. (2005).The Information Revolution: The Not-for-dummies Guide to the History, Technology, and Use of the World Wide Web. Ironbound Press.ISBN 9780976385745.
  8. ^"Learning VBScript", P. Lomax.ISBN 1-56592-247-6. Ed. O'Reilly, 1997. sec. C13.
  9. ^"Web application". Archived from the original on 22 February 2014. Retrieved24 July 2013.{{cite web}}: CS1 maint: bot: original URL status unknown (link)

External links

[edit]
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=Dynamic_web_page&oldid=1297827696"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp