The sample application that I am going to build is going to be a prison management application. I am going to take this post as a chance to talk about it a bit, discuss the domain and then I’ll talk about the overall architecture in more details.
The domain of a prison is actually fairly simple, you have an inmate, and the sole requirement is that you would keep him (it tend to be overwhelmingly him, rather than her) in lawful custody.
The term lawful custody has a lot of implications, which are, in more or less their order of importance:
- The inmate is in custody, that is, he didn’t manage to run away.
- Custody is lawful, that is, you have legal authorization to keep him in jail. Usually that means an order by a judge, or for the first 24 hours, by a police officer.
- Lawful custody itself means that you:
- keep the inmate fed
- in reasonable conditions (sleeping quarters, sanitation, space)
- access to medical facilities. Indeed, in most prisons the inmates get better health care, especially for emergencies, than the people living in most big cities.
- ability to communicate with lawyers and family
The devil, however, is in the details. I am pretty sure that I could sit down and write about 250 pages of high level spec for things that are absolutely required for a system that run a prison and still not get everything right.
In practice, at least in the prisons I served at, we did stuff using paper, some VB6 apps & Access, and in one memorable occasion, an entire set of small prisons where running on what amounted to a full blown application written using Excel macros.
Anyway, what I think that I’ll do is start with a few modules in the system, not try to build a full blown system.
The modules that I‘ll start with would be:
- Staff – Managing the prison’s staff. This is mostly for authentication & authorization for now.
- Roster – Managing the roster of the prisoners, recording Countings, etc.
- Legal – Managing the legal side of the prisoners, ensuring that there are authorizations for all the inmates, court dates, notifications, etc.
- Escort – Responsible for actually taking the inmates out for court, medical evacs, releasing inmates, etc.
That is enough for now, for that matter, it is a huge workload already, but that is about the only way in which I can actually have a chance to show a big enough system and the interactions between all the parts.