SlideShare a Scribd company logo
1 of 31
Download to read offline
JLayout..
for extension developers
Start using future Joomla renderer today
Dedicated to Manuel Rubio
● Died 15th May 2015
● Opensource lover
● Joomla spanish magazine contributor
● Spanish translator / coordinator
● JUG Barcelona member
@mannuelru
About me
● PHP / Javascript Freelance
● PHP developer since 2010
● Joomla! lover & contributor since 2011
● Top 25 Joomla CMS contributors
● Opensource lover
● Linux user
● Git for everything
● Gulp all the things
@phproberto
¿What is JLayout?
● Rendering system
● Contributed by Yannick Gaultier
● Initially created to render sidebar
● A renderer that is now better than a
lot of other existing renderers
● The future of Joomla!
● Long way to walk
What can I use JLayout for?
● Render modules
● Render plugins
● Render component views
● Render fields
● Render anything!
Where can I find it?
JLayout include paths
Enable debug mode to see where your
layout is being loaded from
JLayout supports overriding by default
JLayout advantages
● Used in core
● Reusability
● Overridable
● Data / View separation
● Debuggable
● Data & layouts inheritance
● Cacheable
● Extensible
How is JLayout helping core?
● Remove dependencies (Mootools, Bootstrap2)
● Customise all the markup
● Custom modals
● Follow best practices
● Replaceable renderer
● Extension customisations
How is it used?
Layout to render
Example: article.tags
Layout Data
Example: array(‘article’ => $item)
Layouts base path
Example: JPATH_SITE .
/plugins/content/myplugin/layouts’
Options
Example: array(‘debug’ => true)
Complex usage
What should I use?
● In classes instances
● In layouts helpers
Handy PHP functions: extract()
Avoid things like:
$displayData[‘view’]->doSomething();
Handy PHP functions: compact()
Best practices
● Always pass data to layouts as an array
● Send only required data
● Use global debug mode
● Divide layouts in smaller parts
○ article
○ article.title
○ article.description.introtext
Best practices: Think JLayout
● An article can be shown in a module like in a view.
● Form layouts can be shared in front & backend
● An article slider can be shown in a category and in
a module.
● Same markup can be styled differently depending
in container.
○ <div class=”article-box”>
■ <h2 class=”article-title”>Joomla!</h2>
Best practices: Comment layout vars
Templaters don’t know the logic behind your app!
Best practices: Extend JLayout
Not for templaters!
Best practices: Extend JLayout (II)
Helper will use our own renderer
Best practices: getRenderer()
Best practices: getLayoutPaths()
Best practices: getLayoutData()
Best practices: getLayoutData() II
Extending data
JLayout for fields
Fields can use a different layout in form settings
Same field logic used to render things differently, add JS
libraries, etc.
JLayout for fields II
Try to use your own prefix
JLayout for libraries
● If it outputs HTML it has to be overridable
● If it loads assets templaters need to control it
JLayout with AJAX
● Return rendered information
● Load more items in a module
with lazyload / button click
● Change grid / list view
● Display forms where needed
JLayout with AJAX: Example
JLayout for templates
● Same markup. Your standard?
● Your layouts can be used in
multiple overrides without
changing them.
● Forms wherever you need them
● Layouts for different frameworks
JLayout for modules
● Debug switcher
● Module layouts inheritance
● Live module layout switcher with
com_ajax + JLayout
● AJAX to load more slider images
JLayout for plugins
● Debug switcher
● Finally your plugin is overridable
● Plugins can be shown differently
in different components.
● Plugins can reuse base component
layouts to render articles,etc.
That’s all!
Questions?

More Related Content

What's hot

Bloc TechTalk - How to Setup Your Android Development Environment
Bloc TechTalk - How to Setup Your Android Development EnvironmentBloc TechTalk - How to Setup Your Android Development Environment
Bloc TechTalk - How to Setup Your Android Development EnvironmentPrasid Pathak
 
Moodley Session #02 - pattern libraries
Moodley Session #02 - pattern librariesMoodley Session #02 - pattern libraries
Moodley Session #02 - pattern librariesmariosom
 
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)Luis Rivera
 
[NijmegenJS] Node.js - 2014/04/25
[NijmegenJS] Node.js - 2014/04/25[NijmegenJS] Node.js - 2014/04/25
[NijmegenJS] Node.js - 2014/04/25jvdheijden
 
Can android be an http server
Can android be an http server Can android be an http server
Can android be an http server 中條 剛
 
Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcampDSCMESCOE
 
Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1Muhammad Ghazali
 
Configure python and wsgi
Configure python and wsgiConfigure python and wsgi
Configure python and wsgiSitthykun LY
 
(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan Price(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan PriceRyan Price
 
Using twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensionsUsing twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensionsRoberto Segura
 
Master your debugger
Master your debuggerMaster your debugger
Master your debuggerPaul Comanici
 
Teach yourself Ruby on Rails
Teach yourself Ruby on RailsTeach yourself Ruby on Rails
Teach yourself Ruby on Railspatrikbona
 
GDG Varna - When Android Meets Maps
GDG Varna - When Android Meets MapsGDG Varna - When Android Meets Maps
GDG Varna - When Android Meets MapsDimitar Danailov
 
Translating Fedora Documentation: Indonesian Team Perspective
Translating Fedora Documentation: Indonesian Team PerspectiveTranslating Fedora Documentation: Indonesian Team Perspective
Translating Fedora Documentation: Indonesian Team PerspectiveAndika Triwidada
 
Plugins on word press
Plugins on word pressPlugins on word press
Plugins on word pressKoombea
 

What's hot (19)

Bloc TechTalk - How to Setup Your Android Development Environment
Bloc TechTalk - How to Setup Your Android Development EnvironmentBloc TechTalk - How to Setup Your Android Development Environment
Bloc TechTalk - How to Setup Your Android Development Environment
 
Moodley Session #02 - pattern libraries
Moodley Session #02 - pattern librariesMoodley Session #02 - pattern libraries
Moodley Session #02 - pattern libraries
 
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
Tetuan Valley Startup School - Guest mentor Angel Luis Quesada (Kubide)
 
[NijmegenJS] Node.js - 2014/04/25
[NijmegenJS] Node.js - 2014/04/25[NijmegenJS] Node.js - 2014/04/25
[NijmegenJS] Node.js - 2014/04/25
 
Scrum introduction
Scrum introductionScrum introduction
Scrum introduction
 
Git intro fajar muslim
Git intro fajar muslimGit intro fajar muslim
Git intro fajar muslim
 
Can android be an http server
Can android be an http server Can android be an http server
Can android be an http server
 
Webdev bootcamp
Webdev bootcampWebdev bootcamp
Webdev bootcamp
 
Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1Introduction to Google Web Toolkit - part 1
Introduction to Google Web Toolkit - part 1
 
Configure python and wsgi
Configure python and wsgiConfigure python and wsgi
Configure python and wsgi
 
(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan Price(some) Drupal Theming by Ryan Price
(some) Drupal Theming by Ryan Price
 
Using twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensionsUsing twig as rendering system for your Joomla extensions
Using twig as rendering system for your Joomla extensions
 
Master your debugger
Master your debuggerMaster your debugger
Master your debugger
 
Teach yourself Ruby on Rails
Teach yourself Ruby on RailsTeach yourself Ruby on Rails
Teach yourself Ruby on Rails
 
RealDay: Angular.js
RealDay: Angular.jsRealDay: Angular.js
RealDay: Angular.js
 
GDG Varna - When Android Meets Maps
GDG Varna - When Android Meets MapsGDG Varna - When Android Meets Maps
GDG Varna - When Android Meets Maps
 
TypeScript
TypeScriptTypeScript
TypeScript
 
Translating Fedora Documentation: Indonesian Team Perspective
Translating Fedora Documentation: Indonesian Team PerspectiveTranslating Fedora Documentation: Indonesian Team Perspective
Translating Fedora Documentation: Indonesian Team Perspective
 
Plugins on word press
Plugins on word pressPlugins on word press
Plugins on word press
 

Similar to JLayout for extension developers

Hong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8thHong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8thWong Hoi Sing Edison
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesAcquia
 
Contributions: what they are and how to find them
Contributions: what they are and how to find themContributions: what they are and how to find them
Contributions: what they are and how to find themPedro Cambra
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master BuilderPhilip Norton
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsIztok Smolic
 
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...DevDay.org
 
The Workflow Methodology to Train Your Team on Drupal 8
The Workflow Methodology to Train Your Team on Drupal 8The Workflow Methodology to Train Your Team on Drupal 8
The Workflow Methodology to Train Your Team on Drupal 8Acquia
 
Android Modularization
Android ModularizationAndroid Modularization
Android ModularizationYoung-Hyuk Yoo
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsLeapfrog Technology Inc.
 
Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Peter Martin
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyMarcos Labad
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...Peter Martin
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to DjangoKnoldus Inc.
 
Joomla! future #jd14fr keynote
Joomla! future #jd14fr keynoteJoomla! future #jd14fr keynote
Joomla! future #jd14fr keynoteRoberto Segura
 
Joomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksJoomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksSaurabh Shah
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.jsEugene Vozniuk
 
UX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONUX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONDrupalCamp Kyiv
 
Boltc CMS - a really quick overview
Boltc CMS - a really quick overviewBoltc CMS - a really quick overview
Boltc CMS - a really quick overviewdantleech
 
Complexity Simplified? (Seblod CCK walk through)
Complexity Simplified? (Seblod CCK walk through)Complexity Simplified? (Seblod CCK walk through)
Complexity Simplified? (Seblod CCK walk through)Joomla Day South Africa
 

Similar to JLayout for extension developers (20)

Hong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8thHong Kong Drupal User Group - 2014 March 8th
Hong Kong Drupal User Group - 2014 March 8th
 
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 MinutesSpeedrun: Build a Website with Panels, Media, and More in 45 Minutes
Speedrun: Build a Website with Panels, Media, and More in 45 Minutes
 
Contributions: what they are and how to find them
Contributions: what they are and how to find themContributions: what they are and how to find them
Contributions: what they are and how to find them
 
Becoming A Drupal Master Builder
Becoming A Drupal Master BuilderBecoming A Drupal Master Builder
Becoming A Drupal Master Builder
 
Drupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 monthsDrupal 8, tricks and tips learned from the first 6 months
Drupal 8, tricks and tips learned from the first 6 months
 
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
[DevDay2018] Liferay DXP – A powerful Enterprise Solution - By Vy Bui, Develo...
 
The Workflow Methodology to Train Your Team on Drupal 8
The Workflow Methodology to Train Your Team on Drupal 8The Workflow Methodology to Train Your Team on Drupal 8
The Workflow Methodology to Train Your Team on Drupal 8
 
Android Modularization
Android ModularizationAndroid Modularization
Android Modularization
 
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and PatternsFRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns
 
Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014Problemen oplossen in Joomla - Joomladagen 2014
Problemen oplossen in Joomla - Joomladagen 2014
 
Joomla - CMS
Joomla - CMSJoomla - CMS
Joomla - CMS
 
Implementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing CompanyImplementing a Symfony Based CMS in a Publishing Company
Implementing a Symfony Based CMS in a Publishing Company
 
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
JUG Utrecht 2013 - Have you tried turning it off and on again? Problemen oplo...
 
Introduction to Django
Introduction to DjangoIntroduction to Django
Introduction to Django
 
Joomla! future #jd14fr keynote
Joomla! future #jd14fr keynoteJoomla! future #jd14fr keynote
Joomla! future #jd14fr keynote
 
Joomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of FrameworksJoomla! Templates and Comparison of Frameworks
Joomla! Templates and Comparison of Frameworks
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.js
 
UX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATIONUX DURING MODULE INSTALLATION AND CONFIGURATION
UX DURING MODULE INSTALLATION AND CONFIGURATION
 
Boltc CMS - a really quick overview
Boltc CMS - a really quick overviewBoltc CMS - a really quick overview
Boltc CMS - a really quick overview
 
Complexity Simplified? (Seblod CCK walk through)
Complexity Simplified? (Seblod CCK walk through)Complexity Simplified? (Seblod CCK walk through)
Complexity Simplified? (Seblod CCK walk through)
 

More from Roberto Segura

TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensionsRoberto Segura
 
Joomla Entity - API semántica para Joomla
Joomla Entity - API semántica para JoomlaJoomla Entity - API semántica para Joomla
Joomla Entity - API semántica para JoomlaRoberto Segura
 
Uso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomlaUso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomlaRoberto Segura
 
Plugin para-joomla-45-minutos
Plugin para-joomla-45-minutosPlugin para-joomla-45-minutos
Plugin para-joomla-45-minutosRoberto Segura
 
Introducción a la programación para joomla
Introducción a la programación para joomlaIntroducción a la programación para joomla
Introducción a la programación para joomlaRoberto Segura
 
Git for joomla! development #JAB14
Git for joomla! development #JAB14Git for joomla! development #JAB14
Git for joomla! development #JAB14Roberto Segura
 
Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!Roberto Segura
 

More from Roberto Segura (7)

TDD for joomla extensions
TDD for joomla extensionsTDD for joomla extensions
TDD for joomla extensions
 
Joomla Entity - API semántica para Joomla
Joomla Entity - API semántica para JoomlaJoomla Entity - API semántica para Joomla
Joomla Entity - API semántica para Joomla
 
Uso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomlaUso de tecnologías modernas en joomla
Uso de tecnologías modernas en joomla
 
Plugin para-joomla-45-minutos
Plugin para-joomla-45-minutosPlugin para-joomla-45-minutos
Plugin para-joomla-45-minutos
 
Introducción a la programación para joomla
Introducción a la programación para joomlaIntroducción a la programación para joomla
Introducción a la programación para joomla
 
Git for joomla! development #JAB14
Git for joomla! development #JAB14Git for joomla! development #JAB14
Git for joomla! development #JAB14
 
Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!Introduccción a la programación en Joomla!
Introduccción a la programación en Joomla!
 

Recently uploaded

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
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
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
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
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 

Recently uploaded (20)

Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
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...
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
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)
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 

JLayout for extension developers

  • 1. JLayout.. for extension developers Start using future Joomla renderer today
  • 2. Dedicated to Manuel Rubio ● Died 15th May 2015 ● Opensource lover ● Joomla spanish magazine contributor ● Spanish translator / coordinator ● JUG Barcelona member @mannuelru
  • 3. About me ● PHP / Javascript Freelance ● PHP developer since 2010 ● Joomla! lover & contributor since 2011 ● Top 25 Joomla CMS contributors ● Opensource lover ● Linux user ● Git for everything ● Gulp all the things @phproberto
  • 4. ¿What is JLayout? ● Rendering system ● Contributed by Yannick Gaultier ● Initially created to render sidebar ● A renderer that is now better than a lot of other existing renderers ● The future of Joomla! ● Long way to walk
  • 5. What can I use JLayout for? ● Render modules ● Render plugins ● Render component views ● Render fields ● Render anything!
  • 6. Where can I find it?
  • 7. JLayout include paths Enable debug mode to see where your layout is being loaded from JLayout supports overriding by default
  • 8. JLayout advantages ● Used in core ● Reusability ● Overridable ● Data / View separation ● Debuggable ● Data & layouts inheritance ● Cacheable ● Extensible
  • 9. How is JLayout helping core? ● Remove dependencies (Mootools, Bootstrap2) ● Customise all the markup ● Custom modals ● Follow best practices ● Replaceable renderer ● Extension customisations
  • 10. How is it used? Layout to render Example: article.tags Layout Data Example: array(‘article’ => $item) Layouts base path Example: JPATH_SITE . /plugins/content/myplugin/layouts’ Options Example: array(‘debug’ => true)
  • 11. Complex usage What should I use? ● In classes instances ● In layouts helpers
  • 12. Handy PHP functions: extract() Avoid things like: $displayData[‘view’]->doSomething();
  • 13. Handy PHP functions: compact()
  • 14. Best practices ● Always pass data to layouts as an array ● Send only required data ● Use global debug mode ● Divide layouts in smaller parts ○ article ○ article.title ○ article.description.introtext
  • 15. Best practices: Think JLayout ● An article can be shown in a module like in a view. ● Form layouts can be shared in front & backend ● An article slider can be shown in a category and in a module. ● Same markup can be styled differently depending in container. ○ <div class=”article-box”> ■ <h2 class=”article-title”>Joomla!</h2>
  • 16. Best practices: Comment layout vars Templaters don’t know the logic behind your app!
  • 17. Best practices: Extend JLayout Not for templaters!
  • 18. Best practices: Extend JLayout (II) Helper will use our own renderer
  • 22. Best practices: getLayoutData() II Extending data
  • 23. JLayout for fields Fields can use a different layout in form settings Same field logic used to render things differently, add JS libraries, etc.
  • 24. JLayout for fields II Try to use your own prefix
  • 25. JLayout for libraries ● If it outputs HTML it has to be overridable ● If it loads assets templaters need to control it
  • 26. JLayout with AJAX ● Return rendered information ● Load more items in a module with lazyload / button click ● Change grid / list view ● Display forms where needed
  • 28. JLayout for templates ● Same markup. Your standard? ● Your layouts can be used in multiple overrides without changing them. ● Forms wherever you need them ● Layouts for different frameworks
  • 29. JLayout for modules ● Debug switcher ● Module layouts inheritance ● Live module layout switcher with com_ajax + JLayout ● AJAX to load more slider images
  • 30. JLayout for plugins ● Debug switcher ● Finally your plugin is overridable ● Plugins can be shown differently in different components. ● Plugins can reuse base component layouts to render articles,etc.