Xem mẫu

  1. AIRLINE RESERVATION SYSTEM SVTH: Nguyễn Thành Công, Nguyễn Thành Công, Nguyễn Văn Toản, Nguyễn Mạnh Tiến, Đào Thị Thu Thủy, Trịnh Thu Trang GVHD: ThS Nguyễn Đình Trần Long Tóm tắt- Năm 2021, với sự trỗi dậy mạnh mẽ của các ngôn ngữ lập trình web như Python, javascript, và Typescript, java vẫn giữ một vị trí rất ổn định và được sử dụng trong nhiều dự án lớn trên thế giới. Ứng dụng web Java là một tập hợp các tài nguyên động (chẳng hạn như Servlet, Trang JavaServer, các lớp và lọ Java) và các tài nguyên tĩnh (các trang và hình ảnh HTML). Trong bài viết này, nhóm phát triển sẽ thảo luận về Java như là khung phát triển cho Hệ thống đặt chỗ hàng không và giải thích cách nó được áp dụng trong quá trình triển khai lập trình. Abstract- In 2021, With the strong rise of web programming languages such as Python, javascript, and Typescript, java still holds a very stable position and is used in many major projects around the world. A Java web application is a collection of dynamic resources (such as Servlets, JavaServer Pages, Java classes and jars) and static resources (HTML pages and pictures). In this article, the development team will discuss Java as the development framework for the Airline Reservation System and explain how it is applied during the programming implementation. Keyword: Python, Javascript, TypeScript, Java, Servlet, JavaServer Pages, Java classes, jars, HTML pages, Airline Reservation System 1. Introduction Traveling around the world is no longer as daunting as it once was, thanks to advances in science and technology, and flying is now one of the most common forms of transportation. In the late 1950s, the airline reservation system was adopted as a comparatively straightforward standalone system for managing aircraft inventory and preserving flight schedules. The modern airline booking system is a collection of products aimed at providing a system that facilitates multiple airline management activities while also serving the needs of passengers from the time of initial booking to the end of the flight. Online flight booking has many benefits: less time and effort to get to the check-in place, quick check-in without waiting, bookings and cancellations also just got much easier, but not all flight booking systems have a modern, clear and concise user-friendly interface. Intending to solve this problem, the aim of this project is to develop an airline booking system that allows travelers to request all flight details based on their destination using the Java language. The interface is reasonably designed, with high visual efficiency, user-friendly and quickly and accurately synthesizes flight and fare information. Users can get information about time, cost and other factors at the same time and at the same place. All available 72
  2. airlines, timetables and prices are displayed. The website will use the MySQL Database to store the latest flight information, customer information as well as information on the latest airline fares and ticket status. The following parts of this paper will (1) give an overview of using Java in developing web applications, (2) analyze the requirements for the Airline Reservation System, (3) demonstrate the implementation of the application, and (4) evaluate the outcome of the development process as well as suggest potential improvements. 2. Main Content 2.1. Airline reservation system 2.1.1. What is Airline reservation system ? Airline reservation systems (ARS) are part of the so-called passenger services system (PSS), which are applications supporting the direct contact with the passenger. ARS eventually evolved into the computer reservation system (CRS). A computer reservation system is used for the reservations of a particular airline and interfaces with a global distribution system (GDS) which supports travel agencies and other distribution channels in making reservations for most major airlines in a single system. 2.1.2 Overview of using Java in developing web applications Since there are so many Java technologies to cover in one post, this one will focus on the most commonly used. The number of technologies mentioned here can be intimidating. Keep in mind that you won't have to use all of them. In reality, a web application is often made up of just one page built using the JavaServer Pages (JSP) technology. You'll occasionally mix three or four of these technologies. It's important to know what's available and how to use each one in a web application, no matter how many you end up using. Java Servlet API You can build HTTP-specific classes using the Java Servlet API. A servlet class extends the capabilities of servers that host applications that use the request-response programming model to access them. Servlets can respond to any form of request, but they are most widely used to extend web service applications. For example, you could use a servlet to retrieve text from an online form and return it to the screen in an HTML page and format, or you could use a different servlet to write the data to a file or database instead. A servlet is a server-side program that doesn't have its own graphical user interface (GUI) or HTML user interface 73
  3. (UI). Many web applications are possible thanks to Java Servlet extensions. JavaServer Pages Technology The JavaServer Pages (JSP) technology makes creating dynamic web content simple and fast. JSP technology allows the accelerated development of server- and platform- independent web-based applications. Using JSP technology, you can insert snippets of servlet code into a text-based document. A JSP page is usually a text-based document with two types of text: Static data, which can be expressed in any text-based format, such as HTML, Wireless Markup Language (WML), or XML. JSP technology elements, which determine how the page constructs dynamic content. The packages involved in creating JSP pages are javax.el, javax.servlet.jsp, javax.servlet.jsp.el, and javax.servlet.jsp.tagext, though you will rarely have to import these directly. A JSP page can be as simple as a bit of HTML with one snippet of JSP code and the .jsp extension of the page name. JavaServer Pages Standard Tag Library The JavaServer Pages Standard Tag Library (JSTL) is a library that encapsulates core features used by many JSP-based applications. You use a common uniform set of tags instead of combining tags from various vendors in your applications. This standardization allows you to run your applications on any JSP container that supports JSTL, and it increases the likelihood that the tags will be implemented correctly. JSTL has iterator and conditional tags for handling flow control, tags for manipulating XML documents, internationalization tags, tags for accessing databases using SQL, and tags for commonly used functions. 2.2. Requirements Analysis The objective of this phase is to transform the needs and high-level requirements specified in earlier phases into unambiguous (measurable and testable), traceable, complete, consistent, and stakeholder-approved requirements. During the Requirements Analysis Phase, the agency will conduct any procurement needed for the project. This phase also includes the 74
  4. use-case diagram which will describe the functionalities of the whole system. Figure 1. Use case Diagram The purpose of this project is to design and develop a flight reservation system where users can browse, view and book a flight. Integrated with logistical and payment support, the asset-light platform claims to make ticket booking easy and secure for both sellers and buyers. Therefore, this includes three main of actors, which are User, Passenger and Administrator. ❖ User : browse the website then view schedule, price, check flight, book flight and search flights. ❖ Passenger : reschedule flight or cancel flight ❖ Administrator : Sign into system with special role, manage tickets. seats, passengers, flights and all account of the system. 75
  5. The detail use-case specification can be seen in the “Use-case specification” document. Other non-functional requirements are documented in the Non functional requirements definition 2.3. Implementation 2.3.1 Version Control Git and Github are now popular standards, therefore our team has chosen to use these tools in the software development process. Git allows the user to track changes to files over time so that the user can go back and look at specific versions later. Github is an online software development assistance and version control service that allows users to share with others on user’s Git repositories by hosting them online. People that have been shared Git repositories can easily view code, push their changes to Github, and also pull changes to their computer. Figure 2 : Github Management 2.3.2 Implementation The implementation of this project is divided into different phases corresponding to different packages of the project code. Implementation accomplished in two main phases: Frontend implementation comes first, then comes backend implementation. The team considers at the beginning of each stage in which members are assigned or tasked themselves, completing the implementation and then pushing the code to the Github repository. The first is frontend , the team uses serve Dynamic HTML Content to FrontEnd Java Servlet (Figure 3) . Views are divided into two main parts: client view and admin view. Each section is 76
  6. divided into different JSP files for each display screen (Figure 4, 5). In addition, Bootstrap is used in this project to responsive the design, it maintains wide browser compatibility. Figure 3 : Front-end Implementation 77
  7. Figure 4 : Client View Figure 5 : Admin View Backend is the next implementation of this project. This implementation phase starts with creating models, DAO and Service Layers followed by the creation of Controller and View. Nguyễn Nguyễn Nguyễn Văn Đào Thị Thu Nguyễn Thành Trịnh Thu Thành Công Mạnh Tiến Toản Thủy Công Trang Model Ticket Flight Flight Passenger User Reservation DAO TicketDAO FlightReser FlightDAO PassengerDAO UserDAO layer vationDAO. java Service TicketServic FlightReser FlightService PassengerServic UserService layer e vationServi e, ce PaymentService Controll Admin Ticket Login, Flight, Ticket User er Logout, Register Customer Ticket Flight Login, Passenger + Reservation Logout, Payment Register Views The views are created corresponding to the controllers that each member is in charge of. 78
  8. 2.4 Design The group paid attention to design four main parts : Database Design, Class Diagram, Activity Diagram and Sequence Diagram. Within the scope of this project and according to the requirement, there are 6 objects that are arranged in the table of database design (Figure 6 ): passenger, users, ticket, payment, flight and flightReservation as well as the properties that go with them showed in Entity- Relationship Diagram to identify the data model of the system. Figure 6 : Database Design The second part is Class diagram (Figure 7) which describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among objects. it shows static structure of classifiers in a system ,helpful for developers and other team members too.Business Analysts can use class diagrams to model systems from a business perspective. 79
  9. Figure 7 : Class Diagram Activity diagram (Figure 8) is the third part. This is another important behavioral diagram in UML diagram to describe dynamic aspects of the system. Activity diagram is essentially an advanced version of flow chart that modeling the flow from one activity to another activity. Figure 8 : Activity Diagram The last is Sequence Diagrams which capture the interaction between objects in the context of a collaboration. Sequence Diagrams are time focused and they show the order of the interaction visually by using the vertical axis of the diagram to represent time what messages are sent and when. 80
  10. Figure 9 : Sequence Diagram 2.5 Evaluation 2.5.1 Advantages The first advantage is the high performance. A Java application's performance can be greatly improved by using Just-In-Time compilation, adaptive optimization, garbage collection, and multi-threading. The Java architecture is also intended to reduce runtime overheads. The second upside of using Java is a true object-oriented programming language. Almost everything in Java is an object. Objects and classes contain both program code and data. Java has a large number of classes grouped into packages that can be inherited and used in applications. Java's object model is trouble-free and simple to extend. 2.5.2 Limitations Although Java is high performance, it seems to be less productive than other programming languages. It is better suited for large projects like banking rather than small languages. Startups today need to hit the market as soon as possible. Java does not do it well in this area, which makes it a minus point of using Java. Using IDE for Java is extremely important and essential for those who do not have much experience using java and that makes web application development in java become IDE dependent. 81
  11. 2.5.3 Further improvements Currently, the system has not provided features to evaluate the quality of the service as well as the feedback of customers. In the future, the system will implement the chatbot to automatically answer frequently asked questions to help better interact with customers. Authentication is another enhancement. Rather than checking the login feature with dump info, the development team would use cloud-based authentication, which is more reliable and professional. Users will be able to sign up using their social network account, and their information will be synced to the cloud. One more thing, In the more distant future, the system will develop to help users find and book hotels, or book a taxi to make the experience of using the system more diverse. Besides, the system will develop an application on mobile devices in order to diversify forms of access and make it more convenient for users. 3. Conclusion Technology is advancing at a rapid pace nowadays, humans can easily move to remote places quickly and conveniently by plane. That's why flight booking systems appeared and became extremely relevant and useful. Due to the increased use of large-scale systems, software engineering is now more focused on various metrics such as usability, ease of use, and, most importantly, scalability. In this report, we have developed a flight booking system using Java language and applied the MVC model in application development to give our customers the best and most special experience using the service. REFERENCES [1] Addison Wesley (2003, February 26). Software Architecture in Practice [Online Book]. Retrieved from http://elibrary.lt/resursai/Leidiniai/Litfund/Lithfund_leidiniai/IT/Addison%20Wesley%20- %20Software%20Architecture%20In%20Practice%202Nd%20Edition%20Ebook-Lib.pdf 82
nguon tai.lieu . vn