Campus Second-Hand Goods Trading Platform Design Based On B/S
Campus Second-Hand Goods Trading Platform Design Based On B/S
Zhang Hai-tao
Zhangjiakou University;Hebei Zhangjiakou 075000,China
[email protected]
Abstract—System architecture of campus second-hand goods through a static page. Users sends a request to the server
trading platform uses the current popular B/S structure and through the browser, the server receives the user's request
uses the MVC three layer development mode, running on the and sends the requested page to the client browser. Under
Internet. Serve only needs to install this system and as long as this kind of structure, page on the site is static, which not
the client users can get to the Internet, they can access this
system through the browser to browse and publish a second-
dynamically change according to the actual situation of the
hand trading information, which saves complex installation, users[1,2]. Website information provider provides users with
configuration and maintenance of the traditional C/S mode. the latest information by updating the pages on the server.
System development is mainly divided into three parts. There is only limited interaction between a user and the
JavaBeans is used to deal with business logic, browser, and there is almost no interaction between web
JSP+HTML+JavaScript is used to manipulate the interface sites and users[3].
and configure the Servlet and SQL Server 2000 database The emergence of technologies such as CGI, JSP, PHP,
access is completed through the JDBC-ODBC bridge. The enable the development of dynamic interactive Web
system provides the service of commodity information applications[4]. Users sends a request to the server through
management, shopping cart, management, online
communication, answering and dynamic information display.
the browser and Web server receives the client requests, and
The whole system makes full use of the modular design idea analyzes the request. If the request is a static page, the
and development method and the testing results show the requested page will be sent to the client. If the request are
system is practical. dynamic pages, then it executes the dynamic pages and send
the results to the client. The script in the dynamic pages can
Keywords- campus second-hand goods trading platform; B/S; interact with database server.
JavaBeans; MVC The Web server can update the information on the page
dynamically according to user's request, the Web
I. WEB APPLICATION SYSTEM STRUCTURE BASED ON information provider can provide users with the latest
B/S information by changing data in the database, without the
The wheel of history load us in the era of informatization needing to change the page one by one. Users can enter
and knowledge economy. The rapid development of Internet information in the database through these dynamic pages to
make more and more people use the new technology to enhance the interaction between the user and the server.
service for their work, study and life. Because a Web page Struts is open source framework, which can be used in the
can integrate the text, images, sound, animation, video and application architecture of model-view-controller (MVC)
other media information in a body, it not only keeps the pattern[5-8]. It uses Servlets, JSP and custom tag library to
information more vivid, but also makes the information build Web application. Because the Struts can completely
browsing more convenient. The Web page at the same time meet the requirement of application development, whic is
can realize online trading platform, customer feedback, etc., easy to use. MVC is a design pattern, it is mandatory to
which is convenient for exchange of information between separate the input, processing and output of application[9,10].
merchants and customers. In the current society, various MVC application always consists of three parts: model, view
types of e-commerce sites have been setting up, which can and controller, respectively, which are responsible for
solve blocking of people information resources to a large different tasks. View shows model state and receives data
extent. As a college campus, along with the improvement of update request. The user input data is sent to the controller,
students' ability to buy and entrance and graduation of each controller receives the user request, calls model response to
year, a large number of second-hand goods is produced. Due responsea user request, and selects view to show the
to the backward information exchange, a lot of information response results. Finally model represents the application
is restricted to campus bulletin boards. There are many state to response status query processing business processes,
limitations in this way, at the same time, it can't meet the and notifies the view business status update. The role of the
requirements of second-hand goods clear communication. So, MVC pattern mainly causes independence of the program
a new way of information communication of second-hand higher and each layer independently finishes their task. A
items is produced, which is the campus second-hand goods partial error will not affecte other parts, such written
trading platform based on Web. procedure is more clear. JSP website development
At the early stage of Web development, Web technology standard provides two modes. One kind is the
applications mainly release information on the Internet JSP+JavaBean development mode[11,12]. One is a
Authorized licensed use limited to: Xi'an Jiaotong-Liverpool University. Downloaded on May 31,2021 at 08:33:12 UTC from IEEE Xplore. Restrictions apply.
JSP+Servlet+ JavaBean development model, which is shown possible. In running, since the client only needs a browser,
in figure 1. users login system through a browser, and the server also
needs only one server, the server requires a database and
web application development environment, which is easy to
implement, so from the running view, the system is feasible.
Such a system at the same time, in the legal management of
system administrators and users conscious cooperation, there
are not any illegal activities and trading violations. In a
variety of feasibility study and based on the request of the
user requirements, develop system scheme is determined
Figure1.JSP+Servlet+JavaBean model through constant arguments and assumptions.
In the JSP+JavaBean model as shown in figure 2, JSP The system consists of the foreground information
page alone responds to the request and will process the browsing, the user management and background
results returned to the customer, all of the data processed by management. Foreground information browsing displays the
JavaBean. This model often leads to a page is embedded in a latest commodity information, the special offer product
large number of scripting languages or the Java code, when information and provides on-site search. It is convenient for
dealing with large business, page program would become the user more quickly and accurately to find the needed
complicated and difficult to develop and maintain[13]. information. The front desk provides the user login and
administrator login, and can connect the university campus
news. After user logining, they can view and edit register
information, retrieve password, check the item details,
shopping, check the order information, online
communication, etc. Administrators can view, manage
Figure2.JSP+Servlet+JavaBean model customer information, manage commodity information to
Servlet technology is a kind of technology using Java to ensure that the normal operation of the site.
realize the function of CGI. The Servlet runs on a Web
server, which is used to generate a Web page[14-16]. The
Servlet technology is very suitable for server-side processing
and programming. In this kind of development mode, JSP
technology is used to display the page, the page does not
have any business processing logic, and it deals with a lot of
things through the Servlet technology. Servlet is used to deal
with request of affairs, which acts as the role of controller,
sents request to the customer, creates Bean and the object
needed by JSP and decides to send which JSP page to the
user according to the request behavior of the user.
II. SYSTEM REQUIREMENTS ANALYSIS
Designing such a system fundamentally solves the
disadvantages of traditional campus second-hand
information communication way, which makes all kinds of
the campus second-hand goods information effectively
integrated, which is convenient for the user. And the users
are mostly students in college, so system scale is not big.
Economically, almost all the choice of development
tools and server are free open source software and the low
cost development is based on Web B/S mode, rather than the Figure3. The functional requirements
relatively high cost of C/S mode, so it is feasible The overall mission of system is to realize students'
economically. Technically, because the system is based on second-hand goods trading platform. It mainly includes the
the Web, it can easily been developed according to the functional requirement of the tourists, members and
actual needs of users. In nowadays, the development of administrators to this platform. The functional requirements
various network application has been quite mature, several is shown in figure 3. It contains system security,
major development languages and tools appear, which can comprehensive system content, system flexibility, scalability,
be very effective to support and develop such a system. At and easy maintenance. The development environment is as
the same time, there also are a lot of successful experience of follows.
e-commerce sites, so from a technical point of view, it is also (1) the server side
262
263
Authorized licensed use limited to: Xi'an Jiaotong-Liverpool University. Downloaded on May 31,2021 at 08:33:12 UTC from IEEE Xplore. Restrictions apply.
Operating system: Windows XP and above version; <servlet-name>OrderServlet</servlet-name>
The Web server: Tomcat 6.0; <url-pattern>/OrderServlet</url-pattern>
Development environment: MyEclipse8.0 integrated </servlet-mapping>
development environment; Filters can be added at any time in the project, because it
Web development framework: Struts 1.2; is a separate code, it is used to do some preliminary
The Java development kit: above JDK 1.5; validation when a request comes to some page. The filter is
Database: SQL Server 2000; mainly used for processing of chinese gibberish and user
Browsers: Internet explorer 8.0; login in the trading platform. The garbled message filtering
Resolution: 1024 x768 pixels. is as follows.
(2) the client <filter>
Operating system: Windows XP and above version; <filter-name>encoding</filter-name>
Browser: Internet explorer 8.0; <filter-class>cn.czmec.servlet.EncodingFilter</filter-
Resolution: 1024 x768 pixels. class>
Campus second-hand goods trading platform adopts <init-param>
three layer architecture of B/S mode. The front desk function <param-name>encoding</param-name>
module includes user information management, commodity <param-value>gb2312</param-value>
information display, shopping cart management, online </init-param>
communication, message management and other modules. In </filter>
the campus second-hand goods trading platform, all the user <filter-mapping>
of the front desk can enter home page of the trading platform, <filter-name>encoding</filter-name>
to view the list information of all commodities and you can <url-pattern>/*</url-pattern>
also leave a message and reply. For member user, you can </filter-mapping>
also view the details of the goods, carry outt online shopping, Sometimes it is needed to know about the user using the
check the order information and communicate. system, and how many people are using the system. At that
In campus second-hand goods trading platform, the time, you can implement online number statistics and online
background administrator enters the background monitoring by means of session listener
management interface. The administrator can query and (HttpSessionListener interface) and ServletContext listener
delete users. Administrator also can query, add and delete (ServletContextListener interface). Code of online people
the types of the items in the trading platform. At the same monitoring is as follows.
time, administrator also can maintain the dynamic <listener>
information announcements and links of trading platform. <listener-class>cn.czmec.servlet.OnlineCount</listener-
Background has two kinds of identities, which is the class>
administrator and super administrator permission, and the </listener>
only difference is the super administrator can add and delete MVC three-tier design is realized by means of Struts.
privilege of relevant administrative, but ordinary After the completion, the system produces a Struts-
administrator can only maintain their own information. config.xml file, the file is the core of the Struts, and its main
This design uses relational database and the database function is as a data storage. Some important parameters in
meets the requirements of 3NF, in order to improve the the class are stored. When Tomcat is loaded, the XML file in
operation efficiency of the system. the Struts will be found, and then reads configuration
parameters into the corresponding class.
III. DETAILED DESIGN AND IMPLEMENTATION OF THE After finish coding work, platform testing is carried out.
SYSTEM (1)interface test. Don't open the Web server, click links on
A Web container can run multiple Web application, and the page over and over again to test its connection, until all
each application has a unique context root. How to deploy links achieve the desired effect.
the context root is associated with specific Web container. (2)functional test. Several major functional modules are
When the user sends request from the browser, the Servlet tested and try best to find the potential error.
container receives a request. How to determine which Web (3)the performance test. The program is issued in the local
application should respond needs comparing the beginning area network to see whether it meet the user's request.
of the requested URL and context path to decide, so it is (4)demand test. According to the demand analysis, test
necessary to configure the mapping between Servlet and whether the content of the site is the same as the original
URL. Cofiguration of web.xml is as follows. design. Through testing of these aspects, we can timely
<servlet-mapping> correct system to improve the problem of the system, so as
<servlet-name>OrderServlet</servlet-name> to achieve the anticipated goal.
<url-pattern>/OrderServlet</url-pattern>
</servlet-mapping>
<servlet-mapping>
263
264
Authorized licensed use limited to: Xi'an Jiaotong-Liverpool University. Downloaded on May 31,2021 at 08:33:12 UTC from IEEE Xplore. Restrictions apply.
IV. CONCLUSIONS [13] C. D. Tang, Wang Zhiping. Design and Implementation of
Laboratory Teaching Management System in University,Computer
This paper develops a second-hand goods trading and Modernization, vol. 14, pp.113-116, Sep. 2013.
platform for the campus transaction market. It is practical, [14] A. X. Chen, Design and Implementationof University Experimental
has simple operation, and has friendly interface. It lets the Teaching Management System, Computer Knowledge and
campus people who need to buy and sell shares the same Technology, vol. 28, pp.1926-1927, Sep. 2014.
access to information, and implements the online and offline [15] R. L. Zhou, “Design and Implementation of Mixed Mode for
Teaching Management System Based on C/S and B/S, Office
interaction between the buyers and sellers. Informatization, vol. 32, pp.58-59, Dec. 2009.
System uses JSP technology and uses the Java [16] A. Qu, Study and design of college education and teaching
programming language, which is a campus second-hand management system based on Web Technology, Electronic Test, vol.
goods trading platform based on Web software.The system 20, pp.10-12, Sep. 2014.
is practical, flexible and is easy to operate.
ACKNOWLEDGEMENTS
REFERENCES
[1] ZHANG Wei, GAO Yuan. The Design and Implement of Web
Application System Based on Struts Framework. Computer
Knowledge and Technology, 2009-15.
[2] ZHU Tao, ZHANG Shui-ping. B/S mode-based Teacher Information
Management System's Realization. Computer Knowledge and
Technology, 2005-02.
[3] YU Dong-mei, ZHANG Qiu-yu, LIN Chang-xu, TANG Jing-bing.
Study of MVC design pattern to support multiple terminal based on
J2EE, Computer Engineering and Design, 2005-03.
[4] LIU Jun-qiang, GU Hai-quan, WANG Xun,LI Xiu-rong. Application
platform based on integration of open source frameworks, Computer
Engineering and Design, 2007-01.
[5] XiuqinHou, DiankunFang, Zhongchun. The design and
implementation of Web applications Based Struts and Hibernate.
Control & Automation, 2005-23.
[6] LIU Yang, GAO Lian-sheng,WANG Bin.Study and implement of
distribution system based on J2EE and MVC design pattern.
Computer Engineering and Design,2007-07.
[7] YUAN Meileng, HUANG Yan bo, HUANG Jia lin, WENG Yan
bin. The Research and Application of MVC Software Architecture
Based on J2EE, Application Research of Computers, 2003-03.
[8] CHEN Da-xin, YANG Lu-ming. Application of MVC Design Pattern
in Distance Test System, Microcomputer Development, 2004-10.
[9] Liang, W. Research on Database Connection Technology of Web
Application Based on JDBC. Journal of Hefei University (Natural
Sciences) 4, 2010. pp. 29-32.
[10] Kratt, C., Calvin, W.M., Coolbaugh, M.F. Mineral mapping in the
Pyramid Lake basin: Hydrothermal alteration, chemical precipitates
and geothermal energy potential. Remote Sensing of Environment
2010, pp. 2297-2304.
[11] Harris, A., Hossain, F.Investigating the Optimal Configuration of
Conceptual Hydrologic Models for Satellite-Rainfall-Based Flood
Prediction. IEEE Geoscience and Remote Sensing Letters, 2008. pp.
532-536.
[12] Kumar, S, Peters-Lidard, C, Tian, Y. An Integrated Hydrologic
Modeling and Data Assimilation Framework. Computer, 2008, pp.
52-59.
264
265
Authorized licensed use limited to: Xi'an Jiaotong-Liverpool University. Downloaded on May 31,2021 at 08:33:12 UTC from IEEE Xplore. Restrictions apply.