API Centric Development in PHP
-
Upload
joe-stagner -
Category
Technology
-
view
1.836 -
download
0
Transcript of API Centric Development in PHP
1
Click to edit Master title style
API Centric Web Development
Joe Stagner Zend Technologies
2
Click to edit Master title style
The significant problems of today can not be solved with the kinds of thinking that created those problems in the first place!
3
Click to edit Master title style
3
Haven't we done this before ?
Procedural Programming
Object Oriented Programming
Modular Programming
Domain Driven Development
Event Driven Development
Test Driven Development
Agile Methodologies
Pair Programming
Component Oriented Development
Why? What? How?
4
Click to edit Master title style
5
Click to edit Master title style
6
Click to edit Master title style
7
Click to edit Master title style
8
Click to edit Master title style
9
Click to edit Master title style
10
Click to edit Master title styleBam !
11
Click to edit Master title style
12
Click to edit Master title style
13
Click to edit Master title style
6 BILLION
Growth Factor !
14
Click to edit Master title style
15
Click to edit Master title style
16
Click to edit Master title style
17
Click to edit Master title style
18
Click to edit Master title styleWorlds Collide
19
Click to edit Master title style
20
Click to edit Master title style
20
What is used to build the WWW ?
21
Click to edit Master title style
21
% of PHP Developers working on Mobile Apps
using the cloud
72%
Base: 3,335 (in 2012) and 4,809 (in 2013) enterprise, SMB and independent developers worldwideSource: Zend Technologies, Zend Developer Pulse Survey 2011 and 2013
68%using APIs
& cloud services 72%
Our World
23
Click to edit Master title styleOk, but what problems are we trying to solve ?
UI
LogicLogic
I/O
UI
Logic
UI
Logic
UI
Logic
UI
Logic
iPhone / iPad Desktop
Android Browser
I/O
I/O
I/O
Static
Static
Static
Static
24
Click to edit Master title style! Agile Development
25
Click to edit Master title style
26
Click to edit Master title styleThe MODERN Expectation
27
Click to edit Master title style
28
Click to edit Master title style
31
Click to edit Master title styleOk, but what problems are we trying to solve ?
Device Specific UI
Device Specific Logic
Client Layer
Shared UIBusiness Logic
iPhone / iPad DesktopAndroid Browser
Data I/O Static Assets
Device Specific UI
Device Specific Logic
Client Layer
Device Specific UI
Device Specific Logic
Client Layer
Device Specific UI
Device Specific Logic
Client Layer
3rd party Broker Future Use
32
Click to edit Master title styleThe Internet is like my TV !
33
Click to edit Master title styleWhat's an API ?
l SOAPl WSDLl WS-*l DOC Literall XML-RCP
l Socketsl TCPl HTTPl Web Sockets
l CORBAl RPCl ORBl COM/DCOM
l BINARYl ASCIIl POXl WS / Etcl JSON
34
Click to edit Master title styleJust Choose !
HTTP (Sockets, etc.)JSON (POX, SOAP, ASCII) REST (RPC)
35
Click to edit Master title style
http://someurl/customer/inserthttp://someurl/customer/?action=inserthttp://someurl/customer/insert/?name=acme....
Un REST
36
Click to edit Master title style
curl --request GET -H "Content-Type: application/json" --data '{"type": "tuple"}' http://someurl/customer
curl --request POST -H "Content-Type: application/json" --upload-file data.json http://someurl/customer
REST ish
37
Click to edit Master title styleWorking with data
40
Click to edit Master title style
40
Legacy Migration
UI
Logic
UI
Logic
I/O
Static
UI
Logic
UI
Logic
I/O
Static
App
API Layer
Web Site Desktop App
41
Click to edit Master title style
41
Legacy Migration
UI
Logic
UI
Logic
I/O
Static
UI
Logic
UI
Logic
I/O
Static
App
API Layer
Web Site Desktop App
42
Click to edit Master title style
42
Legacy Migration
UI
Logic
UI
Logic
I/OLegacy App
API Layer
Web Site Desktop App
Static
UI
Logic
UI
Logic
I/O
Static
43
Click to edit Master title style
43
Native AppMobile App(s)Native App(s) Web App(s)
Users Assets Products Transactions
DATA
Ideal Architecture
44
Click to edit Master title style
44
Benefits – Real Federated Logic
● Finally - Web Client Server
● Separation of Concerns = real agility
● Add features without touching adjacent code
● URL Endpoints are eminently testable
● Ideally suited for Unit Testing and CI
● Stateless endpoints are innately scalable*
● They are also seamlessly evolveable
● HTTP Ubiquity means MAXIMUM code reuse
● And no platform specific dependencies
45
Click to edit Master title style
45
Benefits – Real Federated Logic
Your TEAMS can federate with your logic.
● Large teams can geo-distribute
● Small teams can more successfully out-source / near source
● Logic need not be shared between teams
● Even continuous delivery can be distributed
46
Click to edit Master title style
46
Down side ?
● Performance issues ?● Learning curve ?● Legacy Integration ?
47
Click to edit Master title style
47
49
API–based Development
50
Zend Blueprint for Continuous Delivery
• Blueprint now available at : www.zend.com/blueprint
• Zend Server Patterns :
• New Continuous Delivery Assessment
Coming soon: Bamboo, Puppet, Tivoli
51
New Zend Studio 10.5 Early Access!
• 2x faster PHP code analysis and better responsiveness
• Updated PHP Toolbox: Composer, PHPUnit, PHPDocumentor
• Great for developing ZF2 and end-to-end mobile apps
• New Intelligent library management
Give it a test drive:
www.zend.com/studioEA
Zend Studio 10 is fully integrated with Git, PHPUnit and Zend Framework 2, which gives me one convenient place for my coding practces. When using ZF2, it’s invaluable thanks to its seamless integraton.
Ore Landau, PHP Developer, SangtamTech
”
”
52
Click to edit Master title style
Thank You!
[email protected]@MisfitGeekDevzone.Zend.comMisfitGeek.com
53
Click to edit Master title style
53