SlideShare ist ein Scribd-Unternehmen logo
1 von 20
Downloaden Sie, um offline zu lesen
WHO'S TALKING?
Gediminas Morkevičius aka @l3pp4rd

I code with - PHP, Go, JavaScript, C
I'm an open-source geek - ViM, Arch Linux, DWM user
And I share my stuff github.com/l3pp4rd
SYMFONYCON WARSAW 2013

INCREASE PRODUCTIVITY WITH
DOCTRINE2 BEHAVIORAL EXTENSIONS
SOME HISTORY
The initial commit 2010-09-03 MIT licensed
Maintained ever since
Purpose - provide common model behaviors
Derive metadata mapping and caching technics
Be a framework independent library
AN EXAMPLE
<pp
?h
nmsaeEtt;
aepc niy
ueGdoMpigAntto a Gdo
s emapnnoain s em;
ueDcrnRapn a OM
s otieOMMpig s R;
/*
*
*@Rniy
OMEtt
*@emoteeebefedae"eeeA"
GdoSfDltal(ilNm=dltdt)
*
/
casPout
ls rdc
{
/*
*
*@emrnltbe
GdoTasaal
*@Rounlnt=4
OMClm(egh6)
*
/
piae$il;
rvt tte
/*
*
*@emlgfed="il",udtbefle
GdoSu(ils{tte} paal=as)
*@Rounlnt=4 uiu=re
OMClm(egh6, nqetu)
*
/
piae$lg
rvt su;
/*
*
*@emietmal(n"rae)
GdoTmsapbeo=cet"
*@Rountp=dttm"
OMClm(ye"aeie)
*
/
piae$raeA;
rvt cetdt
/*
*
HOW EXTENSIONS WORK?
SLUGGABLE
Transforms fields into an url friendly slug. Ensures
uniqueness if required.
/*
*
*@emlgfed="oe,"il",sprtr"" sye"ae"
GdoSu(ils{cd" tte} eaao=-, tl=cml)
*@Rounlnt=4 uiu=re
OMClm(egh6, nqetu)
*
/
piae$lg
rvt su;

Default transliterator transforms utf-8 characters to their
ASCII equivalent
TRANSLATABLE
/*
*
*@emrnltbe
GdoTasaal
*@Rounlnt=4
OMClm(egh6)
*
/
piae$il;
rvt tte
/*
*
*@emrnltbe
GdoTasaal
*@Rountp=tx" nlal=re
OMClm(ye"et, ulbetu)
*
/
piae$ecito;
rvt dsrpin

Can link to a specific entity for translations. That would allow
to use a direct foreign key constraint and optimize for better
performance
By default, puts all translations into a single translation
table. It is not performance wise. Uses locale from listener.
TRANSLATION QUERY HINTS
$ur =$m>raeur(SLC pFO Ettrdc pODRB ptte)
qey
e-cetQey"EET
RM niyPout
RE Y .il";
$ur-stit
qey>eHn(
DcrnRur:HN_UTMOTU_AKR
otieOMQey:ITCSO_UPTWLE,
'emrnltbeQeyTeWlernltoWle'
GdoTasaalurreakrTasainakr
)
;
$ur-stitTasaalLsee:HN_RNLTBELCL,'e)
qey>eHn(rnltbeitnr:ITTASAAL_OAE d';
$erdcs=$ur-gteut)
dPout
qey>eRsl(;
arywl(dPout,fnto(niyPout$){
ra_ak$erdcs ucinEttrdc p
eh "o <$-gtil(} wt dsrpin<$-gtecito(}"
co Gt {p>eTte)> ih ecito {p>eDsrpin)>n;
};
)
/ Gt<pe>wt dsrpin<rct>
/ o Äfl ih ecito Fühe
/ Gt<rue>wt dsrpin<rct>
/ o Tabn ih ecito Fühe
TIMESTAMPABLE
Sets timestamps for you. Derived extensions: IpTraceable,
Blameable
/*
*
*@emietmal(n"rae)
GdoTmsapbeo=cet"
*@Rountp=dttm"
OMClm(ye"aeie)
*
/
piae$raeA;
rvt cetdt
/*
*
*@emietmal(n"pae)
GdoTmsapbeo=udt"
*@Rountp=dttm"
OMClm(ye"aeie)
*
/
piae$paeA;
rvt udtdt
/*
*
*@emietmal(n"hne,fed"ttscd" vle1
GdoTmsapbeo=cag" il=sau.oe, au=)
*@Rountp=dttm" nlal=re
OMClm(ye"aeie, ulbetu)
*
/
piae$ulseA;
rvt pbihdt
SORTABLE
Tracks sorting position on your entity
/*
*
*@emotbeoiin
GdoSralPsto
*@Rountp=itgr)
OMClm(ye"nee"
*
/
piae$oiin
rvt psto;
/*
*
*@emotberu
GdoSralGop
*@Rayon(agtniy"aeoy)
OMMnTOetreEtt=Ctgr"
*
/
piae$aeoy
rvt ctgr;
SOFTDELETEABLE
Softly removes your entities, so they get filtered out
afterwards, but maintain in the database.
/*
*
*@emoteeebefedae"eeeA"
GdoSfDltal(ilNm=dltdt)
*@Rniy
OMEtt
*
/
casPout
ls rdc
{
/*
*
*@Rounlnt=4
OMClm(egh6)
*
/
piae$il;
rvt tte
/*
*
*@Rountp=dttm" nlal=re
OMClm(ye"aeie, ulbetu)
*
/
piae$eeeA;
rvt dltdt
}

/..
/.
Given the actions are performed:
$0=nwEttrdc;
p
e niyPout
$0>eTte'ilb sfdltd)
p-stil(Wl e oteee';
$1=nwEttrdc;
p
e niyPout
$1>eTte'rlyscesu pout)
p-stil(Tul ucsfl rdc';
$m>ess(p)
e-prit$0;
$m>ess(p)
e-prit$1;
$m>ls(;
e-fuh)
/ a sm pit pouti rmvd
/ t oe on, rdc s eoe
$m>eoe$0;
e-rmv(p)
$m>ls(;
e-fuh)
eh cut$m>eRpstr(Ettrdc'-fnAl);
co on(e-gteoioy'niyPout)>idl()
/ rsl i:1
/ eut s
NESTED-SET TREE
Manages your entity as Nested-Set strategy based tree.
<pp
?h
nmsaeEtt;
aepc niy
ueGdoMpigAntto a Gdo
s emapnnoain s em;
ueDcrnRapn a OM
s otieOMMpig s R;
/*
*
*@emretp=nse"
GdoTe(ye"etd)
*@RniyrpstrCas"emreEtteoioyNseTeRpstr"
OMEtt(eoioyls=GdoTeniyRpstretdreeoioy)
*
/
casCtgr
ls aeoy
{
/*
*
*@Rountp=itgr)
OMClm(ye"nee"
*@Rd
OMI
*@ReeaeVle
OMGnrtdau
*
/
piae$d
rvt i;
/*
*
*@Rounlnt=4
OMClm(egh6)
*
/
piae$il;
rvt tte
/*
*
*@emreet
GdoTeLf
*@Rountp=itgr)
OMClm(ye"nee"
*
/
How the tree looks in database:
How to keep your tree records secure from getting
compromised during concurrent requests?
Given we have entities:
/*
*
*@Rniy
OMEtt
*
/
casOgnsto {*.*}
ls raiain /../
/*
*
*@emretp=nse"
GdoTe(ye"etd)
*@RniyrpstrCas"emreEtteoioyNseTeRpstr"
OMEtt(eoioyls=GdoTeniyRpstretdreeoioy)
*
/
casPoet
ls rjc
{
/*
*
*@Rayon(agtniy"raiain)
OMMnTOetreEtt=Ognsto"
*@RonounrfrneClmNm=i" nlal=as)
OMJiClm(eeecdounae"d, ulbefle
*
/
piae$raiain
rvt ognsto;
}

/../
*.*
On every request when you move, insert Project you have a
hard relation Organisation. Meaning, you have to select the
specific organisation in order to update the tree.
ueDcrnBLLcMd;
s otieDAokoe
$on=$m>eCneto(;
cn
e-gtoncin)
/ sattascin
/ tr rnato
$on>eiTascin)
cn-bgnrnato(;
ty{
r
/ slcsognsto frudt -lcsi fray
/ eet raiain o pae
ok t o n
/ ra/rt atmt utlti tascined
/ edwie teps ni hs rnato ns
$r =$m>id"niyOgnsto" $rI,LcMd:PSIITCWIE;
og
e-fn(Ettraiain, ogd okoe:ESMSI_RT)
/ cet anwctgr
/ rae
e aeoy
$uPoet=nwPoet
sbrjc
e rjc;
$uPoet>eTte$PS[tte];
sbrjc-stil(_OT"il")
$uPoet>eOgnsto(og;
sbrjc-straiain$r)
$aetrjc =$m>id"niyPoet,$PS[prn_d];
prnPoet
e-fn(Ettrjc" _OT"aeti")
/ pritadfuh
/ ess n ls
$m>eRpstr(Ettrjc"
e-gteoioy"niyPoet)
-pritsisCidf$uPoet $aetrjc)
>essAFrthlO(sbrjc, prnPoet;
$m>ls(;
e-fuh)
$on>omt)
cn-cmi(;
}cth(Ecpin$){
ac xeto e
$on>olak)
cn-rlbc(;
trw$;
ho e
}
Read more about available locking mechanisms supported
by database you are using, some references:
Transactions and concurrency on Doctrine2 website
Locking reads on MySQL 5.5 manual page
Any actions which does atomic operations needs to be
secured including Sortable extension.
FUTURE PLANS:
1.
2.
3.
4.
5.
6.

One next big version upgrade expected 2014
Simplify integration without any preconfiguration using
sensible defaults.
Improve extensions based on the issues learned.
Make them less feature rich, but more customizable.
Improve documentation, add helper commands to review
active listeners and watched entities.
Maintain compatibility without changes to public
interface.
Progress can be followed on pull request
THANK YOU

Powered by: Revealjs

Weitere ähnliche Inhalte

Andere mochten auch

Advanced Exam Certificate
Advanced Exam CertificateAdvanced Exam Certificate
Advanced Exam Certificate
Tyler Ellis
 
Igor_Tolkach_Portfolio2015
Igor_Tolkach_Portfolio2015Igor_Tolkach_Portfolio2015
Igor_Tolkach_Portfolio2015
Igor Tolkach
 
骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍
lys167
 
Catalogue of Dery Chemical
Catalogue of Dery ChemicalCatalogue of Dery Chemical
Catalogue of Dery Chemical
Rina Lu
 
Luke_odgen_2014_updated-1_copy
Luke_odgen_2014_updated-1_copyLuke_odgen_2014_updated-1_copy
Luke_odgen_2014_updated-1_copy
Luke Ogden
 

Andere mochten auch (17)

Aspectos legales. present.
Aspectos legales. present.Aspectos legales. present.
Aspectos legales. present.
 
Bài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tửBài giảng mô phỏng mạch điện tử
Bài giảng mô phỏng mạch điện tử
 
Shared Services - Cost and Other Efficencies
Shared Services - Cost and Other EfficenciesShared Services - Cost and Other Efficencies
Shared Services - Cost and Other Efficencies
 
Advanced Exam Certificate
Advanced Exam CertificateAdvanced Exam Certificate
Advanced Exam Certificate
 
ACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 versionACC 290 Final Exam 2015 version
ACC 290 Final Exam 2015 version
 
Proposal tanaman padi
Proposal tanaman padiProposal tanaman padi
Proposal tanaman padi
 
Joe Cherng_7
Joe Cherng_7Joe Cherng_7
Joe Cherng_7
 
Departemen agama
Departemen agamaDepartemen agama
Departemen agama
 
Tgas sistem pncernaan
Tgas sistem pncernaanTgas sistem pncernaan
Tgas sistem pncernaan
 
Surat keterangan kematian 2
Surat keterangan kematian 2Surat keterangan kematian 2
Surat keterangan kematian 2
 
Igor_Tolkach_Portfolio2015
Igor_Tolkach_Portfolio2015Igor_Tolkach_Portfolio2015
Igor_Tolkach_Portfolio2015
 
Sparc-Japan-Slow-revolution-in-scholarly-communication
Sparc-Japan-Slow-revolution-in-scholarly-communicationSparc-Japan-Slow-revolution-in-scholarly-communication
Sparc-Japan-Slow-revolution-in-scholarly-communication
 
Proposal ubi jalar
Proposal ubi jalarProposal ubi jalar
Proposal ubi jalar
 
骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍骨盆歪斜 姿勢不良惹的禍
骨盆歪斜 姿勢不良惹的禍
 
An introduction: Fast track immediate care
An introduction: Fast track immediate careAn introduction: Fast track immediate care
An introduction: Fast track immediate care
 
Catalogue of Dery Chemical
Catalogue of Dery ChemicalCatalogue of Dery Chemical
Catalogue of Dery Chemical
 
Luke_odgen_2014_updated-1_copy
Luke_odgen_2014_updated-1_copyLuke_odgen_2014_updated-1_copy
Luke_odgen_2014_updated-1_copy
 

Ähnlich wie Increase productivity with doctrine2 extensions

Nginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with LuaNginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with Lua
Tony Fabeen
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
Tony Fabeen
 
Marko Gargenta_Remixing android
Marko Gargenta_Remixing androidMarko Gargenta_Remixing android
Marko Gargenta_Remixing android
Droidcon Berlin
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
Michael Peacock
 
Unit 8
Unit 8Unit 8
Unit 8
siddr
 

Ähnlich wie Increase productivity with doctrine2 extensions (20)

Nginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with LuaNginx Scripting - Extending Nginx Functionalities with Lua
Nginx Scripting - Extending Nginx Functionalities with Lua
 
Devinsampa nginx-scripting
Devinsampa nginx-scriptingDevinsampa nginx-scripting
Devinsampa nginx-scripting
 
Noah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku SecretsNoah Zoschke at Waza 2013: Heroku Secrets
Noah Zoschke at Waza 2013: Heroku Secrets
 
Farewell to Disks: Efficient Processing of Obstinate Data
Farewell to Disks: Efficient Processing of Obstinate DataFarewell to Disks: Efficient Processing of Obstinate Data
Farewell to Disks: Efficient Processing of Obstinate Data
 
Marko Gargenta_Remixing android
Marko Gargenta_Remixing androidMarko Gargenta_Remixing android
Marko Gargenta_Remixing android
 
Refactoring to symfony components
Refactoring to symfony componentsRefactoring to symfony components
Refactoring to symfony components
 
Unit 8
Unit 8Unit 8
Unit 8
 
JavaScript Design Patterns
JavaScript Design PatternsJavaScript Design Patterns
JavaScript Design Patterns
 
Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)Build a custom (micro)framework with ZF2 Components (as building blocks)
Build a custom (micro)framework with ZF2 Components (as building blocks)
 
OOP in Rust
OOP in RustOOP in Rust
OOP in Rust
 
Lca05
Lca05Lca05
Lca05
 
Debugging: Rules & Tools
Debugging: Rules & ToolsDebugging: Rules & Tools
Debugging: Rules & Tools
 
Proxy OOP Pattern in PHP
Proxy OOP Pattern in PHPProxy OOP Pattern in PHP
Proxy OOP Pattern in PHP
 
Zend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHPZend con 2016 - Asynchronous Prorgamming in PHP
Zend con 2016 - Asynchronous Prorgamming in PHP
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
 
Beginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at GoogleBeginner workshop to angularjs presentation at Google
Beginner workshop to angularjs presentation at Google
 
Introduction to Kernel Programming
Introduction to Kernel ProgrammingIntroduction to Kernel Programming
Introduction to Kernel Programming
 
Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015Code Generation in PHP - PHPConf 2015
Code Generation in PHP - PHPConf 2015
 
PHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP LimogesPHP in 2018 - Q4 - AFUP Limoges
PHP in 2018 - Q4 - AFUP Limoges
 
PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.PHP 5 Sucks. PHP 5 Rocks.
PHP 5 Sucks. PHP 5 Rocks.
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Kürzlich hochgeladen (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 

Increase productivity with doctrine2 extensions

  • 1. WHO'S TALKING? Gediminas Morkevičius aka @l3pp4rd I code with - PHP, Go, JavaScript, C I'm an open-source geek - ViM, Arch Linux, DWM user And I share my stuff github.com/l3pp4rd
  • 2. SYMFONYCON WARSAW 2013 INCREASE PRODUCTIVITY WITH DOCTRINE2 BEHAVIORAL EXTENSIONS
  • 3. SOME HISTORY The initial commit 2010-09-03 MIT licensed Maintained ever since Purpose - provide common model behaviors Derive metadata mapping and caching technics Be a framework independent library
  • 4. AN EXAMPLE <pp ?h nmsaeEtt; aepc niy ueGdoMpigAntto a Gdo s emapnnoain s em; ueDcrnRapn a OM s otieOMMpig s R; /* * *@Rniy OMEtt *@emoteeebefedae"eeeA" GdoSfDltal(ilNm=dltdt) * / casPout ls rdc { /* * *@emrnltbe GdoTasaal *@Rounlnt=4 OMClm(egh6) * / piae$il; rvt tte /* * *@emlgfed="il",udtbefle GdoSu(ils{tte} paal=as) *@Rounlnt=4 uiu=re OMClm(egh6, nqetu) * / piae$lg rvt su; /* * *@emietmal(n"rae) GdoTmsapbeo=cet" *@Rountp=dttm" OMClm(ye"aeie) * / piae$raeA; rvt cetdt /* *
  • 6. SLUGGABLE Transforms fields into an url friendly slug. Ensures uniqueness if required. /* * *@emlgfed="oe,"il",sprtr"" sye"ae" GdoSu(ils{cd" tte} eaao=-, tl=cml) *@Rounlnt=4 uiu=re OMClm(egh6, nqetu) * / piae$lg rvt su; Default transliterator transforms utf-8 characters to their ASCII equivalent
  • 7. TRANSLATABLE /* * *@emrnltbe GdoTasaal *@Rounlnt=4 OMClm(egh6) * / piae$il; rvt tte /* * *@emrnltbe GdoTasaal *@Rountp=tx" nlal=re OMClm(ye"et, ulbetu) * / piae$ecito; rvt dsrpin Can link to a specific entity for translations. That would allow to use a direct foreign key constraint and optimize for better performance
  • 8. By default, puts all translations into a single translation table. It is not performance wise. Uses locale from listener.
  • 9. TRANSLATION QUERY HINTS $ur =$m>raeur(SLC pFO Ettrdc pODRB ptte) qey e-cetQey"EET RM niyPout RE Y .il"; $ur-stit qey>eHn( DcrnRur:HN_UTMOTU_AKR otieOMQey:ITCSO_UPTWLE, 'emrnltbeQeyTeWlernltoWle' GdoTasaalurreakrTasainakr ) ; $ur-stitTasaalLsee:HN_RNLTBELCL,'e) qey>eHn(rnltbeitnr:ITTASAAL_OAE d'; $erdcs=$ur-gteut) dPout qey>eRsl(; arywl(dPout,fnto(niyPout$){ ra_ak$erdcs ucinEttrdc p eh "o <$-gtil(} wt dsrpin<$-gtecito(}" co Gt {p>eTte)> ih ecito {p>eDsrpin)>n; }; ) / Gt<pe>wt dsrpin<rct> / o Äfl ih ecito Fühe / Gt<rue>wt dsrpin<rct> / o Tabn ih ecito Fühe
  • 10. TIMESTAMPABLE Sets timestamps for you. Derived extensions: IpTraceable, Blameable /* * *@emietmal(n"rae) GdoTmsapbeo=cet" *@Rountp=dttm" OMClm(ye"aeie) * / piae$raeA; rvt cetdt /* * *@emietmal(n"pae) GdoTmsapbeo=udt" *@Rountp=dttm" OMClm(ye"aeie) * / piae$paeA; rvt udtdt /* * *@emietmal(n"hne,fed"ttscd" vle1 GdoTmsapbeo=cag" il=sau.oe, au=) *@Rountp=dttm" nlal=re OMClm(ye"aeie, ulbetu) * / piae$ulseA; rvt pbihdt
  • 11. SORTABLE Tracks sorting position on your entity /* * *@emotbeoiin GdoSralPsto *@Rountp=itgr) OMClm(ye"nee" * / piae$oiin rvt psto; /* * *@emotberu GdoSralGop *@Rayon(agtniy"aeoy) OMMnTOetreEtt=Ctgr" * / piae$aeoy rvt ctgr;
  • 12. SOFTDELETEABLE Softly removes your entities, so they get filtered out afterwards, but maintain in the database. /* * *@emoteeebefedae"eeeA" GdoSfDltal(ilNm=dltdt) *@Rniy OMEtt * / casPout ls rdc { /* * *@Rounlnt=4 OMClm(egh6) * / piae$il; rvt tte /* * *@Rountp=dttm" nlal=re OMClm(ye"aeie, ulbetu) * / piae$eeeA; rvt dltdt } /.. /.
  • 13. Given the actions are performed: $0=nwEttrdc; p e niyPout $0>eTte'ilb sfdltd) p-stil(Wl e oteee'; $1=nwEttrdc; p e niyPout $1>eTte'rlyscesu pout) p-stil(Tul ucsfl rdc'; $m>ess(p) e-prit$0; $m>ess(p) e-prit$1; $m>ls(; e-fuh) / a sm pit pouti rmvd / t oe on, rdc s eoe $m>eoe$0; e-rmv(p) $m>ls(; e-fuh) eh cut$m>eRpstr(Ettrdc'-fnAl); co on(e-gteoioy'niyPout)>idl() / rsl i:1 / eut s
  • 14. NESTED-SET TREE Manages your entity as Nested-Set strategy based tree. <pp ?h nmsaeEtt; aepc niy ueGdoMpigAntto a Gdo s emapnnoain s em; ueDcrnRapn a OM s otieOMMpig s R; /* * *@emretp=nse" GdoTe(ye"etd) *@RniyrpstrCas"emreEtteoioyNseTeRpstr" OMEtt(eoioyls=GdoTeniyRpstretdreeoioy) * / casCtgr ls aeoy { /* * *@Rountp=itgr) OMClm(ye"nee" *@Rd OMI *@ReeaeVle OMGnrtdau * / piae$d rvt i; /* * *@Rounlnt=4 OMClm(egh6) * / piae$il; rvt tte /* * *@emreet GdoTeLf *@Rountp=itgr) OMClm(ye"nee" * /
  • 15. How the tree looks in database:
  • 16. How to keep your tree records secure from getting compromised during concurrent requests? Given we have entities: /* * *@Rniy OMEtt * / casOgnsto {*.*} ls raiain /../ /* * *@emretp=nse" GdoTe(ye"etd) *@RniyrpstrCas"emreEtteoioyNseTeRpstr" OMEtt(eoioyls=GdoTeniyRpstretdreeoioy) * / casPoet ls rjc { /* * *@Rayon(agtniy"raiain) OMMnTOetreEtt=Ognsto" *@RonounrfrneClmNm=i" nlal=as) OMJiClm(eeecdounae"d, ulbefle * / piae$raiain rvt ognsto; } /../ *.*
  • 17. On every request when you move, insert Project you have a hard relation Organisation. Meaning, you have to select the specific organisation in order to update the tree. ueDcrnBLLcMd; s otieDAokoe $on=$m>eCneto(; cn e-gtoncin) / sattascin / tr rnato $on>eiTascin) cn-bgnrnato(; ty{ r / slcsognsto frudt -lcsi fray / eet raiain o pae ok t o n / ra/rt atmt utlti tascined / edwie teps ni hs rnato ns $r =$m>id"niyOgnsto" $rI,LcMd:PSIITCWIE; og e-fn(Ettraiain, ogd okoe:ESMSI_RT) / cet anwctgr / rae e aeoy $uPoet=nwPoet sbrjc e rjc; $uPoet>eTte$PS[tte]; sbrjc-stil(_OT"il") $uPoet>eOgnsto(og; sbrjc-straiain$r) $aetrjc =$m>id"niyPoet,$PS[prn_d]; prnPoet e-fn(Ettrjc" _OT"aeti") / pritadfuh / ess n ls $m>eRpstr(Ettrjc" e-gteoioy"niyPoet) -pritsisCidf$uPoet $aetrjc) >essAFrthlO(sbrjc, prnPoet; $m>ls(; e-fuh) $on>omt) cn-cmi(; }cth(Ecpin$){ ac xeto e $on>olak) cn-rlbc(; trw$; ho e }
  • 18. Read more about available locking mechanisms supported by database you are using, some references: Transactions and concurrency on Doctrine2 website Locking reads on MySQL 5.5 manual page Any actions which does atomic operations needs to be secured including Sortable extension.
  • 19. FUTURE PLANS: 1. 2. 3. 4. 5. 6. One next big version upgrade expected 2014 Simplify integration without any preconfiguration using sensible defaults. Improve extensions based on the issues learned. Make them less feature rich, but more customizable. Improve documentation, add helper commands to review active listeners and watched entities. Maintain compatibility without changes to public interface. Progress can be followed on pull request