in reply to Re^2: A First CPAN Odyssey
in thread A First CPAN Odyssey
Indeed... In fact, the inspiration for the module that I have written comes from a home grown module to which I was exposed at a former job. It had some very good concepts (that I've cherry picked as best I can), but also many serious flaws that were very problematic time and time again. On my own, I have written three different iterations, all inspired by that original module for various projects or consulting jobs. This will be the fourth iteration of my attempt to forge something that lives up to the potential of the original.
I've really struggled with this module to avoid kludgey compromises, and I hope that that will shine through in the (purported) elegance of the API. Execution efficiency has also been a big concern, as the database at my job which is serving as a pilot project is of the order of tens of millions of records.
One of the key issues with which I wrestled was how to instantiate a large collection of objects, associated with their children in one-to-many has-a relationships, while neither executing superfluous queries nor pulling in extra information in the join operations. The solution to this was to issue one query for the collection of objects being loaded, and one query for each of the has-a relationships, ordering the object query by its surrogate primary key, and each of the has-a link table queries by the associated foreign primary key. The best image I can conjure for this process is the zipping of an n-threaded zipper where different segments of the various zippers have to be shifted to match up. :-) Presumably other OO-mappers have successfully wrangled with this problem before me, but I was pretty happy with myself for working out all the details. The original module of which I spoke totally punted on the issue, instead assuming that the user would never simultaneously load multiple objects that had one-to-many relationships.
Oh, and both of your links seem like excellent resources to promote the uniqueness of my own module, something that, as jZed pointed out in another comment, is of utmost importance if I am going to stimulate any interest in my module.
Thanks again.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: A First CPAN Odyssey
by stvn (Monsignor) on Jun 23, 2004 at 00:54 UTC | |
by jZed (Prior) on Jun 23, 2004 at 01:08 UTC | |
by skyknight (Hermit) on Jun 23, 2004 at 02:10 UTC | |
by skyknight (Hermit) on Jun 23, 2004 at 02:09 UTC | |
by stvn (Monsignor) on Jun 23, 2004 at 16:07 UTC |