| With the rapid development of the mobile Internet technology and the increase of mobile users,e-commerce businesses are constantly tilting to mobile terminals.Different clients in different languages,platforms,and versions,such as Web,iOS,Android,need different services to support.However,the missing commonality of interface layer implementations and the highly coupled designed between the servers and clients make the low rates of code reuse,which cause the services on the service-side to become complicated.Based on the REST design style,this paper reports a set of e-commerce server client architectures with common interface,decoupled business and dynamical management and updating.This paper adopts the bottom-up approach to design the server-side framework.At the bottom layer,services are split into a single REST resource unit and exposed as URI address,which are to ensure that the businesses are decoupled.The business layer,as the combination of the bottom resources,supports the individual improvement of the business and improves the scalability and flexibility of the server-side.At the interface layer,a set of universal REST API interfaces and Mock data are defined,which not only support all kinds of client services to ensure the identity of the services,but also improve the code reuse to achieve the unified management and maintenance of business.In view of the security risks on the REST,this paper also adds the certification and authentication mechanisms to guarantee the access security of sensitive resources.In the client update and reversion,in order to simplify the cumbersome processes that need to be compiled and audited,this paper proposes a dynamic update client scheme based on configuration files,and provides the Web-side configuration management inlet to facilitate unified management and configuration of clients.Finally,the test work are expanded in this paper.The interface tests of each functional modules show that the interface design is universal and responsive;the front-end performance tests on the configuration management page show that the configuration interfaces have a good interaction experience;the stress tests on the home page interface show that the server can resist the concurrent data pressure from small and medium-sized enterprises.The project of general server for e-commerce based on REST reported in this paper has certain reference value. |