Bookings API + implementation
Project information
Project pages on drupal.org:
Current status: Booking and availability CRUD, tests, conflict checking, and an API-provided custom form element for picking resources.
Description
Proposal on groups.drupal.org (currently not exactly the same as submitted proposal)
This project will create a bookings API to make it easier for developers to write modules that involve booking resources, such as rooms, projectors, or public computer terminals.
In addition, this project will also create a public room and resource booking system that uses this API. This booking system will allow unregistered users to submit booking requests, with immediate availability feedback. A booking admin would then be able to review and moderate requested bookings.
Status updates
2008-07-01
Done: More bug reports and patches for Date API. Preliminary implementation of conflict detection. Basic custom form element for selecting resources. Now working on changes to the table schema which means a significant revision of some code.
Plan: Separating booking/availability records from instances of each, into a separate table.
Holdups: None.
2008-06-25
Oops, forgot about the report for this week until now.
Done: I submitted a bug report, then a patch for it, for Date Repeat API. My first bug report and first patch ever! Hopefully it wasn't misguided. I've also made my first commit for the Public Bookings module. I'm working on both modules concurrently.
Plan: After reading a book, I've decided against representing everything as nodes, so, everything is now self-sufficient in terms of accessing the tables and info. I'm not going to think about integration with CCK or anything like that until after everything is working, just to reduce the scope and give me less to think about. Now working on bookings and availability record CRUD and its tests, and how to present a menu of resources to book.
Holdups: I had to return Pro Drupal Development after having it loaned for 1 week, as someone else had a hold request on it.
2008-06-17
Exams are over; now resuming work.
Plan: I'm going to start developing the module that will be using this API, at the same time, even while the API is not complete. This is just so there's a better chance that I'd catch any hitches with using the API early on.
Holdups: Drupal books are scarce, outdated, or rare in all libraries and all cities near me. I got my hands on Pro Drupal Development 1ed this week, but it's due back next week because someone else has put a hold on it...
2008-06-10
Exam week; nothing to report.
2008-06-03
Done: I've just committed some of the stuff I've been doing on-and-off over the past week. I have an .install file with the database schema. One table holds both booking and resource availability records, because they share many common attributes, so I thought it'd make sense to fit them all into one table and have the API help differentiate between the two. I have the CRU functions for bookables (resources) done, while hook_delete() handles the D of all related rows. I wrote a SimpleTest for it, and it passes. I'm using the hooking function found at http://www.civicactions.com/blog/writing_extensible_drupal_modules_part_... here.
Plan: I have 2 finals at the end of next week, so I don't plan to do much until those are over. Please look over my work and criticize, so I don't end up doing a lot of work along the same path and then discovering that there's some fundamental flaw or something.
Holdups: My exams and coursework. I'm also spending a lot of time thinking about how to make the API useful and flexible enough to reduce developers' need to write their own SQL to use the API's tables. It's mind-wracking.
2008-05-27
So far I have 3 types of nodes: booking, resource, and availability info. Bookings and availability records can obey iCal recurrence rules. Availability rules will be weighted, allowing for complex availability times and exceptions.
I'm currently in summer session at UBC, with final exams at the end of the second week of June, so I won't be as active as I'd like.



Great idea!
I have actually been looking for something to use for a theater ticket purchasing part of a website. Maybe integrating this with ubercart would be the way to go? I'm not much of a programmer but I'm willing to get my hands dirty. :-)