Architecting eCommerce APIs - Gluecon 13

27
Architecting e-Commerce APIs Saranyan Vigraham @saranyan, Tech Guy, Bigcommerce)

description

Gluecon 2013 talk on eCommerce API architecture

Transcript of Architecting eCommerce APIs - Gluecon 13

Page 1: Architecting eCommerce APIs - Gluecon 13

Architecting e-Commerce APIsSaranyan Vigraham @saranyan, Tech Guy, Bigcommerce)

Page 2: Architecting eCommerce APIs - Gluecon 13

What is BAD software design?

Page 3: Architecting eCommerce APIs - Gluecon 13

Rigid - Hard to ChangeToo many parts get affected by a change

Page 4: Architecting eCommerce APIs - Gluecon 13

Fragile - Unexpected thingsSomething else breaks

Page 5: Architecting eCommerce APIs - Gluecon 13

No re-usabilityIt is part of the “core code”

Page 6: Architecting eCommerce APIs - Gluecon 13

Mobile, Blah Blah!

Page 7: Architecting eCommerce APIs - Gluecon 13

Importance of Platform

Page 8: Architecting eCommerce APIs - Gluecon 13

Where is your API?

Page 9: Architecting eCommerce APIs - Gluecon 13

MVC

Templates

Mobile Templates

Static Assets

Database

Database

Database

Website and Mobile

MVC

Templates

Static Assets

MVC Templates

Mobile Templates

Static Assets

Mobi MVC

We are forced to rethink our architectures

Page 10: Architecting eCommerce APIs - Gluecon 13

MVCTemplates

Static Assets

Database

Website

MVCTemplates

Static Assets

Mobile

Native App

Native App API

Page 11: Architecting eCommerce APIs - Gluecon 13

The Big Ball of Mud

Brian Foote and Joseph Yoder, laputan.org/mud

Page 12: Architecting eCommerce APIs - Gluecon 13

The Big Ball of Mud

Page 13: Architecting eCommerce APIs - Gluecon 13

Starting with API first

Page 14: Architecting eCommerce APIs - Gluecon 13

Everything is a service!

API Layer

UI UI UI

Page 15: Architecting eCommerce APIs - Gluecon 13

Everything is a service!

API Layer

Payments Orders Authentication...

Page 16: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

Everything is a service!

Page 17: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

Everything is a service!

X

Page 18: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

Everything is a service!

Page 19: Architecting eCommerce APIs - Gluecon 13

Liskov Substitution

Client Service 1 Service 2

Service 3

Page 20: Architecting eCommerce APIs - Gluecon 13

Liskov Substitution

Client Service 1 Service 2

Service 3

Page 21: Architecting eCommerce APIs - Gluecon 13

Liskov Substitution

API Layer

Payments Shipping Authentication...

Service Container

SingleCode Base

New Service Container

New AuthenticationSystemShipping Service

2.0

Page 22: Architecting eCommerce APIs - Gluecon 13

Interface Segregation

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

Page 23: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

UI UI

Interface Segregation

Page 24: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

Interface Segregation

Page 25: Architecting eCommerce APIs - Gluecon 13

API Layer

Payments Orders Authentication...

Service Container

SingleCode Base

UI UI

Interface Segregation

Page 26: Architecting eCommerce APIs - Gluecon 13

• Everything is a service

• Single codebase - Creation of sandboxes, provisioning, etc

• Liskov substitution

• Interface Segregation

Re-cap

Page 27: Architecting eCommerce APIs - Gluecon 13

?@saranyan

https://developer.bigcommerce.com