Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: Joomla\CMS\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Input/Input.php on line 31

Deprecated: Joomla\CMS\Input\Cookie implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Input/Cookie.php on line 21

Deprecated: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /homepages/13/d380392445/htdocs/Jlive/libraries/src/Uri/Uri.php on line 141
library - Macrotone Blogs

Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.

Using a custom Joomla library in your components

We were aware of an article written by Roberto Segura which covers the use of libraries in ones; own written components.  This addresses (in one way) a conclusion that there was a certain amount of duplication particularly in the language strings but also in code that is used both in the front end of a Joomla site and in the back end of the site.

We have been ‘playing’ (for want of another word) with the concept in a new component that we are developing and are very pleased with the way that it is shaping up.  We had already made changes in some of our later components to use the back end language strings in preference to the front end language files, and also where ever possible use the Joomla globally defined strings, but the use of a specific component library can aid in the use of language strings but also in the use of common code, without the need for adding additional code to include specific files by making use of the Joomla library autoloader.

We thought it was worth sharing this with our readers as even though we have been using Joomla for many years there is still much more to learn and discover. This is after all another one of the things we like about Joomla.

Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries