Hotel mixin sample -- overview

The Mixin Hotel is a sample application for Barbara and Manuela, two concierges who are overwhelmed by scribbled notes. Four use-case slices constitute the application:

  • reservation system – managing (future) reservations for rooms
  • billing – the guest's consumption from the hotel bar is logged and eventually added to the rent for the room
  • discount extension – a new incentive from the hotel management: for each third visit, guests get a 10% discount
  • queueing extension – reservations can be put into a reservation queue if the hotel is completely booked for the week of the attempted reservation

The Mixin Hotel sample code is just that – a sample, not a real working hotel management program. The sample is written for a toy-world, some restrictions apply. This list is not exhaustive:

  • guests can call or fax reservation requests
  • rooms can only be booked for an entire week
  • there are no months or years; weeks are simply counted
  • guests can reserve SOME room, not a particular room; a room is assigned by the system, which takes the first available room
  • guests are identified unambiguously by their name (i.e. there is only one Smith, for example)
  • no user-interface is provided here, just code and unit-tests

What's more, we don't use an inversion of control container or an O/R-mapper here. In a real application, you would use re-motion mixin's ObjectFactory in tandem with something like Castle.Windsor. (A "facility" for integrating Castle.Windsor's inversion of control container can be found here: FIXME).

Inspiration

The idea from a hotel sample is from Ivar Jacobson's aforementioned book Aspect-Oriented Programming with Use-Cases. The sample is designed in the spirit of domain-driven development, way of designed software in close accordance with the business domain, based, on use-cases. Classes are modeled after real-world entities; methods represent real concierge activities behind the desk.