使用 Zend Framework 3 构建 RESTful 服务的最佳方式

Best way to build RESTful services using Zend Framework 3

我们正在启动一个新项目,该项目将利用 RESTful 服务与 Web 客户端 (AngularJS) 和移动平台(Android 和 iOS)通信.

想法是将业务逻辑隐藏在 RESTful 服务中,并为 Web 客户端和移动平台使用相同的代码。

我们的服务器是使用 Zend Framework 3 在 PHP 中构建的(我是该框架的新手)。该应用程序将有数十个实体和数百个服务。

我在网上注意到 ZF2 似乎有一个 REST 模块,但我找不到适用于 ZF3 的模块(至少在文档中找不到)。

我有一些问题:

ZF3 仍然附带 AbstractRestController,可在 here. Apigility could be a starting point for your REST application, but you could also consider implementing only some parts of Apigility and build your own logic on top of that. Interesting modules can be found in the ZF-Campus GitHUB repository:

中找到

大多数(如果不是全部)这些模块都经过重构以支持 ZF3(并向后兼容 ZF2)。

自己浏览存储库,因为您可能会发现其他有用的模块。