Java Web Learning (2): Static and Dynamic Web pages

Source: Internet
Author: User

a static web page (1) static Web page Overview

In web design, a Web page in pure HTML (an application under the standard Universal Markup Language) is often referred to as a "static page", and a static web page is

A standard HTML file whose file name extension is. htm,. html, which can contain text, images, sounds, Flash animations, client script, and ActiveX

controls, and Java applets. Static Web page is the foundation of the construction of the site, the early sites are generally made of static web pages.

static Web pages are relative to the dynamic Web pages refer to pages that have no background database, no programs, and no interactivity. Static pages are relatively newer than

more cumbersome, suitable for general updates than fewer display sites. It is easy to misunderstand that the static page is the HTM page, in fact, Static is not completely static

He can also show a variety of dynamic effects, such as animations in GIF format, FLASH, scrolling subtitles, and more.

(2) static Web page introduction

Static web pages are sometimes called flat pages. The URL form of a static web page is usually the end of HTML (Hypertext Markup Language), and the text is marked with hypertext

Languages (. htm,. html),. shtml,. XML (Extensible Markup Language), and so on. On Web pages that are in Hypertext Markup Language format, you can also appear

Various dynamic effects, such as animated, FLASH, and scrolling subtitles in. gif format, these "dynamic effects" are just visual, with the dynamic that will be described below

Web pages are different concepts. Static Web pages are usually Hypertext Markup language documents stored as files in the file system, and can be accessed through the HTTP network

Network server.

(3) Characteristics of static Web pages

1) static Web pages each page has a fixed URL, and the URL of the Web page is in. htm,. html,. shtml and other common forms as suffixes, without the "?" ;

(In Dynamic Web pages, "? "There are some problems in search engine retrieval, it is generally impossible for search engines to access all the pages from a database of a website, or

For technical reasons, search spiders do not crawl URLs "? "Later in the content)

2) Once the content of the Web page is posted on the Web server, the content of each static webpage is saved on the Web server, regardless of whether or not there is any user access.

In other words, static Web pages are real files stored on the server, each page is a separate file;

3) The content of static Web pages is relatively stable, so it is easy to be searched by search engines;

4) Static Web pages do not support the database, in the production and maintenance of the site work is large, so when the site information is very large when the full reliance on static Web page production method is more difficult;

5) The interactivity of static Web pages is poor and has a large limitation in function.

6) Page browsing speed, the process does not need to connect to the database, open the page faster than the dynamic page.

7) Reduce the burden of the server, the workload is reduced, but also reduce the cost of the database.

(4) Advantages of static Web pages

1) can be made public (that is, a copy can be proved to anyone).

2) hosting does not require any special requirements (no special intermediate software such as hypertext preprocessor, Common Gateway Interface).

3) There is no network server or application server, such as directly from the CD-ROM (laser disc-read-only memory) or USB flash drive to read content, you can

to be accessed directly through a Web browser.

4) Web site is more secure, HTML pages are not affected by ASP-related vulnerabilities, and can reduce attacks, anti-SQL injection. When a database error occurs, it does not affect

Normal site access.

(5) Disadvantages of static web pages

1) Any personalization or interaction will run on the client.

2) There is no automated tool to maintain a large number of static paging files is unrealistic.

3) Unable to fully support user/customer needs (appearance selection, browser support, cookies).
(6) The difference between static and dynamic Web pages

1) Production language of Web page production:

static Web pages use language: Hypertext Markup Language (an application of the standard Universal Markup Language).

Dynamic Web pages Use language: Hypertext Markup Language +asp or hyper-text markup Language +php or Hypertext Markup Language +jsp or Hypertext Markup Language

+asp. NET, and so on.

2) Whether the program is running on the server side is an important sign.

Programs, Web pages, and components that run on the server side are dynamic Web pages that return different pages with different customers, different times, ASP,

PHP, JSP, ASP., CGI, etc. Programs, Web pages, plug-ins, and components that run on the client, belonging to static Web pages, such as HTML pages, Flash,

JavaScript, VBScript, and so on, they are always the same.

(7) static Web pages and Dynamic Web links

1) Static and dynamic Web pages have the characteristics of the site to use Dynamic Web pages or static pages mainly depends on the site's functional requirements and the content of the site more

Less, if the site function is relatively simple, the content update is not very large, the use of pure static Web pages will be more simple, the contrary generally use dynamic web technology

To achieve. Static Web pages are relative to dynamic Web pages, which means that there are no background databases, no programs, and no interactive Web pages. Static pages are relatively up-to-date

To be more troublesome, it is suitable for display sites that are less commonly updated.

2) A static web page is a standard HTML file whose file name extension is. htm or. html, which can contain text, images, sounds, Flash animations, guest

User-side scripts and ActiveX controls and Java applets. Although the use of these objects on such web pages can make the Web page dynamic, but this page

Does not contain any scripts that run on the server side, and each line of code on the Web page is pre-written by the Web designer and placed on the Web server

, it is called a static Web page after it has been sent to the client's browser and no longer changes. Static Web page is the foundation of website Construction, static web page

and dynamic Web pages are not contradictory, in order to adapt to the search engine retrieval needs, even if the use of dynamic website technology, you can also translate the content of the Web page into

static Web Publishing. Dynamic website can also adopt the principle of static and dynamic integration, suitable for dynamic Web pages where dynamic Web pages, if necessary to use static network

page, you can consider the method of static Web pages, on the same site, dynamic Web content and static Web page content exists at the same time is very common

love.
Two Dynamic Web pages (1) Dynamic Web page Overview

Dynamic Web pages correspond to static Web pages, that is, the suffix of the page URL is not a common form of a static web page such as HTM, HTML, shtml, XML, etc.

aspx,. asp,. jsp,. PHP,. Perl,. CGI, etc., and has an iconic symbol "?" in the URL of a dynamic Web page.

(2) Dynamic Web page introduction

The so-called Dynamic Web page, refers to a static web page relative to the Web programming technology. Static Web pages, with the creation of HTML code, the content of the page and the explicit

The effect is basically unchanged unless you modify the page code. Dynamic Web pages are not, although the page code is not changed, but the content of the display

can change with the result of time, environment, or database operation.

It is worth emphasizing that you should not confuse Dynamic Web pages and page content with motion. Here is the Dynamic Web page, with various animations on the page, rolling

Animated subtitles and other visual dynamic effects are not directly related, dynamic Web pages can also be plain text content, can also contain a variety of animation content, these only

is the Web page specific content of the form, regardless of whether the Web page has dynamic effect, as long as the use of Dynamic Web site technology generated by the Web page can be called Dynamic network

page.

In short, Dynamic Web page is the basic HTML syntax specification and Java, VB, VC and other advanced programming language, database programming and other technology integration,

In order to achieve the content and style of the site efficient, dynamic and interactive management. Therefore, in this sense, the combination of HTML and other advanced

Programming Language and database technology the Web pages that are generated are all dynamic Web pages.

From the perspective of the Web browser, whether it is a Dynamic Web page or static Web page, can display basic text and picture information, but from the site development,

In terms of management and maintenance, there is a big difference.

(3) features of dynamic Web pages 1) Dynamic Web pages generally based on database technology, can greatly reduce the workload of site maintenance;

2) Web site with Dynamic Web technology can achieve more functions, such as user registration, user login, online survey, user management, order management, etc.

and so on;

3) The Dynamic Web page is not actually a Web page file that exists independently on the server, but only when the user requests the server to return a complete Web page;

4) "?" in the Dynamic Web page There are some problems in search engine retrieval, and it is generally impossible for search engines to access all the nets from a database of a website.

page, or for technical reasons, the search does not crawl the URL "?" After the content, so the Web site using Dynamic Web sites in the search engine push

Wide-time needs to do some technical processing to adapt to the search engine requirements.

(4) New technology of Dynamic web design 1) PHP

That is hypertext preprocessor, which is the hottest scripting language on the Internet today, its syntax draws on C, Java, Perl and other languages

, but with minimal programming knowledge you can use PHP to build a truly interactive web site. It has very good compatibility with the HTML language,

The user can add HTML tags directly to the script code, or add script code to the HTML tag for better page control. PHP mention

for the standard database interface, the database connection is convenient, the compatibility is strong, the extensibility is strong, the object-oriented programming can be done.
2) ASP

Active Server Pages, which is a Hypertext Identity language (HTML), script, and CGI developed by Microsoft (Public gateway

interface), which does not provide its own programming language, but rather allows users to write ASP applications using many existing scripting languages. Asp

Programming is more convenient and more flexible than HTML. It runs on the Web server and then runs the results in HTML format to the customer

End of the browser. Therefore, ASP is much more secure than the generic scripting language.

The biggest benefit of ASP is the ability to include HTML tags, direct access to the database, and the use of infinitely extensible ActiveX controls, so the programming

Easier and more flexible than HTML. By using ASP's component and object technologies, users can directly use ActiveX controls to invoke object-side

methods and properties to achieve powerful interactivity in a simple way.

But ASP technology is also not perfect, because it is basically limited to Microsoft's operating system platform, the main working environment is Microsoft's IIS application

Structure, and because ActiveX objects have platform features, ASP technology cannot easily be implemented on a cross-platform Web server.

3) JSP

Java Server Pages, a new technology introduced by Sunmicrosystem Company in June 1999, is based on Java servlet and

Web development technology for the entire Java system.

There are many similarities between JSP and ASP in terms of technology, but both originate from different technical specification organizations, and ASP is generally applied only to Windows

nt/2000 platform, while JSPs can run on more than 85% of servers, and JSP-based applications are easier than ASP-based applications

maintenance and management, so many people believe that the future of the most promising dynamic website technology.
4)asp .

Asp. NET is a programming framework built on the common language runtime that can be used to build powerful Web applications on the server. ASPX is a micro-

The soft on the server side of the Dynamic Web page file, through the execution of IIS parsing can get dynamic pages, Microsoft introduced a new method of network programming,

rather than the simple upgrade of ASP , because its programming method and ASP are very different, he is on the server side The program code that the server compiles and executes,

ASP using the scripting language, the server invokes the script parsing engine each time the request is executed to parse its code in the program, and ASP. make

with a variety of language is written, and is fully compiled, faster than ASP, and, not only fast, but also many advantages.

(5) ASP. NET features compared to the previous web development model,ASP . NET provides several important advantages:

1) Enhanced performance. ASP . NET is the compiled common language runtime code that runs on the server. Unlike the explained predecessors,ASP .

Leverage early-bound, real-time compilation, native optimization, and out-of-box caching services. This is equivalent to significantly improving performance before writing lines of code.

2) World-class tools support. The ASP . NET Framework complements a large number of toolboxes and designers in the VisualStudio integrated development environment. WYSIWYG compilation

server controls and auto-deployment are just a few of the features that this powerful tool provides.

3) power and flexibility. Because ASP . NET is based on the common language runtime, Web application developers can leverage the power and spirit of the entire platform

The. NET Framework class Library, message processing, and data access solutions are all seamlessly accessible from the Web. ASP . NET is also language-independent, so you can choose

Choose the language that best suits your application, or split it across multiple languages. In addition, the interoperability of the common language runtime is guaranteed when migrating to ASP.

Stay existing investments in COM-based development.

(6) Dynamic webpage disadvantage

1) First Dynamic Web page does not dominate the speed of access

The Dynamic Web page first obtains the user's instruction, then the webpage takes the instruction to the database to find and the instruction corresponding data, then passes to the server, through

The compilation of the server compiles the dynamic page into standard HTML code, which is passed to the user's browser so that the user sees the Web page. The problem comes out, every time

Access to the page through a process, this process will take at least a few seconds, access to a lot of people, the page loading speed will be slow, the

Server is also a burden, from the user's point of view, the page loading slow, delayed response, next time who will come to visit your website. While the static network

Page is simple, static Web pages are actually present, without the server's compilation, directly loaded into the customer's browser display. This shows that the dynamic

Web pages do not have the advantage of access speed.

2) There is no advantage in search engine inclusion

Above from the point of view of server and user experience, and then from the search engine collection point of view, Dynamic Web page is in the user input instructions before

The formation of the page, does not exist this page, and search engine will only crawl off-the-shelf, and will not be input, so the site in search engine inclusion is not

Dominant. The search engine still likes static pages. But search engines continue to improve development. So far, the vast majority of search engines have supported moving

The crawl of the State page.

three static Web pages and Dynamic Web pages summary (1) static web page Presentation: The contents of the webpage are fixed and will not be updated.
Required technology: HTML, CSS
(2) Dynamic Web page presentation: The content of the Web page is dynamically displayed through the program, automatically updated, learning to create dynamic Web pages.

Required technology: HTML, CSS, database technology, at least one high-level language (Java, C #, PHP), JavaScript, XML, and so on. The mainstream of the movement

Web scripting Technology (JSP, ASP, PHP).

(3) Dynamic Web performance

Dynamic Web page dynamic refers to the ability to interact with the user, such as login to enter the correct user name and password, the system will prompt the login success.

Learn Dynamic web development at least one high-level language is needed.

The display of the content of dynamic Web pages is implemented through programs.

The content of a dynamic Web page is usually read from the database.

Dynamic elements such as animations, videos, and so on can be displayed on animated pages, while static pages can also display dynamic elements. This is not a distinction between static Web pages and

The difference between dynamic Web pages.



Java Web Learning (2): Static and Dynamic Web pages

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.