It depends on the problem you need to solve Modular Component Component Module Plugincomplexity
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.
default component architecture Component Controllers Helpers Models Viewsbut for a complex component how does it work? Lets think on a ecommerce component
software ecommerce component functionalitiesCatalog Promotions Sales Customers Reports … How to start?
ecommerce software component functionalities1. Separate your functionalities2. List functionalities by “group” Catalog Customers Promotions … Manage Products Customers Customers Categories Groups Attributes Attributes Sets Tags
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”
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”
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”
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
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.