Joomla! Component Complexity         @juliopontes
What’s best for        you        depends on              your                  situation
It depends on                  the problem                        you need to solve                                       ...
Joomla!                        application                                                       architecture             ...
default                  component                                         architecture                         Component ...
software      ecommerce            component                                  functionalitiesCatalog                   Pro...
ecommerce             software                                 component                                                  ...
ecommerce   software            component                          functionalities             Customers             Compo...
ecommerce   software               component                                  functionalities                             ...
ecommerce   software               component                                        functionalities            Sales      ...
modular                        component                                                      architecture                ...
Understand                    Modular component                                             URLindex.php?option=com_ecomme...
understand                    Jcontroller(Legacy)                                                  getInstanceJController:...
Examples                          Jcontroller(Legacy)                                                  getInstanceInstanti...
Understand                   Modular component                                                Bootstrap.php-   Read Config...
Understand                      Modular component                                                    Logicindex.php?option...
Pseudo Code                        Modular component                                                  Bootstrap.phpindex.p...
File system        Default component                              architecture                     Attributes for Customer...
File system        Modular component                  architecture
File system        Modular component                                  architecture              Attributes for products   ...
Understand       Modular component                          Module file system             Repository of component modules...
Code       Modular component                               Standards         Component + Module + “Controller” + Controlle...
Code       Modular component                               Standards         EcommerceCatalogControllerTags         Ecomme...
Build your                         Modular component                                                          ExampleThis ...
Upcoming SlideShare
Loading in …5
×

Joomla Complex Component MVC Proposal

4,046 views

Published on

Using JMVC in a different way.

This should work on 1.5 but need some changes.

Published in: News & Politics
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,046
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
35
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Joomla Complex Component MVC Proposal

  1. Joomla! Component Complexity @juliopontes
  2. What’s best for you depends on your situation
  3. It depends on the problem you need to solve Modular Component Component Module Plugincomplexity
  4. Joomla! application architecture Site Application Components Component name Component name 2 component name 3 Controllers Controllers ControllersHelpers Models Helpers Models Helpers Models Views Views Views All components work together to build our site.
  5. default component architecture Component Controllers Helpers Models Viewsbut for a complex component how does it work? Lets think on a ecommerce component
  6. software ecommerce component functionalitiesCatalog Promotions Sales Customers Reports … How to start?
  7. ecommerce software component functionalities1. Separate your functionalities2. 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 InvoicesSystem Catalog Shipments Sales Credit Memos Transactions BillingReports Customers Agreements Terms and Conditions Promotion Tax
  10. ecommerce software component functionalities Sales ProductsSystem Catalog Categories Catalog AttributesReports Customers Attributes Sets Promotion Tags
  11. modular component architecture Component Component modules (folder) Module name Module name 2 Module name 3 Controllers Controllers ControllersHelpers Models Helpers Models Helpers Models Views Views Views All components modules work together and build our component.
  12. Understand Modular component URLindex.php?option=com_ecommerce&module=catalog&task=controller.task component Component module Task
  13. understand Jcontroller(Legacy) getInstanceJController::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) getInstanceInstantiations Master Controller Name ComponentJController::getInstance(‘Content’); ContentController com_contentJController::getInstance(‘Users’); UsersController com_usersJController::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 Logicindex.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.phpindex.php?option=com_ecommerce&module=catalogComponent = EcommerceModule = CatalogJController::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 ExampleThis 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 thatyou’ve found by using this architecture. THANK YOU!http://www.github.com/juliopontes/ecommerce-modular-component

×