Topic: Symfony
Language: italian (english version soon)
First of three presentations shown during the first edition of the Train to Symfony
Verona 13/14 April 2013
http://traintosymfony.com
http://twitter.com/TrainToSymfony
Emanuele Gaspari
https://twitter.com/inmarelibero
EASY NOTES 3.0
EASY NOTES is the ideal solution for linking EASY ENTERPRISE to an IBM® Lotus Notes®/Domino® environment. Documents and attachments are archived and searched directly from IBM® Lotus Notes®.
Topic: Symfony
Language: italian (english version soon)
First of three presentations shown during the first edition of the Train to Symfony
Verona 13/14 April 2013
http://traintosymfony.com
http://twitter.com/TrainToSymfony
Emanuele Gaspari
https://twitter.com/inmarelibero
EASY NOTES 3.0
EASY NOTES is the ideal solution for linking EASY ENTERPRISE to an IBM® Lotus Notes®/Domino® environment. Documents and attachments are archived and searched directly from IBM® Lotus Notes®.
Xkanban V3: eXtreme Programming, Kanban and TimboxingFilippo De Santis
This speech will focus on how a PHP Company starting with XP is ending up using timeboxing and kanban, keeping alive the values and principles of an extreme programming development team.
Not only are the programmers trying to push forward those values, but also the management is trying to build a better company through systematic communication, clear objectives, understanding of individuals and interactions, working software, customer collaboration and responsiveness to change. This talk will focus on the positive and negative experiences my colleagues and I have had during the last year as managers and developers.
I will begin showing the problems my company had. Then, I will present the solutions we adopted to solve those problems. Finally, I will briefly explain how an activity “flows” through our workflow.
.tel — это домен и сервис, служащий единой точкой контакта с его владельцем. В проект вложены миллионы долларов, и если все пойдет как задумано, то через несколько лет молодой человек при знакомстве с девушкой будет спрашивать не телефон, а ее домен .tel.
I benchmark effettuati su molti framework PHP negli ultimi mesi mostrano una netta inferiorità di Symfony2 rispetto agli altri. In questo talk parleremo del perchè i benchmark sulla velocità non rappresentano il vero valore di Symfony2, mentre lo sono la flessibiità, la modularità e l'aderenza a degli standard. Parleremo delle caratteristiche che rendono questo framework uno dei più usati in ambito PHP, anche solo considerando quanti altri framework stanno integrando parti di esso. Infine, parleremo di come questo framework metta nelle mani di chi lo utilizza strumenti molto potenti (e a volte complessi) e lasci la responsabilità di come utilizzarli a noi sviluppatori. In questo momento vale come mai prima la massima 'da grande potere deriva grande responsabilità'.
Last year I presented a speech on how we were trying to solve some of Ideato’s organizational problems. This year I’ll talk about what we achieved and how, and in which direction we are going on.
This speech will focus on how we are trying to create a self-sufficient and self-organized team.
I’ll talk about what ideato is doing to get the most applying eXtreme Programming principles and values. This speech will focus on clients involvement and sustainable pace.
Xkanban V3: eXtreme Programming, Kanban and TimboxingFilippo De Santis
This speech will focus on how a PHP Company starting with XP is ending up using timeboxing and kanban, keeping alive the values and principles of an extreme programming development team.
Not only are the programmers trying to push forward those values, but also the management is trying to build a better company through systematic communication, clear objectives, understanding of individuals and interactions, working software, customer collaboration and responsiveness to change. This talk will focus on the positive and negative experiences my colleagues and I have had during the last year as managers and developers.
I will begin showing the problems my company had. Then, I will present the solutions we adopted to solve those problems. Finally, I will briefly explain how an activity “flows” through our workflow.
.tel — это домен и сервис, служащий единой точкой контакта с его владельцем. В проект вложены миллионы долларов, и если все пойдет как задумано, то через несколько лет молодой человек при знакомстве с девушкой будет спрашивать не телефон, а ее домен .tel.
I benchmark effettuati su molti framework PHP negli ultimi mesi mostrano una netta inferiorità di Symfony2 rispetto agli altri. In questo talk parleremo del perchè i benchmark sulla velocità non rappresentano il vero valore di Symfony2, mentre lo sono la flessibiità, la modularità e l'aderenza a degli standard. Parleremo delle caratteristiche che rendono questo framework uno dei più usati in ambito PHP, anche solo considerando quanti altri framework stanno integrando parti di esso. Infine, parleremo di come questo framework metta nelle mani di chi lo utilizza strumenti molto potenti (e a volte complessi) e lasci la responsabilità di come utilizzarli a noi sviluppatori. In questo momento vale come mai prima la massima 'da grande potere deriva grande responsabilità'.
Last year I presented a speech on how we were trying to solve some of Ideato’s organizational problems. This year I’ll talk about what we achieved and how, and in which direction we are going on.
This speech will focus on how we are trying to create a self-sufficient and self-organized team.
I’ll talk about what ideato is doing to get the most applying eXtreme Programming principles and values. This speech will focus on clients involvement and sustainable pace.
Symfony2 per utenti Symfony 1.x: Architettura, modelli ed esempi
1. Symfony2
per utenti Symfony 1.x
Architettura, modelli ed esempi
http://phpday.it #phpday
venerdì 13 maggio 2011
2. Chi sono
• Web developer @ideato
• 3 anni da professionista con php
• Se avete domande... fatele! Sono comprese
nel prezzo del biglietto
http://phpday.it #phpday
venerdì 13 maggio 2011
3. Symfony2 VS Symfony 1.x
Le basi: dove va cosa?
src i nostri bundles
app configurazione
vendor librerie esterne
web php app/console assets:install --symlink web/
http://phpday.it #phpday
venerdì 13 maggio 2011
4. Symfony2 VS Symfony 1.x
Le basi: e chi gli dice che è lì?
app/autoload.php
L’ordine è importante!
http://phpday.it #phpday
venerdì 13 maggio 2011
5. Symfony2 VS Symfony 1.x
Le basi: Come funziona l’autoload? (namespace)
app/autoload.php
src/Ideato/XKanbanBundle/Entity/Activity.php
new IdeatoXKanbanBundleEntityActivity()
autoload.php (namespace ‘Ideato’ in ‘src’) + <namespace><nome classe> = PATH
http://phpday.it #phpday
venerdì 13 maggio 2011
6. Symfony2 VS Symfony 1.x
Le basi: Come funziona l’autoload? (PEAR)
app/autoload.php
No namespace! PATH = __DIR__.’/../vendor/twig-extensions/lib/Twig/Extensions/MyClass.php’
http://phpday.it #phpday
venerdì 13 maggio 2011
7. Symfony2 VS Symfony 1.x
Le basi: Quali bundle sto usando?
app/AppKernel.php
http://phpday.it #phpday
venerdì 13 maggio 2011
8. Symfony2 VS Symfony 1.x
Le basi: ok... e il routing?
app/config/routing.yml
src/Ideato/XKanbanBundle/Resources/config/routing.yml
http://phpday.it #phpday
venerdì 13 maggio 2011
9. Symfony2 VS Symfony 1.x
Internals
HttpFoundation
http://phpday.it #phpday
venerdì 13 maggio 2011
10. Symfony2 VS Symfony 1.x
Internals
HttpKernel
HttpFoundation
http://phpday.it #phpday
venerdì 13 maggio 2011
11. Symfony2 VS Symfony 1.x
Internals
HttpKernel
Request
HttpFoundation
http://phpday.it #phpday
venerdì 13 maggio 2011
12. Symfony2 VS Symfony 1.x
Internals HttpKernel::handle()
Request HttpKernel Response
HttpFoundation
http://phpday.it #phpday
venerdì 13 maggio 2011
13. Symfony2 VS Symfony 1.x
Internals
Request Response
HttpKernel::handle()
Response
GetResponseEvent::hasResponse()
[Some listeners set a response...]
onCoreRequest Event
http://phpday.it #phpday
venerdì 13 maggio 2011
14. Symfony2 VS Symfony 1.x
Internals
Request
HttpKernel::handle()
Controller
Controller
Arguments
onCoreRequest Event
[Sets _controller Request attribute]
Resolver Resolver
[Listeners can manipulate the callable]
onCoreController Event
http://phpday.it #phpday
venerdì 13 maggio 2011
15. Symfony2 VS Symfony 1.x
Internals
Response
HttpKernel::handle()
Value
Response
Controller GetResponseEvent::hasResponse()
[Some listeners set a response...]
onCoreRequest Event
http://phpday.it #phpday
venerdì 13 maggio 2011
16. Symfony2 VS Symfony 1.x
Internals
Request Response
HttpKernel::handle()
Response
GetResponseEvent::hasResponse()
Controller
Response [Some listeners can manipulate the response...]
onCoreResponse Event
http://phpday.it #phpday
venerdì 13 maggio 2011
17. Symfony2 VS Symfony 1.x
Perchè Symfony2?
• Symfony2 è un evoluzione
• Sfrutta quelle che sono le potenzialità di php 5.3
• Ad oggetti
• Punta all’indipendenza dei propri componenti
• CoC: Symfony2 offre la possibilità di utilizzare diversi strumenti per
raggiungere un risultato, ma non usa le configurazioni per
modificare il comportamento degli strumenti che utilizza.
http://phpday.it #phpday
venerdì 13 maggio 2011
18. Symfony2 VS Symfony 1.x
Doctrine 2
$manager->persist($object);
$object->save();
Paradigm shift (DDD) $manager->flush();
ORM
(Configurazione mapping)
DBAL
(configurazione accesso db)
DB
http://phpday.it #phpday
venerdì 13 maggio 2011
19. Symfony2 VS Symfony 1.x
Doctrine 2
Le fixtures sono oggetti
https://github.com/doctrine/data-fixtures
http://symfony.com/doc/current/cookbook/doctrine/doctrine_fixtures.html
http://phpday.it #phpday
venerdì 13 maggio 2011
20. Symfony2 VS Symfony 1.x
Doctrine 2
Le fixtures sono oggetti
https://github.com/doctrine/data-fixtures
http://symfony.com/doc/current/cookbook/doctrine/doctrine_fixtures.html
http://phpday.it #phpday
venerdì 13 maggio 2011
21. Symfony2 VS Symfony 1.x
Doctrine 2: let’s go faster!
Database
serialized
ORM
object
object
http://phpday.it #phpday
venerdì 13 maggio 2011
22. Symfony2 VS Symfony 1.x
Validation
Class Activity
http://phpday.it #phpday
venerdì 13 maggio 2011
23. Symfony2 VS Symfony 1.x
Validation
Class Activity
Validator Errori
[annotation, yml, xml, php]
http://phpday.it #phpday
venerdì 13 maggio 2011
24. Symfony2 VS Symfony 1.x
Validation
Class Activity
Validator Errori
[annotation, yml, xml, php]
http://phpday.it #phpday
venerdì 13 maggio 2011
25. Symfony2 VS Symfony 1.x
Events
Listeners
my_listener
EventDispatcher::dispatch($event) your_listener
their_listener
Invece di definire classi nel filter.yml, definisci listeners!
http://phpday.it #phpday
venerdì 13 maggio 2011
26. Symfony2 VS Symfony 1.x
Events
Listeners
my_listener
MyEventDispatcher::dispatch($event) your_listener
their_listener
Si può definire più di un EventDispatcher
http://phpday.it #phpday
venerdì 13 maggio 2011
27. Symfony2 VS Symfony 1.x
Dependency Injection / Service container
DDD (Domain Driven Design)
+
Service Oriented Architecture
http://phpday.it #phpday
venerdì 13 maggio 2011
28. Symfony2 VS Symfony 1.x
Dependency Injection / Service container
EntityManager Mailer Logger Validator ...
Service Container
Oggetti che utilizzano i servizi definiti nel sistema
http://phpday.it #phpday
venerdì 13 maggio 2011
29. Symfony2 VS Symfony 1.x
Dependency Injection / Service container
• Separazione delle responsabilità
• Test più specifici (se non unitari) per ogni classe
• Dipendenze esplicite
• Un solo oggetto che è responsabile di instaziare i servizi
della nostra applicazione
http://phpday.it #phpday
venerdì 13 maggio 2011
30. Symfony2 VS Symfony 1.x
TWIG
• Ad oggetti
• Refattorizzabile
• Implementa l’ereditarietà
• E’ possibile accedere ai blocchi dei template da cui si
eredita!
http://phpday.it #phpday
venerdì 13 maggio 2011
31. Symfony2 VS Symfony 1.x
FORM
Object
Form Factory/Builder isValid()
Validator
http://phpday.it #phpday
venerdì 13 maggio 2011
32. Symfony2 VS Symfony 1.x
Le ultime considerazioni...
• Semplicità
• Symfony2 contiene Symfony 1.x
• La barriera di apprendimento iniziale è alta
• Ha un sistema di caching che fa paura! (vedi @fabpot)
• Doctrine 2: nuovo approccio (rif. “Paradigm shift”)
• Traduzioni? Form? Comandi shell? Stanno arrivando!
http://phpday.it #phpday
venerdì 13 maggio 2011
33. Symfony2 VS Symfony 1.x
Filippo De Santis
Twitter: @filippodesantis
fd@ideato.it
Joind.in: http://joind.in/talk/view/3004
Examples: https://github.com/p16/ikb
http://phpday.it #phpday
venerdì 13 maggio 2011