Current location - Education and Training Encyclopedia - Graduation thesis - ASP forum is urgently needed to design graduation thesis
ASP forum is urgently needed to design graduation thesis
Network forum, also known as asynchronous conference system and bulletin board, is the most common online discussion system except email. It originated from the BBS system developed in the early Internet, and gradually evolved into the present form-BBS system based on Web with the development of the Internet.

This paper mainly introduces the construction of network forum using ASP technology. Through the dynamic WEB database technology based on Internet, the problem of remote data transmission and reading can be solved. The remote client terminal can submit a request through the web page, query the information on the remote data server, and store the information in the database of the remote data server at the same time, so as to enjoy the information. At the same time, using Internet technology can reduce the cost of software development and deployment. As long as WEB applications are installed on the server, every client can browse and use them.

This forum is a practical forum program written with ASP(ActiveX server page). The whole forum adopts a three-tier mode based on the Internet, that is, the common B/S (browser/server) structure, which can also be called B/W/S (browser /Web/ server) structure, and the server side is a Web server and a database server. ASP supports many scripting languages, such as Vbscript and Javascript, and can also cooperate with other scripting languages such as Perl through plug-ins. The ASP program of this forum is implemented in Vbscript scripting language.

Keywords ASP, BBS, access

1 Introduction

1. 1 Introduction

1.2 website development

2. Technical background

2. 1 ASP technology

2.2 Windows 2000 and IIS 5.0

2.3 flash MX

2.4 DreamWeaver

3. Outline design

3. 1 system model

3.2 Outline design of website structure

3.3 Module outline design

4. Detailed design

4. Detailed design of1database

4.2 Detailed design of the module

4.3 Page Style Design

5. System implementation

5. Settings of1IIS 5.0

5.2 Development Steps

5.3 Web design

5.4 coding

5.5 debugging

6. Concluding remarks

6. 1 model system summary

1 Introduction

1. 1 Introduction

2 1 century is an era of informationization and networking, and it is an era of knowledge economy. The rapid development of network technology has brought us unprecedented opportunities and challenges. Nowadays, people are no longer strangers to the Internet. Many people are eager to learn network knowledge and linger on surfing the internet.

At present, there are thousands of websites on the Internet in Qian Qian, some of which have hundreds of thousands, millions or even tens of millions of visitors, while others have few visitors. The reason is that websites with large visits are not only rich in resources, but also well-planned and beautifully designed. It can be said that web pages are the images of enterprises and individuals on the Internet. Browsers who wander around the internet often skim the surface and pass by. Only pages with distinctive features, detailed content and novel design can stop them from browsing. Successful web pages are original and often leave a deep impression on visitors.

1.2 website development

There are many tools for making web pages now, which are quite imposing. However, "if a worker wants to do a good job, he must sharpen his tools first." Dreamweaver's professionalism, intuition, ease of use and powerful functions are deeply loved by people in the industry, and it supports the latest DHTML and CSS standards. It is the best web design software at present, supports two mainstream browsers and the latest web design, and is the first choice tool for professionals.

With the development of Internet and the rapid development of Web technology, people are no longer satisfied with static HTML, but require more dynamic and interactive website technology. CGI (Universal Gateway Interface) is an early mature network interaction technology, which has been widely used in the Internet, but its system expansion is limited and transaction processing efficiency is low. ASP technology introduced by Microsoft completely overcomes the limitations of CGI and makes it easy for beginners to master it. ASP, the full name of which is Active server Page, is a Web server-side running environment. ASP can not only generate dynamic, interactive and high-performance WEB applications, but also perform complex database operations. ASP itself contains VBScript and JavaScript engine, which enables scripts to be directly embedded in HTML, and can also achieve more powerful functions through ActiveX controls. It is precisely because ASP is powerful and easy to learn that more and more web developers turn from CGI to ASP.

ASP (Dynamic Server Page) is the key technology to develop this system. Using Microsoft ASP technology to realize WEB interface, connect database server, handle server-side programs, and dynamically generate web pages. As a component of IIS3.0 and IIS4.0 servers introduced by Microsoft, it embeds scripting language directly into HTML language, and handles operations, variable output and subprocess calls by executing script statements.

ASP provides a server scripting environment, which can be used to build and run dynamic, interactive and efficient network server applications. Because ASP is based on DCOM (Distributed Component Object Model) architecture, the program architecture can be executed in a distributed way locally or on the network. HTTP browser is an excellent client operating platform, because it has the advantages of crossing various soft product platforms, which constitutes the framework model of browser/server. With ASP, the program is separated from the appearance. By using scripts and components, ASP allows users to separate programming from web design and other work.

Based on the short development cycle of this graduation project, I chose ASP as my first choice tool for making BBS forums.

1.3 website development

Chapter 1 is the introduction, in which the system developed by this graduation project is defined, what needs to be done is understood through the definition of the problem, and the development content is briefly introduced; At the same time, in the introduction, the research background and significance of the subject are analyzed. Before developing this system, it also introduces the investigation of the existing system and the feasibility analysis of developing this system.

The second chapter is the system requirements analysis. The main contents include system function requirement analysis, business process, data process, data dictionary, system business process reorganization and improvement, etc.

The third chapter is the overall design of the system. The main contents include system functional requirements analysis, system model, website structure summary design and module summary design.

Chapter 4 is the system design part, the main content is the overall architecture design of the system, which is derived from the data flow; System data model design, including E-R diagram, relational model and data table; Determination of system development and operation environment. Starting from the fourth chapter, the design of each main module is introduced.

The fifth chapter introduces the realization of the system, including the architecture design of the four modules of the system, the functions, interfaces, interface design and detailed design of each sub-module, as well as the problems encountered in the design and solutions.

The fifth chapter is the conclusion, which mainly includes the introduction of the main functions, characteristics/advantages of the system, the shortcomings and improvement schemes of the system, and the experience and gains of the graduation project.

2. Technical background

2. 1 ASP technology

2. 1. 1 What is ASP (Dynamic Server Page)?

Microsoft's Active Server Page (ASP for short) is a script environment executed by the host. It allows us to plan and write properly to produce dynamic and interactive website applications; Translate the webpage we designed from the host and send the standard HTML file to the client after execution. When the client's browser requests the server to execute an asp file. ASP "file will be translated from scratch on the server with ASP interpreter installed, and the execution result will be returned to the client. Because the result of execution will be transmitted to the browser of the client in the form of standard HTML file, there is no browser incompatibility problem.

Microsoft Active Server Pages, which we call ASP, is actually a server-side scripting environment developed by Microsoft. ASP is included in IIS. Through ASP, we can combine HTML pages, ASP instructions and ActiveX components to build a dynamic, interactive and efficient WEB server application. With ASP, you don't have to worry about whether the browser on the client can run the code you wrote, because all programs will be executed on the server, including all script programs embedded with ordinary HTML. After the program is executed, the server only returns the execution result to the client browser, which reduces the burden of the client browser and greatly improves the interaction speed. The following are some features of Active Server Pages:

1. Using easy-to-understand scripting languages such as VBScript and JScript, combined with HTML code, you can quickly

Complete the application for the website.

2. It is easy to write without compilation, and can be executed directly on the server side.

3. Use a common text editor (such as Windows Notepad) for editing and design.

4. browser independence, as long as the client uses a browser that can execute HTML code,

You can browse the contents of web pages designed by Active Server Pages. Scripting languages (VBScript, Jscript) used in dynamic server pages are all executed on the WEB server side, and the browser of the client does not need to be able to execute these scripting languages.

5.Active Server Pages is compatible with any ActiveX scripting language. Besides VBScript or JScript, other scripting languages provided by third parties, such as REXX and Perl, are also used by plug-ins. The script engine is a COM (Component Object Model) object that handles script programs.

6.6 source program. The active server page will not be transmitted to the browser of the client, so the source program can be prevented from being copied by others and the security of the program can be improved. Figure 1 shows the working mode of asp. When a browser requests a file (. ASP), the ASP script starts to execute. At this time, the Web server calls ASP, reads all files and executes every command, and then sends the results back to the browser in the form of HTML pages.

2. Features of1.2 ASP

Compared with previous Web development tools, ASP has the following characteristics:

Integrated in HTML, which can be executed without compiling or linking;

Use a regular text editor (such as Windows Notepad) for design;

Independent of the browser;

Object-oriented;

This function can be extended by ActiveX server components;

Compatible with any ActiveX scripting language;

Access to the database is very convenient, and ADO components can be used.

The source code of ASP will not be transmitted to the user's browser, and the program code can be hidden.

At present, ASP is only applicable to the following Web servers:

Microsoft Internet Information Server (IIS) version 3.0 or above.

Microsoft personal Web server (PWS)

2. 1.3 ASP file and syntax

Asp file is a text file, which can contain text, HTML tags and script commands. The file suffix is. ASP。 ASP files are equivalent to executable files and must be placed in a directory with executable rights on the Web server. When the browser requests the Web server to call the ASP file, ASP is started. The Web server starts calling ASP, reads the requested ASP file from beginning to end, executes each command, and then dynamically generates an HTML page and sends it to the browser. However, it should be noted that ASP files cannot be executed by opening, and must be links. The script command in ASP file and the command represented by output should be placed in the locator ""between and ""to output the expression to the browser.

ASP can use any scripting language, as long as the corresponding script driver is provided. It provides drivers for VBScript and JavaScript. The default scripting language is VBScript, which developers must use.

There may be some identical parts in different ASP files, such as functions and process definitions. Generally speaking, these parts can be placed in files such as functions.txt, which are included in every ASP file that uses these functions. When executing an ASP file, only the functions or processes called in the file and stored in functions.txt are included, not the whole contents of the functions.txt file.

The basic object of 2. 1.4 ASP

ASP has five main built-in objects: request, response, server, session and application. These five objects have their own methods and properties, so when using them, we should make full use of the methods and properties they provide. Some of their methods and characteristics will be briefly described below:

1. Request

ASP still follows the popular method of exchanging data by using client. There are four ways for ASP's built-in request object to obtain client data: QueryString, Form, Cookies and ServerVariables.

(1) query string

In addition to using forms to transmit data, you can also use "?" After the hyperlink. The way to convey information.

(2) Form

There are generally three ways to send information using forms: sending information to other ASP; Through the form in the HTML page; Send information from a form in an ASP to another ASP; The information in ASP is passed to itself.

(3) cookies

On the client side, Cookies record a lot of information about the client browser. We can get its value through the requested command. Cookies(“name ") or record some information on the client through Response. Cookies ("name") = "value "to control visitors.

(4) Server variables

We know that the transport protocol of Web/Browser is HTTP. The header of HTTP will contain some information about the client, such as the IP address of the client and the language system of the browser. Relevant information can be obtained upon request. ServerVariables("*** * * ")。

Step 2 react

When data is to be transmitted from the server to the client, the following methods can be used:

(1) response. Write directly outputs information.

(2) response. Redirect directs the client to another URL location.

(3) coping. ContentType controls the output file type. The package type sent by the server to the client can be text/html text or gif/jpeg graphic file, so before each transmission, we should inform the client of the file type to be transmitted, which is generally "text/html" by default.

(4) coping. Cookies are used to set the value of cookies. Cookies system has five attributes by default, including Expires (time), Domain (domain name), Path (path), Secure (security) and Haskeys (judging whether there are other Cookies under Cookies).

(5) response. Buffer is used to determine whether to transfer information to the buffer.

3. Server objects

It is a very important built-in object for accessing methods and properties on the server. Wherein, the server. Use the CreateObject method to generate Activex server component instances, so that ASP applications can achieve more powerful functions.

4. Session object

Session actually refers to the time from the visitor's arrival at a specific homepage to his departure. Each visitor will get a session separately to manage personal user information, and the stored variables can be called between pages (in session state).

5. Application object

The Application object is an application-level object, which is used to share information among all users and can save data during the running of the Web application.

2. Built-in components of1.5 ASP

Components are ActiveX controls that have been registered on the server. ASP has five built-in components. Before using a component, you need to create an instance of it before you can call its methods and properties.

1.dataaccess component

This is the most important component, which uses ADODB (an optimized ActiveX data object specially used for developing Web applications) to access the information in the database. Through the Session object, ASP application keeps the database link open, that is, the database link can be referenced many times in an ASP application, thus overcoming the limitation of only executing the database link once in an IDC page.

2. Advertisement rotating component

This is a component that publishes advertisements on web pages in a planned way. There are two files related to him: Rotater scheduling text file and redirection text file.

The carousel schedule file contains advertising information managed by this component. Such as the size of the advertising space, the image files to be used, the proportion of each advertising image, and the like.

The redirection file can be. Asp and. Dll files to guide users to connect to advertising-related websites.

3. Browser function components

Appropriate content can be sent according to the browser's functions (table, frame, ActiveXControls, etc.). ). When the browser accesses the Web server, the browser will automatically send a user agent HTTP header containing the browser type and its version. The browser capability component will compare this title with the entries in the Browscap.ini file on the server side, so as to determine the capabilities of the browser, so that the server side can effectively control the sending of content to the browser.

4. File access component

This component uses two objects, FileSystemObject and TextStream, to obtain and modify information in files stored on the Web server. The method is as follows: First, use the server. Createobject (script. FileSystemObject) generates an instance of the FileSystemObject, and then returns the TextStream object using two methods of the filesystemobject, namely, CreateTextFile and OpenTextFile.

5. Content Link Component

The content link component is used to manage the URL list so that users can centrally maintain the site list. The URL list is managed by a text file. As long as the text file is updated, the component will automatically update the contents of the site list, which is somewhat similar to the advertisement rotator component. The ProGid of this component is MSWC. NextLink

2. The working principle of1.6 ASP accessing database

The working principle of ASP accessing database is as follows:

1. User requested access. Asp files are operated by browser and database.

2. The Web server responds to this request and judges that this file is an ASP script file, not an ordinary standard HTML file. The Web server calls the ASP engine.

3.ASP engine interprets ASP script and calls database access to request access to the database in the script.

4.ADO connects with the background database through ODBC to access the database.

5.ADO passes the result of accessing the database to the ASP engine.

6.ASP engine generates a homepage in HTML format according to the results of accessing the database, and submits it to the Web server.

7. number seven. The Web server passes the HTML file generated by ASP to the user who requests access.

Through the above seven steps, the access to the background database is completed.

2.2 Windows 2000 and IIS 5.0

The Web server selected for this project is IIS 5.0 (Internet Information Server), and the operating system platform is Windows 2000 Professional version. The following is a brief introduction to both:

Introduction to Windows 2000

Windows 2000 operating system is a new generation operating system developed by Microsoft on the basis of Windows NT 5.0 system. Windows 2000 actually includes four versions: Windows 2000 Professional, Windows 2000 Server, Windows 2000 Advanced Server and Windows 2000 DataCenter Server. They all adopt NT kernel technology, which has good security and stability. At the same time, they fully inherited the easy operation characteristics of Windows 95/98 and the network application characteristics of Windows NT. The following only briefly introduces the new features and functions of Windows 2000 from five aspects:

1. Active Directory

Active directory includes two aspects: directory and directory-related services. A directory is a physical container for storing various objects; A directory service is a service that makes all information and resources in a directory work. Active Directory is a distributed directory service. Information can be scattered on many different computers, ensuring fast access and fault tolerance; At the same time, no matter where users visit and where the information is, it provides users with a unified view.

2. Document services

Windows 2000 provides distributed file system, encrypted file system, disk defragmentation and indexing service. The function of Distributed File System (DFS) is to organize files into a tree-like hierarchical logical structure, regardless of their physical distribution, which is convenient for users to access network file resources, strengthen fault tolerance and balance network load. Encrypted File System (EFS) is a new method to store NTFS files on disk. Encrypted file systems are based on public keys. As a part of system services, it is easy to manage, has the ability to defend against attacks, and is transparent to users.

3. Storage services

Storage management in Windows 2000 includes dynamic disk volume management, disk defragmentation and automatic system recovery. Windows 2000 integrates the dynamic disk volume management of VERITAS, providing online disk volume creation, expansion or mirroring, and even adding new disks without restarting the computer. It also provides a self-describing disk, simplified tasks and an intuitive user interface. Windows 2000 also reduces storage costs by hierarchical system management (HSM) and supporting emerging storage access protocols.

4. Smart mirroring

The main contents of intelligent image include remote installation, user data management, application software management and user setting management. Smart mirroring enables administrators to focus on managing users who use computers, not machines.

5. Safety function

Windows 2000 has realized: data security, communication security between enterprises, single-point secure login between enterprises and the Internet, and easy-to-use and extensible security management.

Windows 2000 Professional maintains good compatibility with Windows 95/98 and Windows NT Workstation. Because Windows 2000 Professional adopts NT technology architecture, it is slightly better than Windows 9x in supporting new hardware, improving system stability and network access. In addition, the system aims to directly introduce Internet applications into users' desktops and adopt a Web-based Windows update strategy, which makes it very convenient to upgrade technical support, software and drivers.

Features of IIS 5.0

IIS 5.0 (Internet Information Server) is a part of Windows 2000, which has higher security, more convenient management and new version of network services.

1. Security

(1) Digest authentication: Digest authentication allows secure and strict authentication of users across proxy servers and firewalls. In addition, anonymous and integrated Windows authentication (formerly called Windows NT Challenge/Response Authentication and NTLM Authentication) can be performed.

(2) Secure communication: Secure Socket Protocol Layer (SSL)3.0 and Transport Protocol Layer Security (TLS) provide a secure way to exchange information between clients and servers. In addition, SSL 3.0 and TLS provide a way for the server to authenticate the client before the user logs in to the server.

(3) Kerberos 5 authentication protocol compatibility: IIS 5.0 has fully integrated the Kerberos 5 authentication protocol implemented in Microsoft Windows 2000, thus allowing users to pass authentication credentials between computers running Windows.

(4) Certificate storage: At present, the IIS 5.0 certificate storage has integrated the Windows CryptoAPI storage. Windows Certificate Manager provides a single portal that allows users to store, back up and configure server certificates.

(5) Fortezza: IIS 5.0 supports the American government security standard commonly known as Fortezza. This standard ensures the security, integrity verification and access control of messages, components and systems through encryption mechanism.

2. Management function

(1) Restart IIS: You can now restart Internet services without restarting your computer.

(2) Backup and restore IIS: You can back up and store the metabase settings, so as to return to the known security state more easily.

(3) Configuration options: You can set permissions for reading, writing, executing, scripting and FrontPage Web operations at the site, directory or file level.

(4) Site traffic monitoring: it is used to display real-time graphs of site traffic statistics, such as daily requests, hourly requests, daily visitors and hourly visitors.

(5) Centralized management: IIS uses Microsoft Management Console (MMC) management tools. MMC supports programs that administrators use to manage servers and becomes a snap-in. You can use IIS snap-in to manage Windows 2000 Server running Internet information service on Intranet from a computer running Windows 2000 Professional.

3. Network services

(1) New features of ASP: Active Server Pages adds a method and a component to the existing object, and upgrades ADO and script engine.

(2) ADSI 2.0: In IIS 5.0, administrators and application developers can add custom objects, properties and methods to the existing ADSI providers, thus further increasing the flexibility for administrators to configure the site.

(3) Internet standard: IIS version 5.0 conforms to the HTTP 1. 1 standard, supports functions including PUT and DELETE, and has the ability to customize HTTP error messages and HTTP headers.

2.3 DreamWeaver

2.3. 1 What is Dreamweaver?

Dreamweaver is a "what you see is what you get" web editing tool produced by Macromedia. Different from Frontpage, Deamweaver adopts the design style of floating face version of Mac machine, which may not be suitable for novices. But when you get used to its operation, you will find that Dreamweaver's intuition and efficiency are unmatched by Frontpage.

2.3.2 Advantages of Dreamweaver

Dreamweaver's support for DHTML (Dynamic Web Page) is particularly good, and it can easily make many dazzling interactive page effects. Plug-in programming enables its functions to be infinitely extended. Dreamweaver, Flash and Firework are also called the Three Musketeers of Macromedia Web page making. Because it is the product of the same company, it has a very close combination of functions. Therefore, it is not an exaggeration to say that Dreamweaver is the first choice for advanced web page making.

3. Outline design

3. 1 system model

The BBS forum I want to do is a typical B/W/D database architecture system. It has a three-tier architecture, the front end is the client and the background is the server (including database server, file server, etc.). ), and Web server and ASP are the middle layers of database operation. The specific structure is as follows (Figure 3. 1):

HTTP request data request

HTTP reply returns data

Figure 3- 1 System Structure Diagram

How it works: At the front end, use browsers such as IE and NetScape to send HTTP requests to the Web server. The Web server accesses the background database through ASP and some intermediate components, and returns the operation results to the front browser in the form of HTML pages.

3.2 Outline design of website structure

I planned the structure of the website. In order to realize its function, the website must include two parts: the page and the background database.

3.2. 1 page outline design

This is a user-oriented "window" where users interact with the background of the website. It mainly provides interactive information browsing, member login, publishing articles and so on.

3.2.2 Summary Design of Background Database

1. Member information database

Store the specific information of website members, and users can enter the website to browse and publish articles only after registering.

2.BBS information base

Customers who publish articles on BBS can exchange information and enjoy * * *.

3.3 Module outline design

Today, all kinds of large websites now have forums, and a large number of people are using it for online communication. This is life in the Internet age. Today, online forum has become a very special way, which has had a great impact on people's lives. They are convenient, fast and cheap, and they contain a lot of information. You can get all kinds of questions in the forum and answer questions raised by others. Let's build an online forum now. The basic functions of online forums are:

1 for related technical enthusiasts to express their views on this technology;

2. Users can view the articles in the forum conveniently;

When someone asks a question in the forum, other members of the forum can answer this question;

Members who ask questions can easily refer to their own reply articles.