SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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.
 

Dernier

Dernier (20)

Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024Long journey of Ruby Standard library at RubyKaigi 2024
Long journey of Ruby Standard library at RubyKaigi 2024
 
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
1111 ChatGPT Prompts PDF Free Download - Prompts for ChatGPT
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
Event-Driven Architecture Masterclass: Engineering a Robust, High-performance...
 
How we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdfHow we scaled to 80K users by doing nothing!.pdf
How we scaled to 80K users by doing nothing!.pdf
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
Event-Driven Architecture Masterclass: Integrating Distributed Data Stores Ac...
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 

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