Till now, I have had the experience of developing either a desktop application or a Website. But, with this Hotel reservation system, I am interfacing a problem that needs both.

The application needs to be fulfil the following requirements :

Manager can do the bookings/checkout of the incoming customers at the reception counter System.

Customers should be able to book themselves online.

As you can see, the second requirements clearly means that a web app is required, whereas the first can be accomplished via desktop development.

This type of requirement is pretty common. Like, in case of cinema seat bookings, We are free to book ourself online or we can go the ticket window and buy one. The question is how are these simultaneous and different requirements fulfilled for a single project. There has to be a sync or else the customer might book himself in an already booked room.

From my understanding, there are two ways to develop this solution.

You develop a Web application with a back-end(admin panel) and host it on a server. The customers can book themselves on the front-end, while the manager(at reception desk) can use the administrator panel to carry out his bookings and checkouts. Since both front-end and back-end are using a single database, there is no requirement for sync.

Develop a desktop application for use at the Hotel and a website for the customers to book online. The two applications are maintaining a single datbase, therefore synchronization comes into play. Some definite development for the sync is mandatory or else the system will fail.

Which of the above solutions should I choose ?. This is also a common scenario for banks. They handle transactions at the local branch as well as over the Internet. How do they achieve this thing. Much like i mentioned above or something different.

With a desktop application, why do you assume that there has to be two databases? Why can't a desktop application and a web application interface with the same database?
–
Thomas Owens♦Sep 22 '11 at 14:27

ohh ya....sorry i messed up. So, where should i keep the database, at the server where i am doing the hosting ?
–
Pankaj UpadhyaySep 22 '11 at 14:35

1

Run. Sceaming. This statement comes from someone who has worked with hotel reservations and hotel data interchange.
–
Wyatt BarnettSep 22 '11 at 15:52

4 Answers
4

I agree with the other answers that include web services, but web services is really just one way to implement the solution. The important thing is to separate the reservation system from the various clients of that system. Think in terms of building a reservation server that implements all the logic and data storage needed to keep track of reservations irrespective of any particular UI. The reservation server only presents one interface, all the clients talk to that server through that one interface.

This design has a lot of advantages:

You can add as many clients as you want:

web client for online reservations

desktop client for use in the hotel

administrative client for producing reports

test client for validating changes to the server

custom clients for interfacing with aggregators

You can update the server with little or no impact on the clients, provided you don't change the interface

Completely avoids any synchronization issues -- nothing can get out of sync because the data is only stored in one place

Web services is one very popular way to implement the interface to this sort of server, and I'd say it's likely the right choice in most situations. There are other possibilities, such as defining your own protocol, but I don't see any reason to get into that if you don't have to.

For hotels there is a third requirement you're not thinking of - exposing yourself to aggregation sites (think Expedia) for bookings.

If this is a requirement (and it probably is when they ask "so how do we sell through Expedia") then synchronisation sort of goes out of the window (there are ways around it but really you all want to look at the same data source).

So single hosted database, single set of web services and then call the web services from both the hotel staff interface (desktop or web) and the customer facing interface. If they ever want to sell through someone else, the web services can be used for that too.

But you should also look at buying this stuff - it's a solved problem and there are off the shelf solutions. Most of them are relatively low on capital outlay, they just take a per booking fee.

(Answering your other question - banks have centrally hosted systems, single data stores accessed live over a WAN - at least they do these days).

No, i am looking to develop this on my own for learning purposes. My father has a hotel(24 rooms) for which I developed an application in foxpro 2.6. It's doing well but they don't offer online booking. I am thinking of upgrading the system with new features
–
Pankaj UpadhyaySep 22 '11 at 14:48

6

Sorry, but reconsider learning on an application that is less critical and doesn't have family issues.
–
JeffOSep 22 '11 at 15:04

@Jeff O : I won't be upgrading until i feel the application is secure enough to be deployed. But still, I will take your point. BTW, can you please tell me an example or tutorial for this
–
Pankaj UpadhyaySep 22 '11 at 16:53

You outline 2 approaches and it has already been suggested to you that you could have a desktop & web app talk to the same database or the same web service - both are of course possible.

The problem is how to choose the approach, and for this I suggest you consider the following scenarios:

What is the impact if the system becomes unavailable to the hotel staff?

What is the impact if the system becomes unavailable to online customers?

If both online customer and hotel staff wish to book the same room, will it be first come/first served or will priority be given to the higher rate? (hotels generally discount walk in non bookings for that night)

Does the hotel have facilities/procedures for backup/restore if the system is kept locally?

I would assume that your priority will be to maintain hotel access, not online access.

This would lead to the question, could the hotel operate if the system was unavailable due to the hotels internet connection going offline? can they accept that risk?

All of these questions need to be put to the client before you can decide on an approach.

Edit: with regards to banks, it occurs in numerous different ways, probably all possible ways and there are some surprising assumptions made (at least in the UK ATM system) on how much money an ATM will release if it is not able to comunicate with the bank infrastructure.