SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler offline
Best Practices in 
Component Development 
Jan Tezner 
@jantezner 
Prague, Czech Republic
ABOUT ME 
● More than 10 years in PHP development 
● 7 years experience with MODX 
● CTO and Team Leader in COEX 
● MODX Ambassador for Czech Republic 
● One of organizers of Czech MODX Day 2013
ABOUT COEX 
● Established in 2006 
● Custom PHP & Python development 
● 20 people in-house 
● 100+ of MODX finished projects 
● MODX Professional partner since 2011 
● Direct subcontractors of MODX LLC since 2012
“We don't always give our clients what 
they originally wanted but we always 
bring them what their business really 
needs.“
WHAT WILL FOLLOW AND WHAT NOT 
This is not an ultimate workflow, those are best practices we found 
in COEX in last couple of years. 
1. What to consider before start 
2. Environment setup 
3. Development tips 
4. Build of Transport Package 
5. Testing 
6. Release 
7. Maintenance of Component 
8. Links to other resources
WHAT TO CONSIDER BEFORE START 
● Clarify solution requirements 
● Search for an existing solution 
● Consider development for yourself or public use 
● Find a good name for your component 
● Consider support for old Revolution 2.2
ENVIRONMENT SETUP - Folders 
.../somewhere/ 
/extjs/ 
/modx22t/ 
/modx23/ 
/modx23t/ 
/packages/ 
site webroot //localhost/ 
extjs debug files 
testing 
development 
testing 
components folders inside 
ExtJS 3.4 download link 
Put content of archive ./ext-3.4.0/src/ into /extjs/ folder
ENVIRONMENT SETUP - MODX 
System Settings 
● compress_js = No 
● compress_css = No 
● cache_disabled = Yes 
● session_cookie_path = / 
} Or more easily by SQL 
Then don’t forget to: 
● Manually delete all content in /core/cache/ folder 
● Delete all cookies in the browser
ENVIRONMENT SETUP - Package 
● Don’t start from scratch 
○ BxrExtra Yeoman generator 
○ GitPackageManagement → ./_packages/ 
● Use IDE for development → 
● User your favorite browser :) 
○ Console 
○ Network logger
ENVIRONMENT SETUP - PhpStorm 
For smooth development I strongly recommend to make 
following configurations for your component project. 
Tree > External Libraries 
Configure PHP Include Path 
● /modx/connectors 
● /modx/core/cache 
● /modx/core/model 
● /modx/core/xpdo 
● /modx/manager/controllers 
● /modx/manager/templates 
Settings > Javascript > Libraries 
● modext /modx/manager/assets/modext/ 
● extjs /extjs/
ENVIRONMENT SETUP - .gitignore 
Don’t forget to ignore files which shouldn’t be located within 
your repository. 
E.g. config, uploaded, temporary or dev tools files. 
Link to .gitignore from Tagger
DEVELOPMENT TIPS - General 
● MODX Error log is your friend → use $modx->log(...); 
● Clear cache often (on filesystem /core/cache/) 
● Use xDebug 
Beware of backwards compatibility to 2.2 
● Javascript: MODx.config.connector_url only in 2.3 
● PHP: if ($modx->version[‘major_version’] < 3) { ... }
DEVELOPMENT TIPS - Elements 
● Use Static elements for development 
● Try to not use nested Chunks → performance, readability 
● Don’t hardcode strings into code, use Lexicons 
● Snippets / Plugins shouldn’t contain HTML 
● Don’t be lazy with creating snippet parameters 
● Don’t hardcode “global” variables, 
use System or Context Settings
BUILD OF PACKAGE 
● Correctly use Semantic versioning 
● Don’t forget to write changelog 
● It is good practice to write date of release into 
readme and changelog 
● Don’t forget to put short description and basic usage of 
component or its parts into readme 
● Also put link to documentation into readme 
● Readme should also contain version of MODX where you 
have tested your Component
TESTING 
● Test often and carefully in time of development 
● Before release perform tests on clean MODX install 
● Don’t forget to also test Component updates and uninstall 
● Test on latest version of MODX 
● Don’t test it only by yourself 
○ Ask your colleague / friend to help 
○ Ask the community
RELEASE 
Great documentation makes great components, 
great components make money. 
● Start at least with basic documentation with elementary 
description of snippet parameters 
● Use standard place for documentation 
● Make screenshots of visual parts 
● Make a nice description for extras.modx.com 
● Promote it to community
MAINTENANCE OF COMPONENT 
Lifecycle of component doesn’t end when component is released.
LINKS 
● How to Write a Good Chunk 
● How to Write a Good Snippet 
● Advanced Development 
● Developing an Extra in MODX Revolution 
● Creating a 3rd Party Component Build Script 
● MODExt 
● ExtJS 3.4 API Documentation 
● ExtJS 3.4 Examples
Thank you! 
COEX 
@coexcz 
facebook.com/coex.cz 
Jan Tezner 
@jantezner 
Prague, Czech Republic

Mais conteúdo relacionado

Mais procurados

(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...
(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...
(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...Web::Strategija
 
Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)Peter Arato
 
Nuxeo World Session: GWT Integration
Nuxeo World Session: GWT IntegrationNuxeo World Session: GWT Integration
Nuxeo World Session: GWT IntegrationNuxeo
 
Tech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareTech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareAlfresco Software
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportYouSee
 
Last Month in PHP - May 2016
Last Month in PHP - May 2016Last Month in PHP - May 2016
Last Month in PHP - May 2016Eric Poe
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with RustKnoldus Inc.
 
PUG ROMAGNA - Alternative a Magento2
PUG ROMAGNA - Alternative a Magento2PUG ROMAGNA - Alternative a Magento2
PUG ROMAGNA - Alternative a Magento2Giuseppe Morelli
 
Cynthia Wu: Satisfaction Not Guaranteed
Cynthia Wu: Satisfaction Not GuaranteedCynthia Wu: Satisfaction Not Guaranteed
Cynthia Wu: Satisfaction Not GuaranteedAnna Royzman
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you codeIzzet Mustafaiev
 
MongoDB Jump Start
MongoDB Jump StartMongoDB Jump Start
MongoDB Jump StartHaim Michael
 
React Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesReact Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesFabio Biondi
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)alexkingorg
 
Drupal BigPipe: What have I learned
Drupal BigPipe: What have I learnedDrupal BigPipe: What have I learned
Drupal BigPipe: What have I learnedRadim Klaška
 

Mais procurados (20)

(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...
(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...
(WS11) Dobrica Pavlinušić: HTML5TV - kako obraditi i objaviti predavanja na w...
 
Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)Drupal and contribution (2010 - 2011 / 2)
Drupal and contribution (2010 - 2011 / 2)
 
Nuxeo World Session: GWT Integration
Nuxeo World Session: GWT IntegrationNuxeo World Session: GWT Integration
Nuxeo World Session: GWT Integration
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
 
Tech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco shareTech talk live custom content viewers in alfresco share
Tech talk live custom content viewers in alfresco share
 
Volunteering at YouSee on Technology Support
Volunteering at YouSee on Technology SupportVolunteering at YouSee on Technology Support
Volunteering at YouSee on Technology Support
 
Last Month in PHP - May 2016
Last Month in PHP - May 2016Last Month in PHP - May 2016
Last Month in PHP - May 2016
 
WebAssembly with Rust
WebAssembly with RustWebAssembly with Rust
WebAssembly with Rust
 
Groovy and noteworthy
Groovy and noteworthyGroovy and noteworthy
Groovy and noteworthy
 
Neo4j Graph Database, from PHP
Neo4j Graph Database, from PHPNeo4j Graph Database, from PHP
Neo4j Graph Database, from PHP
 
Paas
PaasPaas
Paas
 
PUG ROMAGNA - Alternative a Magento2
PUG ROMAGNA - Alternative a Magento2PUG ROMAGNA - Alternative a Magento2
PUG ROMAGNA - Alternative a Magento2
 
Cynthia Wu: Satisfaction Not Guaranteed
Cynthia Wu: Satisfaction Not GuaranteedCynthia Wu: Satisfaction Not Guaranteed
Cynthia Wu: Satisfaction Not Guaranteed
 
Buildr - build like you code
Buildr -  build like you codeBuildr -  build like you code
Buildr - build like you code
 
MongoDB Jump Start
MongoDB Jump StartMongoDB Jump Start
MongoDB Jump Start
 
React Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive servicesReact Typescript for beginners: Translator app with Microsoft cognitive services
React Typescript for beginners: Translator app with Microsoft cognitive services
 
WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)WordPress Plugins (WordCamp Utah)
WordPress Plugins (WordCamp Utah)
 
Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3Nuxeo Web Engine - Embedding GFv3
Nuxeo Web Engine - Embedding GFv3
 
NoSQL
NoSQLNoSQL
NoSQL
 
Drupal BigPipe: What have I learned
Drupal BigPipe: What have I learnedDrupal BigPipe: What have I learned
Drupal BigPipe: What have I learned
 

Destaque

Cable coaxial
Cable coaxialCable coaxial
Cable coaxialcococoP
 
Prospects & Future Of Ice, Cse, Latest
Prospects & Future Of Ice, Cse, LatestProspects & Future Of Ice, Cse, Latest
Prospects & Future Of Ice, Cse, LatestFNian
 
El comercio entre méxico y china
El comercio entre méxico y chinaEl comercio entre méxico y china
El comercio entre méxico y chinaAlejandraViveros
 
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02Proyectoformativodesistemas11manco1 141030141335-conversion-gate02
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02cococoP
 

Destaque (7)

Cable coaxial
Cable coaxialCable coaxial
Cable coaxial
 
Voyages
VoyagesVoyages
Voyages
 
Despedida Breve
Despedida BreveDespedida Breve
Despedida Breve
 
Prospects & Future Of Ice, Cse, Latest
Prospects & Future Of Ice, Cse, LatestProspects & Future Of Ice, Cse, Latest
Prospects & Future Of Ice, Cse, Latest
 
El comercio entre méxico y china
El comercio entre méxico y chinaEl comercio entre méxico y china
El comercio entre méxico y china
 
Los planetas
Los planetasLos planetas
Los planetas
 
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02Proyectoformativodesistemas11manco1 141030141335-conversion-gate02
Proyectoformativodesistemas11manco1 141030141335-conversion-gate02
 

Semelhante a Best Practices in Component Development for MODX

Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausWomen in Technology Poland
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers WorkshopJody Garnett
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for BeginnersSean Prunka
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best PracitcesJustin Filip
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersJon Peck
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausWomen in Technology Poland
 
Django best practices
Django best practicesDjango best practices
Django best practicesAdam Haney
 
An introduction to Emulsify
An introduction to EmulsifyAn introduction to Emulsify
An introduction to Emulsifyvaluebound
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...mfrancis
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Paul McKibben
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composernuppla
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipsterJulien Dubois
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xWong Hoi Sing Edison
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and moreAcquia
 
Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Mario García
 

Semelhante a Best Practices in Component Development for MODX (20)

Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Architektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan KrausArchitektura html, css i javascript - Jan Kraus
Architektura html, css i javascript - Jan Kraus
 
GeoServer Developers Workshop
GeoServer Developers WorkshopGeoServer Developers Workshop
GeoServer Developers Workshop
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for Beginners
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Multiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for PublishersMultiplier Effect: Case Studies in Distributions for Publishers
Multiplier Effect: Case Studies in Distributions for Publishers
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Django best practices
Django best practicesDjango best practices
Django best practices
 
An introduction to Emulsify
An introduction to EmulsifyAn introduction to Emulsify
An introduction to Emulsify
 
Web components. Compose the web.
Web components. Compose the web.Web components. Compose the web.
Web components. Compose the web.
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
 
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
Help! I inherited a Drupal Site! - DrupalCamp Atlanta 2016
 
Bootstrap4 x pages
Bootstrap4 x pagesBootstrap4 x pages
Bootstrap4 x pages
 
Efficient development workflows with composer
Efficient development workflows with composerEfficient development workflows with composer
Efficient development workflows with composer
 
Workshop - E2e tests with protractor
Workshop - E2e tests with protractorWorkshop - E2e tests with protractor
Workshop - E2e tests with protractor
 
Devoxx : being productive with JHipster
Devoxx : being productive with JHipsterDevoxx : being productive with JHipster
Devoxx : being productive with JHipster
 
Drupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.xDrupal in 5mins + Previewing Drupal 8.x
Drupal in 5mins + Previewing Drupal 8.x
 
Drupal 8 improvements for developer productivity php symfony and more
Drupal 8 improvements for developer productivity  php symfony and moreDrupal 8 improvements for developer productivity  php symfony and more
Drupal 8 improvements for developer productivity php symfony and more
 
Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)Jbake workshop (Greach 2019)
Jbake workshop (Greach 2019)
 

Último

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 

Último (20)

Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 

Best Practices in Component Development for MODX

  • 1.
  • 2. Best Practices in Component Development Jan Tezner @jantezner Prague, Czech Republic
  • 3. ABOUT ME ● More than 10 years in PHP development ● 7 years experience with MODX ● CTO and Team Leader in COEX ● MODX Ambassador for Czech Republic ● One of organizers of Czech MODX Day 2013
  • 4. ABOUT COEX ● Established in 2006 ● Custom PHP & Python development ● 20 people in-house ● 100+ of MODX finished projects ● MODX Professional partner since 2011 ● Direct subcontractors of MODX LLC since 2012
  • 5. “We don't always give our clients what they originally wanted but we always bring them what their business really needs.“
  • 6. WHAT WILL FOLLOW AND WHAT NOT This is not an ultimate workflow, those are best practices we found in COEX in last couple of years. 1. What to consider before start 2. Environment setup 3. Development tips 4. Build of Transport Package 5. Testing 6. Release 7. Maintenance of Component 8. Links to other resources
  • 7. WHAT TO CONSIDER BEFORE START ● Clarify solution requirements ● Search for an existing solution ● Consider development for yourself or public use ● Find a good name for your component ● Consider support for old Revolution 2.2
  • 8. ENVIRONMENT SETUP - Folders .../somewhere/ /extjs/ /modx22t/ /modx23/ /modx23t/ /packages/ site webroot //localhost/ extjs debug files testing development testing components folders inside ExtJS 3.4 download link Put content of archive ./ext-3.4.0/src/ into /extjs/ folder
  • 9. ENVIRONMENT SETUP - MODX System Settings ● compress_js = No ● compress_css = No ● cache_disabled = Yes ● session_cookie_path = / } Or more easily by SQL Then don’t forget to: ● Manually delete all content in /core/cache/ folder ● Delete all cookies in the browser
  • 10. ENVIRONMENT SETUP - Package ● Don’t start from scratch ○ BxrExtra Yeoman generator ○ GitPackageManagement → ./_packages/ ● Use IDE for development → ● User your favorite browser :) ○ Console ○ Network logger
  • 11. ENVIRONMENT SETUP - PhpStorm For smooth development I strongly recommend to make following configurations for your component project. Tree > External Libraries Configure PHP Include Path ● /modx/connectors ● /modx/core/cache ● /modx/core/model ● /modx/core/xpdo ● /modx/manager/controllers ● /modx/manager/templates Settings > Javascript > Libraries ● modext /modx/manager/assets/modext/ ● extjs /extjs/
  • 12. ENVIRONMENT SETUP - .gitignore Don’t forget to ignore files which shouldn’t be located within your repository. E.g. config, uploaded, temporary or dev tools files. Link to .gitignore from Tagger
  • 13. DEVELOPMENT TIPS - General ● MODX Error log is your friend → use $modx->log(...); ● Clear cache often (on filesystem /core/cache/) ● Use xDebug Beware of backwards compatibility to 2.2 ● Javascript: MODx.config.connector_url only in 2.3 ● PHP: if ($modx->version[‘major_version’] < 3) { ... }
  • 14. DEVELOPMENT TIPS - Elements ● Use Static elements for development ● Try to not use nested Chunks → performance, readability ● Don’t hardcode strings into code, use Lexicons ● Snippets / Plugins shouldn’t contain HTML ● Don’t be lazy with creating snippet parameters ● Don’t hardcode “global” variables, use System or Context Settings
  • 15. BUILD OF PACKAGE ● Correctly use Semantic versioning ● Don’t forget to write changelog ● It is good practice to write date of release into readme and changelog ● Don’t forget to put short description and basic usage of component or its parts into readme ● Also put link to documentation into readme ● Readme should also contain version of MODX where you have tested your Component
  • 16. TESTING ● Test often and carefully in time of development ● Before release perform tests on clean MODX install ● Don’t forget to also test Component updates and uninstall ● Test on latest version of MODX ● Don’t test it only by yourself ○ Ask your colleague / friend to help ○ Ask the community
  • 17. RELEASE Great documentation makes great components, great components make money. ● Start at least with basic documentation with elementary description of snippet parameters ● Use standard place for documentation ● Make screenshots of visual parts ● Make a nice description for extras.modx.com ● Promote it to community
  • 18. MAINTENANCE OF COMPONENT Lifecycle of component doesn’t end when component is released.
  • 19. LINKS ● How to Write a Good Chunk ● How to Write a Good Snippet ● Advanced Development ● Developing an Extra in MODX Revolution ● Creating a 3rd Party Component Build Script ● MODExt ● ExtJS 3.4 API Documentation ● ExtJS 3.4 Examples
  • 20.
  • 21. Thank you! COEX @coexcz facebook.com/coex.cz Jan Tezner @jantezner Prague, Czech Republic