[dev] Turba API cleanups
Michael M Slusarz
slusarz at horde.org
Wed Mar 14 06:26:11 UTC 2012
Quoting slusarz at horde.org:
> Working with the Turba external API the last few weeks, there are
> some fairly brutal method calls and performance issues. Wondering
> if we can change some of this in time for Horde 5.
>
> Off the top of my head:
>
> * search() is an example of the problems of using parameters with
> default values. A potential call to search could look like:
> $registry->call('contacts/search', array(null, null, null, null,
> null, array('email')))
>
> (That call may not return anything, but it is perfectly legal).
>
> Not to mention it is difficult to read. I would suggest that we
> convert to a single array option that uses named keys to identify
> the parameters. Not only would it make calls easier to read, but
> there would not need to be placeholders for all the non-used
> parameters in a call.
For the record: this has been done in Horde 5 (last week).
> * I think it would be nice to have an API call that does a search
> exclusive to email addresses and returns a Horde_Mail_Rfc822_List
> object. This is the primary use case in IMP (and for the
> contactautocompleter), and would optimize a common query.
This has also been added.
michael
___________________________________
Michael Slusarz [slusarz at horde.org]
More information about the dev
mailing list