SlideShare uma empresa Scribd logo
1 de 71
Baixar para ler offline
/**
* @SIMPLIFY YOUR CODE
* WITH ANNOTATIONS
**/
Created by Piotr Pasich / @piotrpasich
WWW.XSOLVE.PL

@XSOLVE
„I HATE A LONG DISTANCE
BETWEEN YOU AND ME”

ENTITY
LET’S START
WRITING A STORY
/*
*
* Ei s a e it n Ps e tt .
d t n xs ig o t ni y
*
*@o t (/ i} ,n m= p s_ pa e)
R ue "{ d" ae "o tu d t"
*@e h d" U"
M to (P T)
*@e p ae "s le yf n Cn ud eP s: d th m. wg )
T ml t ( Xo v Sm oy oB n l: ot ei .t l ti "
*
/
p bi f nt o u d tA to(e u s $ eu s,$ d
u l c u c i n p a e c i nR q e t r q e t i )
{
$ m= $h s > e Dc rn (- g ta ae (;
e
t i- gt ot i e) >e Mn gr )
$ ni y= $m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ;
ett
e -g te o io y' sl ey f nC nu de P s' -f n(i )
i ( $n iy {
f ! et t )
t rw $h s >r ae oF u dx et o(Ua l t fn P s e t t. )
ho t i- ce t Nt on Ec pi n'n be o i d o t ni y' ;
}
$ ee eo m= $ hs >r ae e ee om$d ;
d l tF r
t i- c et Dl tF r(i )
$ d t o m = $ h s> r a e d t o m $ n i y ;
e i Fr
ti-c e tE iF r( et t )
$ dt om>a d ee us (r q et ;
e i Fr-h nl Rq e t$ eu s)
i ( ei Fr-i Vl d ) {
f $ dt om> sa i( )
$ m> ls ( ;
e- fu h)
r tr $ hs>e i et $h s> ee a er (p s_ d t, ar y ' d = $d );
eu n t i-r dr c( t i- gn rt Ul ' ot ei ' ra ( i' > i ) )
}
r tr a ry
eun ra(
' ni y
et t'
= $ ni y
> e tt ,
' dt fr ' = $ dt om>r ae i w)
ei _o m
> e iF r-c et Ve (,
' ee ef r '= $ ee eo m> ra e iw )
dl t_ om > d lt F r- ce tV e( ,
)
;
}
WELL, WE ARE NOT
THE BEST WRITERS,
ARE WE?
@ROUTE
/*
*
* @o t( /i }, n m= ps _p a e)
Ru e "{ d" a e" o tu dt "
* @e hd"U "
Mt o(P T)
*/
*
c as Ru e
ls ot
{
p ia e$a h
rv t pt ;
p ia e$a e
rv t nm ;
p ia e$e ur mn s =a ry )
rv t rq ie e t
ra(;
p ia e$p in =ar y)
rv t ot os
ra ( ;
p ia e$e al s =ar y )
rv t df ut
ra(;
p ia e$o t
rv t hs ;
p ia e$e hd =ar y)
rv t mt os
ra ( ;
p ia e$c ee =ar y)
rv t sh ms
ra ( ;
p ia e$o dt o ;
rv t cn ii n
/ *. . */
*( .) *
}
/*
*
* @o t( /i }, n m= p s_ pa e,
Ru e "{ d"
ae "o tu d t"
*
m to s "U "
eh d= PT
*
r qi e et =" d =" d" )
eu rm ns { i"
+}
*/
*
@TEMPLATE
/*
*
* @e pa e "s le yf n Cn ud eP s: d th m. wg )
Tm l t( Xo v Sm oy oB n l: ot ei .t l ti "
*/
*
c as Tm lt
l s e pa e
{
p ia e$e pa e
rv t tm lt ;
p ia e$n ie =’ ti ’
rv t eg n
w g;
pi ae $a s =a ry )
rv t v r
ra(;
p ia e$t em be =f l e
rv t sr aa l
as;
/ *. . */
*( .) *
}
i (! $ hs >e (s cr t .o tx '- iG a td 'O EE I O' ){
f
t i- gt ' eu iy cn e t) >s rn e( R L_ DT R )
tr w n wA c sD ne Ec p in )
h o e ce se i dx et o( ;
}
@SECURITY
u eS ni u de F ae ok xr B nl o fg rt o e ui y
s e s oB nl r mw r Et au de Cn i ua in Sc r t;
/*
*
*@e u iy "a _o e' O EE IO '"
S cr t ( hs r l( RL _D T R) )
*
/
p bi f nt o u d tA to(e u s $ eu s,$ d
u l c u c i n p a e c i nR q e t r q e t i )
{
$ m=$h s> e Dc rn (- g ta ae (;
e
t i- gt ot i e) >e Mn gr )
$ ni y=$m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ;
ett
e -g te o io y' sl ey f nC nu de P s' -f n(i )
i ($ ni y {
f !e tt )
t r w $ h s> r a e o F u d x e t o ( U a l t f n P s e t t . )
h o ti-c e tN to nE cp i n' nb e o id ot n iy ' ;
}
}
@PARAMCONVERTER
u eS ni u de F ae ok xr B nl o fg rt o a aC ne tr
s e s oB nl r mw r Et au de Cn i ua in Pr m ov re ;
/*
*
* @a aC ne tr" ot ,c as " sl ey fn Cn u de Ps "
Pr m ov re(p s" ls =X ov Sm o yo Bn l: o t)
*
/
p bi f nt o u d tA to(e u s $ eu s,P s $o t
u l c u c i n p a e c i nR q e t r q e t o t p s )
{
}
c as Pr mo vr e ​
l s a aC ne tr ​
{
p ia e$ ae ​
r v t nm;
p ia e$ ls ;
r v t ca s​
p i a e $ p i n = a r y) ​
r v t ot os
ra(;
p ia e$ pi n l= fl e
r v t ot oa
as;
}
/*
*
* @o t( /l g{ a e/ su }"
Ru e "b o/ dt }{ l g/ )
* @a aC ne tr" ot ,o to s {e cu e: {d t "}
Pr m ov re(p s" pi n= "x ld " " ae })
* @a aC ne tr" ot ,
Pr m ov re(p s"
c as "X ov Sm o yo Bn l: ot ) ,
l s= s l ey fn Cn u de Ps "
o to s{
p in =
" ap n" { dt " "a e, "l g :" lg }
m pi g : " a e: d t" s u" s u ",
" eo io ym t o" =" id ih o n"
r ps t r_ eh d
fn Wt Ji s}
}
*
/
YOUR OWN
PARAMCONVERTER
n ms aeSn i u de Fa eo k xr Bn l eu s a aC ne tr
a ep c e so Bn l r mw rE ta ud e Rq et Pr m ov re ;
u eS ni u de F ae ok xr B nl o fg rt o o fg rt oI t ra e
s e s oB nl r mw r Et au de Cn i ua in Cn i ua in ne fc ;
u eS mo yC mo e tH tF ud t o eu s;
s y f n op nn t p on ai nR qe t
i tr aePr mo v re It ra e
n ef c a aC ne tr n ef c
{
f nt o ap yR qe t$e us ,C ni u ai nn ef c $o fg r to )
u c in pl ( eu s rq e t of gr to I tr ae c ni ua in ;
f nt o sp ot (o f gr to It ra e $o fg rt o )
u c in up r sC ni ua i nn ef c cn i ua in ;
}
n ms aeXo v y fn Cn ud e Rq et Pr mo v re ;
a ep c S le Sm oy o Bn l eu s a aC ne tr
u eS ni u de F ae ok xr B nl e us a a Cn et rP rm o vr eI tr a e
s e s oB nl r mw r Et au de Rq e tP rm ov r e aa Cn et r ne fc ;
c as Wb ev cP r mo vr e ip ee t Pr mo v re It ra e
l s e sr ie aa Cn e tr m lm ns a aC ne tr n ef c
{
p oe td$e s ri e
r t ce w be vc ;
p bi f nt o _c nr c ( e sr ie $e sr i e{
u l c u ci n _o t ut Wb ev c w be vc )
$hs >e s ri e= $e s ri e
ti -w be vc
w be vc ;
}
p bi f nt o ap yR qe t $e us ,P rm o vr e $o fg rt o)
u l c u ci n pl ( eu s rq et aa Cn et r cn iu a in
{
$ ae =$ o fg rt o- g ta e) / Te at iu e nm
nm
cn iu a in >e Nm (; / h t rb t ae
$ ls = $o fg r to - g tl s ( ; /T ea ti u ec as nm
ca s
c ni ua in > eC as ) /h tr bt l s a e
$ pi n =$ hs > eO to s$ of g rt o) / A ar y o o to s
ot os
ti - g tp i n( cn iu ai n ; / n ra f p in
$ b =$ hs > e s ri e> id $p i n[ i ' )
oj
t i-w be vc -fn (o to s'd ];
$ eu s-a ti ue (p r m $ b)
rq et >t rb t s $ aa , oj ;
r tr t u;
eu n r e
}
p bi f nt o sp ot (o f gr to It ra e$o fg rt o )
u l c u ci n up r sC ni ua in n ef c cn i ua in
{
$ pi n =$hs > eO to s$ of g rt o)
ot os
ti -g tp i n( cn iu ai n ;
r tr $ hs>e s ri e> id $p i n[ i')! n l;
eu n t i-w be vc - fn (o to s ' d] = ul
}
}
# ap cn i/ of g yl
p/ o fg cn i. m
s ri e:
e vc s
w be vc .a a .o vr e
e s ri ep rm cn e tr
c as
ls:
X ov y f nC nu de Rq e tP rm ov re  es ri ea a Cn e
S l eS mo yo Bn l e us a a Cn et rW be v cP rm ov
a gm ns
ru et :
- @e s ri e
w be vc
t g:
as
- {n m :r qe tp r mc ne tr p ir t: -,c ne tr w be vc O j}
ae e u s. aa _o vr e , r o iy 2 o vr e : e s ri eb
/*
*
* @a aC ne tr
Pr m ov re
*/
*
p bi f nt o s o At o( es r ie b $ e sr ie b)
u lc u ci n hw ci n Wb ev cO j wb ev c Oj ;
VALIDATION
p oe td $h rD s rp in
r tc e s ot ec it o ;
p oe td $a s= a ry )
r tc e t g
ra(;
/*
*
*@s e tN tl n(
A sr o Ba k )
*@s e tL nt (
A sr e gh
*
m n= ""
i
2,
*
m x= "5 "
a
2 0)
*
/
p oe td $h rD s rp in
r tc e s ot ec it o ;
/*
*
*@s e tA l{
A sr l (
*
@ se tN tl n,
A sr o B ak
*
@ se tL nt (i = ""
A sr e g hm n
1)
*}
)
*
/
p oe td $a s= a ry )
r tc e t g
ra(;
YOUR OWN
VALIDATOR
n ms aeXo v y fn Cn ud e Vl dt rC nt a ns
a ep c S le Sm oy o Bn l ai ao  os ri t;
u eS mo yC mo e tV ld tr C nt an ;
s y f n op nn a i ao o sr it
/*
*
*@n o ai n
A nt to
*
/
c as Cn an Ea p ee tn sC n ta n
l s o ti sx ml x e d os ri t
{
p bi $ es g =' h ea pe i nt vl d'
u l c m sa e
T e xm l s o a i.;
}
u eX ov y fn C nu de Vl d tr Cn ta ns a Sm o yo ;
s S l eS mo yo Bn l a ia o os r it s y fn Cn
c as Ea pe ni y
l s x ml Et t
{
/ ..
/ .
/*
*
* @ yf nC nC na n Ea pe
S mo yo  ot is xm l
*
/
p oe td $r p ry
r t ce p oe t;
/ ..
/ .
}
$ hs >p ae ae =nw Dt Tm ( ;
t i- u dt Dt
e a ei e)
@ORMPREPERSIST()
@ORMPREUPDATE()
/*
*
* @Rn iy
OME tt
* @Ra Lf cc e al ak
OMH si ey lC lb c s
*
/
c as Ps {
ls ot
/*
*
* @Rr Pr i t)
O MP e e s s (
* @Rr Ud t (
O MP e p a e )
*
/
p bi f nt o pe pa e) / (. )/
u l c u ci n rU d t({* .. *}
}
NOTIFICATIONS
SERVICES
JMSDIEXTRABUNDLE

HTTP://JMSYST.COM/BUNDLES/JMSDIEXTR
ABUNDLE/MASTER/ANNOTATIONS
/*
*
* @e vc
Sr i e
* @a(d cr n. v n_ it nr , at iu e ={ ee t =" ot pa e }
Tg" ot ie ee tl s ee " tr bt s
" v n"
ps Ud t" )
*
/
c as Mi Nt fc t oS ri e
l s a lo ii ai ne v c
{
/*
*
* @n et aa s {
I jc Pr m(
*
" al r =@ ne t" a lr )
m ie "
I j c( mi e"
*}
)
*
/
p bi f nt o _c nt ut S it Mi e $a lr { /( .) /
u l c u ci n _o s rc (w f_ al r mi e )
* .. *}
p bi f nt o ps Ud t ( i ey lE et rs$ rs { /( .) * }
u l c u ci n ot p ae Lf cc ev n Ag a g)
*. . /
}
p bi f nt o p s Ud t( ie y lE et rs $r s
u lc u ci n ot pa e Lf cc ev nA g a g)
{
$ ni y= $r s >e Et t( ;
ett
a g- gt n iy )
i ( et t i s ac o Ps ){
f $ ni y nt ne f ot
/ *s n nt fc t o * /
* ed o ii ai n *
}
}
PERFORMANCE
@CACHE
(+ VARNISH + ESI)
p bi f nt o s o At o( eu s $e us , Ps $ ot {
u lc u ci n hw ci n Rq et r qe t ot p s)
$ ep ne= n w Rs os (;
r s os
e ep n e)
$ ep ne>e L sM df e( p s- gt pa eA ( )
r s os-s ta to i id $o t> eU d td t) ;
i ( rs os-i Nt o ii d$ eu s) {
f $ ep ne> so Md fe ( rq et )
r tr $ ep ne
eu n r s os;
}
$ ep ne >e E pr s " oo r w)
r s os -s tx ie ( tm ro ";
$ ep ne>e M xg (0 )
r s os -s ta Ae 6 0;
$ ep ne>e S ae Mx g( 0 )
r s os-s th rd a Ae 60 ;
$ ep ne>e P bi (r e;
r s os-s tu lc t u)
r tr $ ep ne
e u n r so s;
}
/*
*
*@a h (x ie =t mr o " p b i= tu "
C ce ep rs " oo rw , ul c" re )
*
/
p bi f nt o so At o (o t $ ot { *( .) *}
ul c uc in h wc in Ps ps) / * .. */
CONCLUSION
BEFORE
/*
*
* Ei s a e it n Ps e tt .
d t n xs ig o t ni y
*
*@o t (/ i} ,n m= p s_ pa e)
R ue "{ d" ae "o tu d t"
*@e h d" U"
M to (P T)
*@e p ae "s le yf n Cn ud eP s: d th m. wg )
T ml t ( Xo v Sm oy oB n l: ot ei .t l ti "
*
/
p bi f nt o u d tA to(e u s $ eu s,$ d
u l c u c i n p a e c i nR q e t r q e t i )
{
i ( ! $ hs >e (s c rt .o tx '- i Ga td 'O E EI O' ){
f
t i - g t' eu iy c ne t) >s rn e (R L_ DT R )
tr w n w Ac sD ne E cp in )
h o e ce s ei dx et o( ;
}
$ m= $h s > e Dc rn (- g ta ae (;
e
t i- gt ot i e) >e Mn gr )
$ ni y= $m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ;
ett
e -g te o io y' sl ey f nC nu de P s' -f n(i )
i ( $n iy {
f ! et t )
t rw $h s >r ae oF u dx et o(Ua l t fn P s e t t. )
ho t i- ce t Nt on Ec pi n'n be o i d o t ni y' ;
}
$ ee eo m= $ hs >r ae e ee om$d ;
d l tF r
t i- c et Dl tF r(i )
$ d t o m = $ h s> r a e d t o m $ n i y ;
e i Fr
ti-c e tE iF r( et t )
$ dt om>a d ee us (r q et ;
e i Fr-h nl Rq e t$ eu s)
i ( ei Fr-i Vl d ) {
f $ dt om> sa i( )
$ ni y> e Ud tD t(e Dt Tm ( )
et t- st pa e aenw a ei e) ;
$ m> ls ( ;
e- fu h)
t y{
r
$ hs> e( xo v. m i. oi ia o'- sn (e tt )
ti-g t ' s le ea ln tf c tr)> ed $ ni y;
} ct h(x et o $) {
a c Ec pi n e
$ hs> e( ss in) >e Fa ha (
t i - g t ' e s o '- g t l s B g )
AFTER
/*
*
*@o t (/ i} ,n m= p s_ pa e, mt o s" U"
R ue "{ d" ae "o tu d t" e hd =P T )
*@e p ae "s le yf n Cn ud eP s: d th m. wg )
T ml t ( Xo v Sm oy oB n l: ot ei .t l ti "
*@a a Cn et r
P rm ov re
*@e u iy "a _o e' O EE IO '"
S cr t ( hs r l( RL _D T R) )
*
/
p bi f nt o u d tA to(e u s $ eu s,P s $o t
u l c u c i n p a e c i nR q e t r q e t o t p s )
{
$ ee eo m= $ hs >r ae e ee om$o t> e I( )
d l tF r
t i- c et Dl tF r(p s- gt d) ;
$ d t o m = $ h s> r a e d t o m $ o t ;
e i Fr
ti-c e tE iF r( ps )
$ dt om>a d ee us (r q et ;
e i Fr-h nl Rq e t$ eu s)
i ( ei Fr-i Vl d ) {
f $ dt om> sa i( )
$ m> ls ( ;
e- fu h)
r tr $ hs>e i et $h s> ee a er (p s_ d t, ar y ' d = $d );
eu n t i-r dr c( t i- gn rt Ul ' ot ei ' ra ( i' > i ) )
}
r tr a ry
eun ra(
' ni y
et t'
= $ ni y
> e tt ,
' dt fr ' = $ dt om>r ae i w)
ei _o m
> e iF r-c et Ve (,
' ee ef r '= $ ee eo m> ra e iw )
dl t_ om > d lt F r- ce tV e( ,
)
;
}
@ANNOTATION
n ms aeXo v y fn Cn ud e An tt o;
a ep c S le Sm oy o Bn l no ai n
/*
*
*@n o ai n
A nt to
*
/
c as Si cL gt
l s w th ih
{
p ia e$ om
r v t ro;
p bi f nt o st om $o m
u l c u ci n eR o (r o)
{
$ hs>o m =$ om
ti-r o
ro;
}
p bi f nt o gt om $o m
u l c u ci n eR o (r o)
{
r tr $ hs>o m
eu n t i-r o;
}
}
n ms aeXo v y fn Cn ud e An tt o rv r
a ep c S le Sm oy o Bn l no ai n Di e;
u eX ov y fn C nu de An t to w th ih ;
s S l eS mo yo Bn l n oa in Si c Lg t
/*
*
*@n o ai n
A nt to
*
/
c as An tt oD i e
l s n oa in rv r
{
p ia e$ ed r
r v t ra e;
p ia e$ om i h;
r v t ro Lg t

p bi f nt o _c nt ut $ ed r L g t$ om ih )
u l c u ci n _o s rc (r ae , ih r o Lg t
{
$ hs>e d r= $e dr / gt an tt os r ae
ti-r ae
r ae ;/ e no a in e dr
$ hs>o m ih = $o mi h ;
ti-r oL gt
ro L gt
}
p bi f nt o oK re Cn r le (i tr ot o lr vn $ vn )
u l c u ci n ne n lo to lr Fl e Cn rl eE e t e et
{
i ( i_ ra (c n rl e =$ vn -g to t ol r) ){ /r t r i n c nr le
f ! sa r y$ ot ol r
e et > eC nr le ( )
/ eu n f o o t ol r
r tr ;
eu n
}
$ be t= n w el ci n be t$ ot ol r0) / gt cn rl e
oj c
e R f et oO jc (c n rl e[]; / e ot o lr
$ eh d= $ be t> eM t o( cn rl e[ ] ;/ gt mt o
mt o
o jc - gt eh d$ ot o lr1) / e e hd

f ra h( t i - ra e- g te hd no ai n (m to ) a $ of gr t o) {/ Sa
oe c $h s> e dr >e Mt oA n tt os $e h d s c n iu ai n
/t r
i(s o jc (c ni u ai n & $ of g rt o is ac o Si cL gt )/F u
fi _b et $ of gr to ) & cn iu ai n nt ne f wt h ih ){ /o
$ h s> o m i h - s i c ( c n i u a i n > e R o ( )
ti-r o Lg t> wt h $ o fg rt o- g to m) ;
}
}
}
s ri e:
e vc s
s m_ no ai n di e:
o e an tt o_ rv r
c as X ov y f nC nu de An t to r vr A nt to Di e
ls: S l eS mo yo B nl n oa in D ie n oa in r vr
t g: [n m :k re .v n _i tn r ee t kr e. ot ol r mt o :o Kr eC
as { ae e n le et ls ee , vn : en l cn rl e, e hd n e nl o
a gm ns [ an t to _e dr @ om lg t
ru et : @n oa in r ae , r o _i h]
/*
*
* @w th ih (o m "a o"
Si c Lg tr o= sl n )
*
/
p bi f nt o s i cL gt na o At o(
u lc u ci n wt hi h IS ln ci n)
{ .}
..
Q&A

THANK YOU
NO QUESTIONS?
SHOULD WE CREATE
AN ANNOTATION
FOR BREADCRUMBS?
WE'RE HIRING
XSOLVE.PL

Mais conteúdo relacionado

Mais procurados (18)

Todos los futbolistas van al cielo
Todos los futbolistas van al cieloTodos los futbolistas van al cielo
Todos los futbolistas van al cielo
 
Siswoharsojo bharata yuddha 01 091 180
Siswoharsojo   bharata yuddha 01 091 180Siswoharsojo   bharata yuddha 01 091 180
Siswoharsojo bharata yuddha 01 091 180
 
Metáforas de la vida cotidiana
Metáforas de la vida cotidianaMetáforas de la vida cotidiana
Metáforas de la vida cotidiana
 
Solucion10
Solucion10Solucion10
Solucion10
 
Solucion 10 t
Solucion 10 tSolucion 10 t
Solucion 10 t
 
Floor plan sccc dan pc expo
Floor plan sccc dan pc expoFloor plan sccc dan pc expo
Floor plan sccc dan pc expo
 
Estructura y funcionamiento del lenguaje
Estructura y funcionamiento del lenguajeEstructura y funcionamiento del lenguaje
Estructura y funcionamiento del lenguaje
 
Alat berat untuk proyek konstruksi
Alat berat untuk proyek konstruksiAlat berat untuk proyek konstruksi
Alat berat untuk proyek konstruksi
 
Solucion 14
Solucion 14Solucion 14
Solucion 14
 
La opinión pública como elemenfo fundamental de las relaciones públicas
La opinión pública como elemenfo fundamental de las relaciones públicasLa opinión pública como elemenfo fundamental de las relaciones públicas
La opinión pública como elemenfo fundamental de las relaciones públicas
 
Pengelolaan kelas
Pengelolaan kelasPengelolaan kelas
Pengelolaan kelas
 
Solucion 7
Solucion 7Solucion 7
Solucion 7
 
новый год в кругу семьи буклеты
новый год в кругу семьи буклетыновый год в кругу семьи буклеты
новый год в кругу семьи буклеты
 
Solucion 9
Solucion 9Solucion 9
Solucion 9
 
Semana n°03 solucionario
Semana n°03   solucionarioSemana n°03   solucionario
Semana n°03 solucionario
 
Solucio 6
Solucio 6Solucio 6
Solucio 6
 
Semana n°01 solucion
Semana n°01 solucionSemana n°01 solucion
Semana n°01 solucion
 
Projeto A DENGUE skan dos alunos 2013
Projeto A DENGUE skan dos alunos 2013Projeto A DENGUE skan dos alunos 2013
Projeto A DENGUE skan dos alunos 2013
 

Destaque

Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisRicard Clau
 
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 MeetupKacper Gunia
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpMatthew Davis
 
Partes de la computadora
Partes de la computadoraPartes de la computadora
Partes de la computadoraObdu Chaparro
 
الخصوصيه في الشبكات الاجتماعيه
الخصوصيه في الشبكات الاجتماعيهالخصوصيه في الشبكات الاجتماعيه
الخصوصيه في الشبكات الاجتماعيهمحمد الشهري
 
SpreadIT - Make your project SOLID!
SpreadIT - Make your project SOLID! SpreadIT - Make your project SOLID!
SpreadIT - Make your project SOLID! Piotr Pasich
 
De Clerck Fleur presentatie
De Clerck Fleur presentatieDe Clerck Fleur presentatie
De Clerck Fleur presentatieFleurrdc
 
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. Murphy
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. MurphyReaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. Murphy
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. MurphyAaron D. Murphy, Architect / CAPS
 
iSnap Social Marketing Presentation
iSnap Social Marketing PresentationiSnap Social Marketing Presentation
iSnap Social Marketing PresentationSnapShare Photo
 
ідеї для вечірнього макіяжу
ідеї для вечірнього макіяжуідеї для вечірнього макіяжу
ідеї для вечірнього макіяжуAnnaBoyko1
 
A2 Media Studies - Question 4 Final Draft
A2 Media Studies - Question 4 Final DraftA2 Media Studies - Question 4 Final Draft
A2 Media Studies - Question 4 Final DraftPheebs023
 
Beautiful condos and townhomes for sale in Sooke, BC
Beautiful condos and townhomes for sale in Sooke, BCBeautiful condos and townhomes for sale in Sooke, BC
Beautiful condos and townhomes for sale in Sooke, BCSukhjit Randhawa
 
Feedback & evaluation final
Feedback & evaluation finalFeedback & evaluation final
Feedback & evaluation finalbhargav123321
 

Destaque (17)

Speed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with RedisSpeed up your Symfony2 application and build awesome features with Redis
Speed up your Symfony2 application and build awesome features with Redis
 
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
 
Diving deep into twig
Diving deep into twigDiving deep into twig
Diving deep into twig
 
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and GulpOptimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
Optimising Your Front End Workflow With Symfony, Twig, Bower and Gulp
 
Partes de la computadora
Partes de la computadoraPartes de la computadora
Partes de la computadora
 
الخصوصيه في الشبكات الاجتماعيه
الخصوصيه في الشبكات الاجتماعيهالخصوصيه في الشبكات الاجتماعيه
الخصوصيه في الشبكات الاجتماعيه
 
SpreadIT - Make your project SOLID!
SpreadIT - Make your project SOLID! SpreadIT - Make your project SOLID!
SpreadIT - Make your project SOLID!
 
De Clerck Fleur presentatie
De Clerck Fleur presentatieDe Clerck Fleur presentatie
De Clerck Fleur presentatie
 
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. Murphy
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. MurphyReaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. Murphy
Reaching & Connecting with the BOOMER CONSUMER - by EtMM Aaron D. Murphy
 
Project templates, Copy & Paste
Project templates, Copy & Paste Project templates, Copy & Paste
Project templates, Copy & Paste
 
iSnap Social Marketing Presentation
iSnap Social Marketing PresentationiSnap Social Marketing Presentation
iSnap Social Marketing Presentation
 
ідеї для вечірнього макіяжу
ідеї для вечірнього макіяжуідеї для вечірнього макіяжу
ідеї для вечірнього макіяжу
 
A2 Media Studies - Question 4 Final Draft
A2 Media Studies - Question 4 Final DraftA2 Media Studies - Question 4 Final Draft
A2 Media Studies - Question 4 Final Draft
 
Beautiful condos and townhomes for sale in Sooke, BC
Beautiful condos and townhomes for sale in Sooke, BCBeautiful condos and townhomes for sale in Sooke, BC
Beautiful condos and townhomes for sale in Sooke, BC
 
Feedback & evaluation final
Feedback & evaluation finalFeedback & evaluation final
Feedback & evaluation final
 
каталог химии для клининга
каталог химии для клинингакаталог химии для клининга
каталог химии для клининга
 
Time management
Time managementTime management
Time management
 

Mais de Piotr Pasich

Messaging queues with RabbitMQ
Messaging queues with RabbitMQMessaging queues with RabbitMQ
Messaging queues with RabbitMQPiotr Pasich
 
How to write applications prepared for every cataclysm with Event Sourcing an...
How to write applications prepared for every cataclysm with Event Sourcing an...How to write applications prepared for every cataclysm with Event Sourcing an...
How to write applications prepared for every cataclysm with Event Sourcing an...Piotr Pasich
 
Varnish - Tips & Tricks - 4Developers 2015
Varnish - Tips & Tricks - 4Developers 2015Varnish - Tips & Tricks - 4Developers 2015
Varnish - Tips & Tricks - 4Developers 2015Piotr Pasich
 
Arduino - SymfonyCon 2014 Lighting Talks
Arduino - SymfonyCon 2014 Lighting TalksArduino - SymfonyCon 2014 Lighting Talks
Arduino - SymfonyCon 2014 Lighting TalksPiotr Pasich
 
Game of performance - Message Brokers behind the scenes
Game of performance - Message Brokers behind the scenesGame of performance - Message Brokers behind the scenes
Game of performance - Message Brokers behind the scenesPiotr Pasich
 
PHPConPl 2013 - Allowed memory size of X bytes exhausted
PHPConPl 2013 - Allowed memory size of X bytes exhaustedPHPConPl 2013 - Allowed memory size of X bytes exhausted
PHPConPl 2013 - Allowed memory size of X bytes exhaustedPiotr Pasich
 
#SPUG - Legacy applications
#SPUG - Legacy applications#SPUG - Legacy applications
#SPUG - Legacy applicationsPiotr Pasich
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
 

Mais de Piotr Pasich (8)

Messaging queues with RabbitMQ
Messaging queues with RabbitMQMessaging queues with RabbitMQ
Messaging queues with RabbitMQ
 
How to write applications prepared for every cataclysm with Event Sourcing an...
How to write applications prepared for every cataclysm with Event Sourcing an...How to write applications prepared for every cataclysm with Event Sourcing an...
How to write applications prepared for every cataclysm with Event Sourcing an...
 
Varnish - Tips & Tricks - 4Developers 2015
Varnish - Tips & Tricks - 4Developers 2015Varnish - Tips & Tricks - 4Developers 2015
Varnish - Tips & Tricks - 4Developers 2015
 
Arduino - SymfonyCon 2014 Lighting Talks
Arduino - SymfonyCon 2014 Lighting TalksArduino - SymfonyCon 2014 Lighting Talks
Arduino - SymfonyCon 2014 Lighting Talks
 
Game of performance - Message Brokers behind the scenes
Game of performance - Message Brokers behind the scenesGame of performance - Message Brokers behind the scenes
Game of performance - Message Brokers behind the scenes
 
PHPConPl 2013 - Allowed memory size of X bytes exhausted
PHPConPl 2013 - Allowed memory size of X bytes exhaustedPHPConPl 2013 - Allowed memory size of X bytes exhausted
PHPConPl 2013 - Allowed memory size of X bytes exhausted
 
#SPUG - Legacy applications
#SPUG - Legacy applications#SPUG - Legacy applications
#SPUG - Legacy applications
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
 

Simplify your code with annotations - SymfonyCon Warsaw 2013

  • 1. /** * @SIMPLIFY YOUR CODE * WITH ANNOTATIONS **/ Created by Piotr Pasich / @piotrpasich
  • 3.
  • 4.
  • 5.
  • 6. „I HATE A LONG DISTANCE BETWEEN YOU AND ME” ENTITY
  • 7.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15. /* * * Ei s a e it n Ps e tt . d t n xs ig o t ni y * *@o t (/ i} ,n m= p s_ pa e) R ue "{ d" ae "o tu d t" *@e h d" U" M to (P T) *@e p ae "s le yf n Cn ud eP s: d th m. wg ) T ml t ( Xo v Sm oy oB n l: ot ei .t l ti " * / p bi f nt o u d tA to(e u s $ eu s,$ d u l c u c i n p a e c i nR q e t r q e t i ) { $ m= $h s > e Dc rn (- g ta ae (; e t i- gt ot i e) >e Mn gr ) $ ni y= $m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ; ett e -g te o io y' sl ey f nC nu de P s' -f n(i ) i ( $n iy { f ! et t ) t rw $h s >r ae oF u dx et o(Ua l t fn P s e t t. ) ho t i- ce t Nt on Ec pi n'n be o i d o t ni y' ; } $ ee eo m= $ hs >r ae e ee om$d ; d l tF r t i- c et Dl tF r(i ) $ d t o m = $ h s> r a e d t o m $ n i y ; e i Fr ti-c e tE iF r( et t ) $ dt om>a d ee us (r q et ; e i Fr-h nl Rq e t$ eu s) i ( ei Fr-i Vl d ) { f $ dt om> sa i( ) $ m> ls ( ; e- fu h) r tr $ hs>e i et $h s> ee a er (p s_ d t, ar y ' d = $d ); eu n t i-r dr c( t i- gn rt Ul ' ot ei ' ra ( i' > i ) ) } r tr a ry eun ra( ' ni y et t' = $ ni y > e tt , ' dt fr ' = $ dt om>r ae i w) ei _o m > e iF r-c et Ve (, ' ee ef r '= $ ee eo m> ra e iw ) dl t_ om > d lt F r- ce tV e( , ) ; }
  • 16. WELL, WE ARE NOT THE BEST WRITERS, ARE WE?
  • 18.
  • 19.
  • 20.
  • 21. /* * * @o t( /i }, n m= ps _p a e) Ru e "{ d" a e" o tu dt " * @e hd"U " Mt o(P T) */ *
  • 22. c as Ru e ls ot { p ia e$a h rv t pt ; p ia e$a e rv t nm ; p ia e$e ur mn s =a ry ) rv t rq ie e t ra(; p ia e$p in =ar y) rv t ot os ra ( ; p ia e$e al s =ar y ) rv t df ut ra(; p ia e$o t rv t hs ; p ia e$e hd =ar y) rv t mt os ra ( ; p ia e$c ee =ar y) rv t sh ms ra ( ; p ia e$o dt o ; rv t cn ii n / *. . */ *( .) * }
  • 23. /* * * @o t( /i }, n m= p s_ pa e, Ru e "{ d" ae "o tu d t" * m to s "U " eh d= PT * r qi e et =" d =" d" ) eu rm ns { i" +} */ *
  • 25. /* * * @e pa e "s le yf n Cn ud eP s: d th m. wg ) Tm l t( Xo v Sm oy oB n l: ot ei .t l ti " */ *
  • 26. c as Tm lt l s e pa e { p ia e$e pa e rv t tm lt ; p ia e$n ie =’ ti ’ rv t eg n w g; pi ae $a s =a ry ) rv t v r ra(; p ia e$t em be =f l e rv t sr aa l as; / *. . */ *( .) * }
  • 27. i (! $ hs >e (s cr t .o tx '- iG a td 'O EE I O' ){ f t i- gt ' eu iy cn e t) >s rn e( R L_ DT R ) tr w n wA c sD ne Ec p in ) h o e ce se i dx et o( ; }
  • 29. u eS ni u de F ae ok xr B nl o fg rt o e ui y s e s oB nl r mw r Et au de Cn i ua in Sc r t; /* * *@e u iy "a _o e' O EE IO '" S cr t ( hs r l( RL _D T R) ) * /
  • 30. p bi f nt o u d tA to(e u s $ eu s,$ d u l c u c i n p a e c i nR q e t r q e t i ) { $ m=$h s> e Dc rn (- g ta ae (; e t i- gt ot i e) >e Mn gr ) $ ni y=$m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ; ett e -g te o io y' sl ey f nC nu de P s' -f n(i ) i ($ ni y { f !e tt ) t r w $ h s> r a e o F u d x e t o ( U a l t f n P s e t t . ) h o ti-c e tN to nE cp i n' nb e o id ot n iy ' ; } }
  • 32. u eS ni u de F ae ok xr B nl o fg rt o a aC ne tr s e s oB nl r mw r Et au de Cn i ua in Pr m ov re ; /* * * @a aC ne tr" ot ,c as " sl ey fn Cn u de Ps " Pr m ov re(p s" ls =X ov Sm o yo Bn l: o t) * / p bi f nt o u d tA to(e u s $ eu s,P s $o t u l c u c i n p a e c i nR q e t r q e t o t p s ) { }
  • 33. c as Pr mo vr e ​ l s a aC ne tr ​ { p ia e$ ae ​ r v t nm; p ia e$ ls ; r v t ca s​ p i a e $ p i n = a r y) ​ r v t ot os ra(; p ia e$ pi n l= fl e r v t ot oa as; }
  • 34. /* * * @o t( /l g{ a e/ su }" Ru e "b o/ dt }{ l g/ ) * @a aC ne tr" ot ,o to s {e cu e: {d t "} Pr m ov re(p s" pi n= "x ld " " ae }) * @a aC ne tr" ot , Pr m ov re(p s" c as "X ov Sm o yo Bn l: ot ) , l s= s l ey fn Cn u de Ps " o to s{ p in = " ap n" { dt " "a e, "l g :" lg } m pi g : " a e: d t" s u" s u ", " eo io ym t o" =" id ih o n" r ps t r_ eh d fn Wt Ji s} } * /
  • 36. n ms aeSn i u de Fa eo k xr Bn l eu s a aC ne tr a ep c e so Bn l r mw rE ta ud e Rq et Pr m ov re ; u eS ni u de F ae ok xr B nl o fg rt o o fg rt oI t ra e s e s oB nl r mw r Et au de Cn i ua in Cn i ua in ne fc ; u eS mo yC mo e tH tF ud t o eu s; s y f n op nn t p on ai nR qe t i tr aePr mo v re It ra e n ef c a aC ne tr n ef c { f nt o ap yR qe t$e us ,C ni u ai nn ef c $o fg r to ) u c in pl ( eu s rq e t of gr to I tr ae c ni ua in ; f nt o sp ot (o f gr to It ra e $o fg rt o ) u c in up r sC ni ua i nn ef c cn i ua in ; }
  • 37. n ms aeXo v y fn Cn ud e Rq et Pr mo v re ; a ep c S le Sm oy o Bn l eu s a aC ne tr u eS ni u de F ae ok xr B nl e us a a Cn et rP rm o vr eI tr a e s e s oB nl r mw r Et au de Rq e tP rm ov r e aa Cn et r ne fc ; c as Wb ev cP r mo vr e ip ee t Pr mo v re It ra e l s e sr ie aa Cn e tr m lm ns a aC ne tr n ef c { p oe td$e s ri e r t ce w be vc ; p bi f nt o _c nr c ( e sr ie $e sr i e{ u l c u ci n _o t ut Wb ev c w be vc ) $hs >e s ri e= $e s ri e ti -w be vc w be vc ; } p bi f nt o ap yR qe t $e us ,P rm o vr e $o fg rt o) u l c u ci n pl ( eu s rq et aa Cn et r cn iu a in { $ ae =$ o fg rt o- g ta e) / Te at iu e nm nm cn iu a in >e Nm (; / h t rb t ae $ ls = $o fg r to - g tl s ( ; /T ea ti u ec as nm ca s c ni ua in > eC as ) /h tr bt l s a e $ pi n =$ hs > eO to s$ of g rt o) / A ar y o o to s ot os ti - g tp i n( cn iu ai n ; / n ra f p in $ b =$ hs > e s ri e> id $p i n[ i ' ) oj t i-w be vc -fn (o to s'd ]; $ eu s-a ti ue (p r m $ b) rq et >t rb t s $ aa , oj ; r tr t u; eu n r e } p bi f nt o sp ot (o f gr to It ra e$o fg rt o ) u l c u ci n up r sC ni ua in n ef c cn i ua in { $ pi n =$hs > eO to s$ of g rt o) ot os ti -g tp i n( cn iu ai n ; r tr $ hs>e s ri e> id $p i n[ i')! n l; eu n t i-w be vc - fn (o to s ' d] = ul } }
  • 38. # ap cn i/ of g yl p/ o fg cn i. m s ri e: e vc s w be vc .a a .o vr e e s ri ep rm cn e tr c as ls: X ov y f nC nu de Rq e tP rm ov re es ri ea a Cn e S l eS mo yo Bn l e us a a Cn et rW be v cP rm ov a gm ns ru et : - @e s ri e w be vc t g: as - {n m :r qe tp r mc ne tr p ir t: -,c ne tr w be vc O j} ae e u s. aa _o vr e , r o iy 2 o vr e : e s ri eb
  • 39. /* * * @a aC ne tr Pr m ov re */ * p bi f nt o s o At o( es r ie b $ e sr ie b) u lc u ci n hw ci n Wb ev cO j wb ev c Oj ;
  • 41. p oe td $h rD s rp in r tc e s ot ec it o ; p oe td $a s= a ry ) r tc e t g ra(;
  • 42. /* * *@s e tN tl n( A sr o Ba k ) *@s e tL nt ( A sr e gh * m n= "" i 2, * m x= "5 " a 2 0) * / p oe td $h rD s rp in r tc e s ot ec it o ; /* * *@s e tA l{ A sr l ( * @ se tN tl n, A sr o B ak * @ se tL nt (i = "" A sr e g hm n 1) *} ) * / p oe td $a s= a ry ) r tc e t g ra(;
  • 44. n ms aeXo v y fn Cn ud e Vl dt rC nt a ns a ep c S le Sm oy o Bn l ai ao os ri t; u eS mo yC mo e tV ld tr C nt an ; s y f n op nn a i ao o sr it /* * *@n o ai n A nt to * / c as Cn an Ea p ee tn sC n ta n l s o ti sx ml x e d os ri t { p bi $ es g =' h ea pe i nt vl d' u l c m sa e T e xm l s o a i.; }
  • 45. u eX ov y fn C nu de Vl d tr Cn ta ns a Sm o yo ; s S l eS mo yo Bn l a ia o os r it s y fn Cn c as Ea pe ni y l s x ml Et t { / .. / . /* * * @ yf nC nC na n Ea pe S mo yo ot is xm l * / p oe td $r p ry r t ce p oe t; / .. / . }
  • 46. $ hs >p ae ae =nw Dt Tm ( ; t i- u dt Dt e a ei e)
  • 48. /* * * @Rn iy OME tt * @Ra Lf cc e al ak OMH si ey lC lb c s * / c as Ps { ls ot /* * * @Rr Pr i t) O MP e e s s ( * @Rr Ud t ( O MP e p a e ) * / p bi f nt o pe pa e) / (. )/ u l c u ci n rU d t({* .. *} }
  • 52. /* * * @e vc Sr i e * @a(d cr n. v n_ it nr , at iu e ={ ee t =" ot pa e } Tg" ot ie ee tl s ee " tr bt s " v n" ps Ud t" ) * / c as Mi Nt fc t oS ri e l s a lo ii ai ne v c { /* * * @n et aa s { I jc Pr m( * " al r =@ ne t" a lr ) m ie " I j c( mi e" *} ) * / p bi f nt o _c nt ut S it Mi e $a lr { /( .) / u l c u ci n _o s rc (w f_ al r mi e ) * .. *} p bi f nt o ps Ud t ( i ey lE et rs$ rs { /( .) * } u l c u ci n ot p ae Lf cc ev n Ag a g) *. . / }
  • 53. p bi f nt o p s Ud t( ie y lE et rs $r s u lc u ci n ot pa e Lf cc ev nA g a g) { $ ni y= $r s >e Et t( ; ett a g- gt n iy ) i ( et t i s ac o Ps ){ f $ ni y nt ne f ot / *s n nt fc t o * / * ed o ii ai n * } }
  • 56. p bi f nt o s o At o( eu s $e us , Ps $ ot { u lc u ci n hw ci n Rq et r qe t ot p s) $ ep ne= n w Rs os (; r s os e ep n e) $ ep ne>e L sM df e( p s- gt pa eA ( ) r s os-s ta to i id $o t> eU d td t) ; i ( rs os-i Nt o ii d$ eu s) { f $ ep ne> so Md fe ( rq et ) r tr $ ep ne eu n r s os; } $ ep ne >e E pr s " oo r w) r s os -s tx ie ( tm ro "; $ ep ne>e M xg (0 ) r s os -s ta Ae 6 0; $ ep ne>e S ae Mx g( 0 ) r s os-s th rd a Ae 60 ; $ ep ne>e P bi (r e; r s os-s tu lc t u) r tr $ ep ne e u n r so s; }
  • 57. /* * *@a h (x ie =t mr o " p b i= tu " C ce ep rs " oo rw , ul c" re ) * / p bi f nt o so At o (o t $ ot { *( .) *} ul c uc in h wc in Ps ps) / * .. */
  • 60. /* * * Ei s a e it n Ps e tt . d t n xs ig o t ni y * *@o t (/ i} ,n m= p s_ pa e) R ue "{ d" ae "o tu d t" *@e h d" U" M to (P T) *@e p ae "s le yf n Cn ud eP s: d th m. wg ) T ml t ( Xo v Sm oy oB n l: ot ei .t l ti " * / p bi f nt o u d tA to(e u s $ eu s,$ d u l c u c i n p a e c i nR q e t r q e t i ) { i ( ! $ hs >e (s c rt .o tx '- i Ga td 'O E EI O' ){ f t i - g t' eu iy c ne t) >s rn e (R L_ DT R ) tr w n w Ac sD ne E cp in ) h o e ce s ei dx et o( ; } $ m= $h s > e Dc rn (- g ta ae (; e t i- gt ot i e) >e Mn gr ) $ ni y= $m > eR ps tr ( Xo vS mo yo B nl :o t) >i d$d ; ett e -g te o io y' sl ey f nC nu de P s' -f n(i ) i ( $n iy { f ! et t ) t rw $h s >r ae oF u dx et o(Ua l t fn P s e t t. ) ho t i- ce t Nt on Ec pi n'n be o i d o t ni y' ; } $ ee eo m= $ hs >r ae e ee om$d ; d l tF r t i- c et Dl tF r(i ) $ d t o m = $ h s> r a e d t o m $ n i y ; e i Fr ti-c e tE iF r( et t ) $ dt om>a d ee us (r q et ; e i Fr-h nl Rq e t$ eu s) i ( ei Fr-i Vl d ) { f $ dt om> sa i( ) $ ni y> e Ud tD t(e Dt Tm ( ) et t- st pa e aenw a ei e) ; $ m> ls ( ; e- fu h) t y{ r $ hs> e( xo v. m i. oi ia o'- sn (e tt ) ti-g t ' s le ea ln tf c tr)> ed $ ni y; } ct h(x et o $) { a c Ec pi n e $ hs> e( ss in) >e Fa ha ( t i - g t ' e s o '- g t l s B g )
  • 61. AFTER
  • 62. /* * *@o t (/ i} ,n m= p s_ pa e, mt o s" U" R ue "{ d" ae "o tu d t" e hd =P T ) *@e p ae "s le yf n Cn ud eP s: d th m. wg ) T ml t ( Xo v Sm oy oB n l: ot ei .t l ti " *@a a Cn et r P rm ov re *@e u iy "a _o e' O EE IO '" S cr t ( hs r l( RL _D T R) ) * / p bi f nt o u d tA to(e u s $ eu s,P s $o t u l c u c i n p a e c i nR q e t r q e t o t p s ) { $ ee eo m= $ hs >r ae e ee om$o t> e I( ) d l tF r t i- c et Dl tF r(p s- gt d) ; $ d t o m = $ h s> r a e d t o m $ o t ; e i Fr ti-c e tE iF r( ps ) $ dt om>a d ee us (r q et ; e i Fr-h nl Rq e t$ eu s) i ( ei Fr-i Vl d ) { f $ dt om> sa i( ) $ m> ls ( ; e- fu h) r tr $ hs>e i et $h s> ee a er (p s_ d t, ar y ' d = $d ); eu n t i-r dr c( t i- gn rt Ul ' ot ei ' ra ( i' > i ) ) } r tr a ry eun ra( ' ni y et t' = $ ni y > e tt , ' dt fr ' = $ dt om>r ae i w) ei _o m > e iF r-c et Ve (, ' ee ef r '= $ ee eo m> ra e iw ) dl t_ om > d lt F r- ce tV e( , ) ; }
  • 64. n ms aeXo v y fn Cn ud e An tt o; a ep c S le Sm oy o Bn l no ai n /* * *@n o ai n A nt to * / c as Si cL gt l s w th ih { p ia e$ om r v t ro; p bi f nt o st om $o m u l c u ci n eR o (r o) { $ hs>o m =$ om ti-r o ro; } p bi f nt o gt om $o m u l c u ci n eR o (r o) { r tr $ hs>o m eu n t i-r o; } }
  • 65. n ms aeXo v y fn Cn ud e An tt o rv r a ep c S le Sm oy o Bn l no ai n Di e; u eX ov y fn C nu de An t to w th ih ; s S l eS mo yo Bn l n oa in Si c Lg t /* * *@n o ai n A nt to * / c as An tt oD i e l s n oa in rv r { p ia e$ ed r r v t ra e; p ia e$ om i h; r v t ro Lg t p bi f nt o _c nt ut $ ed r L g t$ om ih ) u l c u ci n _o s rc (r ae , ih r o Lg t { $ hs>e d r= $e dr / gt an tt os r ae ti-r ae r ae ;/ e no a in e dr $ hs>o m ih = $o mi h ; ti-r oL gt ro L gt } p bi f nt o oK re Cn r le (i tr ot o lr vn $ vn ) u l c u ci n ne n lo to lr Fl e Cn rl eE e t e et { i ( i_ ra (c n rl e =$ vn -g to t ol r) ){ /r t r i n c nr le f ! sa r y$ ot ol r e et > eC nr le ( ) / eu n f o o t ol r r tr ; eu n } $ be t= n w el ci n be t$ ot ol r0) / gt cn rl e oj c e R f et oO jc (c n rl e[]; / e ot o lr $ eh d= $ be t> eM t o( cn rl e[ ] ;/ gt mt o mt o o jc - gt eh d$ ot o lr1) / e e hd f ra h( t i - ra e- g te hd no ai n (m to ) a $ of gr t o) {/ Sa oe c $h s> e dr >e Mt oA n tt os $e h d s c n iu ai n /t r i(s o jc (c ni u ai n & $ of g rt o is ac o Si cL gt )/F u fi _b et $ of gr to ) & cn iu ai n nt ne f wt h ih ){ /o $ h s> o m i h - s i c ( c n i u a i n > e R o ( ) ti-r o Lg t> wt h $ o fg rt o- g to m) ; } } }
  • 66. s ri e: e vc s s m_ no ai n di e: o e an tt o_ rv r c as X ov y f nC nu de An t to r vr A nt to Di e ls: S l eS mo yo B nl n oa in D ie n oa in r vr t g: [n m :k re .v n _i tn r ee t kr e. ot ol r mt o :o Kr eC as { ae e n le et ls ee , vn : en l cn rl e, e hd n e nl o a gm ns [ an t to _e dr @ om lg t ru et : @n oa in r ae , r o _i h]
  • 67. /* * * @w th ih (o m "a o" Si c Lg tr o= sl n ) * / p bi f nt o s i cL gt na o At o( u lc u ci n wt hi h IS ln ci n) { .} ..
  • 70. SHOULD WE CREATE AN ANNOTATION FOR BREADCRUMBS?