How to make your website dynamic
Is your website still as static as ever? Among the current geometric growth of Internet websites, a considerable number of them are still sticking to static and have invisibly lagging behind the pace of the times. The so-called static means that the web page content of the website is fixed. When the user's browser requests to provide web page content to the WEB server through the Internet HTTP (Hypertext Transport Pr otocol) protocol, the server only transmits the originally designed static HTML document. Give to the user a browser. The content of its page uses only standard HTML code, and at most, it is accompanied by the popular GIF89A format dynamic pictures, such as the animation effect of several puppies and kittens running around. If a website maintainer wants to update the content of a web page, he or she must manually update all of his or her HTML documents.
The fatal weakness of static websites is that they are not easy to maintain. In order to constantly update web content, you must constantly repeat HTML documents. As the content and information of the website continue to increase, you will feel that the workload is beyond imagination.
You can't help but ask: So what is a dynamic website? This is the core of the article. The so-called dynamic does not refer to the GIF dynamic pictures placed on the web page. Here, the author has formulated the following rules for the concept of dynamic pages:
1. Interactiveness means that web pages will dynamically change and respond according to user requirements and choices, and use the browser as the client interface. This will be a major event in the future development of WEB.
2. Automatic update means that you don’t need to manually update the HTML document, and a new page will be automatically generated, which can greatly save workload.
3. It changes from time to person, that is, when different people visit the same website at different times and different people will produce different pages. Isn’t it cool?
Now that you have a basic concept for dynamic websites, you should choose a competent weapon next. There are many ways to dynamically make your website, it depends on what your needs are. If you are a maintainer of your personal website and use a free homepage space, in most cases you can only use Java, Java Script and the latest DHTML technology. If your homepage space provider can give you CGI permissions or ASP Support, then you will be very lucky to play with real dynamic technology. The CGI and ASP technology will be discussed later. Here we will focus on personal websites only the latest DHTML technology.
What exactly is DHTML? How is it different from traditional HTML? DHTML is when a web page is downloaded from a WEB server and no longer needs to be processed by the server, but directly and dynamically updates the content, layout style, and animation of the web page in the browser. For example, when the mouse moves to the article paragraph, the paragraph can turn blue, or when you click on a hyperlink, a drop-down sub-hyperlink directory will be automatically generated. This is Dynamic HTML (Dynamic HTML), which is one of the most exciting and practical innovations in the rapid development of the Internet in recent years. It is a concept achieved through the comprehensive development of various technologies, including Java Script, VB0Script, Document Object Model, Layers and Cascading Style Sheets (CSS stylesheets), etc. It is very unfortunate that after several battles between Netscape and Microsoft IE browser, we still have not received a unified standard for DHTML support. Therefore, this article has to be described separately when introducing DHTML. Let's first take a look at Microsoft IE 4's support for DHTML:
1. Dynamic Content: Dynamically update the content of the web page, and dynamically insert, modify, or delete components of the web page at any time, such as text, tags, etc.
2. Dynamic Styles Sheets: Through W3C's Cascading Style Sheets (connected typeface, referred to as CSS1 or CSS), it provides the font size, font size, thickness, font style, and line height of HTML tags. , text color, add bottom line or middle horizontal line, distance from edge, centering left or centering, indentation, background picture or color and other typesetting functions. Dynamic layout styles can dynamically change the layout style at any time.
3. Dynamic Positioning: Through W 3 C's Working Draft on Positioning HTML with Cascading Style Sheets, it provides the positioning function of HTML components in the X, Y, and Z axes, allowing designers to place images, controls, text, etc. in anywhere on the page. By placing it on different Z-axis, the designer can produce overlapping effects.
4. Built-in Data Awareness: No need for complex programs or spend too much resources on the server, allowing web designers to process documents in real time.
5. Built-in multimedia support: IE 4.0 combines CSS and built-in ActiveX Controls to provide multimedia support functions, including multimedia functions such as conversion effects, filter effects, path control, sequence control, animation, drawing, playback of sound and images.
Let's take a look at the support provided by Netscape Communicator 4.0 for DHTML:
1. Dynamic Styles Sheets: Support W 3 C Cascading Style Sheets (connected type style, referred to as CSS1 or CSS), and homemade Java Script Style Sheets.
2.Dynamic Layers: Provides the functions of positioning pictures and texts, changing the overlapping order of pictures and texts, controlling hiding or displaying pictures and texts, and allowing you to design animation effects!
3.Dynamic Fonts: Provides the function of downloading fonts from the server. It can be seen that although IE 4.0 and Netscape Communicator 4.0 both provide Dynamic HTML support, in fact, except for the similar specifications of Cascading Style Sheets, the rest are very different. Therefore, when you design DHTML pages, compatibility issues must be fully considered. Choosing a competent weapon and method is always the most important for designers. The author will explain the use methods and design techniques of DHTML carefully in Chapter 2 "Eighteen Martial Arts of Dynamic Web Design", please pay close attention.
Perhaps for a personal website, the full use of DHTML technology is enough to make the web page come to life and full of dynamicity. However, for businesses that build commercial websites, it is far from enough to have DHTML. Because the dynamic effects that occur only on the client's browser cannot meet the dynamic needs of commercial websites such as large amounts of information inquiries, customer consultation, resource interaction, etc. Therefore, as a designer of commercial websites, it is necessary to design a more practical and interactive dynamic website. Since most commercial websites have a large amount of data and information, the original intention of building a network is to facilitate customers to query corporate information, facilitate communication with customers, and obtain timely information feedback. Then, you will inevitably face how to allow users to query the WEB database information through the Internet or intranet in the browser interface, and even enter, update and delete the information on the WEB server. Below, I will briefly introduce several commonly used dynamic website design methods:
1. The traditional method of CGI (Common Gateway Interface) is used to perform the executable form set by the form. After the user fills in the browser, and makes an HTTP request, the WEB server will execute the executable form set by the form. The CGI application, the CGI program analyzes the information entered in the form (form), accesses the WEB database, and returns the query execution results to the browser in HTML format. Using CGI to access WEB databases has many disadvantages, such as not easy to develop, high cost of change and modification, limited functions, not easy to detect errors, slow execution speed, etc., and since it is not integrated into HTML documents, it must be used completely with HTML. Different design processes to design an executable application.
2. IDC (Internet Database Connector) Internet Database Connector is one of the features of Windows NT Server containing Internet Information Server (IIS) 2.0. It provides a way to publish and interact with users. Method, it is actually an ISAPI application included in IIS. You only need to master the basic knowledge of HTML and SQL and write a few code to compile interactive database applications, allowing users to query, input, update, and delete on the WEB server in the browser interface Data information. As VB programmers like, the files that make up the IDC application are explanatory. Because the design is simple, just prepare two files to access the data of the WEB server in the browser on the user side without compiling it. Therefore, there is a fast development cycle and feedback. But the price of this simplicity is to sacrifice a lot of flexibility, which forces you to give up a lot of control over the user interface and almost all the ability to verify data. Therefore IDC is only suitable for simple WEB applications.
3. ActiveX Data Object (ADO) is the best choice for WEB database applications.
What exactly is ActiveX Data Object (ADO for short)? ActiveX Data Object technology allows you to combine with Active Server Pages (ASP for short) to create web page content that provides data information. Just execute Structured Query Language (Structured Query Language, SQL for short) instructions on the web page to allow users to Enter, update, and delete data on the WEB server in the browser interface. When the browser on the user side fills out the information required to enter in the form and presses the Submit button, the HTTP request is transmitted to the WEB server through the Internet and intranet. The request executes the Active Server Pages program specified in the form on the WEB server (suffix name) for . ASP documentation). An ASP document is a plain text document that includes: HTML tags, VBScript or JScript language program code, ASP syntax, and structured query language SQL instructions. IIS3.0/4.0 WEB server execution. ASP document is connected to a database that supports ODBC through the ODBC driver, executes the SQL instructions specified by the ASP document, and finally transmits the execution result to the user's browser in HTML format. ADO has the advantages of easy use, fast development and execution, less system resources, and small disk space.
The above are the dynamic technologies commonly used in designing commercial websites. Due to my work and usage experience, I prefer the combination of ADO and ASP. In the long run, this pair of partners will inevitably become the core technology of dynamic WEB in the future. Therefore, in the second chapter of this article, "Eighteen Martial Arts of Dynamic Web Design", the author will explain the use of ADO and ASP, so stay tuned.