[dev] API Interface Rewrite

Jan Schneider jan at horde.org
Mon Aug 3 18:47:04 UTC 2009


Zitat von Michael M Slusarz <slusarz at horde.org>:

> Quoting Chuck Hagenbuch <chuck at horde.org>:
>
>> Quoting Michael M Slusarz <slusarz at horde.org>:
>>
>>> Log:
>>> Better job of determining mobile support. At least it doesn't require
>>> hardcoded support of a non-longer existing app.
>>>
>>> Probably would be best to do to API files what we just did to hooks files -
>>> put all the code into a single class.  Then we are not polluting the
>>> namespace with a bunch of functions, we don't have to use hackish API
>>> function names, and we can easily do something like set a class member
>>> variable to true to indicate of an application has mobile support.
>>
>> I agree. I've got some ideas on this also, but given my level of  
>> work buried lately, and that I'll be on vacation next week, I'll  
>> look at what folks come up with and go from there.
>
> My initial thought (pseudocode version) is this:
>
> // Rename files to lib/Api.php so they are autoloadable.
> class App_Api
> {
>     // Does this application support a mobile view?
>     public $mobileview = [boolean];
>
>     // The version of the application (gets rid of version.php files)
>     public $version = [string];
>
>     // The existing services array
>     protected $_services = array();
>
>     public function [API name - no more '_app_' prefix] ()
>     {
>     }

Looks good.

>     ...
>
>     // Prefs UI stuff: Do we want to move code from lib/prefs.php  
> file into the API file?

Yes, good idea.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digitale PGP-Unterschrift
URL: <http://lists.horde.org/archives/dev/attachments/20090803/356ac07e/attachment.bin>


More information about the dev mailing list