nikosdion / joomla_extensions_development

Joomla Extensions Development: a reference book
GNU Free Documentation License v1.3
10 stars 1 forks source link

Joomla 4 namespaces corrected #27

Closed HermanPeeren closed 1 year ago

HermanPeeren commented 1 year ago

Pull Request for Issue #26 .

Namespaces corrected as used in Joomla 4:

The namespace part of the concepts section might start a little bit abstract, with words as "vendor namespace prefix" and "extension name". That was elaborated from the original text. Concrete examples are listed in following paragraph.

I added a railroad diagram for the namespaces. I think it can clarify things for some people (like me). tried to let it fit as much as possible to the colors in which the online book is published now. I used a png, but a svg or other formats can be provided too. But of course: I can remove it if you don't like it.

This diagram was made with https://www.bottlecaps.de/rr/ui with the BNF-rule:

JoomlaExtensionNamespace ::= VendorNamespace ((("\Component"|"\Module") "\"Extensionname ("\Administrator"|"\Site"|"\Api"))|("\Plugin"("\System"|"\Content"|("\"OtherPluginType)) "\"Extensionname))

Color: EC7B79 Original background was transparant and there were no margins; didn't work on a black background, hence the non-transparant white background (and added 20px margin).

I saw one more occasion of a custom plugin-namespace that started with \Joomla: in the chapter "Console plugins" (in components.xml), but I left it like that, because that is the actual namespace of that ATS plugin.

In plugins.xml I only made some minor changes, like changing "\Joomla" to "\Acme" in custom module and plugin namespaces, but the diff looks like I rewrote large pieces. I used XMLmind editor. For some reason the text was reformatted in a way that it disturbed the whole diff. Hope I didn't break anything. If necessary I'll redo that part, so you can more easily review the changes.

nikosdion commented 1 year ago

Thank you very much! This is great! I love the diagram :)