varuog
varuog

Reputation: 3081

zfr-rest and apigilty difference

What is the difference between zfr-rest and apigilty. Which one should be used in which circumstances? AS far as I can see zfr-rest is simple and can be used to deliver any payload where as apigilty seems like bound to return only HAL. Which one should be best to use/learn. apigility probably will be included in zf3. Any information of experience, ideas with these two will be helpful.

Upvotes: 1

Views: 97

Answers (1)

Wilt
Wilt

Reputation: 44326

ZF-Rest is a ZF2 module that according to the docs:

provides structure and code for quickly implementing RESTful APIs that use JSON as a transport.

Apigility is a ZF2 application or as they write in the docs a Meta-Module:

Meta- Zend Framework 2 module combining features from:

  • zf-api-problem
  • zf-content-negotiation
  • zf-hal
  • zf-rest
  • zf-rpc
  • zf-versioning

Apigility requires ZF-Rest as you can see here on line 44 inside the composer.json file for the application, so it is an application dependency.

Thus, you cannot use Apigility without ZF-Rest, but you can use ZF-Rest without Apigility.

You also mention HAL inside your question. There is a separate module called ZF-Hal providing the HAL-Json functionality in Apigility. This module seamlessly connects to ZF-Rest.

I hope this will make it more understandable it all relates.

Upvotes: 1

Related Questions