gogobus.it - overview on a recently launched symfony2 platform

24
http://gogobus.it Overview on a recently launched Symfony2 platform PHPDay Verona – 16/05/2015

Upload: inmarelibero

Post on 27-Jul-2015

68 views

Category:

Internet


0 download

TRANSCRIPT

http://gogobus.it

Overview on a recently launched Symfony2 platform

PHPDay Verona – 16/05/2015

Emanuele Gaspari

PHP/Symfony developer

@inmarelibero

[email protected]

Train to Symfony

http://traintosymfony.com

SymfonyBricks

http://symfonybricks.com

https://github.com/copiaincolla/MetaTagsBundle

Development started in mid February 2015

Online on April the 30th

First bookable ride on May the 14th

16May

1Jun

25Jun

30Jun

Bob buys the first ticket, 24€

ride is confirmed

ride is closed

bus leaves

other 10 people buy tickets, < 24€

final price of 16€ is calculated

users can buy tickets, 16€

30° traveller buys a ticket, 24€

Pains

Ouwtard and Returns

(with multiple stops)

Booking and payments

Searches

Edit Ride form

Booking form

Emails

demo time

Objects to handle

users

rides

stops

events

booking tickets, travellers, luggages

discount codes

ride proposals

charges

logs

:80:22

EC2t2.mediumFrankfurt

RDSdb.td2.microFrankfurt

SESIreland

Load BalancerFrankfurtCloudFlare

httpscache

bandwidth

Tools

Symfony 2.6

jQuery 1.11

Bootstrap 3.3

MySQL 5.5

Apache 2.4

RabbitMQ 3.4

Capifony 2.8

no tests

Other stuf

Supervisor

1 always-running command on server (Symfony command)

1 consumer on server

Stripe (PHP SDK)

HWIOAuthBundle (Facebook login)

GitHub

Slack integration

Focus on Symfony

concentrate on business logic

fit our needs

a bundle for everything I need now

Tell me more

Bundles in src/

AdminBundle

AppBundle

EmailBundle

ListenersBundle

LoggerBundle

RabbitMQBundle

SlackBundle

UserBundle

Services

55 services

and growing

~3 functions

per service

Hints

https://github.com/videlalvaro/RabbitMqBundle/issues/246

I wouldn't do it again

Listeners from the beginning

I wish I had done

use JMS\DiExtraBundle

dedicated $em with entities mapping because a single log

flushes ALL entities

separate the always-running command in a bundle

use AWS SDK PHP from the beginning

better environments separation

I learned

Remember to code for the 10% of the most problematic logic

Divide and Conquer from the very beginning

No fear for services: they are your best friends

Create specific Excepion classes as you need

Next

API (FOSRestBundle, Kong)

IOS App

Decouple RabbitMQ server and consumer

Better logs handling

Refactor the always-running command

ESI

Symfony Gateway Cache, Varnish

@inmarelibero

[email protected]

Train to Symfony

http://traintosymfony.com

SymfonyBricks

http://symfonybricks.com