Current location - Education and Training Encyclopedia - Graduation thesis - Computer web page graduation thesis
Computer web page graduation thesis
Dynamic website construction

Abstract: The development of computer technology, especially the rapid development of network technology, provides great convenience for the preservation and management of documents. In this paper, the basic principles and methods of software engineering are applied to the whole system, the requirements are analyzed, and the specific methods to solve the problems are put forward. In concrete production, B/S system is realized by ASP technology. ASP technology is combined with database technology, users can query the samples they need at will on the browser side, and the background operation of data is handled by the server side. This improves the interactivity of web pages and makes the whole system better serve users.

Keywords: software engineering ASP dynamic web page

Digitization of sample room in Southwest Forestry College

Abstract: With the rapid development of computer technology, especially on the network, it is more convenient to store and manage files. In this paper, the basic theories and methods of software engineering are applied to the whole system, and on the basis of analyzing the system requirements, the solutions are put forward. In the network construction, the B/ S system is realized by ASP technology. Because of the combination of ASP technology and database technology, users can freely query the specimens they need through the data processing of the server. In this way, the interactivity of web pages is improved and the whole system serves users better. ..

Keywords: soft project; ASP dynamic web page

catalogue

1 Introduction 1

2 Introduction to the Specimen Room of Southwest Forestry College 2

3 Application of software engineering principles 3

3. 1 demand analysis 3

3.2 Entity Relationship Diagram 3

4 using ASP 4 to build dynamic web pages

4. 1 Advantages of dynamic web pages 4

4.2 ASP technology introduction 5

4.3 technical characteristics and working principle of ASP 5

4.3. 1 ASP operation mode 5

4.3.2 working principle of ASP 6

4.3.3 Technical characteristics of ASP 7

4.4 Using ASP 8 to design dynamic web pages

4.5 using ASP to query dynamic data 1 1

4.6 ASP accessing database 12

4.6. 1 ASP built-in objects and components

4.6.2 Working principle of ASP accessing database 13

4.6.3 ASP Connection to Database Method 14

5 Web interface design 14

5. 1 webpage interface element 15

5.2 overall modeling of web page 16

5.3 Page Color Matching 16

6 Problems and Solutions in Construction 17

7 conclusion 19

Reference 20

Thank you 2 1

1 Introduction

The information society makes the carrier form and recording mode of archives present a diversified development trend. The unification of paper archives will be replaced by the coexistence of audio-visual archives and electronic archives. The traditional archival editing and research work must change the closed management mode in the past, and the editing and research mode must gradually change to multi-carrier, all-round and deep-seated development of archival information resources and enter a dynamic network world. Website construction provides new opportunities, puts forward new requirements and opens up a new world for archival compilation and research. In this regard, through establishing its own online archives and developing online archives services, we can deeply understand that the compilation and research of archives can meet the needs of the development of information society.

With the acceleration of China's informatization process and the increasing expansion of network information resources, the construction of archives information website has been put on the agenda of the factory. However, in China, the emergence of archival information websites is still in its infancy. There is no systematic discussion in theory, which is seriously lagging behind in practice.

Computers can be used to count and retrieve archival information. The application of these modern information technologies can not only liberate archivists from heavy physical labor, but also make the vigorous development and scientific, reasonable and effective utilization of archival information resources truly become a reality, and also lay a foundation for the enjoyment of archival information resources by human beings in the future. But it is not enough to just do the above two points, because both developers and users of archival information resources must attach great importance to the activation of archival information resources, that is, digest, absorb and utilize the original archival information resources, and then generate new knowledge, so as to maximize the utility of archival information resources and realize the maximum value of archival information resources.

In the "National Informatization Index Composition Scheme" issued by the state in July 20001year, the level and degree of informatization in China are detailed with 20 indicators. Among them, article 12 "Total capacity of network resource library" is related to the construction of website archive information and data resources. With the popularity of e-government in China, the Internet provides a fast and effective means and a brand-new model for human beings to obtain information in government, business and management activities in the new century. In this change, only the units and enterprises that are good at using the Internet to build their own management system can succeed. In order to give full play to the role of archival information, all kinds of archival departments and their archivists in China have established archival information websites on the Internet.

2 Brief introduction to the specimen room of Southwest Forestry College

The herbarium of Southwest Forestry College was founded by Mr. Xu Yongchun on 1939 under the leadership of Mr. Zhang Haiqiu. During the construction of the herbarium, Professor Xue Jiru and Professor Zhang Zheng, Qin Renchang, Hao Jingsheng, Cai, Feng, Mao Pinyi made long-term and unremitting contributions. At the same time, with the joint efforts of the students of Professor Xu Yongchun and Professor Xue Jiru and the staff of the herbarium,

The forest plant specimen room of Southwest Forestry College mainly features the collection of tree specimens, FAGACEAE specimens and bamboo specimens in southwest China. At present, there are more than 8,000 species and nearly 200,000 copies of all kinds of plant specimens belonging to 23 1 family 1 070. Among them, gymnosperms 1 1 family, angiosperms 163 family, monocotyledons 18 family and ferns 39 families. There are more than 260 species belonging to 7 genera in FAGACEAE, with nearly 8000 volumes. More than 500 species belonging to 40 genera of Bambusoideae, with more than 20,000 volumes; There are about 3000 species of pteridophytes belonging to 100 genera. There are more than 400 species of tree specimens collected from Taiwan Province Province in the 1940s, 40 rare specimens brought back from France by Professor Zheng on 1940, over 350 species of model specimens copied by Beijing Institute of Botany. This is the largest collection of FAGACEAE and Bambusoideae in China. This is the largest collection of FAGACEAE and Bambusoideae in China.

The Forest Herbarium of Southwest Forestry University has been registered and recognized by the International Botanical Society with the code name "SWFC", which has been listed in the Catalogue of National Herbarium and the Catalogue of International Herbarium. It ranks second among 0/7 herbarium in Yunnan/Kloc, top ten among 47 herbarium with more than 654.38+10,000 copies in China, and seventh among the "Top Ten Herbariums in China" published by the Royal Botanical Garden.

In the Botanical Herbarium of Southwest Forestry University, many specimens are preserved and managed in the traditional paper way, which brings great inconvenience to consult and manage. Since the birth of the first electronic computer 1946, computers have been developing at an unparalleled speed and have been widely used in industry, agriculture, national defense, science and production. In file management, the traditional way of saving and managing files by manual text has gradually faded out of the historical stage with the popularization and deepening of computers. This method of saving and managing files has long been affirmed and widely used by people. However, with the advent of the information age, this method has gradually exposed its shortcomings and deficiencies, such as low efficiency, poor confidentiality, easy data loss and the need for a large number of human resources. Therefore, the digital construction of specimen room came into being, and our hospital also invested a lot of manpower and material resources to build a digital specimen room.

3 Application of software engineering principles

Software engineering includes technology and management, which is a close combination of management and technology. At present, software engineering methodology is divided into traditional methodology and object-oriented methodology. In the subject of digital construction of specimen room, the thoughts and principles of traditional methodology are mainly used.

3. 1 demand analysis

Traditional software engineering methodology uses structured analysis technology to analyze user requirements. Requirements analysis needs to understand the user's situation, and then refine the user's basic needs repeatedly through communication with users in order to obtain complete, accurate and specific requirements for the target system. In order to find the real needs of users, demand analysis should first investigate and analyze the problems faced by users from a macro perspective, that is, the first step of demand analysis is to understand the current situation of users and the problems that need to be solved as accurately as possible [13]. In the website of Herbarium, users only need to obtain specimen information and query the detailed information of specimens that meet their own query conditions. Therefore, when making a query system, we should fully consider the properties of specimens and the query conditions that users may use, and organically combine them to better serve users.

3.2 Entity Relationship Diagram

Structured analysis is essentially an activity of creating models. The data model contains three kinds of interrelated information: data objects, attributes describing data objects and relationships between data objects.

Data objects are representations of complex information that software must understand. The so-called composite information refers to things with a series of different properties or attributes. In this query system, the data objects are specimens and users.

Attribute refers to the nature of the data object, and when determining the attribute, we should understand it according to the problem to be solved.

Relationships refer to the way data objects are connected with each other.

Figure 1 Entity Relationship Diagram

As can be seen from Figure 3. 1, the specimen is divided into four attributes: family, genus, species and specimen, but the user's attribute is not important here, that is to say, the user's attribute has no influence on the whole query. Users can obtain specimen information through accurate and fuzzy query. Therefore, when formulating the whole system, we should fully consider the above factors and use their ideas to run through the whole system.

4 using ASP to build dynamic web pages

4. 1 Advantages of dynamic web pages

With the rapid development of the Internet, users are no longer satisfied with seeing static pages through browsers, but want to generate more flexible and vivid dynamic pages as needed. There is no doubt that the database has great advantages for the dynamic retrieval of information, so generating dynamic web pages according to the constant changes of database information will become an important method of web page design.

The technology of dynamic web pages is supported by many manufacturers, and they all have their own advantages. Using JSP, ASP, PHP and other related technologies, users can send Http requests to executable applications instead of static HTML files. The server will immediately run this limited program, respond to the user's input, return the processing results to the client, or update the data records. Through this model, we can interact effectively between the server and the client.

Static surfers can call browsing directly from the server, which takes up less server resources, but has the disadvantage of no interactive function. For users, it is a big defect that they can only watch and can't participate in activities.

Dynamic web pages contain interactive functions, and visitors can interact with service pages to complete a series of actions. Dynamic web pages have the following advantages:

(1) Readers can interact with the Web server.

(2) You can query the database.

(3) You can interact with files other than HTML.

(4) It can shorten the query time and improve the browsing efficiency.

Its biggest advantage is that users can directly participate in activities [9].

4.2 ASP technology introduction

The full name of ASP is (Active Server Pages), which is a component of IIS introduced by Microsoft. ASP is actually an environment for developing scripting languages on the server side. It can be used to develop dynamic, interactive and high-performance Web server-side applications, and it is easy to realize complex Web applications. The script programs developed by ASP all run on the server side, regardless of the browser used by the user, which greatly reduces the requirements for the client side. Its working principle is that the browser calls an ASP file (a text file) from the Web server, and the script engine on the server interprets and executes each script statement, and then generates an HTML file from the execution result and sends it to the client [7].

ASP files include text, HTML tags and script statements unique to ASP files. Making ASP files, like HTML files, can be edited by any plain text editor. ASP can use any scripting language, as long as the corresponding scripting engine is provided. ASP itself provides two scripting engines, VB Script and jscript, and the default is VB ScriPt.

ASP includes five built-in objects: ① Request object to get information from browser; ② Respond to the object and send information to the browser; ③ Server object, which controls the implementation of ASP and acts on the server-side ActiveX control; ④ Session object, which stores user task information; ⑥ Apply the object, so that multiple users can enjoy the information of a program.

Dynamic and database content is the inevitable trend of the development of Internet websites. ASP provides strong support for the development and application of Internet websites with its simple and efficient development mode and rich control means.

4.3 technical characteristics and working principle of ASP

4.3. 1 ASP operation mode

When the browser requests *. ASP file, ASP script starts running. At this point, the web server calls ASP to read the requested file from beginning to end, run all the commands, and return the HTML page to the browser.

Figure 2 ASP operation mode diagram

Figure 4. 1 illustrates that when ASP files access database data through ADO (Active Date Object) using database access components, the web server plays the role of an intermediate component. It receives web page requests from the user's web browser, sends any command requests for data or database to the database server through the network using ODBC, receives data from the database server, and sends the generated web pages and data back to the user's browser. In Figure 4.2, the relationship between the parts in the operation is shown:

Figure 3 ASP component diagram

4.3.2 working principle of ASP

ASP-based pages reside on the web server in the form of *. Asp file. A *. The asp source file is a text file, which can include the following components:

Text is used to display information, page titles, etc. .

HTML tag realizes page style design.

ASP Script (Script Command)

Figure 4 ASP working principle diagram

Figure 4.3 shows the working principle of ASP. When the browser is applied to a web server, it is used for the page defined by *. Asp uses HTTP protocol, web server responds to HTTP request, and uses ASP engine to interpret application files. When an ASP script command is encountered, the ASP engine calls the corresponding script engine (the script engine resides on the web server as a component) for processing. ASP provides two scripting engines, namely VBScript engine and VJScript engine. If you want to use other scripting languages, you need to install the corresponding scripting engine on the web server. When encountering a component based on COM standard (the component itself is a compiled and reusable binary code), the ASP engine starts the corresponding component to complete the specified function. If the ASP file contains a request to access the database, the ASP built-in component ADO (ActiveX Date Ob-Object) connects to the database through ODBC, accesses the database, and returns the access result to the web server. ASP engine

Generate corresponding HTML syntax components from the running results of scripts and components, and form standard HTML pages together with the original text and HTML tags in the file and send them to the client browser [3].

Technical characteristics of ASP

When using ASP technology, we should follow the principle that ASP scripts must be used together with components based on COM tags to develop dynamic web applications with practical value.

Based on components, the development of application programs can be divided into two categories: one is to develop core components that can be used by many programs; The other is to integrate the services provided by these core components to build applications that realize specific functions. Microsoft and some "middleware" manufacturers provide many component products for different application fields. Users of the component only need to know the interface of the component, and do not need to know the internal structure of the component and the data used.

In ASP technology, ASP script is equivalent to an adhesive, which integrates components with specific functions to form the final software product. Using components, developers can specialize in what they are best at, thus reducing the difficulty of development; Using components can also help developers to separate user interface from application logic and data services, and quickly develop web applications based on three-tier client/server structure, which has high repeatability. To sum up, ASP has the following characteristics:

(1) You can edit and design with a commonly used text editor (such as Notepad);

(2)ASP scripts need not be compiled, are easy to write and can be directly interpreted and executed on the server side;

(3) No matter what browser, the client can browse the pages designed by ASP as long as it uses a browser that can execute HHML code;

(4) Object-oriented, system components and ASP built-in components can be easily referenced in ASP scripts, and functions can be extended by customizing ActiveX server components;

(5) The source program of ASP will not be transmitted to the client, so it can prevent others from stealing the source program and improve the security of the program;

(6) Compatible with any ActiveX scripting language. In addition to designing with VBScript and JScript, you can also use other scripting languages provided by third parties to extend functions through Plug_in [5].

4.4 Dynamic Web Design with ASP

The so-called "dynamic" does not mean putting a few animated GIF pictures on the page, but its meaning roughly includes the following two aspects:

(1) "interactivity" means that the content of a web page will dynamically respond or change according to the user's requirements and choices.

(2) "Automatic update" means automatically generating a new page without manually updating the HTML document, which can greatly save the workload.

There are three traditional technical schemes for generating dynamic web pages according to user requests:

(1) The earliest channel was CGI (Universal Gateway Interface), that is, Universal Gateway Interface.

(2) Use special interfaces provided by web server vendors, such as ISAPI and NSAPI; ;

(3) Using JAVA to access the database (JDBC). All three schemes have a problem, that is, it is difficult to develop. Program development and HTML writing are two completely different processes, which need special programmers to develop.

The appearance of ASP technology makes the design of dynamic web pages a relaxed and pleasant job. As long as a few lines of script statements, the background database information can be published on the Internet, which is much better than the traditional technical scheme in the programming and readability of web scripts.

ASP file is an HTML document with embedded script, which can be executed on the server side. ASP-compatible web servers execute these scripts, generate corresponding HTML language components on the spot, and combine them with the original HTML language of web pages to work together to the front end. ASP file is a text file, which contains the following contents:

(1) text (text)

(2)HIML tag (HTML tag)

(3) Script Life Today [4]

The following is the source code of ASP program in this webpage:

& ltimg src= "../Image/FMLN 193。 GIF" width="500" height="4 " >& ltbr & gt

& ltbr & gt

& lt/div & gt;

& lttable width = " 40% " border = " 1 " align = " center " cell padding = " 0 " cellspacing = " 0 " & gt;

& lttr bgcolor="#CCCEEE " >。

& lttd width="22%" nowrap>。 & lt div align = "center" >< fontcolor = "# 990000" > belongs to

Serial number: & ltfont color="#990000 "> Family:

& lttd nowrap & gt

& lt% response. write(records(" keid ")% & gt;

& lt/TD & gt;

& lt/tr & gt;

& lttr bgcolor="#CCCEEE " >。

& lttd nowrap & gt< div align = "center" >< fontcolor = "# 990000" > Latin name:

& lttd nowrap & gt

& lt% response. write(records(" Latin name ")% & gt;

& lt/TD & gt;

& lt/tr & gt;

& lttr bgcolor = " # DDDEEE " & gt

& lttd nowrap & gt< div align = "center" >< fontcolor = "# 990000" > Chinese name:

& lttd nowrap & gt

& lt% response. write(records(" Chinese name ")% & gt;

& lt/TD & gt;

& lt/tr & gt;

& lttr bgcolor="#CCCEEE " >。

& lttd nowrap & gt< div align = "center" >< fontcolor = "# 990000" > Related descriptions:

& lttd nowrap & gt

& lt% response. Write (record "Miao Shu")%>

& lt/TD & gt;

& lt/tr & gt;

& lt/table & gt;

& ltdiv align="center " >& ltbr & gt

& lta href = " JavaScript:history . back( 1)" & gt; return

Due to the adoption of B/S mode, the workload of the whole system is greatly reduced. Figure 4.4 shows the B/S mode.

Fig. 5b schematic diagram of b/s mode

The working principle of. On the front end, browsers such as IE and Netscape are used 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 foreground browser in the form of HTML pages.

4.5 Using ASP for dynamic data query

In order to display the data obtained from the database in the client browser, it is necessary to add a table object to the ASP file. Table object can be used to display the records obtained by SQL query from server-side database. Visualization tools such as Dreamweaver can be used to design the user interface of *. ASP file is convenient. Including adding table objects, dynamic GIF files, etc. The following is the query code of this webpage:

& lt%

Word=request(trim ("keyword"))

Set record = server. CreateObject("ADODB.recordset ")

If request ("option 2")=" accurate ",then

If request ("select1") = "section", then.

Sql="select * from Ke Biao where keID =' "& or chinesename ='"& or latinname =' "&"

Else if request ("select1") = "genus" and then

SQL = " select * from Shu Biao where shuID = ' " & amp; Word & or Chinese name =' "& word & or Latin name ='" & word & "

else if request(" select 1 ")= " kind " then。

SQL = " select * from zhongbiao where zhongID = ' " & amp; Word & or Chinese name =' "& word & or Latin name ='" & word & "

Else if request ("select1") = "specification", and then

SQL = " select * from specimen Biao where biaoID = ' " & amp; Word & or Chinese name =' "& word & or Latin name ='" & word & "

If ... it will be over.

If err.number & lt& gt then 0

Response.write "Database operation failed:"&; Error description

If ... it will be over.

Else if request ("select 2") = "fuzzy" and then

If request ("select1") = "section", then.

SQL = " select * from keID like ' % " & amp; The word & amp“% "or a Chinese name similar to"% ". The Latin name of the word & "%"or similar "%"&the word &%' "

Else if request ("select1") = "genus" and then

SQL = " select * from Shu Biao where Shu id like ' % " & amp; The word & amp“% "or a Chinese name similar to"% ". The Latin name of the word & "%"or similar "%"&the word &%' "

else if request(" select 1 ")= " kind " then。

SQL = " select * from zhonggao where zhonggid like ' % " & amp; The word & amp“% "or a Chinese name similar to"% ". The Latin name of the word & "%"or similar "%"&the word &%' "

Else if request ("select1") = "specification", and then

SQL = " select * from specimen Biao where biaoID like ' % " & amp; The word & amp“% "or a Chinese name similar to"% ". The Latin name of the word & "%"or similar "%"&the word &%' "

If ... it will be over.

If err.number & lt& gt then 0

Response.write "Database operation failed:"&; Error description

If ... it will be over.

If ... it will be over.

records.open sql,connectstr, 1,3

% & gt

When the Web server has finished processing the user's HTTP request, it sends the result to the browser, and the user can see the result.

4.6 ASP access to database

ASP built-in objects and components

ASP provides six powerful built-in objects and five built-in components.

Built-in object:

(1) Request: Get front-end user information.

(2) Response: Send the information to the front-end users.

(3) server: provide Web server tools.

(4) Session: Only users can access the user information stored in the session.

(5) Application: Manage all session information for all users to enjoy.

(6)ObjectContext: Cooperate with the transaction server for distributed transaction processing.

The first three are commonly used, and the interaction between web server and browser is realized by request and response. An important method of request is ForM (), which is used to extract the user input information of the browser. For example, the following statement can get what the user fills in the text box: request. Form ("Nane ") Obviously, this is much simpler than the complicated programming required by CCI and other methods. The output uses an important response method Write, such as "Response.write our message". This statement outputs a message to the browser.

Built-in components:

(1) Database access component: ASP provides ADO to access the database with ODBC standard.

(2) Advertising wheel display component: used to maintain and build Internet advertisements.

(3) Browser compatibility component: provide the server with the functional data of the browser, so as to send web pages suitable for various browsers.

(4) File access component: provides tools for reading and writing files.

(5) File hyperlink component: provides the management of web pages.

4.6.2 Working principle of ASP accessing database

There are several ways to access the Web database: CGI (Universal Gateway Interface), ISAPI (Internet Server Application Programming Interface), Java, plug-ins and ASP technology. These technologies were developed to overcome static HTML pages.

ASP is a script development environment based on Web server, which can develop and run dynamic, interactive and high-performance Web server applications on ASP platform.

Fig. 6 schematic diagram of ASP accessing database

Figure 4.5 illustrates the working principle of ASP accessing database. ASP program runs on the network server. When the front-end user requests the ASP homepage, the Web server responds to the HTTP request, calls the ASP engine to execute the file and explains the script. If there is a request to access the database in the script, it will immediately connect with the corresponding background database through ODBC or ILE DB, and complete the operation with the database access component ADO. Finally, ASP generates a homepage in HTML language according to the results of accessing the database and returns it to the front-end users. Users only see the HTML page, but not the ASP program code, which enhances the confidentiality.

4.6.3 ASP connection to the database method

ASP provides two methods to access the database: the first method is to connect with the database once every time you access the database, and once the connection statement is established with the database, you can manipulate the data; When the data operation is completed, all related objects are closed.

Another way to connect to the database is to close the connection after the user task is completed, which is controlled by the Global.asp file. Every ASP-based internet application can store a Global.asp file in the application root directory, which has four events: application start, perceptual start, application end and session end. The connection between the user and the database is in the Session-start event, and the connection is closed in the Session-end event [1].

In this webpage, the following code is used to realize the connection between ASP and database:

& lt%

dim connectstr

Continue to the next step when an error occurs.

Set connectstr = Server. CreateObject("ADODB。 Connect ")

connectstr。 Open "driver = {sqlserver}; Server = localhostuid = jsj2000 database = herbarium; pwd=jsj2000 "

If err.number & lt& gt then 0

Response.write "Database operation failed:"&; Error description

Response. End

If ... it will be over.

% & gt

5 Web interface design

As more and more enterprises start to establish their own websites, websites not only have the function of disseminating information, but also often represent the image of enterprises. The commercialization and advertising trend of website construction put forward higher requirements for the artistry of web design. Although HTML language provides support for commonly used Windows standard controls, the visual effect of web pages may be poor due to the single shape and color of Windows standard controls. For example, list boxes and drop-down list boxes can only display concave borders, the colors of arrows in the drop-down list cannot be changed, and scroll bars can only appear at the bottom and right side of the window. When a web page is divided into multiple frames, scroll bars will inevitably appear in the middle of the web page, destroying the integrity of the web page. If we actively cooperate with the shape and color of Windows standard controls in web page design, the creative space of web pages will be limited. Therefore, it is necessary to implement custom controls in web pages to meet the requirements of web page art design.

5. 1 Web interface elements

Different from traditional media, web pages include not only words and images, but also emerging multimedia elements such as sound, video and animation. With the help of code language programming, various interactive effects have increased the vividness and complexity of the web interface, and web designers need to consider the arrangement and optimization of more page elements. Generally speaking, the main interface of a web page