CVS edit link for chrislynch42
I've gotten quite a bit over the last several years from Drupal and want to give a little back. Contributing to an open source project is one of my life goals.I created a module to track my personal book collection. It has a fairly nice Web 2.0 interface which helps to reduce the number of clicks needed for data entry. Additionally I have integrated Google Books with it so that you can just enter the ISBN and it will automatically populate the local database with the books data from Google. You may very well ask why wouldn't I just use Google Books? Control, privacy and I started the module before Google Books existed.
The main difference between the Milan module (the one under review) and the ones that currently exist is that mine is focused on tracking a personal collection. It stores information locally so as to provide more privacy from government and commercial tracking. This isn't additional security but rather privacy through anonymity and poor accessibility. Your information would be readily available stored on sites such as Google books. This module allows for local storage information such as its under my bed or in the attic. It allows for tracking of the books using little information. It provides a structured method for classifying books by genre, series, worlds, authors and publishers. It utilizes Google books to locally save book data via ISBN. Below is a table with my description on the focus of the other similar modules. Each description focuses on the difference from the Milan module.
| Module | Description |
|---|---|
| Book Post |
Doesn't store book data locally and isn't to track books. Is targeted more towards including book data in other blog like posts so they can be talked about. |
| MARC & Millennium OPAC Integration |
These are targeted towards bulk importing library. They aren't targeted to an average user to just track their book collection with a minimum of effort. |
| Open Library API | These are modules that could provide additional functionality but do not provide the same functionality. |
| Comment | File | Size | Author |
|---|---|---|---|
| #19 | csl_milan.tar_.gz | 140 KB | chrislynch42 |
| #18 | csl_milan.tar_.gz | 130 KB | chrislynch42 |
| #17 | csl_milan.tar_.gz | 17.91 KB | chrislynch42 |
| #16 | csl_milan.tar_.gz | 17.6 KB | chrislynch42 |
| #15 | csl_milan.tar_.gz | 17.34 KB | chrislynch42 |
Comments
Comment #1
chrislynch42 commentedYou can reference my previous attempt to see any previous issues. I have addressed those issues in this code submission. On major change is that I have now seperated it from one module with two sub-modules too three modules. I did this by abstracting the authors and publishers to persons and companies. I have identified them as authors and publishers using taxonomy. This will be useful in the future when other entities can be derived from them.
Comment #2
verbosity commentedI can't properly review not having cvs access myself, but a couple of points:
1. you need to use the doxygen formatting conventions
http://drupal.org/node/1354
EG.
for each 'hook' function you build should have this at the least
2. for all your .tpl.php files ( except : page-milan-person-add.tpl.php ) - and I'm sure this applies to some of your other files.
should be
3. I'm not sure why, but all your tpl.php files are the same ( except node-milan.tpl.php ), and all they do is print $content is there a reason for this?
Comment #3
verbosity commentedComment #4
chrislynch42 commentedWhen you install a module into Drupal it automatically takes // $Id$ and makes it // $Id: node.tpl.php , v 1.4 2007/08/07 08:39:36 goba Exp $ . I suppose I can write a ruby script to automatically take it out.
Comment #5
avpadernoHello, and thank you for applying for a CVS account.
CVS ID tags are expanded when a file is committed in a CVS repository, not when a Drupal module is installed.
Comment #6
chrislynch42 commentedThat makes sense. I am working with the code right now using my own cvs repository. I went ahead and wrote a Ruby script to clean up the Id comments and other issues.
Comment #7
chrislynch42 commentedI have been working on adding Doxygen comments to the code. I have found a logic error in the code. I could post some updated code or wait until your current review is done. How would you prefer to proceed?
Comment #8
avpadernoIt would be better if you upload the updated code, to avoid reviewers report something that you have already changed.
Comment #9
chrislynch42 commentedCode with Doxygen comments
Comment #10
verbosity commentedHi,
The code looks improved. have you ran it through the coder module? ( also you can use the options to do a 'minor' search for issues)
a couple of points that coder has thrown up ( not an exhaustive list )
company.module Line 80 & Line 127:
company.pages.inc Line 37 & Line 50:
else statements should begin on a new line
Should be:
company.pages.inc
Line 44: Use uppercase for PHP constants, e.g. NULL, TRUE, FALSE
company.install
milan_series.pages.inc
the final ?> should be omitted from all code files
you've also got lots of trailing spaces, some tabs instead of double spaces ( using the 'minor option in coder will help with this.
when you mention a function in the doxygen comments you've missed the () from the functions, these should be included
EG: company.install
Line 9: @see should always be followed by a filename, a url or a function name with ()
@see hook_installshould be
@see hook_install()milan_person.pages.inc
( also appears in milan_company.pages.inc
Line 24: Line 38: Line 40: In SQL strings, Use db_query() placeholders in place of variables. This is a potential source of SQL injection attacks when the variable can come from user data. (Drupal Docs)
( the above was pulled from coder, it may not be valid, can you explain what the variable is/does in that context and provide a reason to not use a placeholder?
page-milan-company-add.tpl.php
Line -1: @file block missing (Drupal Docs)
There are a few issues with the @file bit, but if I'm honest they didn't make sense to me and I didn't have time to reread the doxygen stuff to make sense of it, its probably needing a space here or a line there type of thing.
I've not had a chance to play around with the module itself to check for bugs, and I'm unlikely to do so before next week. however I'd suggest that you work on the issues here ( using the coder module hint hint ) to allow someone to evaluate its functionality without formatting and doxygen issues.
OH as a final note, please include a readme.txt , I like reading them to find out how to install/use the module
Comment #11
chrislynch42 commentedUsed the settings you recommended in coder and corrected all the error reports except the following:
1) @file description should be on the following line. I tried several different ways of writing it and it still reported the error.
2) In SQL strings, Use db_query() placeholders in place of variables. This is a potential source of SQL injection attacks when the variable can come from user data. User input is not being placed in a in this case. I used a variable to place a repeated string in multiple queries making the code more readable and maintainable.
3) node-milan.tpl.php The control statement should be on a separate line from the control conditional. It would change the way it would display to put it on multiple lines and in this case it is more readable on one line.
Comment #12
chrislynch42 commentedManaged to eliminate the @file errors reported by the coder module. The Drupal comments do not appear to be an exact match for Doxygen.
Comment #13
verbosity commentedI'm afraid I wont be able to look at this for a few days, setting to needs review in the hope someone else will.
@chrislynch42 : each time you submit a revision to your module you should change the status to 'needs review' ( unless it still needs work :P )
Comment #14
chrislynch42 commentedShould be good for review now.
Comment #15
chrislynch42 commentedI did some testing and eliminated a couple of problem areas as well as removing some debug code I found.
Comment #16
chrislynch42 commentedMore testing and more bugs resolved. I have found a problem with refreshing the select boxes so I am going to put it in a needs work status until I can get that fixed.
Comment #17
chrislynch42 commentedI changed the code to use the ahah drupal functionality to reload the select boxes. I must say that it works much better than the previous method I was using.
Comment #18
chrislynch42 commentedThere was a bug in my handling of the ahah. It does make me question the design decisions of the Form API. Seems awfully complicated just to add some AJAX. I suppose it might be due to security considerations but even so.
Comment #19
chrislynch42 commentedIt was saving the nodes anonymously and that has been fixed. Additionally some ISBN numbers would pull multiple entries from google books so changed the code so that it will only insert the first entry.
Comment #20
arianek commentedHi. Please read all the following and the links provided as this is very important information about your CVS Application:
Drupal.org has moved from CVS to Git! This is a very significant change for the Drupal community and for your application. Please read the following documentation on how this affects and benefits you and the application process:
Migrating from CVS Applications to (Git) Full Project Applications
Comment #21
chrislynch42 commentedComment #22
avpaderno