Manual icon indicating copy to clipboard operation
Manual copied to clipboard

Update basic-module.md

Open marcorensch opened this issue 1 year ago • 3 comments

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

marcorensch avatar May 07 '24 13:05 marcorensch

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.

robbiejackson avatar May 07 '24 15:05 robbiejackson

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...

marcorensch avatar May 07 '24 15:05 marcorensch

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

robbiejackson avatar May 07 '24 16:05 robbiejackson

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

  • Is the code logic efficient?

" --pr_reviewer.inline_code_comments=false

HLeithner avatar Jun 04 '24 11:06 HLeithner

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');

qodo-code-review[bot] avatar Jun 04 '24 11:06 qodo-code-review[bot]

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 avatar Jul 28 '24 08:07 robbiejackson

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

robbiejackson avatar Jul 28 '24 21:07 robbiejackson