Phoenix.pm: Decisions, decisions

Doug Miles doug.miles at bpxinternet.com
Thu Jun 22 13:09:50 CDT 2000


Deal!  When do you want to present?

Beaves at aol.com wrote:
> 
> Hello, yous'all  (Jersey boy visits Texas)
> 
> OK, I'm looking for some input.  I am wondering the best way to set up a
> certain MySQL table column (or columns).
> 
> In my Internet Contact Manager, each group record currently has about 10
> integer columns that indicate various customized priviledege levels for
> certain funtions (such as search, email, invite, postmessage, etc).  Theses
> privililedge levels will not usually be searched, but will of course be
> called up each time that group is accessed.
> 
> In general database terms, what are the pros and cons of:
> 1)Keeping the current modus apparandi (most certainly mispelled...)
> 
> versus
> 
> 2)Changing the priviledges to a single column of a (currently) 10 digit int
> or char, and parsing the privilidges each time the group is accessed.
> 
> Just wondering.
> 
> To make this a legitimate Perl Post, I'll add an intersting tidbit from
> Damian Conway's book "Object Oriented Perl".  I always wondered exactly how a
> method was searched for before finally giving up.  My concern was usually
> centered around where a given package's AUTOLOAD routine fit in to the
> heirarchy.  The term for this procedure, as I came to find out, is called
> 'dispatching' a method.
> 
> If $obj->method() is called:
> 1: Look in the objects class for sub 'method' (simple enough)
> 2: ELSE, Search @ISA, stepping through each parent class, depth first, left
> to right.
> 3: ELSE, Look in UNIVERAL for the sub 'method.'
> 4: ELSE, do steps 1,2,3, but now look for the sub 'AUTOLOAD'.
> 5: Give up and throw and exception.  ("Can't locate object method "method"
> via package "Class")
> 
> If this piques your curiosity, you might want to grab the latest TPJ.  Conway
> has a neat article about Multiple Dispatching and Dispatch Tables, which can
> be used to 'improve' the dispatching of methods to suit your needs.
> 
> Lastly, I just finished 'objectizing' the code that my ICM message board
> uses.  I used a lot of the techniques from Conway's book.  It might make for
> topic of  interest to some of you on some hot muggy Tuesday night, and I'd be
> glad to stumble through my design (or plagiarism) steps.  I am curious to see
> how others approach the initial design phase of programming.
> 
> OK, Yous'all can go now...
> 
> Tim
> 
> shameless ICM plug:
> http://www.azwebs.com/cgi-local/icm/icm.cgi
> 100% perl generated, and MySQL used exclusively

-- 
- Doug

"A synonym is a word you use when you can't spell the 
word you first thought of."
--Burt Bacharach



More information about the Phoenix-pm mailing list