SlideShare a Scribd company logo
FORGET ABOUT INDEX.PHP
BUILD YOUR APPLICATIONS AROUND HTTP!
Kacper Gunia @cakper
Software Engineer @SensioLabsUK
Symfony Certified Developer
PHPers Silesia @PHPersPL
Good old days
flickr.com/linkahwai/5162310920
Hello world in PHP“ ” + tutorial
Gojko’s two facts about
programming web:
1)Ctrl-C
2)Ctrl-V
<?php	
  
!
$name	
  =	
  $_GET['name'];	
  
echo	
  "Hello	
  $name!";
It works! :D
but…
and so on… ;)
How HTTP works?
flickr.com/see-­‐through-­‐the-­‐eye-­‐of-­‐g/4278744230
Request
Kabooooom!
Response
This is what HTTP is about!
Request
Response
This is what Your App is about!
Request
Response
“(…) the goal of your
application is always to
interpret a request and
create the appropriate
response based on your
application logic.”
Symfony.com
HTTP is simple
flickr.com/wildhaber/5936335464
Request
flickr.com/haniamir/3318727924
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
I want to see…
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
…this resource!
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
And I know it should be on localhost
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
Psst, I’m using 1.1 version of HTTP protocol
Response
flickr.com/aftab/3364835006
HTTP/1.1	
  200	
  OK	
  
Host:	
  localhost:8000	
  
Content-­‐type:	
  text/html	
  
!
Hello	
  Kacper!
HTTP/1.1	
  200	
  OK	
  
Host:	
  localhost:8000	
  
Content-­‐type:	
  text/html	
  
!
Hello	
  Kacper!
OK man, I’ve found it!
HTTP/1.1	
  200	
  OK	
  
Host:	
  localhost:8000	
  
Content-­‐type:	
  text/html	
  
!
Hello	
  Kacper!
And it’s an HTML
HTTP/1.1	
  200	
  OK	
  
Host:	
  localhost:8000	
  
Content-­‐type:	
  text/html	
  
!
Hello	
  Kacper!
Hello World!
[METH]	
  [REQUEST-­‐URI]	
  HTTP/[VER]	
  
[Field1]:	
  [Value1]	
  
[Field2]:	
  [Value2]	
  
!
[request	
  body,	
  if	
  any]
HTTP/[VER]	
  [CODE]	
  [TEXT]	
  
[Field1]:	
  [Value1]	
  
[Field2]:	
  [Value2]	
  
!
[response	
  body]
ResponseRequest
What if we create objects
from Request & Response?
Object-oriented HTTP
flickr.com/mohammadafshar/9571051345
GET	
  /index.php?name=Kacper	
  HTTP/1.1	
  
Host:	
  localhost:8000
$request-­‐>getMethod();	
  	
  	
  GET	
  
$request-­‐>getPathInfo();	
  /
HTTP/1.1	
  200	
  OK	
  
Host:	
  localhost:8000	
  
Content-­‐type:	
  text/html	
  
!
Hello	
  Kacper!
$response-­‐>getStatusCode();	
  200	
  
$response-­‐>getContent();	
  	
  	
  	
  Hello	
  Kacper!
HttpFoundation
flickr.com/rubempjr/8050505443
“The HttpFoundation
component defines
an object-oriented

layer for the HTTP
specification”
Symfony.com
Request
flickr.com/haniamir/3318727924
$request	
  =	
  Request::createFromGlobals();	
  
!
$request	
  =	
  new	
  Request(	
  
	
  	
  	
  	
  $_GET,	
  
	
  	
  	
  	
  $_POST,	
  
	
  	
  	
  	
  array(),	
  
	
  	
  	
  	
  $_COOKIE,	
  
	
  	
  	
  	
  $_FILES,	
  
	
  	
  	
  	
  $_SERVER	
  
);
!
	
  	
  	
  	
  $_GET	
  	
  	
  	
  	
  $request-­‐>query	
  	
  
	
  	
  	
  	
  $_POST	
  	
  	
  	
  $request-­‐>request	
  
	
  	
  	
  	
  $_COOKIE	
  	
  $request-­‐>cookies	
  
	
  	
  	
  	
  $_FILES	
  	
  	
  $request-­‐>files	
  
	
  	
  	
  	
  $_SERVER	
  	
  $request-­‐>server	
  
!
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $request-­‐>headers	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $request-­‐>attributes
ParameterBag instances
$name	
  =	
  isset($_GET['name'])	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  ?	
  $_GET['name']	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  :	
  "World";
$name	
  =	
  $request	
  
	
  	
  	
  	
  	
  	
  	
  	
  -­‐>query	
  
	
  	
  	
  	
  	
  	
  	
  	
  -­‐>get('name',	
  'World');
$request-­‐>isSecure();
Verify configured header or standard one
$request-­‐>isXmlHttpRequest();
Verify AJAX request
$request	
  =	
  Request::create(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  '/',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'GET',	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  ['name'	
  =>	
  'Kacper']	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );
Simulate a Request
Response
flickr.com/aftab/3364835006
$response	
  =	
  new	
  Response(	
  
	
  	
  	
  	
  ‘Hello	
  Kacper!’,	
  
	
  	
  	
  	
  Response::HTTP_OK,	
  
	
  	
  	
  	
  ['content-­‐type'	
  =>	
  'text/html']	
  
);	
  
!
$response-­‐>prepare($request);	
  
$response-­‐>send();
$response	
  =	
  new	
  RedirectResponse(

	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'http://example.com/'	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );
Redirect Response
$response	
  =	
  new	
  JsonResponse();	
  
$response-­‐>setData(['name'	
  =>	
  'Kacper']);
JSON Response
Let’s use them together!
$kernel	
  =	
  new	
  AppKernel('dev',	
  true);	
  
!
$request	
  =	
  Request::createFromGlobals();	
  
$response	
  =	
  $kernel-­‐>handle($request);	
  
$response-­‐>send();	
  
!
$kernel-­‐>terminate($request,	
  $response);
Symfony app_dev.php
$kernel	
  =	
  new	
  AppKernel('dev',	
  true);	
  
!
$request	
  =	
  Request::createFromGlobals();	
  
$response	
  =	
  $kernel-­‐>handle($request);	
  
$response-­‐>send();	
  
!
$kernel-­‐>terminate($request,	
  $response);
Symfony app_dev.php
Reminds something? ;)
Request
Kabooooom!
Response
Front Controller
flickr.com/cedwardbrice/8334047708
”The Front Controller
consolidates all request
handling by channeling
requests through a single
handler object (…)”
MartinFowler.com
$kernel	
  =	
  new	
  AppKernel('dev',	
  true);	
  
!
$request	
  =	
  Request::createFromGlobals();	
  
$response	
  =	
  $kernel-­‐>handle($request);	
  
$response-­‐>send();	
  
!
$kernel-­‐>terminate($request,	
  $response);
Let’s go deeper…
HTTP Kernel
flickr.com/stuckincustoms/6341844005
“The HttpKernel
component provides a
structured process for
converting a Request into
a Response by making use
of the EventDispatcher.”
Symfony.com
interface	
  HttpKernelInterface	
  
{	
  
	
  	
  	
  	
  const	
  MASTER_REQUEST	
  =	
  1;	
  
	
  	
  	
  	
  const	
  SUB_REQUEST	
  =	
  2;	
  
!
	
  	
  	
  	
  /**	
  
	
  	
  	
  	
  	
  *	
  @return	
  Response	
  A	
  Response	
  instance	
  
	
  	
  	
  	
  	
  */	
  
	
  	
  	
  	
  public	
  function	
  handle(	
  
	
  	
  	
  	
  	
  	
  	
  	
  Request	
  $request,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  $type	
  =	
  self::MASTER_REQUEST,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  $catch	
  =	
  true);	
  
}
How Symfony transforms
Request into Response?
Event Dispatcher
flickr.com/parksjd/11847079564
“The EventDispatcher
component provides tools
that allow your application
components to communicate
with each other by
dispatching events and
listening to them.”
Symfony.com
EventDispatcher is
an implementation
of Mediator pattern
$dispatcher	
  =	
  new	
  EventDispatcher();	
  
$dispatcher-­‐>addListener(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  'foo.action',	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  function	
  (Event	
  $event)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  //	
  do	
  whatever	
  you	
  need	
  
});	
  
!
$event	
  =	
  new	
  Event();	
  
$dispatcher-­‐>dispatch('foo.action',	
  $event);
The kernel.request Event
flickr.com/drakegoodman/13479419575
Manipulate your
Request here…
…you can even
return a Response!
public	
  function	
  onKernelRequest(GetResponseEvent	
  $event)	
  
{	
  
	
  	
  	
  	
  $request	
  =	
  $event-­‐>getRequest();	
  
	
  	
  	
  	
  if	
  ($request-­‐>query-­‐>get('name')	
  ===	
  'Kacper')	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  $event-­‐>setResponse(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  new	
  Response("We	
  don't	
  like	
  you!")	
  
	
  	
  	
  	
  	
  	
  	
  	
  );	
  
	
  	
  	
  	
  }	
  
}
…or e.g. detect
device, location…
…and routing is
resolved here
The Routing Component
flickr.com/checksam/12814058644
“The Routing
component maps an
HTTP request to a set
of configuration
variables.”
Symfony.com
$route	
  =	
  new	
  Route('/',	
  array('controller'	
  =>	
  'HelloController'));	
  
$routes	
  =	
  new	
  RouteCollection();	
  
$routes-­‐>add('hello_route',	
  $route);	
  
!
$context	
  =	
  new	
  RequestContext();	
  
$context-­‐>fromRequest($request);	
  
!
$matcher	
  =	
  new	
  UrlMatcher($routes,	
  $context);	
  
!
$parameters	
  =	
  $matcher-­‐>match('/');	
  
//	
  ['controller'	
  =>	
  'HelloController',	
  '_route'	
  =>	
  'hello_route']
$route	
  =	
  new	
  Route('/',	
  array('controller'	
  =>	
  'HelloController'));	
  
$routes	
  =	
  new	
  RouteCollection();	
  
$routes-­‐>add('hello_route',	
  $route);	
  
!
$context	
  =	
  new	
  RequestContext();	
  
$context-­‐>fromRequest($request);	
  
!
$matcher	
  =	
  new	
  UrlMatcher($routes,	
  $context);	
  
!
$parameters	
  =	
  $matcher-­‐>match('/');	
  
//	
  ['controller'	
  =>	
  'HelloController',	
  '_route'	
  =>	
  'hello_route']
$route	
  =	
  new	
  Route('/',	
  array('controller'	
  =>	
  'HelloController'));	
  
$routes	
  =	
  new	
  RouteCollection();	
  
$routes-­‐>add('hello_route',	
  $route);	
  
!
$context	
  =	
  new	
  RequestContext();	
  
$context-­‐>fromRequest($request);	
  
!
$matcher	
  =	
  new	
  UrlMatcher($routes,	
  $context);	
  
!
$parameters	
  =	
  $matcher-­‐>match('/');	
  
//	
  ['controller'	
  =>	
  'HelloController',	
  '_route'	
  =>	
  'hello_route']
$route	
  =	
  new	
  Route('/',	
  array('controller'	
  =>	
  'HelloController'));	
  
$routes	
  =	
  new	
  RouteCollection();	
  
$routes-­‐>add('hello_route',	
  $route);	
  
!
$context	
  =	
  new	
  RequestContext();	
  
$context-­‐>fromRequest($request);	
  
!
$matcher	
  =	
  new	
  UrlMatcher($routes,	
  $context);	
  
!
$parameters	
  =	
  $matcher-­‐>match('/');	
  
//	
  ['controller'	
  =>	
  'HelloController',	
  '_route'	
  =>	
  'hello_route']
$route	
  =	
  new	
  Route('/',	
  array('controller'	
  =>	
  'HelloController'));	
  
$routes	
  =	
  new	
  RouteCollection();	
  
$routes-­‐>add('hello_route',	
  $route);	
  
!
$context	
  =	
  new	
  RequestContext();	
  
$context-­‐>fromRequest($request);	
  
!
$matcher	
  =	
  new	
  UrlMatcher($routes,	
  $context);	
  
!
$parameters	
  =	
  $matcher-­‐>match('/');	
  
//	
  ['controller'	
  =>	
  'HelloController',	
  '_route'	
  =>	
  'hello_route']
Resolve Controller
flickr.com/rightbrainphotography/480979176
interface	
  ControllerResolverInterface	
  
{	
  
	
  	
  	
  	
  public	
  function	
  getController(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Request	
  $request	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );	
  
!
	
  	
  	
  	
  public	
  function	
  getArguments(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Request	
  $request,	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $controller	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );	
  
}
Controller is
a PHP callable
The kernel.controller Event
flickr.com/drakegoodman/12451824524
Change controller
here (if you need)
and initialise data
e.g. parameters
conversion
happens now
Resolve Arguments
flickr.com/joiseyshowaa/2720195951
interface	
  ControllerResolverInterface	
  
{	
  
	
  	
  	
  	
  public	
  function	
  getController(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Request	
  $request	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );	
  
!
	
  	
  	
  	
  public	
  function	
  getArguments(	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Request	
  $request,	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $controller	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  );	
  
}
Arguments
come from
$request->attributes
ParameterBag
Controller Call
flickr.com/taspicsvns/11768808836
Time for your
application logic
Return
Response object
Optional:
The kernel.view event
flickr.com/drakegoodman/11006558364
Transform
non-Response
into Response
e.g.
@Template
annotation
e.g. transform
arrays into
JSON Responses
The kernel.response Event
flickr.com/drakegoodman/14482752231
Manipulate
Response
e.g.
WebDebugToolbar
Send Response
flickr.com/stuckincustoms/5727003126
The kernel.terminate Event
flickr.com/drakegoodman/12203395206
Do the heavy
stuff now
e.g.
Send Emails
HTTP Cache
flickr.com/soldiersmediacenter/403524071
Cache-Control
Expires
Cache-Control
Expires
$response	
  =	
  new	
  Response();	
  
!
$response-­‐>setPublic();	
  
$response-­‐>setMaxAge(600);	
  
$response-­‐>setSharedMaxAge(600);
Validation
public	
  function	
  indexAction(Request	
  $request,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  $name)	
  
{	
  
	
  	
  	
  	
  $response	
  =	
  new	
  Response("Hello	
  $name");	
  
	
  	
  	
  	
  $response-­‐>setETag(md5($response-­‐>getContent()));	
  
	
  	
  	
  	
  $response-­‐>setPublic();	
  
	
  	
  	
  	
  $response-­‐>isNotModified($request);	
  
!
	
  	
  	
  	
  return	
  $response;	
  
}
ESI
flickr.com/nasamarshall/6950477589
“The ESI specification
describes tags you can
embed in your pages
to communicate with
the gateway cache.”
Symfony.com
<!DOCTYPE	
  html>	
  
<html>	
  
	
  	
  	
  	
  <body>	
  
	
  	
  	
  	
  <!-­‐-­‐	
  ...	
  content	
  -­‐-­‐>	
  
!
	
  	
  	
  	
  <!-­‐-­‐	
  Embed	
  the	
  content	
  of	
  another	
  page	
  -­‐-­‐>	
  
	
  	
  	
  	
  <esi:include	
  src="http://..."/>	
  
!
	
  	
  	
  	
  <!-­‐-­‐	
  ...	
  content	
  -­‐-­‐>	
  
	
  	
  	
  	
  </body>	
  
</html>
But I don’t have Varnish!
Symfony2 Reverse Proxy
flickr.com/zacharyz/3950845049
$kernel	
  =	
  new	
  AppKernel('prod',	
  false);	
  
$kernel-­‐>loadClassCache();	
  
!
$kernel	
  =	
  new	
  AppCache($kernel);	
  
!
$request	
  =	
  Request::createFromGlobals();	
  
$response	
  =	
  $kernel-­‐>handle($request);	
  
$response-­‐>send();	
  
$kernel-­‐>terminate($request,	
  $response);
$kernel	
  =	
  new	
  AppKernel('prod',	
  false);	
  
$kernel-­‐>loadClassCache();	
  
!
$kernel	
  =	
  new	
  AppCache($kernel);	
  
!
$request	
  =	
  Request::createFromGlobals();	
  
$response	
  =	
  $kernel-­‐>handle($request);	
  
$response-­‐>send();	
  
$kernel-­‐>terminate($request,	
  $response);
OK, but are those things actually
used outside of Symfony?
flickr.com/tombricker/5709640847
YES!
Drupal 8
phpBB
Silex
eZ Publish
Laravel
Kacper Gunia
Software Engineer
Symfony Certified Developer
PHPers Silesia
Thanks!
joind.in/10880

More Related Content

What's hot

Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Kacper Gunia
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
Kirill Chebunin
 
Decoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DICDecoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DIC
Konstantin Kudryashov
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
Hugo Hamon
 
Decoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDDDecoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDD
Aleix Vergés
 
Models and Service Layers, Hemoglobin and Hobgoblins
Models and Service Layers, Hemoglobin and HobgoblinsModels and Service Layers, Hemoglobin and Hobgoblins
Models and Service Layers, Hemoglobin and Hobgoblins
Ross Tuck
 
Min-Maxing Software Costs
Min-Maxing Software CostsMin-Maxing Software Costs
Min-Maxing Software Costs
Konstantin Kudryashov
 
Doctrine fixtures
Doctrine fixturesDoctrine fixtures
Doctrine fixturesBill Chang
 
Dependency Injection in PHP
Dependency Injection in PHPDependency Injection in PHP
Dependency Injection in PHP
Kacper Gunia
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
Hugo Hamon
 
When cqrs meets event sourcing
When cqrs meets event sourcingWhen cqrs meets event sourcing
When cqrs meets event sourcing
Manel Sellés
 
Design how your objects talk through mocking
Design how your objects talk through mockingDesign how your objects talk through mocking
Design how your objects talk through mocking
Konstantin Kudryashov
 
Symfony without the framework
Symfony without the frameworkSymfony without the framework
Symfony without the framework
GOG.com dev team
 
Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015
Konstantin Kudryashov
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examples
Marcello Duarte
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
Advanced symfony Techniques
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony Techniques
Kris Wallsmith
 
Database Design Patterns
Database Design PatternsDatabase Design Patterns
Database Design Patterns
Hugo Hamon
 
Crafting beautiful software
Crafting beautiful softwareCrafting beautiful software
Crafting beautiful software
Jorn Oomen
 

What's hot (20)

Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK MeetupScaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
Scaling Symfony2 apps with RabbitMQ - Symfony UK Meetup
 
Rich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 ApplicationRich Model And Layered Architecture in SF2 Application
Rich Model And Layered Architecture in SF2 Application
 
Decoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DICDecoupling with Design Patterns and Symfony2 DIC
Decoupling with Design Patterns and Symfony2 DIC
 
Design Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
 
Decoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDDDecoupling the Ulabox.com monolith. From CRUD to DDD
Decoupling the Ulabox.com monolith. From CRUD to DDD
 
Models and Service Layers, Hemoglobin and Hobgoblins
Models and Service Layers, Hemoglobin and HobgoblinsModels and Service Layers, Hemoglobin and Hobgoblins
Models and Service Layers, Hemoglobin and Hobgoblins
 
Min-Maxing Software Costs
Min-Maxing Software CostsMin-Maxing Software Costs
Min-Maxing Software Costs
 
Doctrine fixtures
Doctrine fixturesDoctrine fixtures
Doctrine fixtures
 
Dependency Injection in PHP
Dependency Injection in PHPDependency Injection in PHP
Dependency Injection in PHP
 
Silex meets SOAP & REST
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
 
When cqrs meets event sourcing
When cqrs meets event sourcingWhen cqrs meets event sourcing
When cqrs meets event sourcing
 
Design how your objects talk through mocking
Design how your objects talk through mockingDesign how your objects talk through mocking
Design how your objects talk through mocking
 
Symfony without the framework
Symfony without the frameworkSymfony without the framework
Symfony without the framework
 
Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015Min-Maxing Software Costs - Laracon EU 2015
Min-Maxing Software Costs - Laracon EU 2015
 
PhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examplesPhpSpec 2.0 ilustrated by examples
PhpSpec 2.0 ilustrated by examples
 
The History of PHPersistence
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
Advanced symfony Techniques
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony Techniques
 
Database Design Patterns
Database Design PatternsDatabase Design Patterns
Database Design Patterns
 
Crafting beautiful software
Crafting beautiful softwareCrafting beautiful software
Crafting beautiful software
 

Similar to Forget about index.php and build you applications around HTTP!

Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12
Jakub Zalas
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsMichael Peacock
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)Fabien Potencier
 
Symfony internals [english]
Symfony internals [english]Symfony internals [english]
Symfony internals [english]
Raul Fraile
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207patter
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2
eugenio pombi
 
Micropage in microtime using microframework
Micropage in microtime using microframeworkMicropage in microtime using microframework
Micropage in microtime using microframework
Radek Benkel
 
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyoエラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
Shohei Okada
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
Wim Godden
 
Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
Flavio Poletti
 
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
Amazon Web Services
 
Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionAdam Trachtenberg
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
Wim Godden
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012D
 
PSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworksPSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworks
Elton Minetto
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
vanphp
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applicationselliando dias
 
Fatc
FatcFatc

Similar to Forget about index.php and build you applications around HTTP! (20)

Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12Symfony components in the wild, PHPNW12
Symfony components in the wild, PHPNW12
 
Phpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friendsPhpne august-2012-symfony-components-friends
Phpne august-2012-symfony-components-friends
 
The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)The symfony platform: Create your very own framework (PHP Quebec 2008)
The symfony platform: Create your very own framework (PHP Quebec 2008)
 
Symfony internals [english]
Symfony internals [english]Symfony internals [english]
Symfony internals [english]
 
symfony on action - WebTech 207
symfony on action - WebTech 207symfony on action - WebTech 207
symfony on action - WebTech 207
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2PHPUnit elevato alla Symfony2
PHPUnit elevato alla Symfony2
 
Micropage in microtime using microframework
Micropage in microtime using microframeworkMicropage in microtime using microframework
Micropage in microtime using microframework
 
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyoエラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
エラー時にログに出力する情報と画面に表示する情報を分ける #LaravelTokyo
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Perl Web Client
Perl Web ClientPerl Web Client
Perl Web Client
 
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
(DEV305) Building Apps with the AWS SDK for PHP | AWS re:Invent 2014
 
Dirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP ExtensionDirty Secrets of the PHP SOAP Extension
Dirty Secrets of the PHP SOAP Extension
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012What mom never told you about bundle configurations - Symfony Live Paris 2012
What mom never told you about bundle configurations - Symfony Live Paris 2012
 
PSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworksPSR-7, middlewares e o futuro dos frameworks
PSR-7, middlewares e o futuro dos frameworks
 
React PHP: the NodeJS challenger
React PHP: the NodeJS challengerReact PHP: the NodeJS challenger
React PHP: the NodeJS challenger
 
PHP and Rich Internet Applications
PHP and Rich Internet ApplicationsPHP and Rich Internet Applications
PHP and Rich Internet Applications
 
Fatc
FatcFatc
Fatc
 

More from Kacper Gunia

How a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty systemHow a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty system
Kacper Gunia
 
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learnedRebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Kacper Gunia
 
The top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingThe top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doing
Kacper Gunia
 
Embrace Events and let CRUD die
Embrace Events and let CRUD dieEmbrace Events and let CRUD die
Embrace Events and let CRUD die
Kacper Gunia
 
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Kacper Gunia
 
OmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ toolOmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ tool
Kacper Gunia
 
Code Dojo
Code DojoCode Dojo
Code Dojo
Kacper Gunia
 
SpecBDD in PHP
SpecBDD in PHPSpecBDD in PHP
SpecBDD in PHP
Kacper Gunia
 

More from Kacper Gunia (8)

How a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty systemHow a large corporation used Domain-Driven Design to replace a loyalty system
How a large corporation used Domain-Driven Design to replace a loyalty system
 
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learnedRebuilding Legacy Apps with Domain-Driven Design - Lessons learned
Rebuilding Legacy Apps with Domain-Driven Design - Lessons learned
 
The top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doingThe top 10 things that any pro PHP developer should be doing
The top 10 things that any pro PHP developer should be doing
 
Embrace Events and let CRUD die
Embrace Events and let CRUD dieEmbrace Events and let CRUD die
Embrace Events and let CRUD die
 
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
Domain-driven Design in PHP and Symfony - Drupal Camp Wroclaw!
 
OmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ toolOmniFocus - the #1 ‘Getting Things Done’ tool
OmniFocus - the #1 ‘Getting Things Done’ tool
 
Code Dojo
Code DojoCode Dojo
Code Dojo
 
SpecBDD in PHP
SpecBDD in PHPSpecBDD in PHP
SpecBDD in PHP
 

Recently uploaded

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
JoytuBarua2
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
Kamal Acharya
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 

Recently uploaded (20)

HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
Planning Of Procurement o different goods and services
Planning Of Procurement o different goods and servicesPlanning Of Procurement o different goods and services
Planning Of Procurement o different goods and services
 
Cosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdfCosmetic shop management system project report.pdf
Cosmetic shop management system project report.pdf
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 

Forget about index.php and build you applications around HTTP!