SlideShare a Scribd company logo
1 of 24
Joomla! Component Complexity

         @juliopontes
What’s best for
        you
        depends on
              your
                  situation
It depends on
                  the problem
                        you need to solve


                                             Modular
                                            Component
                                Component

             Module

  Plugin


complexity
Joomla!
                        application
                                                       architecture
                                Site Application

                                 Components

  Component name              Component name 2               component name 3

     Controllers                 Controllers                    Controllers
Helpers        Models       Helpers        Models          Helpers       Models
        Views                       Views                          Views



                   All components work together to build our site.
default
                  component
                                         architecture
                         Component

    Controllers    Helpers      Models          Views




but for a complex component how does it work?

       Lets think on a ecommerce component
software
      ecommerce
            component
                                  functionalities

Catalog                   Promotions



                  Sales
                                        Customers


  Reports
                            …




              How to start?
ecommerce             software
                                 component
                                                              functionalities
1. Separate your functionalities
2. List functionalities by “group”

                   Catalog        Customers      Promotions      …

                                      Manage
                    Products
                                     Customers

                                     Customers
                   Categories
                                      Groups


                    Attributes


                    Attributes
                       Sets


                      Tags
ecommerce   software
            component
                          functionalities
             Customers
             Component
  Sales
                             …
Component


              Ecommerce
               software
ecommerce   software
               component
                                  functionalities
                                             Orders
            Sales

                                            Invoices

System                 Catalog             Shipments




                                  Sales
                                          Credit Memos

                                          Transactions

                                             Billing
Reports               Customers           Agreements
                                           Terms and
                                           Conditions
          Promotion
                                              Tax
ecommerce   software
               component
                                        functionalities
            Sales                              Products

System                 Catalog                Categories




                                  Catalog
                                              Attributes

Reports               Customers             Attributes Sets

          Promotion
                                                 Tags
modular
                        component
                                                      architecture
                                 Component

                         Component modules (folder)

    Module name                Module name 2               Module name 3

     Controllers                Controllers                  Controllers
Helpers        Models      Helpers        Models        Helpers       Models
        Views                      Views                        Views



      All components modules work together and build our component.
Understand
                    Modular component
                                             URL

index.php?option=com_ecommerce&module=catalog&task=controller.task




               component          Component module        Task
understand
                    Jcontroller(Legacy)
                                                  getInstance


JController::getInstance(‘BASE_NAME’);

 1. Will search controller.php file in a base_path
 2. If not defined base_path will assume JPATH_COMPONENT
 3. Your master controller name should be “BASE_NAME” + “Controller”
Examples
                          Jcontroller(Legacy)
                                                  getInstance

Instantiations                         Master Controller Name   Component


JController::getInstance(‘Content’);      ContentController     com_content
JController::getInstance(‘Users’);        UsersController       com_users
JController::getInstance(‘Banners’);      BannersController     com_banners
Understand
                   Modular component
                                                Bootstrap.php


-   Read Configuration from config/module.php
-   Check if requested module are exists in folder structure
-   Define JPATH_COMPONENT_MODULE with module path
-   Define base_path as JPATH_COMPONENT_MODULE from JControllerLegacy
-   Use as base_name “COMPONENT” + “MODULE”
Understand
                      Modular component
                                                    Logic
index.php?option=com_ecommerce&module=catalog

                include                        Read config.
ecommerce.php              bootstrap.php                        config
                                                              module.php

                          Instantiate Controller

                                   folder


          MODULE                        MODULE                 MODULE
Pseudo Code
                        Modular component
                                                  Bootstrap.php
index.php?option=com_ecommerce&module=catalog


Component = Ecommerce
Module = Catalog

JController::getInstance(
    ‘EcommerceCatalog’,
    array(
          ‘base_path’ => JPATH_COMPONENT_MODULE
    )
);
File system
        Default component
                              architecture

                     Attributes for Customers, Products ???

              What relations between controllers ???
                           How to start to understand???


                               Questions?!
File system
        Modular component
                  architecture
File system
        Modular component
                                  architecture

              Attributes for products

              Products Management

              Tags for products
Understand
       Modular component
                          Module file system

             Repository of component modules
             Component Module Name
             Sub Controllers from Catalog Component Mod.
             Helpers from Catalog Component Module
             Models from Catalog Component Module
             Tables from Catalog Component Module
             Views from Catalog Component Module
             Master Controller
Code
       Modular component
                               Standards

         Component + Module + “Controller” + Controller Name

         Component + Module + “Helper”

         Component + Module + “Model” + Model Name

         Component + Module + “Table” + Table Name

         Component + Module + “View” + View Name
         Component + Module + “Controller”
Code
       Modular component
                               Standards

         EcommerceCatalogControllerTags

         EcommerceCatalogHelper

         EcommerceCatalogModelTags

         EcommerceCatalogTableTags

         EcommerceCatalogViewTags
         EcommerceCatalogController
Build your
                         Modular component
                                                          Example
This is a sample concept for development a complex software as a Joomla! component.
I’ve not interesting on continue development of this example.
The example its not fully implemented.
It just for show a better way “thinking out of box” How to build complex components.

If you use it, please feedback to community and share the solutions/problems that
you’ve found by using this architecture.




                             THANK YOU!
http://www.github.com/juliopontes/ecommerce-modular-component

More Related Content

Similar to Joomla Complex Component MVC Proposal

Comparing Joomla CCKs
Comparing Joomla CCKsComparing Joomla CCKs
Comparing Joomla CCKsJustin Herrin
 
Justin Herrin Comparing Joomla CCKs from jd12ne
Justin Herrin Comparing Joomla CCKs from jd12neJustin Herrin Comparing Joomla CCKs from jd12ne
Justin Herrin Comparing Joomla CCKs from jd12neJustin Herrin
 
Techdays 2013 the road to end user self service with service manager 2012
Techdays 2013   the road to end user self service with service manager 2012Techdays 2013   the road to end user self service with service manager 2012
Techdays 2013 the road to end user self service with service manager 2012CompuTrain. De IT opleider.
 
Techdays 2013 the road to end user self service with service manager 2012 SP1
Techdays 2013 the road to end user self service with service manager 2012 SP1Techdays 2013 the road to end user self service with service manager 2012 SP1
Techdays 2013 the road to end user self service with service manager 2012 SP1wwwally
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPSerge Smertin
 
Spagic 3: OSGi Universal Middleware for an effective SOA solution
Spagic 3: OSGi Universal Middleware for an effective SOA solution Spagic 3: OSGi Universal Middleware for an effective SOA solution
Spagic 3: OSGi Universal Middleware for an effective SOA solution SpagoWorld
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development Mage Guru
 
Select ex standfordproductinformation
Select ex standfordproductinformationSelect ex standfordproductinformation
Select ex standfordproductinformationalmeili
 
OMGi application store
OMGi application storeOMGi application store
OMGi application storetothtamas
 
Features and Context Overview
Features and Context OverviewFeatures and Context Overview
Features and Context Overviewbrentratliff
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Mathew Beane
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupKelly Mason
 
SelecEX Standford Marketing
SelecEX Standford MarketingSelecEX Standford Marketing
SelecEX Standford Marketingrleungym
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Alessandro Molina
 
TechEd 2012 NA - MGT332 - fighting fire to the cloud!
TechEd 2012 NA - MGT332 - fighting fire to the cloud!TechEd 2012 NA - MGT332 - fighting fire to the cloud!
TechEd 2012 NA - MGT332 - fighting fire to the cloud!wwwally
 

Similar to Joomla Complex Component MVC Proposal (20)

Comparing Joomla CCKs
Comparing Joomla CCKsComparing Joomla CCKs
Comparing Joomla CCKs
 
Introduction to Visualforce
Introduction to VisualforceIntroduction to Visualforce
Introduction to Visualforce
 
Onlineshopping
OnlineshoppingOnlineshopping
Onlineshopping
 
Justin Herrin Comparing Joomla CCKs from jd12ne
Justin Herrin Comparing Joomla CCKs from jd12neJustin Herrin Comparing Joomla CCKs from jd12ne
Justin Herrin Comparing Joomla CCKs from jd12ne
 
Techdays 2013 the road to end user self service with service manager 2012
Techdays 2013   the road to end user self service with service manager 2012Techdays 2013   the road to end user self service with service manager 2012
Techdays 2013 the road to end user self service with service manager 2012
 
Techdays 2013 the road to end user self service with service manager 2012 SP1
Techdays 2013 the road to end user self service with service manager 2012 SP1Techdays 2013 the road to end user self service with service manager 2012 SP1
Techdays 2013 the road to end user self service with service manager 2012 SP1
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHP
 
Spagic 3: OSGi Universal Middleware for an effective SOA solution
Spagic 3: OSGi Universal Middleware for an effective SOA solution Spagic 3: OSGi Universal Middleware for an effective SOA solution
Spagic 3: OSGi Universal Middleware for an effective SOA solution
 
Mageguru - magento custom module development
Mageguru -  magento custom module development Mageguru -  magento custom module development
Mageguru - magento custom module development
 
12 Amazing Features of Magento 2
12 Amazing Features of Magento 212 Amazing Features of Magento 2
12 Amazing Features of Magento 2
 
Select ex standfordproductinformation
Select ex standfordproductinformationSelect ex standfordproductinformation
Select ex standfordproductinformation
 
A guiding light for the processes in your private cloud
A guiding light for the processes in your private cloudA guiding light for the processes in your private cloud
A guiding light for the processes in your private cloud
 
OMGi application store
OMGi application storeOMGi application store
OMGi application store
 
Features and Context Overview
Features and Context OverviewFeatures and Context Overview
Features and Context Overview
 
Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2Madison PHP - Getting Started with Magento 2
Madison PHP - Getting Started with Magento 2
 
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento MeetupMagento 2.2: It's Coming Right For You! | Colorado Magento Meetup
Magento 2.2: It's Coming Right For You! | Colorado Magento Meetup
 
SelecEX Standford Marketing
SelecEX Standford MarketingSelecEX Standford Marketing
SelecEX Standford Marketing
 
Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2Rapid Prototyping with TurboGears2
Rapid Prototyping with TurboGears2
 
TechEd 2012 NA - MGT332 - fighting fire to the cloud!
TechEd 2012 NA - MGT332 - fighting fire to the cloud!TechEd 2012 NA - MGT332 - fighting fire to the cloud!
TechEd 2012 NA - MGT332 - fighting fire to the cloud!
 
Angular2 and You
Angular2 and YouAngular2 and You
Angular2 and You
 

Recently uploaded

Power in International Relations (Pol 5)
Power in International Relations (Pol 5)Power in International Relations (Pol 5)
Power in International Relations (Pol 5)ssuser583c35
 
15042024_First India Newspaper Jaipur.pdf
15042024_First India Newspaper Jaipur.pdf15042024_First India Newspaper Jaipur.pdf
15042024_First India Newspaper Jaipur.pdfFIRST INDIA
 
Political-Ideologies-and-The-Movements.pptx
Political-Ideologies-and-The-Movements.pptxPolitical-Ideologies-and-The-Movements.pptx
Political-Ideologies-and-The-Movements.pptxSasikiranMarri
 
Geostrategic significance of South Asian countries.ppt
Geostrategic significance of South Asian countries.pptGeostrategic significance of South Asian countries.ppt
Geostrategic significance of South Asian countries.pptUsmanKaran
 
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...The Lifesciences Magazine
 
11042024_First India Newspaper Jaipur.pdf
11042024_First India Newspaper Jaipur.pdf11042024_First India Newspaper Jaipur.pdf
11042024_First India Newspaper Jaipur.pdfFIRST INDIA
 
Emerging issues in migration policies.ppt
Emerging issues in migration policies.pptEmerging issues in migration policies.ppt
Emerging issues in migration policies.pptNandinituteja1
 
16042024_First India Newspaper Jaipur.pdf
16042024_First India Newspaper Jaipur.pdf16042024_First India Newspaper Jaipur.pdf
16042024_First India Newspaper Jaipur.pdfFIRST INDIA
 
13042024_First India Newspaper Jaipur.pdf
13042024_First India Newspaper Jaipur.pdf13042024_First India Newspaper Jaipur.pdf
13042024_First India Newspaper Jaipur.pdfFIRST INDIA
 
12042024_First India Newspaper Jaipur.pdf
12042024_First India Newspaper Jaipur.pdf12042024_First India Newspaper Jaipur.pdf
12042024_First India Newspaper Jaipur.pdfFIRST INDIA
 
lok sabha Elections in india- 2024 .pptx
lok sabha Elections in india- 2024 .pptxlok sabha Elections in india- 2024 .pptx
lok sabha Elections in india- 2024 .pptxdigiyvbmrkt
 

Recently uploaded (12)

Power in International Relations (Pol 5)
Power in International Relations (Pol 5)Power in International Relations (Pol 5)
Power in International Relations (Pol 5)
 
15042024_First India Newspaper Jaipur.pdf
15042024_First India Newspaper Jaipur.pdf15042024_First India Newspaper Jaipur.pdf
15042024_First India Newspaper Jaipur.pdf
 
Political-Ideologies-and-The-Movements.pptx
Political-Ideologies-and-The-Movements.pptxPolitical-Ideologies-and-The-Movements.pptx
Political-Ideologies-and-The-Movements.pptx
 
World Economic Forum : The Global Risks Report 2024
World Economic Forum : The Global Risks Report 2024World Economic Forum : The Global Risks Report 2024
World Economic Forum : The Global Risks Report 2024
 
Geostrategic significance of South Asian countries.ppt
Geostrategic significance of South Asian countries.pptGeostrategic significance of South Asian countries.ppt
Geostrategic significance of South Asian countries.ppt
 
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...
Mitochondrial Fusion Vital for Adult Brain Function and Disease Understanding...
 
11042024_First India Newspaper Jaipur.pdf
11042024_First India Newspaper Jaipur.pdf11042024_First India Newspaper Jaipur.pdf
11042024_First India Newspaper Jaipur.pdf
 
Emerging issues in migration policies.ppt
Emerging issues in migration policies.pptEmerging issues in migration policies.ppt
Emerging issues in migration policies.ppt
 
16042024_First India Newspaper Jaipur.pdf
16042024_First India Newspaper Jaipur.pdf16042024_First India Newspaper Jaipur.pdf
16042024_First India Newspaper Jaipur.pdf
 
13042024_First India Newspaper Jaipur.pdf
13042024_First India Newspaper Jaipur.pdf13042024_First India Newspaper Jaipur.pdf
13042024_First India Newspaper Jaipur.pdf
 
12042024_First India Newspaper Jaipur.pdf
12042024_First India Newspaper Jaipur.pdf12042024_First India Newspaper Jaipur.pdf
12042024_First India Newspaper Jaipur.pdf
 
lok sabha Elections in india- 2024 .pptx
lok sabha Elections in india- 2024 .pptxlok sabha Elections in india- 2024 .pptx
lok sabha Elections in india- 2024 .pptx
 

Joomla Complex Component MVC Proposal

  • 2. What’s best for you depends on your situation
  • 3. It depends on the problem you need to solve Modular Component Component Module Plugin complexity
  • 4. Joomla! application architecture Site Application Components Component name Component name 2 component name 3 Controllers Controllers Controllers Helpers Models Helpers Models Helpers Models Views Views Views All components work together to build our site.
  • 5. default component architecture Component Controllers Helpers Models Views but for a complex component how does it work? Lets think on a ecommerce component
  • 6. software ecommerce component functionalities Catalog Promotions Sales Customers Reports … How to start?
  • 7. ecommerce software component functionalities 1. Separate your functionalities 2. List functionalities by “group” Catalog Customers Promotions … Manage Products Customers Customers Categories Groups Attributes Attributes Sets Tags
  • 8. ecommerce software component functionalities Customers Component Sales … Component Ecommerce software
  • 9. ecommerce software component functionalities Orders Sales Invoices System Catalog Shipments Sales Credit Memos Transactions Billing Reports Customers Agreements Terms and Conditions Promotion Tax
  • 10. ecommerce software component functionalities Sales Products System Catalog Categories Catalog Attributes Reports Customers Attributes Sets Promotion Tags
  • 11. modular component architecture Component Component modules (folder) Module name Module name 2 Module name 3 Controllers Controllers Controllers Helpers Models Helpers Models Helpers Models Views Views Views All components modules work together and build our component.
  • 12. Understand Modular component URL index.php?option=com_ecommerce&module=catalog&task=controller.task component Component module Task
  • 13. understand Jcontroller(Legacy) getInstance JController::getInstance(‘BASE_NAME’); 1. Will search controller.php file in a base_path 2. If not defined base_path will assume JPATH_COMPONENT 3. Your master controller name should be “BASE_NAME” + “Controller”
  • 14. Examples Jcontroller(Legacy) getInstance Instantiations Master Controller Name Component JController::getInstance(‘Content’); ContentController com_content JController::getInstance(‘Users’); UsersController com_users JController::getInstance(‘Banners’); BannersController com_banners
  • 15. Understand Modular component Bootstrap.php - Read Configuration from config/module.php - Check if requested module are exists in folder structure - Define JPATH_COMPONENT_MODULE with module path - Define base_path as JPATH_COMPONENT_MODULE from JControllerLegacy - Use as base_name “COMPONENT” + “MODULE”
  • 16. Understand Modular component Logic index.php?option=com_ecommerce&module=catalog include Read config. ecommerce.php bootstrap.php config module.php Instantiate Controller folder MODULE MODULE MODULE
  • 17. Pseudo Code Modular component Bootstrap.php index.php?option=com_ecommerce&module=catalog Component = Ecommerce Module = Catalog JController::getInstance( ‘EcommerceCatalog’, array( ‘base_path’ => JPATH_COMPONENT_MODULE ) );
  • 18. File system Default component architecture Attributes for Customers, Products ??? What relations between controllers ??? How to start to understand??? Questions?!
  • 19. File system Modular component architecture
  • 20. File system Modular component architecture Attributes for products Products Management Tags for products
  • 21. Understand Modular component Module file system Repository of component modules Component Module Name Sub Controllers from Catalog Component Mod. Helpers from Catalog Component Module Models from Catalog Component Module Tables from Catalog Component Module Views from Catalog Component Module Master Controller
  • 22. Code Modular component Standards Component + Module + “Controller” + Controller Name Component + Module + “Helper” Component + Module + “Model” + Model Name Component + Module + “Table” + Table Name Component + Module + “View” + View Name Component + Module + “Controller”
  • 23. Code Modular component Standards EcommerceCatalogControllerTags EcommerceCatalogHelper EcommerceCatalogModelTags EcommerceCatalogTableTags EcommerceCatalogViewTags EcommerceCatalogController
  • 24. Build your Modular component Example This is a sample concept for development a complex software as a Joomla! component. I’ve not interesting on continue development of this example. The example its not fully implemented. It just for show a better way “thinking out of box” How to build complex components. If you use it, please feedback to community and share the solutions/problems that you’ve found by using this architecture. THANK YOU! http://www.github.com/juliopontes/ecommerce-modular-component