--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/62e47e41-3e57-447b-b105-fcb910c3f864n%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Joomla! General Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/joomla-dev-general/jtbFd1CL4oc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/ab269340d59688248b77f3248afe5b42297a1634.camel%40gmail.com.
You don't package the same library with multiple different components.
The basis of a library to install once and be used by many.
Regarding the use of language strings, there's already good documentation on this subject.
You can check inside Joomla table to know what components are
installed and manage dependencies this way.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/ab269340d59688248b77f3248afe5b42297a1634.camel%40gmail.com.
You don't package the same library with multiple different components.
The basis of a library to install once and be used by many.
Regarding the use of language strings, there's already good documentation on this subject.
You can check inside Joomla table to know what components are installed and manage dependencies this way.
See answer below...
On Wed, 2021-03-31 at 12:34 -0400, Polyna-Maude R.-Summerside wrote:You don't package the same library with multiple different components.
Well if the component depends on the library, you have to package them together - you are not going to require the user to install the library first separately. What I see big developers doing is have a mechanism during install preflight to check that the install will not downgrade an existing library install, and if the version in the package is later than what (if any) is currently installed then go ahead and install it over the top (upgrade) of the earlier version.
Does mean you have to tack care to ensure new versions of the library are backward compatible with anything that might be in the field.
You said the solution in your own question...
What you called "big developer" are simply "developer using
library".
Yes if you change stuff on your way, and end up with outdated library you'll have problem later on if you don't make sure of compatibility.
This is the basis of all complex software solutions. And one reason there's a thing called "Dependency hell" in Windows !
Maybe it's not worth saving some disk space for making your system overly complex if you don't master all of the development practice related to dependency management.
I don't see that many Joomla components / modules / etc using library and those who do (example JD Social Login / JD Social Share) are mostly using outside library that don't interface directly with Joomla.
You can always add some abstraction layer if needed, that's
called a shim.
The basis of a library to install once and be used by many.
Yes, but see aboveRegarding the use of language strings, there's already good documentation on this subject.
Well I've not been able to find where to put language files that are independent of any one component. I suppose you could create a dummy component with just the language and css files and package that with each individual component (again with version checking on install) then all of the components could use the dummy component language files (and media/css) but that seems a bit clunky
I've not been able to find how to access a language file in with library that is not tied to a specific component. I think it is possible for css, but JText and JHtml expect language files to belong to an extension don't they? Or can a library include a language file reference in its xml - but where will JInstall put it so that other extensions can access it?
Can you point to the relevant document please?
https://docs.joomla.org/Loading_extra_language_files
https://docs.joomla.org/Creating_a_language_definition_file
To know where does Joomla look for a language file :
https://github.com/joomla/joomla-cms/blob/3.9.25/libraries/src/Language/Text.php
There's a alias that register JText as Text.
In my case there are a small number of strings that are specific to each component, and a vast number that are common across components. So each component has to have its own language file in the normal way; but it seems very wasteful (and difficult to maintain) to have all the common stuff be duplicated in each component's own language file.
You can check inside Joomla table to know what components are installed and manage dependencies this way.
Yep, but when I tested it it is between 10 and 100 times faster to check a session variable than to hit the database to look up if an extension is installed and enabled every time you need to (which may be fairly often if you are sharing a data table between components). So I try and check the database only once per session and set a session variable unless I have to be absolutely sure that the other component hasn't been changed in the meantime (although regular install/uninstall does change the session variable but something silly might happen)
No doubt it's faster to check a session variable than to check something in the database.
But we are getting really far from the initial talk here.
You check for component installed and dependency (in this case the library) at the moment you install them or remove them.
So there's not much of a issue on the time it take. Because
anyway, the installation of a component require interaction with
the library.
Roger
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/21bcd3fb8866cf18ff7b0c609b8e7b5ec9c9a8a0.camel%40gmail.com.
Hi !
Maybe you wanna explain better what you are trying to build ?
If you give me example I could better give you a answer.
For example when is it better to simply reuse code and when is it better to go for the library options.
What else is possible to do (custom hack)...
I felt my first answer may sound a bit rude...
Sorry for this.
Don't hesitate if you got questions.
If you want, I can leave you my professional website (Running Joomla).
It's quite ugly but if you go there and register then we'll be able to exchange private email.
I just don't want to leave my email here because I know some scanning robots may pick it up...
I know it's ugly but I'm really not a web designer, everything that seem close to be artistic is quite hard for me. I'm a more into code development and for a while being doing security assessment (PCI-DSS).
Hope this help you out.
--
You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/21bcd3fb8866cf18ff7b0c609b8e7b5ec9c9a8a0.camel%40gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Joomla! General Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/joomla-dev-general/jtbFd1CL4oc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/2f0265a3-d3ca-af82-e918-b57b052cff32%40gmail.com.