I've been doing a lot of repetitive operations on the results from  
manager functions lately.

Today I think I realized a functionality that might make sense -- if  
the results returned by a manager call weren't simply an array, but a  
class object.

It would behave just as an array - there would be no real difference  
in current functionality.  perhaps a tied array or blessed reference.

By default, there would be a Rose::DB::Object::ManagerResult class  
that does basically nothing but support common array functions.

Calls to manager functions would then accept a manager_result_class  
parameter , which is the name of the class to return the result as  
( defaults to Rose::DB::Object::ManagerResult )

given a list of manager results, one can then further filter the  
results without hitting the db, or easily loop through the items to  
do a repetitive task

ie:     
        my      $past_addresses= manager_get_past_addresses_for_userid( 1 );
        my      $ny_addresses= $past_addresses->get_limit_to_ny();
                $past_addresses->mark_as_private();

there are a lot of pros and cons to this approach, and it can get  
utterly confusing to some...

but i think it could be pretty neat.

opinions ?

// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| FindMeOn.com - The cure for Multiple Web Personality Disorder
| Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -
| RoadSound.com - Tools For Bands, Stuff For Fans
| Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - -



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to