Kunena 6.2.5 & module Kunena Latest 6.0.7 released

The Kunena team has announce the arrival of Kunena 6.2.5 [K 6.2.5] which is now available for download as a native Joomla extension for J! 4.3.x/4.4.x/5.0.x. This version addresses most of the issues that were discovered in K 6.1 / K 6.2 and issues discovered during the last development stages of K 6.2

This is for users to help other users, to discuss topics that are related to forum administration in general or problems in running Joomla. This is not the place to ask for Joomla support. If you want assistance with Joomla please ask at forum.joomla.org

Question How to develop Joomla extensions easily

More
4 years 2 months ago #1 by shoulders
I have posted this over at the Joomla forum but I was wondering what the Kunena Team's method was.

forum.joomla.org/viewtopic.php?f=727&t=975850

There might seem an obvious answer but please bear with me.

  • I am an amateur programmer
  • I understand PHP, Webhosting, MySQL etc..
  • I can use NetBeans, xampp ftp etc...
  • I can use GitHub (not too bad)
  • I can write Joomla modules and plugins
  • I have written my own CRM software ~30,000 lines of code

But I cannot work out how to develop Joomla extensions easily. There are 2 methods I have tried:

(1) Have the extension in a separate folder, develop/code it in this folder, and after every change, install the extension from this folder into Joomla to see if the changes work.
Pro
  • Code is all neat in a single folder (repo) and I can easily push the changes to Github
  • Changes can be logged in the IDE or github easily.
Con
  • I have to install the extension everytime I make changes to see if they work in Joomla and this can take time.


(2) Install a basic version of the plugin, translation files, config file and then develop the php files in place.
Con
  • I have to re-install the extension for the configuration to be updated
  • Re-installing will causes my changes to be wiped out
  • When I have made changes I have to manually copy them back to the source files in the repo
Pro
  • I can see most changes with a simple page refresh
  • Development is much quicker


These methods are not ideal. As soon as I try and develop a component I would not realistically be able to use the methods above. Is there a third way that will make this process easier that I have not figured out? perhaps a way to configure my IDE?

Any help would be appreciated

shoulders

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #2 by rich
I'm not a developer, so I'm not sure if I understand your question correctly.
Kunena will be developed on Github and when a developer creates a pull request, we can test this request with the Joomla Extension Patch Tester.
github.com/joomla-extensions/patchtester
github.com/joomla-extensions/patchtester/releases
Example: When is installed Kunena-dev on my test page and when a new pull request is available, I can load this change temporarily in my installation. So it's possible to test before you install or merge the pull requests.
Last edit: 4 years 2 months ago by rich.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #3 by ruud
Hi,

My 'weapon' of choice is Geany (IDE / Text Editor).
Every component / plugin / module I develop for joomla is in its own directory and in the folder structure of the zip file you need to install the component / plugin / etc.

For each component I have a phing file (build file) that will: 1. replace some tags (like version) throughout the code, minify, uglify, etc., 2. zip the directory so I have an installable zip file, 3 copy the files in the directory to the correct places on the (local) webserver

So when I do a change, I press (for Geany) F9 which will execute the phing file and will create the zip and do the copy, and i can test on my local webserver.

I could have also done it the other way around: develop on the webserver directory structure, so that when I save a change, it is automatically on the webserver without building the zip file.
The disadvantages here for me where: 1. you need to search for a file that you want to change in the complete joomla installation (1000+ of files), 2. when you add a file to your component, you must make sure that you adjust the logic to add it to the zip file for distribution

sharing = caring

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #4 by shoulders
very helpful to see how someone else does things. a quick followup:

1) do you copy the built zip file to joomla and then use joomla to install that zip file? if not how do you update configuration parameters?

2) do you have any websites I can go and look at phing?

3) do you use windows? I do.

My idea I am think about is to have each of my projects in a single folder (as i do now for github) but use symbolic links to map them to the correct location of my Joomla installation. When i need to update the configuration parameters I am going to make a modified installed from folder tab to only 'install' the configurations but not copy of the files.

This method allows me to update my extension in a github project for versioning and see the results live in joomla and for the occasional time i need to update those pesky config options I can use my modified 'install from folder tab'.

Creating the symbolic links/copy files I need to figure out how to automated this.

appreciate the info.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago #5 by ruud

shoulders wrote: very helpful to see how someone else does things. a quick followup:

1) do you copy the built zip file to joomla and then use joomla to install that zip file? if not how do you update configuration parameters?

You only need to install the created zip file on the first run, or use the discover method because the files are already copied to the webserver with the joomla install (via the phing script)

2) do you have any websites I can go and look at phing?


www.phing.info/

3) do you use windows? I do.

No, opensource all the way (linux / ubuntu)

My idea I am think about is to have each of my projects in a single folder (as i do now for github) but use symbolic links to map them to the correct location of my Joomla installation. When i need to update the configuration parameters I am going to make a modified installed from folder tab to only 'install' the configurations but not copy of the files.

This method allows me to update my extension in a github project for versioning and see the results live in joomla and for the occasional time i need to update those pesky config options I can use my modified 'install from folder tab'.

Creating the symbolic links/copy files I need to figure out how to automated this.

appreciate the info.

As said That is what the phing script does: it copies the files from the extension to the location on the webserver, no need to symlink, just a plain copy.
As for the configuration options: you should always do two things:
1. add a default value in the xml file where the configuration parameter is created, AND
2. when reading the parameter from the database, you MUST always take into account that this parameters is NOT in the saved settings for that installation (a user can just install the new version and not save the configuration): when reading the parameter also always pass the default value
Code:
$setting = $params->get('newparameter', 'defaultvalue');
that way parameters are always handled correctly, added or not.

sharing = caring

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #6 by xillibit

shoulders wrote: I have posted this over at the Joomla forum but I was wondering what the Kunena Team's method was.

Hello,

We work mostly with phstorm and eclipse IDE too, the process to develop on J! 4.0 or whatever the Joomla! version is, this is the example for a fresh install below :
  1. Do a clone locally of joomla repo from github, for j!4.0 you need to do a composer install and npm install
  2. Just follow the J! install process
  3. Make symlink between the clone of J! repo and the a new folder into wamp
  4. Do a clone locally of your own Kunena fork repo from github
  5. Install the Kunena build on the Joomla! installation
  6. Then we use a script which makes symlink between kunena clone and folders under wamp joomla installation
  7. When you work on new thing, just do a checkout from your folder of Kunena fork and when you have finished do a pull request
  8. Do a git pull on J! clone regulary to have last changes

The build process is based on ant which needs java and it's used for release, to build just when you want and for automated nightly build

For starting just follow the basic tutorial : docs.joomla.org/J3.x:Developing_an_MVC_C...ng_a_Basic_Component

I don't provide support by PM, because this can be useful for someone else.
Last edit: 4 years 2 months ago by xillibit.

Please Log in or Create an account to join the conversation.

More
4 years 2 months ago - 4 years 2 months ago #7 by shoulders
As ever I appreciate the help so I thought I would share with you my plugin that is now in testing, QWInstallerTab.

Quick Description:
A modified Joomla Installer that creates symbolic links to the source files rather that doing a hard copy allowing for developing directly on your local project folder. It also has the ability for you to set your own default install directory.

Long Description
It has a lot more options.

Tested On:
Windows 10, Xampp, Netbeans and Joomla! 3.9.14

This is not available just yet as I am finishing of the translations and just tidying the code a little more.

I welcome any feedback or thoughts.

Thanks

shoulders



P.S. Is it possible to get copies of your ANT and Phing files so i can experiment and see if i can tie them into my plugin? I appreciate you might not want to hand them out and in which case, no probs. I can learn quicker with a pre-built script rather than from scratch.
Attachments:
Last edit: 4 years 2 months ago by shoulders.

Please Log in or Create an account to join the conversation.

More
10 months 6 days ago - 10 months 6 days ago #8 by clod
I prefer to use CodeLobster IDE for it.
Last edit: 10 months 6 days ago by clod.

Please Log in or Create an account to join the conversation.

Time to create page: 0.378 seconds