Turning code into wine
Access control, wine dispensing and process
management with PHP and JS.
by Ralf Schwoebel (@orgaralf) #APIcon18
Don‘t drink and root...
212:28
What is going on?
312:28
wineBANK Palma
412:28
wineBANK
• It is a club
• It is a location to store wine
• It is a location to drink wine
• It is an eCommerce platform
• It is technology driven
• Its success is depending (partially) on APIs
wineBANK smart card
512:28
Impressions worldwide
A club and...
...event location...
... storage facility...
... gastronomy ...
... technology based!
612:28
wineBANK.club
And why is that worth a talk on a conference?
712:28
wineBANK General Web
812:28
wineBANK eCommerce
912:28
wineBANK eCommerce
1012:28
wineBANK User Interface
1112:28
wineBANK User Interface
1212:28
wineBANK admin Interface
1312:28
wineBANK admin Interface II
1412:28
Obstacles and learnings
1512:28
1 location:
1 problem
1612:28
2 Locations:
100 Problems
eg: CHF, Taxes, outside
EU, 2 languages more,
special handling of
signups, promotioncodes
1712:28
wineBANK technology
MariaDB
PHP5 on Symphony
Linux Servers
(cloud)
(PHP)
Scripts
API
Connectors
• Invoicing
• Mailings
• Up/Downgrades
• Cancellations
website
PHP + JS = HTML5
Member Area
PHP + JS = HTML5
Franchisee
PHP + JS = HTML5
Franchisor
PHP + JS = HTML5
Master Admin
PHP + JS = HTML5
1812:28
wineBANK – Kung Fu Squad
From „one man band“ to development team...
PHP
Server-Config
Database
APIs
QA
Design
Info-Updates
Monolith Code Symfony based
services & classes
Localize
1912:28
wineBANK Code style
2012:28
wineBANK – the need of the many...
Migration with „Symphony Proxy“: do not throw the code away!
2112:28
wineBANK Code Explosion
• 2 languages
• 5+ tax regions (eg. Austria has something special)
• PDF, XML, CSV generation
• Cross border invoicing with 5x5 cases
(Eg: invoice from Palma to London wineBANKer for BTG)
• 2 evolving APIs, third to come
• Upgrades / Downgrades / Missing Cards, etc.
2212:28
Integration Example
2312:28
Let‘s start simple: Opening Doors
• Cards are produced in bulk: RFID+PIN (card has a number on it)
• Cards are delivered to wineBANK with XLS file
• Membership is sold: card is assigned to contract
• 1 contract can have N cards in X locations (think spouse / team)
• Card code is transferred to all BOSCH systems
• Card is mailed to member: working!
2412:28
Opening Doors with code
• Backend = proprietary Java Pages in German
2512:28
Opening Doors: the obstacles
• Manual card registration in 2 systems
• FTP pull system, no condition reporting (we have to check FTP log)
2612:28
real API
2712:28
Now more seriously: Code, give me wine (BTG)!
• Embedded Windows (sigh) machines
• Connected via local network (Cable, DSL, LTE) to Czech
server
• Franchisee needs to administer the machine CLEANLY!
• Each „click“ converts into a database entry
• Cards are supposed to work globally
• A spanish wineBANKer receives an invoice from London
after drinking there: tax and legal!
2812:28
2912:28
Code, give me wine (BTG)!
1
Sign Up
for the club
2
wB picks a card
enters it manually
3
FTP to doors
Push to BtG
4
Card mailed
to you
5
You fly to Palma
and drink a glass
6
Dataset pushed
to BtG
7
Dataset pulled to
backend
8
Invoice created
eMailed to you
3012:28
Code
3112:28
Obstacles
• 3rd party has different views on how to code
• There is no real staging, because the state differs (always)
• There is no Sandbox from the BtG side
• The franchisee names the wine list: AN2
• Time and deadlines: 4 entities on 1 process!
3212:28
Working on an open heart
3312:28
Obstacles
3412:28
Learnings
The customer has the idea,
but you need to design much more than code:
• Anticipate future expansion: cut your functionality in services!
• Basic project management: external APIs change without warning!
• Testing and automation: come up with a solid test scenario!
• International process design: fix the characteristics before typing!
3512:28
Thank you!
Thank you for your time and attention...
Have a great conference!
Next - 12.15:
• Securing APIs and Microservices with OAuth and OpenID
Connect – Room C
• Micro Frontends – Auditorium
Ralf Schwoebel, CEO
orga.zone AG
rs@orga.zone
https://orga.zone/
3612:28

APIconference London 2018: Turning code into wine

  • 1.
    Turning code intowine Access control, wine dispensing and process management with PHP and JS. by Ralf Schwoebel (@orgaralf) #APIcon18
  • 2.
    Don‘t drink androot... 212:28
  • 3.
    What is goingon? 312:28
  • 4.
  • 5.
    wineBANK • It isa club • It is a location to store wine • It is a location to drink wine • It is an eCommerce platform • It is technology driven • Its success is depending (partially) on APIs wineBANK smart card 512:28
  • 6.
    Impressions worldwide A cluband... ...event location... ... storage facility... ... gastronomy ... ... technology based! 612:28
  • 7.
    wineBANK.club And why isthat worth a talk on a conference? 712:28
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
    2 Locations: 100 Problems eg:CHF, Taxes, outside EU, 2 languages more, special handling of signups, promotioncodes 1712:28
  • 18.
    wineBANK technology MariaDB PHP5 onSymphony Linux Servers (cloud) (PHP) Scripts API Connectors • Invoicing • Mailings • Up/Downgrades • Cancellations website PHP + JS = HTML5 Member Area PHP + JS = HTML5 Franchisee PHP + JS = HTML5 Franchisor PHP + JS = HTML5 Master Admin PHP + JS = HTML5 1812:28
  • 19.
    wineBANK – KungFu Squad From „one man band“ to development team... PHP Server-Config Database APIs QA Design Info-Updates Monolith Code Symfony based services & classes Localize 1912:28
  • 20.
  • 21.
    wineBANK – theneed of the many... Migration with „Symphony Proxy“: do not throw the code away! 2112:28
  • 22.
    wineBANK Code Explosion •2 languages • 5+ tax regions (eg. Austria has something special) • PDF, XML, CSV generation • Cross border invoicing with 5x5 cases (Eg: invoice from Palma to London wineBANKer for BTG) • 2 evolving APIs, third to come • Upgrades / Downgrades / Missing Cards, etc. 2212:28
  • 23.
  • 24.
    Let‘s start simple:Opening Doors • Cards are produced in bulk: RFID+PIN (card has a number on it) • Cards are delivered to wineBANK with XLS file • Membership is sold: card is assigned to contract • 1 contract can have N cards in X locations (think spouse / team) • Card code is transferred to all BOSCH systems • Card is mailed to member: working! 2412:28
  • 25.
    Opening Doors withcode • Backend = proprietary Java Pages in German 2512:28
  • 26.
    Opening Doors: theobstacles • Manual card registration in 2 systems • FTP pull system, no condition reporting (we have to check FTP log) 2612:28
  • 27.
  • 28.
    Now more seriously:Code, give me wine (BTG)! • Embedded Windows (sigh) machines • Connected via local network (Cable, DSL, LTE) to Czech server • Franchisee needs to administer the machine CLEANLY! • Each „click“ converts into a database entry • Cards are supposed to work globally • A spanish wineBANKer receives an invoice from London after drinking there: tax and legal! 2812:28
  • 29.
  • 30.
    Code, give mewine (BTG)! 1 Sign Up for the club 2 wB picks a card enters it manually 3 FTP to doors Push to BtG 4 Card mailed to you 5 You fly to Palma and drink a glass 6 Dataset pushed to BtG 7 Dataset pulled to backend 8 Invoice created eMailed to you 3012:28
  • 31.
  • 32.
    Obstacles • 3rd partyhas different views on how to code • There is no real staging, because the state differs (always) • There is no Sandbox from the BtG side • The franchisee names the wine list: AN2 • Time and deadlines: 4 entities on 1 process! 3212:28
  • 33.
    Working on anopen heart 3312:28
  • 34.
  • 35.
    Learnings The customer hasthe idea, but you need to design much more than code: • Anticipate future expansion: cut your functionality in services! • Basic project management: external APIs change without warning! • Testing and automation: come up with a solid test scenario! • International process design: fix the characteristics before typing! 3512:28
  • 36.
    Thank you! Thank youfor your time and attention... Have a great conference! Next - 12.15: • Securing APIs and Microservices with OAuth and OpenID Connect – Room C • Micro Frontends – Auditorium Ralf Schwoebel, CEO orga.zone AG rs@orga.zone https://orga.zone/ 3612:28

Editor's Notes

  • #3 Short introduction of who we are and how the tasks are split. We are talking about a start-up in the wine business with unique processes and clear budget limitations fighting in a global marketplace and a rapidly changing market. Coding is done by conlabz Project management for wineBANK done by orga.zone This basically means translating and priotizing..
  • #4 Short introduction of who we are and how the tasks are split. We are talking about a start-up in the wine business with unique processes and clear budget limitations fighting in a global marketplace and a rapidly changing market. Coding is done by conlabz Project management for wineBANK done by orga.zone This basically means translating and priotizing..