SlideShare a Scribd company logo
Easily extend your existing
PHP app with an API
in it2PROFESSIONAL PHP SERVICES
Michelangelo van Dam!
!
PHP Consultant
Community Leader
President of PHPBenelux
Contributor to PHP projects
!
T @DragonBe | F DragonBe
https://www.flickr.com/photos/akrabat/8784318813
Who builds API’s?
http://apigee.com/about/
How do you build them?
https://www.flickr.com/photos/florianric/7263382550
October 8, 2013
• ZendCon keynote
• MWOP announces Apigility
• REST API Management Tool
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Apigility in a nutshell
• Full-features REST mgmt tool
• Versioning
• Authentication
• Validation
• Hypertext Application
Language (HAL) supported
• API Documentation
Legacy applications
Example
Zend Framework1 app
https://www.flickr.com/photos/simonov/3629246570
Easily extend your existing php app with an api
https://www.flickr.com/photos/npobre/2601582256
Requirements
• Apigility
• A ZF1 project
• Composer
• Some coding experience
https://www.flickr.com/photos/adesigna/4090782772
Approach
Vanilla Apigility!
Skeleton
Your ZF1 App Your ZF1 Libraries
Download Apigility
git clone https://github.com/zfcampus/zf-apigility-skeleton.git zfdemo-api
cd zfdemo-api
php composer.phar self-update!
php composer.phar install
Add Zend Framework 1
vi composer.json
"require": {!
...!
"zendframework/zendframework1": "~1.12"!
}
php composer.phar update
Add your app and lib
git submodule add -f https://github.com/in2it/zfdemo.git vendor/zfdemo
git submodule add -f https://github.com/in2it/In2it.git vendor/In2it
Symlink into your app
cd vendor/zfdemo/library
ln -s ../../zendframework/zendframework1/library/Zend Zend
ln -s ../../In2it/library/In2it In2it
cd ../../..
Update index.php
sed -i ’s/APPLICATION_PATH/ZF2APP_PATH/g' public/index.php
Run Apigility
php public/index.php development enable
php -S 0.0.0.0:8888 -t public public/index.php
DO NOT RUN IT LIKE THIS IN PRODUCTION!
Welcome!
https://www.flickr.com/photos/raster/3563135804
https://www.flickr.com/photos/levendis/474847831
Get started!
Get started!
Create new API
Create new API
Create new API
Create new API
Provide a name
Provide a name
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Create new REST Service
Create new REST Service
Name the REST service
Name the REST service
Name the REST service
There you go: user API
Easily extend your existing php app with an api
Modify the user API
Modify the user API
We need the resource class
We need the resource class
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Get ZF1for2.php
in2.se/zf1for2
Easily extend your existing php app with an api
Easily extend your existing php app with an api
Thank you MWOP & Team!
https://www.flickr.com/photos/juokaz/4702577233
Resources
• The Apgility site: http://apigility.org
• My blog article: http://in2.se/1fVZ2sI
• My github zfdemo: http://in2.se/1pu7R9b
https://www.flickr.com/photos/lwr/13442542235
Contact us
in it2PROFESSIONAL PHP SERVICES
Michelangelo van Dam
michelangelo@in2it.be
!
www.in2it.be
PHP Consulting - Training - QA
Join the fun!
PHPBENELUX
phpbenelux.eu
https://www.flickr.com/photos/drewm/3191870083

More Related Content

PDF
The Continuous PHP Pipeline
PDF
Continuous delivery - tools and techniques
PDF
Automated Security Testing
PDF
Create, test, secure, repeat
PPTX
Hacker Proof web app using Functional tests
DOC
Mca 02 year_exp_unit_automation_testing_ldra_rtrt_c -
PPTX
Continuous delivery applied
PPTX
Automated Acceptance Tests & Tool choice
The Continuous PHP Pipeline
Continuous delivery - tools and techniques
Automated Security Testing
Create, test, secure, repeat
Hacker Proof web app using Functional tests
Mca 02 year_exp_unit_automation_testing_ldra_rtrt_c -
Continuous delivery applied
Automated Acceptance Tests & Tool choice

What's hot (20)

PPTX
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
PPTX
Releasing High Quality Packages - Longhorn PHP 2021
PPTX
Alm with tfs 2013
PPTX
Hidden Treasure - TestComplete Script Extensions
PDF
LV Dev Efficiency NIDays 2015
PPT
Automated Testing With Jasmine, PhantomJS and Jenkins
PPTX
Cypress workshop for JSFoo 2019
PPTX
Continous integration and delivery for single page applications
PPTX
Api360 Summit The Automated Monolith
PPTX
SanDiego_DevOps_Meetup_9212016-v8
PPTX
Testing Without a GUI Using TestComplete
PPTX
Validating latest changes with XCI
PDF
Spring insight what just happened
PDF
Virtual Dreamin Salesforce DevOps Top 10
PPTX
Web presentation
PPTX
Lap around ALM with Visual Studio and TFS 2013
PPTX
CI back to basis
PPTX
Build software like a bag of marbles, not a castle of LEGO®
PDF
Introduction to Enterprise-Release Engineering on the Salesforce Platform
PDF
Putting Quality First through Continuous Testing
Automated Testing – Web, Mobile, Desktop - Challenges and Successes
Releasing High Quality Packages - Longhorn PHP 2021
Alm with tfs 2013
Hidden Treasure - TestComplete Script Extensions
LV Dev Efficiency NIDays 2015
Automated Testing With Jasmine, PhantomJS and Jenkins
Cypress workshop for JSFoo 2019
Continous integration and delivery for single page applications
Api360 Summit The Automated Monolith
SanDiego_DevOps_Meetup_9212016-v8
Testing Without a GUI Using TestComplete
Validating latest changes with XCI
Spring insight what just happened
Virtual Dreamin Salesforce DevOps Top 10
Web presentation
Lap around ALM with Visual Studio and TFS 2013
CI back to basis
Build software like a bag of marbles, not a castle of LEGO®
Introduction to Enterprise-Release Engineering on the Salesforce Platform
Putting Quality First through Continuous Testing
Ad

Viewers also liked (7)

PDF
Apigility reloaded
PDF
PHPunconf14: Apigility Einführung
PDF
Deprecated: Foundations of Zend Framework 2
PDF
IPC 2015 Zend Framework 3 Reloaded
PDF
Decouple your framework now, thank me later
PDF
The road to php 7.1
PDF
reveal.js 3.0.0
Apigility reloaded
PHPunconf14: Apigility Einführung
Deprecated: Foundations of Zend Framework 2
IPC 2015 Zend Framework 3 Reloaded
Decouple your framework now, thank me later
The road to php 7.1
reveal.js 3.0.0
Ad

Similar to Easily extend your existing php app with an api (20)

PDF
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
PPTX
API Conference 2021
PPTX
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
PDF
Swagger code motion talk
PDF
Introduction to Apigility
PDF
Swagger - Make your REST APIs accessible - Victor Trakhtenberg
PDF
The impact of IoT on APIs
PPTX
Swagger - make your API accessible
KEY
Rhodes
PDF
Apigility introduction v2 (glasgow php)
PPTX
Integrating Alfresco with Portals
PPTX
Auckland API & Microservices Meetup 1: API led design
PPTX
API workshop: Introduction to APIs (TC Camp)
PDF
Let's Program The Cloud
PDF
Developing Great Apps with Apache Cordova
PPTX
London MuleSoft Meetup
PDF
7 Top PHP Development Tools For PHP Coding
PPTX
London-MuleSoft-Meetup-April-19-2023
PDF
Octo API-days 2015
PDF
Top 7 wrong common beliefs about Enterprise API implementation
Pimp legacy PHP apps with Apigility - TrueNorthPHP 2014
API Conference 2021
APIdays Paris 2014 - Workshop - Craft and Deploy Your API in a Few Clicks Wit...
Swagger code motion talk
Introduction to Apigility
Swagger - Make your REST APIs accessible - Victor Trakhtenberg
The impact of IoT on APIs
Swagger - make your API accessible
Rhodes
Apigility introduction v2 (glasgow php)
Integrating Alfresco with Portals
Auckland API & Microservices Meetup 1: API led design
API workshop: Introduction to APIs (TC Camp)
Let's Program The Cloud
Developing Great Apps with Apache Cordova
London MuleSoft Meetup
7 Top PHP Development Tools For PHP Coding
London-MuleSoft-Meetup-April-19-2023
Octo API-days 2015
Top 7 wrong common beliefs about Enterprise API implementation

More from Michelangelo van Dam (20)

PDF
GDPR Art. 25 - Privacy by design and default
PDF
Moving from app services to azure functions
PDF
Privacy by design
PDF
DevOps or DevSecOps
PDF
Privacy by design
PDF
Continuous deployment 2.0
PDF
Let your tests drive your code
PDF
General Data Protection Regulation, a developer's story
PDF
Leveraging a distributed architecture to your advantage
PDF
Open source for a successful business
PDF
Deploy to azure in less then 15 minutes
PDF
Azure and OSS, a match made in heaven
PDF
Getting hands dirty with php7
PDF
Zf2 how arrays will save your project
PDF
PHPUnit Episode iv.iii: Return of the tests
PDF
Your code are my tests
PDF
200K+ reasons security is a must
PDF
QA for PHP projects
PDF
90K Reasons Security is a Must - PHPWorld 2014
PDF
Community works for business - LoneStarPHP 2014
GDPR Art. 25 - Privacy by design and default
Moving from app services to azure functions
Privacy by design
DevOps or DevSecOps
Privacy by design
Continuous deployment 2.0
Let your tests drive your code
General Data Protection Regulation, a developer's story
Leveraging a distributed architecture to your advantage
Open source for a successful business
Deploy to azure in less then 15 minutes
Azure and OSS, a match made in heaven
Getting hands dirty with php7
Zf2 how arrays will save your project
PHPUnit Episode iv.iii: Return of the tests
Your code are my tests
200K+ reasons security is a must
QA for PHP projects
90K Reasons Security is a Must - PHPWorld 2014
Community works for business - LoneStarPHP 2014

Recently uploaded (20)

PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PPTX
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
PPTX
CYBER-CRIMES AND SECURITY A guide to understanding
PPTX
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
PPT
Project quality management in manufacturing
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPT
Chapter 6 Design in software Engineeing.ppt
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
PPTX
“Next-Gen AI: Trends Reshaping Our World”
PPTX
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PPTX
UNIT-1 - COAL BASED THERMAL POWER PLANTS
PPTX
Simulation of electric circuit laws using tinkercad.pptx
PDF
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
PPTX
CH1 Production IntroductoryConcepts.pptx
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
Embodied AI: Ushering in the Next Era of Intelligent Systems
Engineering Ethics, Safety and Environment [Autosaved] (1).pptx
CYBER-CRIMES AND SECURITY A guide to understanding
ANIMAL INTERVENTION WARNING SYSTEM (4).pptx
Project quality management in manufacturing
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Chapter 6 Design in software Engineeing.ppt
Structs to JSON How Go Powers REST APIs.pdf
OOP with Java - Java Introduction (Basics)
Internet of Things (IOT) - A guide to understanding
The-Looming-Shadow-How-AI-Poses-Dangers-to-Humanity.pptx
“Next-Gen AI: Trends Reshaping Our World”
Fluid Mechanics, Module 3: Basics of Fluid Mechanics
Operating System & Kernel Study Guide-1 - converted.pdf
UNIT-1 - COAL BASED THERMAL POWER PLANTS
Simulation of electric circuit laws using tinkercad.pptx
오픈소스 LLM, vLLM으로 Production까지 (Instruct.KR Summer Meetup, 2025)
CH1 Production IntroductoryConcepts.pptx
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...

Easily extend your existing php app with an api