Latest Apigility Release Underscores API-First App Design

Janet Wagner, Data Journalist / Full Stack Developer
May. 15 2014, 03:29PM EDT

Late last year, ProgrammableWeb reported that Zend, the PHP company, launched a new open source project named Apigility. This project makes it possible to quickly and easily create high-quality APIs that reflect industry best practices and standards. Zend has now announced a new version of Apigility which includes new features and improvements allowing users to create APIs with RPC and REST services, authentication, documentation, and much more.

The Apigility Admin Interface - Create New REST Service

Web development has shifted in recent years with many developers and technology companies adopting an "API first" approach to building web, mobile and even enterprise applications. Earlier this year, ProgrammableWeb published an article written by Patricio Robles that takes a look at a few real-world examples illustrating the emerging API-first application development trend. In another ProgrammableWeb article, Uri Sarid, CTO of MuleSoft (parent company of ProgrammableWeb), discusses the value of API-first design as well as different approaches and methodologies. Apigility has been designed and developed using an API-first approach which helps with future-proofing the platform. For example, everything is API driven on the admin side of Apigility, making it possible to version the admin in the same way that APIs can be versioned. Zend Co-founder and CTO Zeev Suraski, is quoted in the press release as saying:
 

"API first has become the new mantra for web development, due to the variety of devices and form factors accessing the web today. Apigility has done a phenomenal job of knocking down some of the challenges traditionally associated with API-based application design."

Apigility provides an easy to use web-based admin interface which allows developers at all levels of API building experience to create quality APIs quickly and easily. Apigility does not require Knowledge of the Zend Framework to use, however, the platform does consist of a collection of ZF2 modules which are "under the hood." Apigility is designed to be a standalone product that does not require users to learn a framework. However, there are some advantages to using Apigility with Zend Studio and Zend Framework.

"API documentation is in HTML format; by default, Apigility provides a template using Bootstrap."

Zend describes Apigility as opinionated, as many of the decisions that need to be made when building an API have already been made by the platform. Enrico Zimuel, Senior PHP Engineer at Zend Technologies, told ProgrammableWeb that:
 

"When you start to create a web API service you need to consider many things, such as the error handling, the content negotiation, the versioning, the authentication, the validation, and last but not least the documentation. Apigility offers to developers all that they need in order to develop a full stack API, even the deployment on a production environment. Using Apigility, developers can design and build APIs in minutes, instead of days."

Matthew Weier O'Phinney, Apigility and ZFF project lead Zend, explained in a session at ZendCon 2013 some of the API architectural opinions built into the Apigility platform:

  • JSON is preferred over XML
  • Hypermedia Application Language is used (application/hal+json)
  • API-Problem is used (application/api-problem+json)
  • Three Types of API versioning built in:
    • URL-based versioning (/v1/session, /v2/session)
    • Mediatype versioning (Accept: application.vnd.zend-con.v2+json)
    • Code is versioned by namespace
  • Pagination is built in, invoked automatically

New out-of-the-box features have been added to the latest release of Apiligity including HTTP Basic, HTTP Digest, and OAuth2 support as well as documentation support which includes HTML, JSON, and Swagger representations. Apigility allows users to create new APIs with both RPC and REST services and features error handling and content negotiation. During the ZendCon 2013 Apigility Keynote Panel, Zend Co-founder and CTO Zeev Suraski, was asked why the company decided to make an investment in such a big project like Apigility as it is not a commercial solution and doesn't directly relate to any products that Zend currently sells. Zeev Suraski stated that:
 

"We think that the developer community in general, specifically the PHP community, is seeing a need of such a capability for the easy way of creating and maintaining APIs. We think it actually gives PHP a serious competitive advantage vs. other platforms. It also made sense to a. create it because as I said PHP needs it and b. to open source it as a layer on top of Zend Framework 2 so that we can really turn this into a standard; into the best possible way to create APIs."

Matthew Weier O'Phinney will be co-hosting a full-day Apigility tutorial session at the Dutch PHP Conference in Amsterdam (June 26-28, 2014). To find out more about Apigility and to read the documentation, visit Apigility.org.

Janet Wagner Janet is a data journalist and full stack developer based in Toledo, Ohio. Her focus revolves around APIs, data visualization, machine learning, and data-driven journalism. Follow her on Twitter: @webcodepro and on Google+

Comments