zfr-rest和apigilty有什么区别?哪种情况下应该使用哪一种?就我所见,zfr-rest很简单,可以用来传递任何有效载荷,因为apigilty似乎只能返回HAL。哪一个应该是最好的使用/学习。应对可能会包含在zf3中。任何有关经验的信息,这两个想法都会有所帮助。zfr-rest和apigilty difference
1
A
回答
1
ZF-Rest是根据文档一个ZF2模块:
提供结构和代码,用于快速实现使用JSON作为传输RESTful API中。
Apigility是ZF2应用程序或作为它们在docs写信元模块:
间 - Zend框架2模块从组合特征:
- ZF-API - 问题
- zf-content-negotiation
- zf-hal
- ZF-休息
- ZF-RPC
- ZF-版本
Apigility需要ZF-休息,你可以看到here on line 44 inside the composer.json
file的应用,所以它是一个应用程序的依赖。因此,如果没有ZF-Rest,你就不能使用Apigility,但是你可以使用没有Apigility的ZF-Rest。
你也在你的问题中提到HAL。有一个单独的模块,称为ZF-Hal在Apigility中提供HAL-Json功能。该模块无缝连接到ZF-Rest。
我希望这会让它更容易理解。
相关问题
- 1. Difference bettwen DataContractSerializer和DataContractJsonSerializer
- 2. Wild difference差8.2.0和8.2.1
- 3. @JsonIgnore vs @Transient -difference?
- 4. self.variable and variable difference
- 5. PHP Regular Expression difference
- 6. 两列SQL DIfference
- 7. ViewRendererServlet vs Dispatcherservlet Difference
- 8. jQuery Array Difference
- 9. UIApplicationDidBecomeActive vs UIApplicationWillEnterForeground difference
- 10. Valid/Validated-Difference(XML,DTD)
- 11. Hortonworks vs Cloudera Architecture Difference
- 12. Group By Row Value Difference
- 13. Angular2localization vs ng2-translate difference
- 14. Eclipse比较编辑器中的Next Difference和Previous Difference是否存在键绑定?
- 15. iOS 9/10 NavigationController Difference
- 16. Java String array Output Difference
- 17. Ember.js等价于.difference?
- 18. CouchDB set-difference/not-in condition
- 19. Message Queue vs Task Queue difference
- 20. Flask-SQLAlchemy whats the difference db.Column vs Column
- 21. 如何在Ruby中理解“set-difference”?
- 22. 为什么_.difference返回所有项目?
- 23. 比较2个数组与_.difference
- 24. Activator.CreateInstance(string)and Activator.CreateInstance <T>()difference
- 25. Synthical difference b/w <%= Html.LabelFor(model => model.studFatherName)%>和<%:Html.LabelFor(model => model.studFatherName)%>
- 26. 高级平均日期具有唯一ID的DIfference
- 27. _.difference检查对象引用或按属性检查属性?
- 28. android-difference docid在这个Java文件(SELECT docid as _id)
- 29. 如何使用MongoDB聚合进行通用集合操作(union,intersection,difference)
- 30. 为什么union,intersection和difference操作在关系代数中称为布尔运算?
有什么方法可以在应用程序中使用除HAL之外的其他有效载荷? – varuog
@varuog是的,你可以连接你自己的RenderStrategy并渲染任何你想要的东西:) – Wilt