Best practices for Joomla extensions developers - Joomla Day 2013

  • Published on
    27-Jan-2015

  • View
    105

  • Download
    3

Embed Size (px)

DESCRIPTION

Do you write extensions for Joomla? Do it the *right* way. You will save time and make friends amongst fellow developers (because they won't hate you when they have to read your code). In this session we will share standards and suggestions about the best practices to adopt when you code your extensions. Based on a true story. Our own.

Transcript

  • 1. Joomla Extensions Development Best Practices Francesco Abeni GiBiLogic extensions.gibilogic.com

2. Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Hola, mundo! 3. Shameless self-promotion Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Francesco Abeni sPrintAddCSSPizzaBox 4. About this speech Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com The quality of code in the Joomlasphere 5. Today roadmap: Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Tools Files and folders Reuse software MVC Other tips Conclusions Feedback please! 6. No dev course Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 7. Our target Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Good = not bad Excellent = above the average Good is enough for today 8. Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 9. IDE basic features Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com multiple files edit syntax highlighting index for methods and variables autocompletion autoformatting compiler versioning / unit testing / phpdoc / ... 10. Some IDEs Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 11. Versioning Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com http://git-scm.com/book 12. Standard Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 13. Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 14. Everything in its right place Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Backend administrator components com_componentname componentname.xml componentname.php controllers models views 15. Everything in its right place Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Backend administrator components com_componentname ... config.xml install.php sql tables helpers 16. media com_componentname css js img components com_componentname componentname.php controllers models views Everything in its right place Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Frontend images com_componentname 17. Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com 18. CSS / JS Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Use existing libraries JavaScript MooTools (since Joomla 1.5) JQuery (since Joomla 2.5) CSS + JavaScript Bootstrap (since Joomla 3.x) P.S. got conflicts? Use JQueryEasy plugin. 19. CSS out of the door Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Don't:

...


...

Do: ...

...
...

.clearfix { } .fixedheight { height: 200px } 20. JS out of the door Francesco Abeni for GiBiLogic http://extensions.gibilogic.com - info@gibilogic.com Do: