Question

I am a novice programmer and would like to develop a desktop application on JAVA "Bus Ticket Reservation". Multiple device may access from different places in this system. I have no idea in networking communication programming. Please help me with some topics:

  • what technique should i learn to communicate with server from different computers to book or check a query ???
  • is it related with database?? should i use mysql database to track the booking?

May be i asked dumb question, please give me some advice and if there any good tutorial.

Was it helpful?

Solution

Since you want to develop a desktop application, you should realize that database is going to be the important component of the application. The outline of steps which you must follow are -

  1. Develop a GUI interface which you will need to distribute to users and will serve as client application. Some basic features which you can provide in the client GUI would include choosing unique identifier (like username), entering booking details, looking at booking history and allowing cancellation.
  2. Develop a database backend which is capable of handling this data. The corresponding tables include - users, bookings and cancellations.
  3. Use JDBC to connect your java application with the backend.

This task does not require knowledge of socket programming. It just requires basic GUI development skills and connecting the application with database using JDBC. You may choose MySQL or PostgreSQL as the backend database. Netbeans IDE provides excellent support for GUI development (Drag and Drop) and you should use it to reduce your development time. For connecting to MySQL through Java, you may go through this link - http://dev.mysql.com/usingmysql/java/ or google for plenty more.

SYNCHRONIZATION
Create a 15 minutes ('t' in general) timeout thread which is initiated once the user submits all the details. You should update the database by reducing the quantity of available tickets for this session. You can also maintain a table which stores active bookings. Within these t minutes, if the user confirms booking, remove the entry from active booking. Otherwise, add the ticket quantity back to available tickets and terminate the session. This is the simplistic way to implement it. http://in.bookmyshow.com folllows this model.

OTHER TIPS

For Desktop application in networking field learn socket programming or FTP(File Transfer Protocole) and RMI( Remote Method Invocation)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top