Xem mẫu

  1. DESIGN AND DEVELOPMENT OF BACKEND APPLICATIONS FOR BANKING ONLINE SYSTEMS USING JAVA SPRING BOOT SVTH: Tăng Bá Minh, Nguyễn Thị Thùy Dương, An Thị Phương, Trần Thị Ngọc Anh, Dương Hoàng Nam GVHD: ThS Nguyễn Đình Trần Long Tóm tắt - Ngày nay, các ngân hàng dường như đang nhảy vào cuộc đua ngân hàng qua Internet. Ngân hàng trực tuyến hoặc ngân hàng điện tử cho phép khách hàng của tổ chức tài chính sử dụng dịch vụ, thực hiện các giao dịch tài chính trên một trang web bảo mật. Mục đích của nghiên cứu này là tìm hiểu về việc sử dụng Spring Boot để xây dựng và phát triển hệ thống ngân hàng trực tuyến.Một số nội dung chính được đề cập trong nghiên cứu này là định nghĩa về Spring Boot, lý do sử dụng Spring Boot, việc sử dụng Spring Boot trong phát triển hệ thống ngân hàng điện tử, kết quả và đánh giá. Abstract - Today, banks seem to be jumping on the bandwagon of Internet banking. Internet banking or electronic banking allows a customer of a financial institution to use services, to conduct financial transactions on a secured website. The purpose of this research is to learn about using Spring Boot to build and develop an online banking system.Some main contents mentioned in this research are the definition of Spring Boot, the reason for using Spring Boot, the use of Spring Boot in development the e-banking system, the result and evaluation. Keyswords: internet banking, financial transactions, Spring Boot A. INTRODUCTION With the development of information technology and the internet, a series of online banks were born to serve online customers. Online banking services have gradually replaced traditional methods. To build online banking systems with complex structures with many different types of services and utilities, developers and programmers need the support of technology framework. Spring Boot provides a good platform for java developers to get started with an auto cconfigurable production- Spring application. With it, developers can get started quickly without losing time on preparing and configuring their Spring application. B. MAIN CONTENT I. Definition of Java Spring Boot Spring Boot is a module of Spring Framework, provides RAD feature (Rapid Application Development). It is an open source Java-based framework used to create a micro Service. Spring Boot is developed by Pivotal Team and is used to build stand-alone and production ready spring applications. Spring Boot helps developers to start coding right away 114
  2. without wasting time on preparing and configuring the environment. Micro Service is an architecture that allows the developers to develop and deploy services independently. Each service running has its own process and this achieves the lightweight model to support business applications. With Spring Framework, it provides a comprehensive infrastructure to support Java application development programmers. It packs some special features like Dependency Injection and modules like: Spring JDBC, Spring MVC, Spring Security, Spring AOP, Spring ORM, Spring Test. These modules can help programmers greatly reduce application development time. Spring framework also has a limitation that the configuration steps are complex and take time for the application to run. However, with Spring Boot, it overcomes these limitations, provides an easier and faster way to set up, configure, and run both simple and web-based applications. In short, Spring Boot is the combination of Spring Framework and Embedded Servers. In Spring Boot, there is no requirement for XML configuration (deployment descriptor). It uses convention over configuration software design paradigm that means it decreases the effort of the developer. The main goals of Spring Boot is to reduce development, unit test, and integration test time: provides Opinionated Development approach, avoids defining more Annotation Configuration, avoids writing lots of import statements, avoids XML Configuration. The features of Spring Boot are : web development, spring application, application events and listeners, admin features, externalized configuration, properties files, type-safe configuration, logging, security. Spring Boot automatically configures application based on the dependencies that have added to the project by using @EnableAutoConfiguration annotation. The entry point of the spring boot application is the class contains @SpringBootApplication annotation and the main method. Spring Boot automatically scans all the components included in the project by using @ComponentScan annotation. II. Reasons for using Spring Boot Framework First, it is based on Java, which is one of the world’s most popular programming languages. Besides that, Spring Boot can help you to quickly build any applications without having to worry about their safe and correct configuration. 115
  3. Second, Spring Boot has many advantages: • It inherits the Spring framework’s features • It creates stand-alone Spring applications that can be started using Java -jar. • It tests web applications easily with the help of different Embedded HTTP servers such as Tomcat, Jetty, etc. We don't need to deploy WAR files. • It provides opinionated 'starter' POMs to simplify our Maven configuration. • It provides production-ready features such as metrics, health checks, and externalized configuration. • There is no requirement for XML configuration. • It offers a CLI tool for developing and testing the Spring Boot application. • It offers the number of plug-ins. • It also minimizes writing multiple boilerplate codes (the code that has to be included in many places with little or no alteration), XML configuration, and annotations. • It increases productivity and reduces development time. III. Java Spring Boot in action: Banking System project summary The project “Banking system” is a web application for solving financial applications of a customer in banking environment in order to nurture the needs of an end banking user that provides the customers of a financial institution with access to financial transactions in a public space without the need for a human clerk or bank taller (manpower). Also, it is more convenient for the admin of the system to manage accounts of customers and also their transactions. The web application was built by using Java Spring Boot, JSP and Bootstrap, however, with the big help of Java Spring Boot, the speed of our implementation is faster. Actually it is an excellent platform for Java developers like us to develop a stand-alone and production- grade spring application that we can just run. To access the web application, we access http://localhost:8080/ Figure 1: CodersBank Homepage 116
  4. The backend was designed based on the Model-View-Controller (MVC) pattern with a few modifications: ● Model: represents the shape of the data. A class in Java is used to describe a model. Model objects store data retrieved from the database. ● View: The JSP and JSTL syntax provides a simple, clean and lightweight way to render HTML content based on your view. ● Controller: It is used for request handling. In our project, we divide into 2 layers: Controller and Service Layers. The Spring Web model-view-controller (MVC) is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale and theme resolution as well as support for uploading files. The default handler is based on the @Controller and @RequestMapping annotations, offering a wide range of flexible handling methods. With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features IV. Development of Banking System Banking Sytem is a Java web applications have been developed using Java Server Pages with Servlet by using Java Spring Boot Framework. The development process was divided into phases: Analysis, design, implementation, and testing. Three first phases are done with Waterfall. Implementation and Testing are done at the same time and in several sprints using Agile. Due to the length of this paper, only the most important and outstanding diagrams and processes will be attached and discussed; more information can be found in the project’s repository [Appendix 1]. Analysis: In this application, we have 12 domains as shown in the below ERD. Figure 2: Banking System’s Entity-Relationship Diagram 117
  5. Design To develop our project, we decided to use Three-tier Architecture – a client-server architecture. Figure 3: Three-tier architecture This figure describes how MVC (the design pattern that will be specified in detail in the next section) is implemented in a 3-tier architecture which we use in developing this project. Backend design and Class Diagram To easily implement the project, the UML Class Diagram is defined in the Design phase. The Class Diagram shows how objects will be implemented as well as their relationships. According to the MVC design pattern and 3-tier architecture we decide to organize our code by module or feature, because it is more scalable, as your application grows it will be a lot easier to maintain and navigate through the code if the code is organized around the module concept. Hence, our Class Diagram will be divided into 4 detail packages: base package, config package, domains package and Controller package. Frontend design The web application is developed using Bootstrap framework version 4. Boostrap is used for building client applications in HTML, CSS that compiles JavaScript in an JSP (Java Server Pages) view. JSP is a server-side programming technology that enables the creation of dynamic, platform-independent methods for the web application and JSTL syntax provides a simple, clean and lightweight way to render HTML content based on your view. 118
  6. Implementation Implementation is carried out at the same time for front-end and backend. The front-end server was developed and tested in Postman with mock API. The backend server was developed in the same way as to how a normal Java Spring Boot web application is created. V. Banking System – work results Within required time working with this project, the project team has released the first major version of the web application. This release contains a dashboard for each user of the system along with the functionality to log in, register and manage customers, customer’s accounts, transactions for administrator and manage accounts, transactions, e-wallets for customers. Typical pages: View All Customers Create a new Customer The details of the project can be found in the project’s repository [Appendix 1]. 119
  7. VI. Evaluation Advantages - The backend of our system is developed with Java Spring Framework which is the most popular application development framework of Java. - The frontend is implemented by Bootstrap which is the most popular front-end open source toolkit. - This application is designed with reusable JSP UI components that make it clearly, friendly and easy-to-use. - We have implemented all the core functions of the typical banking system: Create new Customers, create new Account, create 3 types of transactions including Transfer to another account, Charge money from an E-wallet by customer or directly by administrator, or Withdraw money to their E-wallet. Limitations - Our web application cannot provide a strong authentication which is actually important to a banking system. - This project requires a long period of time, our team had to spend much time to research how a banking works and the banking terminology as no one in our team has the experience in this field. VII. Conclusion In recent years, web application development is an area of the Information Technology industry that constantly evolves, along with the advancement of technologies and tools. Our product, which is applied a trend of using framework – Java Spring Boot to increase productivity and save time of configuration. We also use Three-Tier Architecture to our Banking Management System, which can be improved scalability, enhanced re-usage, improved data integrity, enhanced security, reduced distribution and also it can hide database structure. Besides, with MVC design pattern, we employed the Spring Web model-view- controller (MVC) to build our application. The resulting web application – Coders Bank is not a perfect version of a banking system, this website cannot serve a larger number of users at the same time, the functions are not completed enough but it still satisfied the basic requirements for a typical banking system in real life. In the future, our team will improve its features and bring out more advancement in order to enhance the performance and usability of this web application. 120
  8. REFERENCES [1] Spring Boot, 2021 VMware, Inc. or its affiliates, referenced from https://spring.io/projects/spring-boot [1] dzone.com. 2017. What Is N-Tier Architecture? - Dzone Devops. [online] Available at: [Accessed 6 May 2020]. APPENDIX [1] Project repository: https://github.com/2021FIT-SE2/banking-system.git 121
nguon tai.lieu . vn