Room Reservations is a module that makes it simple for any facility to set up and maintain a system that allows its patrons to reserve rooms. It was created by Randall Library at the University of North Carolina Wilmington, where it is used by students, faculty, and staff to reserve group study rooms within the library. During the most recent month (November 2012), 1781 reservations were made for the library's 15 group study rooms with almost no assistance or involvement from library personnel.

Users are presented with an easy to read reservation calendar that shows bookings and open times for all the available rooms. To make a reservation, the user clicks on an open time block and fills out a short reservation form. A confirmation is sent immediately by email or cell phone text message, and reminders are sent if the reservation is made more than a day in advance.
The module can be extensively configured to meet the needs of different institutions. Some of the elements that can be customized include:
- application name
- room categories
- rooms
- hours by day when reservations can be made
- reservation policies
- reservation instructions
- SMS wireless network information
- reservation confirmation messages
- reservation reminder messages
- time of day when reminders are sent
Before creating this module, we reviewed and analyzed every Drupal module that offered any type of reservation functionality. A number of modules contained a small fraction of the functionality we required, but none of the existing modules offered everything needed to provide our users with an intuitive, easy-to-use interface. For example, there is no module that includes the reservation calendar shown above. There is a sizable amount of interest among academic libraries for a module like this, and this kind of module will be useful to any kind of institution that is need of an automated room reservation system.
Room Reservations project page
Room Reservations project documentation
Repository:
git clone --recursive --branch 6.x-1.x BobHumphrey@git.drupal.org:sandbox/BobHumphrey/1834546.git room_reservations
Drupal 6
Other projects reviewed:
- http://drupal.org/node/1812464#comment-6901814
- http://drupal.org/node/1715026#comment-6861816
- http://drupal.org/node/1806866#comment-6858556
Thank you for reviewing!
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | coder-result.txt | 1.75 KB | klausi |
Comments
Comment #1
monymirzaHi,
there is a little bit work required. Please fix errors and warnings listed here: http://ventral.org/pareview/httpgitdrupalorgsandboxbobhumphrey1834546git
Run coder module to check your code before pushing to git
(please check the Drupal coding standards)
Comment #2
dydave commentedHi Bob,
Thanks for contributing this very interesting module and for all the detailed information.
Several additional comments in terms of code structure:
1 - room_reservation.js
I would recommend you try replacing your JS calls with Drupal.behaviors.xxxx.
For example:
As a recommendation, I would suggest you take a look at facetapi.admin.js from the Facetapi module.
2 - room_reservation.module
For coding standards, maintenance and the sake of clarity, I would recommend moving all your class objects and declarations into:
includes/room_reservation.[obj].inc
At this point you would have to include these class files in the room_reservation.info file as well.
For an example, I would recommend that you take a look at the Facetapi module, again, which has this includes folder (I think it's called plugins) with many classes declarations.
3 - room_reservation.css
line 1: The @charset is not needed I think (never saw it in other modules).
For example, check Facetapi module, mentioned in point 1.
That's all I could see so far, but I guess we would have to do other checks after the coding standards and these comments have been cleaned up.
Hope that helps. Cheers!
Comment #3
Bob Humphrey commentedThank you monymirza for reviewing my module!
I've fixed all the errors and warnings listed at http://ventral.org/pareview/httpgitdrupalorgsandboxbobhumphrey1834546git.
Comment #4
Bob Humphrey commentedThank you DYdave for reviewing my module!
I made the changes outlined in #1 and #3 above.
However, as for item #2, I don't understand what you are requesting. I've reread the Drupal module developers guide and Drupal Standards, security and best practices and I don't see anything that explains this.
I've studied the Facet API module, but I don't understand this part of the code. I see that the classes are placed inside of the plugins/facetapi directory, and I see that they are referenced in facetapi.facetapi.inc. But I don't understand the linking mechanism between the classes and the rest of the code.
There are methods like this within facetapi.facetapi.inc:
But what's going on here? It seems that some kind of custom hook has been created, but what is the hook doing and how is it being used? There is no documentation, and I can't find a reference to anything like this within the Drupal documentation. I don't know what the array is that is being created in this function, or what any of the values mean. And a search on this function shows that it is not being called directly from anywhere in facetapi module.
I'm wondering if this type of structure is needed for my module. I'm only creating one class, and it's a very simple class with only one function, a constructor.
I very much appreciate the time you have taken to review my module.
Comment #5
dydave commentedHi Bob,
Really sorry for the late reply, but I have been kept overly busy with other urgent cases.
Alright, so I took a look again at the code, but I have to say the module file is very large (more than 4000 lines), so it takes quite some time obviously to even just go through half of the code of this single file (not to mention the room_reservations.admin.inc which is pretty big, as well...).
So I guess you're very likely to need quite a few reviews and testing for such an important amount of code, objects and functions.
I assume it would be a good thing to try improving structural aspects, which would end up in a better organization of the code, as I mentioned in #2:
At that time, I couldn't recall the example of code I was referring to, in my mind, so I just tried to find another module, but that was probably a little inappropriate/awkward.
I think this wasn't necessarily the best example I find, since Facetapi is not exactly the module I was looking for.
I went through the modules I reviewed and followed a little bit and finally found the module I was looking for: Botcha-7.x-2.0.
In particular, I would like to attract your attention at the way the files are organized with the controller and model folders which allow a clearer definition and organization of the code that is needed for defining objects and classes and or controller to do stuffs with objects.
But then it seems that's a 7.x module and Room Reservations is for 6.x (so far), so I'm not sure at all whether something like that would be feasible or recommended with drupal-6.x.
Maybe you could take a look at the Botcha-6.x to see if there is anything that could be adapted.
What I meant is that perhaps a small improvement could be to try moving the class Reservation to its own file and for that perhaps the Botcha could give you some inspiration.
I haven't looked any further than that into module's code and more specifically at the details of how this Botcha style structure could be applied, but I thought you might be interested in looking into that module as well.
That's pretty much all I got from this review so far, but I will keep looking further and surely let you know if I found anything else.
One last note, is that if you ever considered working on a 7.x version, I would certainly recommend you look at working with Entity or Entity API.
I hope all these comments will help improving this impressive module, which must have required a very important amount of work and time.
Feel free to let me know if you would have any other questions, comments or concerns on these items, I would surely be glad to provide more information.
Cheers!
Comment #6
Bob Humphrey commentedHello DYdave,
I studied Botcha-6.x and reorganized my room_reservations.module file based on your suggestions. There are now model, view, and controller folders inside the module, with files in each folder to handle the different parts of the application. I also moved all the helper functions into a new file named room_reservations.inc. I think the module is much better organized now, and it should be a lot easier to find things and perform maintenance in the future.
I will definitely take your suggestion and study the other modules you mentioned, as I am hoping to create a 7.x version of this module in the future.
Thank you once again for your work in reviewing this code. It is very generous of you to take the time to review such a large module.
Bob
Comment #7
dydave commentedHi Bob,
You've really done some amazing work there.
It seems my comment and the Botcha module actually gave you a lot of inspiration and you managed taking down the module file from 4000 lines to 800+ .... That's an incredible improvement.
Not to mention the folder structure and distinction with helper functions, etc....
Really nice work.
I checked again the PAReview and it seems that obviously you watched out for that as well (no errors).
So far, I have nothing else to report, but I will certainly keep checking and let you know if I am able to find anything subject to suspicion.
Thanks again very much for all your work, efforts and very kind answers.
Cheers!
Comment #8
Bob Humphrey commentedComment #8.0
Bob Humphrey commentedCorrect git branch
Comment #9
Bob Humphrey commentedAdded review bonus.
Comment #10
klausiReview of the 6.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. You have to get a review bonus to get a review from me.
manual review:
require_once 'mymodule.inc';Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #11
PA robot commentedClosing due to lack of activity. Feel free to reopen if you are still working on this application.
I'm a robot and this is an automated message from Project Applications Scraper.
Comment #11.0
PA robot commentedAdded other modules reviewed.