Click to edit Master title style

API Centric Web
Development
Joe Stagner
Zend Technologies
1
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!

2
Click to editdone this before ?
Haven't we Master title style

Why? What? How?
Agile Methodologies
Procedural Programming
Object Oriented Programming
Modular Programming
Pair Programming
3

Component Oriented Development
Domain Driven Development
Event Driven Development
Test Driven Development
Click to edit Master title style

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
Bam !

Click to edit Master title style

10
Click to edit Master title style

11
Click to edit Master title style

12
Click to edit Master title style

Growth Factor !

I
B
6
13

N
IO
L
L
Click to edit Master title style

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

Worlds Collide

18
Click to edit Master title style

19
Click to What is used to style the WWW ?
edit Master title build

20
ClickWorld Master title style
Our to edit
% of PHP Developers working on Mobile Apps

72%

21

Base: 3,335 (in 2012) and 4,809 (in 2013) enterprise, SMB and independent developers worldwide
Source: Zend Technologies, Zend Developer Pulse Survey 2011 and 2013

68%
72%

using the
cloud

using APIs
& cloud
services
Click to edit Master title style

Ok, but what problems are we trying to solve ?

iPhone / iPad

Desktop

UI

I/O

UI

I/O

Logic

Static

Logic

Static

Browser

Android
UI

UI

I/O

Logic
23

I/O
Static

Logic

Static
Click to edit Master title style

! Agile Development

24
Click to edit Master title style

25
Click to edit Master title style

The MODERN Expectation

26
Click to edit Master title style

27
Click to edit Master title style

28
Click to edit Master title style

Ok, but what problems are we trying to solve ?
Android

Browser

Desktop

Device Specific UI

Device Specific UI

Device Specific UI

Device Specific UI

Device Specific Logic

Device Specific Logic

Device Specific Logic

Device Specific Logic

Client Layer

Client Layer

Client Layer

Client Layer

iPhone / iPad

Data I/O

31

Static Assets

Business Logic

Shared UI

3rd party Broker

Future Use
Click to edit Master title style

The Internet is like my TV !

32
Click to edit Master title style

What's an API ?
l
l
l
l

33

CORBA
RPC
ORB
COM/DCOM

l

l
Sockets
SOAP
l
l
TCP
WSDL
l
l
HTTP
WS-*
l
Web Sockets l DOC Literal
l
XML-RCP

l
l
l
l
l

BINARY
ASCII
POX
WS / Etc
JSON
Click to edit Master title style

Just Choose !

HTTP (Sockets, etc.)
JSON (POX, SOAP, ASCII)
REST (RPC)

34
Click to edit Master title style

Un REST

http://someurl/customer/insert
http://someurl/customer/?action=insert
http://someurl/customer/insert/?name=acme....

35
Click to edit Master title style

REST ish

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

36
Click to edit Master title style

Working with data

37
Legacy Migration
Click to edit

Master title style
Web Site

Desktop App

API Layer

40

UI

I/O

UI

I/O

Logic

App

Static

Logic

Static
Legacy Migration
Click to edit

Master title style
Web Site

Desktop App

API Layer

41

UI

I/O

UI

I/O

Logic

App

Static

Logic

Static
Legacy Migration
Click to edit

Master title style
Web Site

Legacy App

Desktop App

UI

I/O

UI

I/O

Logic

Static

Logic

Static

API Layer

42
Click to edit Master title style

Ideal Architecture
Native App(s)

Users

Mobile App(s)
Native App

Assets

Products

DATA
43

Web App(s)

Transactions
Click to edit – Real Federated Logic
Benefits Master title style
●

Finally - Web Client Server

●

Separation of Concerns = real agility
●

●

URL Endpoints are eminently testable
●

●

They are also seamlessly evolveable

HTTP Ubiquity means MAXIMUM code reuse
●

44

Ideally suited for Unit Testing and CI

Stateless endpoints are innately scalable*
●

●

Add features without touching adjacent code

And no platform specific dependencies
Click to edit – Real Federated Logic
Benefits Master title style

Your TEAMS can federate with your logic.
●

Large teams can geo-distribute

●

Small teams can more successfully out-source / near source
●
●

45

Logic need not be shared between teams
Even continuous delivery can be distributed
Click to edit Master title style
Down side ?

Performance issues ?
● Learning curve ?
● Legacy Integration ?
●

46
Click to edit Master title style

47
API–based Development

49
Zend Blueprint for Continuous Delivery
• Blueprint now available at : www.zend.com/blueprint
• Zend Server Patterns :

Coming soon: Bamboo, Puppet, Tivoli
• New Continuous Delivery Assessment
50
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-toend mobile apps
• New Intelligent library management

”

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

51

Give it a test drive:
www.zend.com/studioEA
Click to edit Master title style

Thank You!
Joe@Zend.com
@MisfitGeek
Devzone.Zend.com
MisfitGeek.com
52
Click to edit Master title style

53

API Centric Development in PHP

  • 1.
    Click to editMaster title style API Centric Web Development Joe Stagner Zend Technologies 1
  • 2.
    Click to editMaster title style The significant problems of today can not be solved with the kinds of thinking that created those problems in the first place! 2
  • 3.
    Click to editdonethis before ? Haven't we Master title style Why? What? How? Agile Methodologies Procedural Programming Object Oriented Programming Modular Programming Pair Programming 3 Component Oriented Development Domain Driven Development Event Driven Development Test Driven Development
  • 4.
    Click to editMaster title style 4
  • 5.
    Click to editMaster title style 5
  • 6.
    Click to editMaster title style 6
  • 7.
    Click to editMaster title style 7
  • 8.
    Click to editMaster title style 8
  • 9.
    Click to editMaster title style 9
  • 10.
    Bam ! Click toedit Master title style 10
  • 11.
    Click to editMaster title style 11
  • 12.
    Click to editMaster title style 12
  • 13.
    Click to editMaster title style Growth Factor ! I B 6 13 N IO L L
  • 14.
    Click to editMaster title style 14
  • 15.
    Click to editMaster title style 15
  • 16.
    Click to editMaster title style 16
  • 17.
    Click to editMaster title style 17
  • 18.
    Click to editMaster title style Worlds Collide 18
  • 19.
    Click to editMaster title style 19
  • 20.
    Click to Whatis used to style the WWW ? edit Master title build 20
  • 21.
    ClickWorld Master titlestyle Our to edit % of PHP Developers working on Mobile Apps 72% 21 Base: 3,335 (in 2012) and 4,809 (in 2013) enterprise, SMB and independent developers worldwide Source: Zend Technologies, Zend Developer Pulse Survey 2011 and 2013 68% 72% using the cloud using APIs & cloud services
  • 22.
    Click to editMaster title style Ok, but what problems are we trying to solve ? iPhone / iPad Desktop UI I/O UI I/O Logic Static Logic Static Browser Android UI UI I/O Logic 23 I/O Static Logic Static
  • 23.
    Click to editMaster title style ! Agile Development 24
  • 24.
    Click to editMaster title style 25
  • 25.
    Click to editMaster title style The MODERN Expectation 26
  • 26.
    Click to editMaster title style 27
  • 27.
    Click to editMaster title style 28
  • 28.
    Click to editMaster title style Ok, but what problems are we trying to solve ? Android Browser Desktop Device Specific UI Device Specific UI Device Specific UI Device Specific UI Device Specific Logic Device Specific Logic Device Specific Logic Device Specific Logic Client Layer Client Layer Client Layer Client Layer iPhone / iPad Data I/O 31 Static Assets Business Logic Shared UI 3rd party Broker Future Use
  • 29.
    Click to editMaster title style The Internet is like my TV ! 32
  • 30.
    Click to editMaster title style What's an API ? l l l l 33 CORBA RPC ORB COM/DCOM l l Sockets SOAP l l TCP WSDL l l HTTP WS-* l Web Sockets l DOC Literal l XML-RCP l l l l l BINARY ASCII POX WS / Etc JSON
  • 31.
    Click to editMaster title style Just Choose ! HTTP (Sockets, etc.) JSON (POX, SOAP, ASCII) REST (RPC) 34
  • 32.
    Click to editMaster title style Un REST http://someurl/customer/insert http://someurl/customer/?action=insert http://someurl/customer/insert/?name=acme.... 35
  • 33.
    Click to editMaster title style REST ish 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 36
  • 34.
    Click to editMaster title style Working with data 37
  • 35.
    Legacy Migration Click toedit Master title style Web Site Desktop App API Layer 40 UI I/O UI I/O Logic App Static Logic Static
  • 36.
    Legacy Migration Click toedit Master title style Web Site Desktop App API Layer 41 UI I/O UI I/O Logic App Static Logic Static
  • 37.
    Legacy Migration Click toedit Master title style Web Site Legacy App Desktop App UI I/O UI I/O Logic Static Logic Static API Layer 42
  • 38.
    Click to editMaster title style Ideal Architecture Native App(s) Users Mobile App(s) Native App Assets Products DATA 43 Web App(s) Transactions
  • 39.
    Click to edit– Real Federated Logic Benefits Master title style ● Finally - Web Client Server ● Separation of Concerns = real agility ● ● URL Endpoints are eminently testable ● ● They are also seamlessly evolveable HTTP Ubiquity means MAXIMUM code reuse ● 44 Ideally suited for Unit Testing and CI Stateless endpoints are innately scalable* ● ● Add features without touching adjacent code And no platform specific dependencies
  • 40.
    Click to edit– Real Federated Logic Benefits Master title style Your TEAMS can federate with your logic. ● Large teams can geo-distribute ● Small teams can more successfully out-source / near source ● ● 45 Logic need not be shared between teams Even continuous delivery can be distributed
  • 41.
    Click to editMaster title style Down side ? Performance issues ? ● Learning curve ? ● Legacy Integration ? ● 46
  • 42.
    Click to editMaster title style 47
  • 43.
  • 44.
    Zend Blueprint forContinuous Delivery • Blueprint now available at : www.zend.com/blueprint • Zend Server Patterns : Coming soon: Bamboo, Puppet, Tivoli • New Continuous Delivery Assessment 50
  • 45.
    New Zend Studio10.5 Early Access! • 2x faster PHP code analysis and better responsiveness • Updated PHP Toolbox: Composer, PHPUnit, PHPDocumentor • Great for developing ZF2 and end-toend mobile apps • New Intelligent library management ” 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 51 Give it a test drive: www.zend.com/studioEA
  • 46.
    Click to editMaster title style Thank You! Joe@Zend.com @MisfitGeek Devzone.Zend.com MisfitGeek.com 52
  • 47.
    Click to editMaster title style 53