joomla / Manual

Joomla Developer Documentation
28 stars 57 forks source link

Update basic-module.md #263

Closed marcorensch closed 3 months ago

marcorensch commented 6 months ago

Wrote the most simple example for the new structure and gave some hints about the helper and additional Models

robbiejackson commented 6 months ago

Hi Marco, I appreciate the effort of contributing to the documentation but I'm actual working on the module tutorial at the moment. See pull request 261.

marcorensch commented 6 months ago

Hi Robbie oh... my fault, I should have checked that first... At first glance - you really are doing a step-by-step tutorial - do you think that the two can coexist? Mine is not using mod_example.php file but the service.php which should also be pointed out...

robbiejackson commented 6 months ago

I haven't finished the tutorial series yet and will be including steps on the service provider file as well as on ajax and update server.

But there are lots of other documents to update for recent Joomla versions if you're keen, eg several at https://docs.joomla.org/API_Guides.

Also pull request 259 gives some help with documenting for the manual

HLeithner commented 5 months ago

/review --pr_reviewer.extra_instructions=" In the possible issues section, emphasize the following:

codiumai-pr-agent-pro[bot] commented 5 months ago

PR Review 🔍

⏱️ Estimated effort to review [1-5] 4, due to the extensive changes across multiple files and the complexity of integrating new module structures, manifest files, and service providers in Joomla. The PR involves XML and PHP code which requires careful review to ensure compatibility and adherence to Joomla standards.
🧪 Relevant tests No
⚡ Possible issues Efficiency Concern: The `getMessage` method in `ExampleHelper` retrieves a message directly from module parameters without any caching mechanism. This could lead to performance issues if the module is loaded multiple times on a page or in scenarios with high traffic, as each module instance would perform the parameter retrieval independently.
🔒 Security concerns No
Code feedback:
relevant fileversioned_docs/version-5.1/building-extensions/modules/basic-module.md
suggestion       Consider adding caching for the message retrieval in the `ExampleHelper` class to improve efficiency. This can be done by storing the retrieved message in a session or a static variable if the message retrieval is expensive or the same across multiple instances. [important]
relevant line$message = $params->get('my-message', 'Fallback Message can be noted here');

robbiejackson commented 3 months ago

Yes, I think this can coexist with the tutorial. I'm going to try to change it (first time doing that!) and then merge it.

robbiejackson commented 3 months ago

Merged as https://github.com/joomla/Manual/pull/289 Thanks Marco!