Simulated test system based on J2EE framework
First, system overview
This system intends to implement basic online simulation test functions, including students login, online exam, teacher login, online scrolls and other modules.
Second, design goals
In addition to including the most basic online exam function, the most important purpose is to demonstrate the complete application of the J2EE framework, including JSP / Servlet, Java Web Start, Message Bean, Session Bean, Equivalent, etc. J2EE Framework. A large number of factory modes, single-case patterns, delegations, and DAO mode in J2EE core mode are used in the system, and the DAO mode in the J2EE core mode is guaranteed to ensure the scalability and insertability of the system.
This system uses both CMP and Hibernate OR mappings for different modules, and also attempts to optimize system performance by using local interfaces and asynchronous communication. The goal is to make the system with a clear hierarchy while ensuring performance, as well as good scalability and scalability. Such a design may be more crazy, theoretical value is greater than the actual value.
Third, program description
The system is roughly structured as shown below:
The system uses CMP to map the examer.student, Examher.Teacher.Teacher, Examer.examin (Test Data Sheet), because these data structures are relatively simple, data is simple, no need Complex, diverse queries, the system is not frequent in the operation of the data table, usually in the case of being insensitive, so CMP is used. Only the most basic query method is provided in the CMP, all program logic is packaged in the corresponding session bean, and session beans are deployed together, so the local interface can be accessed to access entity beans to improve efficiency. The client interacts with session beans. The advantage of this design is hidden data logic, and the structure of MVC is very clear. The later data maintenance is also relatively simple.
The system uses the Hibernate framework to map the examer.question (Test Item Table). The reason is that the table is more complicated. The complex and diverse query is required. The Hibernate framework provides a more flexible query for easy expansion. Similarly, Hibernate itself does not contain business logic, and the program logic is encapsulated by the corresponding session bean to ensure multi-layer isolation. Since the system may have more frequent access to the underlying data sheet, you can consider the change implementation, and the DAO mode accesses the Data table directly by session beans, improve system efficiency.
For the examer.answer, the system does not take OR mapping. The reason is that the data of this form is saved. In the process of the exam, the form will be frequently operated, but the operation is mostly one-way (add new data), there is not much time to query. In response to this feature, the system uses a message bean session bean, using the DAO mode directly access the data table, providing a asynchronous call mechanism by using J2EE's message service, ensuring data security, and efficiency is greatly improved.
Since the system is developed using EJB, the client is rich and diverse, or both browser-based JSP / servlets can also be AWT / SWING / ST desktop applications. In order to facilitate multi-system integration, the system deploys EJB to AXIS, providing Web Service interface, facilitating other platforms, other languages.
The Model and Control of this system are all completed, and the View section has not yet started.