[commits] [Wiki] changed: Project/HordeApiRewrite

Ralf Lang (B1 Systems GmbH) lang at b1-systems.de
Sun Mar 18 10:44:33 UTC 2018


rlang  Sun, 18 Mar 2018 10:44:33 +0000

Modified page: https://wiki.horde.org/Project/HordeApiRewrite
New Revision:  2
Change log:  Update to reflect discussions on dev@ and current progress.

@@ -61,21 +61,37 @@
  The registry allows limited runtime introspection (hasMethod,  
listMethods, listApis) but no hints on input/output formats (parameter  
list and type)

  ++ Proposed H6 API changes

-* Split $App_Api class into $Api_Api classes - Apis still need to be  
registered in registry. (MEDIUM)
+* Split $App_Api class into $App_Api_$Api classes - Apis still need  
to be registered in registry. (MEDIUM)
+-> Limited support with fallback to $App_Api exists in  
https://github.com/ralflang/Core/tree/class-per-api
+-> needs cleanup

-* Implement parameter and return hints -- TBD -> maybe only needed  
for external interfaces? (Needed for REST, maybe SOAP)
+
+* Implement parameter and return hints -- TBD -> only needed for  
external interfaces? (Needed for REST, maybe SOAP)

  * move DAV browsing/CRUD code to API methods -> Does this also make  
sense for ActiveSync? (OPTIONAL)
-
+
  * Factor method routing out of Horde_Rpc_* into a loadable module to  
decouple Horde_Rpc from the Horde ecosystem (HIGH)
-
+
+-> The Rest feature will not use the Horde_Rpc package, at least in  
its current form. Lessons Learned and helper infrastructure should go  
into a rewrite for Horde_Rpc backends with some smooth transition path.
+
+-> For any meaningful Rest support, Horde_Controller needs to support  
raw request body.
+
  A simple boilerplate router should be part of Horde_Rpc to  
facilitate unit testing
-
+
  A Horde-specific router Horde_Core_Rpc_Router should be part of  
Horde_Core and interact with registry:
-Check if api exists (for RPC access / individual RPC type)
-Check if method exists (for RPC access / individual RPC type)
+Check if api/method exists (for RPC access / individual RPC type) and  
which application is set to provide it
+Check if the method is available in the current RPC api
+
+For Rest:
+Use the first part of the URL to match an to a resource type and find  
its providing app and api version
+Get all possible http request dimensions (method, body, headers,  
parameters, rest of URL...)
+Pass to the application's Rest implementation (class per published resource)
+Let Rest implementation decide what to do
+-> try to wrap/serialize to json an interapp api call instead of  
inplace implementation of actual business code here
+
+
  List available apis (for RPC access / individual RPC type) - should be cached
  List available methods (for RPC access / individual RPC type) -  
should be cached
  Find right app to call a specific method
  Find the right runner and configuration for a set of rpc type, api, method



More information about the commits mailing list