APP下载

基于SSM的前后端分离电商网站的设计与实践

2018-07-20戈家龙吴红亚杨保华

电脑知识与技术 2018年13期

戈家龙 吴红亚 杨保华

摘要:21世纪互联网处处是机遇,谁能够把握机会,将产品快速上线,谁就有可能获得领先地位。论文基于SSM三大框架javaEE框架spring、springMVC、Mybatis,设计完成了电商网站。首先分析了基于前后端分离的电商网站的必要性和优势,然后对电商网站进行了需求分析和程序设计,探讨了前后端网站开发的技术实现。论文设计了基于SSM框架的前后端分离的电商网站,实现了一些电商网站的基本功能,如登录注册、加入购物车、提交订单、付款。

关键词:电商网站;架构;前后端分离;测试

中图分类号:TP393 文献标识码:A 文章编号:1009-3044(2018)13-0276-02

Design of the Frontend and Backend Separation E-commerce Website Based on SSM

GE Jia-long, WU Hong-ya,YANG Bao-hua

(Changzhou Vocational Institute of Mechatronic Technology,Changzhou 213164, China)

Abstract: The Internet is everywhere in twenty-first Century. If the opportunity and the product can grasped and launched quickly, the leading position will be wined by the company. The e-commerce website is designed based on the three major frameworks of SSM which are javaEE framework spring, springMVC and Mybatis. Firstly, the necessity and advantages of the e-commerce website based on the separation of the front end and the end are analyzed. Then, the demand analysis and program design of the e-commerce website are carried out, and the technology implementation of the front end website development is discussed. Finally,an e-commerce website is implemented based on the SSM framework, and the basic functions is realized, such as registration, shopping cart, order and payment.

Key words: e-commerce website; framework; Separation of frontend and Backend; test

1 背景

随着互联网的高速发展,电子商务也日新月盛,人们在网上购买商品已经是非常平常的事情,电商网站正是其中的核心[1]。如何高效,快速地开发网站,成为企业的制胜关键[2]。前端、后端和数据库组成了一个完整的网站[3]。传统的开发方式将前端代码和后端代码混杂在一起,如ASP、JSP技术等,这种开发模式需要在前端穿插后端工作或在后端穿插前端工作,导致代码可读性差,开发效率低等问题。基于以上原因,前后端分离的开发架构孕育而生[4-5],提高了网站的开发效率、代码逻辑更加清晰,更加容易应对变化不断的需求,更容易维护,综合减少开发成本。

该论文采用前后端分离和模块化相结合的开发方式,IDE选择IntelliJ Idea,与当下最流行的三大javaEE框架spring、springMVC、Mybatis相结合,服务器采用tomcat,数据库选取Mysql。

2 电商网站的分析与设计

2.1 电商网站的需求分析

分为门户部分和后台管理部分。……

登录APP查看全文