摘要:近年来,互联网已不是什么时髦的词汇,在国内的市场网上订票的比例也越来越多。原因是网上订机票有诸多好处。首先,网上大容量的信息令人一目了然,车次信息、路线信息、车票的可售情况等能更方便预订者进行查询、比较和预订。同时,网上订票不受时间和空间的限制,客户不必亲临长途汽车站,也无需非要赶在营业时间内,随时随地,均可轻松上网订票。另外,车票价格同样可以享受到明折明扣,网上价格信息一目了然,您可以选择以现金支付,也可以网银支付。
该长途汽车订票系统采用ssh(Struts2 + Spring + Hibernate)、javascript脚本控制和Ajax异步交互等技术来开发。结构上分为表现层、业务层和数据访问层。其中表现层采用Struts框架开发;业务层封装业务流程,为适应业务的变更,每一业务模块均有专门的接口及实现类,利用Spring的IOC功能将实现类注入给表现层的Action;数据访问层借助于Hibernate实现,代码简洁且可适应不同的数据库。事务部分利用Spring的声明式事务管理。该系统严格按照软件开发流程:需求分析、页面设计、概要设计、详细设计、测试运行等。
关键词:长途汽车订票系统 ,Hibernate ,Struts2 ,Spring
Abstract:Internet is no longer fashionable words in recent years, and the percentage of booking via the Internet in the domestic is getting higher and higher. The reason is that there are various benefits of booking on the Internet. First of all, the great capacity of information is clear at a glance, the bus number and their routes and whether the tickets are available are very convenient for people to inquire, compare and book. Also booking over the Internet can be restricted by the time and space, you don’t have to be at the station, and you don’t have to in the business hours, you can book every time, everywhere just if you like. Besides, the prices of tickets are of apparent discount, you can choose to pay in cash, and of course, you can choose to pay over the e-bank.
The bus booking system is developed using technologies of ssh(struts+hibernate+
spring),and javascript script controlling and ajax asynchronous interaction. The construction of the system can be divided into three layers which are UI, business layer, and the data access layer. And the UI layer is developed under the framework of Struts. The business flow is packaged by the business layer so as to be accustomed to the changes of the business. There are unique interface and classes of each business module and with the IOC function of Spring, the classes is filled into the Action of the UI layer. The data accessing layer can be achieved via Hibernate, the codes are concise and different database can be accessed. The part of business is achieved via the declaration of transaction management. The development of this system is in strict accordance with the software developing process which consists of demand analysis, UI designing, outline design, detail design and operation test, and etc.
Key Words: bus booking system , struts2 ,hibernate ,spring
目 录