Updated 4a. JCB Demo Component Directory, Folders and Files (markdown)
@@ -272,7 +272,7 @@ Beneath the directory structure and files presented next you will find a short e
|
|||||||
***
|
***
|
||||||
Always keep in mind, JCB is doing most of the tasks related to items below referring to Joomla directories, files, classes, methods and properties. You do not have to, for example, put an index.html file in the root of every directory; you are not required to add the check for direct access to the file; you do not have to write code for the admin or site views unless you extend JCB with your own custom code.
|
Always keep in mind, JCB is doing most of the tasks related to items below referring to Joomla directories, files, classes, methods and properties. You do not have to, for example, put an index.html file in the root of every directory; you are not required to add the check for direct access to the file; you do not have to write code for the admin or site views unless you extend JCB with your own custom code.
|
||||||
|
|
||||||
When combined with the leverage JCB has by reusing Joomla's MVC paradigm and adding the required structures and code to your own components required by Joomla! for you, a myriad of tasks are taken care of you would otherwise spend valuable time doing, instead of focusing on your own code and and the logic required for it to execute properly. That's where elimination of time spent with these types of repetitive tasks and coding while reusing the code in the Joomla! API, greatly reduces your project's time-line.
|
When combined with the leverage JCB has by reusing Joomla's MVC paradigm and adding the required structures and code to your own components required by Joomla! for you, a myriad of tasks are taken care of that you would otherwise spend valuable time doing, instead of focusing on your own code and and the logic required for it to execute properly. That's where elimination of time spent with these types of repetitive tasks and coding while reusing the code in the Joomla! API, greatly reduces your project's time-line.
|
||||||
|
|
||||||
Later, after viewing the remaining videos and the chapters that accompany each in this manual you'll have acquired mastery of even more JCB features and functions, not to mention the understanding and use of the Joomla! API in your own component's code.
|
Later, after viewing the remaining videos and the chapters that accompany each in this manual you'll have acquired mastery of even more JCB features and functions, not to mention the understanding and use of the Joomla! API in your own component's code.
|
||||||
***
|
***
|
||||||
@@ -284,8 +284,6 @@ defined('_JEXEC') or die('Restricted access');
|
|||||||
***
|
***
|
||||||
## \com_demo\demo.php
|
## \com_demo\demo.php
|
||||||
## NetBeans Debug Trace
|
## NetBeans Debug Trace
|
||||||
Joomla! Debug option, set in Joomla! Configuration will also provide this and now with Chrome XDEBUG mentioned earlier it has links to where the code resides. Also J!Dump boosts this using user supplied commands in code that dump variables and even more information about their contents, type, etc. Line numbers of where these Joomla! supplied classes, properties and methods may be found are at the end of each. Note how many paths there are to the Joomla! API supplied automatically by JCB in the component's code it produces in the installed JCB Demo package. JCB adds the code necessary and you trigger other code snippets to be written automatically by JCB to add features and functionality you choose to have in your own component. This includes the custom code snippets you added to it that are displayed in various JCB views as you build and edit a component.
|
|
||||||
|
|
||||||
* index.php.{main}:49
|
* index.php.{main}:49
|
||||||
* libraries/src/Application/CMSApplication.php.Joomla\CMS\Application\SiteApplication->execute:195
|
* libraries/src/Application/CMSApplication.php.Joomla\CMS\Application\SiteApplication->execute:195
|
||||||
* libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->doExecute:233
|
* libraries/src/Application/SiteApplication.php.Joomla\CMS\Application\SiteApplication->doExecute:233
|
||||||
@@ -294,9 +292,12 @@ Joomla! Debug option, set in Joomla! Configuration will also provide this and no
|
|||||||
* libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::executeComponent:382
|
* libraries/src/Component/ComponentHelper.php.Joomla\CMS\Component\ComponentHelper::executeComponent:382
|
||||||
* components/com_demo/demo.php.require_once:35
|
* components/com_demo/demo.php.require_once:35
|
||||||
|
|
||||||
The code that follows in the last bullet point in the above trace, demo.php has links to some Joomla! documentation that is outdated but file locations are still applicable. Joomla! has some extensive changes involving namespaces which it relies on heavily. Deprecated class names will be removed in Joomla! 5 so it is wise to use the new ones, aliased starting with Joomla! 3.8. Unfortunately, it is a bit tedious to find Joomla! paths for files containing its code at times. For example, the Joomla! Platform documentation is no longer maintained and Platform 14 is outdated plus obsolete. It is in the links since it has not been removed from current documentation and it is a great way to present it. Be sure you note and observe any changes in the current or future versions of Joomla! as code may break if Joomla! team removes it. Some links also point to older versions and archived material. Nonetheless, many are informative and many have constructs still in use and not described in current documentation. If a class for example or design pattern is obsolete now and deprecated it is indicated very clearly. These and [other changes](https://developer.joomla.org/news/703-joomla-3-8-beta-released-for-testing.html) should be reviewed in preparation for Joomla! 4. For now, they facilitate backwards compatibility allowing them to be used before the change becomes mandatory for your components to still work.
|
Some links may be outdated. For example, the Joomla! Platform documentation is no longer maintained and Platform 14 is outdated plus obsolete. It is in the links since it has not been removed from current documentation and at times Joomla! 2.5 is referenced since it still functions as the documentation states. Joomla! has some extensive changes involving namespaces which it relies on heavily and locations of class files vary by release, especially with Joomla! 4 name space changes .
|
||||||
|
|
||||||
A class file that is very important to facilitate this and is currently being used is the class map of aliases for classes that do not conform to the namespace naming convention. The file at \comdemo\libraries\classmap.php should be consulted when writing your own components. It has the locations and new standard naming for class files. The old ones will eventually be obsolete starting with Joomla! 5. They are currently deprecated and will log warnings in server log files. These are useful to allow cleaning them up eventually. Each line in the file has the path to the left that is aliased to the path on the right which is the deprecated one. Joomla! developers are using the namespace extensively and this conforms the classes to the new ones that should be used in your components sooner rather than later.
|
Deprecated class names will be removed in Joomla! 5 so it is wise to use the new ones, aliased starting with Joomla! 3.8. Be sure you note and observe any changes in the current or future versions of Joomla! as code may break if Joomla! team removes it. If a class for example or design pattern is obsolete now and deprecated it is indicated very clearly. These and [other changes](https://developer.joomla.org/news/703-joomla-3-8-beta-released-for-testing.html) should be reviewed in preparation for Joomla! 4. For now, they facilitate backwards compatibility allowing them to be used before the change becomes mandatory for your components to still work.
|
||||||
|
|
||||||
|
A class file that is very important to facilitate this and is currently being used is the class map of aliases for classes that do not conform to the namespace naming convention. The file at \libraries\classmap.php should be consulted when writing your own components. The path on the right has the locations and new standard naming for class files.
|
||||||
|
Be aware that if for eaxmple the path is indicated as JLoader::registerAlias('JControllerLegacy', '\\Joomla\\CMS\\MVC\\Controller\\BaseController', '5.0'); the physical path in Joomal! version 3.8.12 is \libraries\src\Application\BaseController.php; its class is BaseController which extends JObject. What one needs to recall is the old ones will eventually be obsolete starting with Joomla! 5. They are currently deprecated and will log warnings in server log files. These are useful to allow cleaning them up eventually. Each line in the file has the path to the left that is aliased to the path on the right which is the deprecated one. Joomla! developers are using the namespace extensively and this conforms the classes to the new ones that should be used in your components sooner rather than later.
|
||||||
|
|
||||||
- [Add unobtrusive JavaScript support to keep a tab state.](https://api.joomla.org/cms-3/classes/JHtmlBehavior.html#method_tabstate)
|
- [Add unobtrusive JavaScript support to keep a tab state.](https://api.joomla.org/cms-3/classes/JHtmlBehavior.html#method_tabstate)
|
||||||
\libraries\cms\html\behavior.php
|
\libraries\cms\html\behavior.php
|
||||||
|
Reference in New Issue
Block a user