SlideShare une entreprise Scribd logo
1  sur  24
Joomla! Reborn: coding in version 1.5 Joe LeBlanc
It finally works the way you always wanted ,[object Object],[object Object],[object Object],[object Object],[object Object]
Goodbye Register Globals! ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Valid XHTML Transitional ,[object Object],[object Object],[object Object],$document =& JFactory::getDocument(); $document->addStyleSheet('path/to/style.css'); $document->addScript('path/to/script.js');
Streamlined Execution ,[object Object],[object Object],[object Object]
Streamlined Execution (contd.) Joomla! 1.5 $mainframe->route(); $Itemid = JRequest::getInt( 'Itemid'); $mainframe->authorize($Itemid); Joomla ! 1.0 if ( $option == 'com_content' && $Itemid === 0 ) { $id  = intval( mosGetParam( $_REQUEST, 'id', 0 ) ); $Itemid = $mainframe->getItemid( $id ); } if ( $Itemid === 0 ) { $query = "SELECT id" . " FROM #__menu" . " WHERE menutype = 'mainmenu'" . " AND published = 1" . " ORDER BY parent, ordering" ; $database->setQuery( $query, 0, 1 ); $Itemid = $database->loadResult(); }
Streamlined Execution (contd.) ,[object Object],[object Object],[object Object]
XML Configuration Improved ,[object Object],[object Object],[object Object]
Component Parameters Pulls from component XML
Modules are finally reusable! ,[object Object]
Modules are finally reusable! (contd.) Without title, default settings With title, default settings With title, button, and overridden default text
Joomla! 1.0 was “MVC lite” ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Real Model View Controller ,[object Object],[object Object],[object Object]
Models ,[object Object],[object Object]
Views ,[object Object],Joomla! 1.0 Joomla! 1.5
Views (contd.) ,[object Object]
Controllers ,[object Object],[object Object],[object Object]
Controllers (contd.) switch ($task) { case 'edit': editRecord($id); break; default: viewRecords(); break; } function editRecord($id) { ... } ... class RecordsController extends JController { function edit() { ... } function display() { parent::display(); } } Joomla! 1.0 Joomla! 1.5
Controllers - display() ,[object Object],[object Object],[object Object],[object Object],http://www.site.com/index.php?option=com_vegetables& view=list
Routing & SEF URLs ,[object Object],[object Object],[object Object],[object Object],[object Object]
router.php - Building Route function VegetablesBuildRoute(&$query) { $segments = array(); $segments[] = $query['view']; unset($query['view']); $segments[] = $query['page']; unset($query['page']); return $segments; }
router.php Parsing Route function VegetablesParseRoute($segments) { $vars = array(); $vars['view'] = $segments[0]; $vars['page'] = $segments[1]; return $vars; }
More information ,[object Object],[object Object],[object Object]
Shameless Plugs ,[object Object],[object Object],[object Object]

Contenu connexe

Tendances

Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Peter Martin
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
Bo-Yi Wu
 

Tendances (19)

Introducing jee7 – jsf 2
Introducing jee7 – jsf 2Introducing jee7 – jsf 2
Introducing jee7 – jsf 2
 
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
In The Brain of Cagatay Civici: Exploring JavaServer Faces 2.0 and PrimeFaces
 
[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법[FEConf Korea 2017]Angular 컴포넌트 대화법
[FEConf Korea 2017]Angular 컴포넌트 대화법
 
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
Developing a Joomla 3.x Component using RAD FOF- Part 1: Back-end - Joomladay...
 
Benefit of CodeIgniter php framework
Benefit of CodeIgniter php frameworkBenefit of CodeIgniter php framework
Benefit of CodeIgniter php framework
 
JBoss Seam vs JSF
JBoss Seam vs JSFJBoss Seam vs JSF
JBoss Seam vs JSF
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
 
Angular js routing options
Angular js routing optionsAngular js routing options
Angular js routing options
 
How routing works in angular js
How routing works in angular jsHow routing works in angular js
How routing works in angular js
 
Beyond PrettyFaces - Einführung in Rewrite
Beyond PrettyFaces - Einführung in RewriteBeyond PrettyFaces - Einführung in Rewrite
Beyond PrettyFaces - Einführung in Rewrite
 
Yerbabuena eRCP OSGi-based
Yerbabuena eRCP OSGi-basedYerbabuena eRCP OSGi-based
Yerbabuena eRCP OSGi-based
 
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)32. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
2. 엔티티 매핑(entity mapping) 2 2 엔티티매핑 2-2-4. 식별자 자동 생성(@generated-value)3
 
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
Uniface Lectures Webinar - Building Responsive Applications with Uniface: Dev...
 
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
Developing a Joomla 3.x Component using RAD/FOF - Joomladay UK 2014
 
PHP & MVC
PHP & MVCPHP & MVC
PHP & MVC
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
MVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web ApplicationsMVC Frameworks for building PHP Web Applications
MVC Frameworks for building PHP Web Applications
 
Bài 12: JSF-2 - Lập Trình Mạng Nâng Cao
Bài 12:  JSF-2 - Lập Trình Mạng Nâng CaoBài 12:  JSF-2 - Lập Trình Mạng Nâng Cao
Bài 12: JSF-2 - Lập Trình Mạng Nâng Cao
 
13.exemplu closure controller
13.exemplu closure controller13.exemplu closure controller
13.exemplu closure controller
 

En vedette

En vedette (6)

Happiness Is Voyage
Happiness Is VoyageHappiness Is Voyage
Happiness Is Voyage
 
Confesiones 1
Confesiones  1Confesiones  1
Confesiones 1
 
Tears Of A Woman
Tears Of A WomanTears Of A Woman
Tears Of A Woman
 
Masterclass Joomla15
Masterclass Joomla15Masterclass Joomla15
Masterclass Joomla15
 
Paisajes Andalucespps Parte 2
Paisajes Andalucespps  Parte 2Paisajes Andalucespps  Parte 2
Paisajes Andalucespps Parte 2
 
Joomla Creative Inside Joomla Templates And Design
Joomla Creative   Inside Joomla Templates And DesignJoomla Creative   Inside Joomla Templates And Design
Joomla Creative Inside Joomla Templates And Design
 

Similaire à Joomlapresentation

Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
Soós Gábor
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
Dilip Patel
 

Similaire à Joomlapresentation (20)

Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011Introduction to Plugin Programming, WordCamp Miami 2011
Introduction to Plugin Programming, WordCamp Miami 2011
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
 
Exploring Symfony's Code
Exploring Symfony's CodeExploring Symfony's Code
Exploring Symfony's Code
 
J query training
J query trainingJ query training
J query training
 
前端概述
前端概述前端概述
前端概述
 
Zend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_ToolZend Framework 1.9 Setup & Using Zend_Tool
Zend Framework 1.9 Setup & Using Zend_Tool
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
Wt unit 5
Wt unit 5Wt unit 5
Wt unit 5
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
Advance Component Development by Azrul Rahim
Advance Component Development by Azrul RahimAdvance Component Development by Azrul Rahim
Advance Component Development by Azrul Rahim
 
Working With The Symfony Admin Generator
Working With The Symfony Admin GeneratorWorking With The Symfony Admin Generator
Working With The Symfony Admin Generator
 
jQuery Tips Tricks Trivia
jQuery Tips Tricks TriviajQuery Tips Tricks Trivia
jQuery Tips Tricks Trivia
 
jQuery in the [Aol.] Enterprise
jQuery in the [Aol.] EnterprisejQuery in the [Aol.] Enterprise
jQuery in the [Aol.] Enterprise
 
Introduction To Code Igniter
Introduction To Code IgniterIntroduction To Code Igniter
Introduction To Code Igniter
 
IOC + Javascript
IOC + JavascriptIOC + Javascript
IOC + Javascript
 
jQuery
jQueryjQuery
jQuery
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
Javascript ui for rest services
Javascript ui for rest servicesJavascript ui for rest services
Javascript ui for rest services
 
Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5Simple module Development in Joomla! 2.5
Simple module Development in Joomla! 2.5
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 

Joomlapresentation

  • 1. Joomla! Reborn: coding in version 1.5 Joe LeBlanc
  • 2.
  • 3.
  • 4.
  • 5.
  • 6. Streamlined Execution (contd.) Joomla! 1.5 $mainframe->route(); $Itemid = JRequest::getInt( 'Itemid'); $mainframe->authorize($Itemid); Joomla ! 1.0 if ( $option == 'com_content' && $Itemid === 0 ) { $id = intval( mosGetParam( $_REQUEST, 'id', 0 ) ); $Itemid = $mainframe->getItemid( $id ); } if ( $Itemid === 0 ) { $query = "SELECT id" . " FROM #__menu" . " WHERE menutype = 'mainmenu'" . " AND published = 1" . " ORDER BY parent, ordering" ; $database->setQuery( $query, 0, 1 ); $Itemid = $database->loadResult(); }
  • 7.
  • 8.
  • 9. Component Parameters Pulls from component XML
  • 10.
  • 11. Modules are finally reusable! (contd.) Without title, default settings With title, default settings With title, button, and overridden default text
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18. Controllers (contd.) switch ($task) { case 'edit': editRecord($id); break; default: viewRecords(); break; } function editRecord($id) { ... } ... class RecordsController extends JController { function edit() { ... } function display() { parent::display(); } } Joomla! 1.0 Joomla! 1.5
  • 19.
  • 20.
  • 21. router.php - Building Route function VegetablesBuildRoute(&$query) { $segments = array(); $segments[] = $query['view']; unset($query['view']); $segments[] = $query['page']; unset($query['page']); return $segments; }
  • 22. router.php Parsing Route function VegetablesParseRoute($segments) { $vars = array(); $vars['view'] = $segments[0]; $vars['page'] = $segments[1]; return $vars; }
  • 23.
  • 24.