Efficient workflow for developing extensions?

For Joomla! 3.x Coding related discussions, please use: http://groups.google.com/group/joomla-dev-general

Moderator: ooffick

Forum rules
Please use the mailing list here: http://groups.google.com/group/joomla-dev-general rather than this forum.
Post Reply
Dawnbringer
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 29, 2020 1:23 pm

Efficient workflow for developing extensions?

Post by Dawnbringer » Sun Mar 29, 2020 1:26 pm

Hey there! I'm facing an issue when developing a Joomla extension, every time I change something in the code, I've to change the version number then repack the extension, and install it again. This becomes time-consuming after hours of work. Does anyone have a suggestion for a more efficient way?

Thanks in advance.

 
User avatar
AlexVega
Joomla! Hero
Joomla! Hero
Posts: 2393
Joined: Fri Aug 28, 2015 6:13 am
Location: México

Re: Efficient workflow for developing extensions?

Post by AlexVega » Sun Mar 29, 2020 4:20 pm

Hi there,

Welcome to the Forum, Are you developing a component?, plugin?, template?...

In the case of component please take a look to this info:
https://docs.joomla.org/J3.x:Developing ... Versioning

Dawnbringer
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 29, 2020 1:23 pm

Re: Efficient workflow for developing extensions?

Post by Dawnbringer » Sun Mar 29, 2020 8:25 pm

AlexVega wrote:
Sun Mar 29, 2020 4:20 pm
Hi there,

Welcome to the Forum, Are you developing a component?, plugin?, template?...

In the case of component please take a look to this info:
https://docs.joomla.org/J3.x:Developing ... Versioning
Forgot about that, it's a plugin.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38459
Joined: Sat Apr 05, 2008 9:58 pm

Re: Efficient workflow for developing extensions?

Post by Webdongle » Sun Mar 29, 2020 9:20 pm

Decide what you want the plugin to do
Use pen and paper to write down the steps
Look for the code corresponding to the steps you want.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8980
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Efficient workflow for developing extensions?

Post by sozzled » Sun Mar 29, 2020 10:03 pm

Dawnbringer wrote:
Sun Mar 29, 2020 1:26 pm
I'm facing an issue when developing a Joomla extension, every time I change something in the code, I've to change the version number then repack the extension, and install it again. This becomes time-consuming after hours of work. Does anyone have a suggestion for a more efficient way?
I know the feeling! :)

When I'm developing a new extension for J! I have a folder on my PC where I store the files that will be used and, at the beginning of the development, I "package the extension" and install it on the target website where I'll be carrying out my tests. So, that's one time where I need to package and install (even if only to test that the extension installs).

One of the drawcards to writing plugins and modules for J! is that they're easier to develop than more extensive products such as components or templates. Plugins and modules usually involve about half-a-dozen files. Most of testing work usually discovers a problem or fault with one file or another. In my opinion, it really doesn't matter if we're discussing plugins, templates, components, modules, languages, packages or any other kind of extension. The approach is the same: one file at a time.

So, as an "efficient" way of managing the amount of time that one might spend in developing a Joomla extension, I build the installation package first, install it once (on a test site), test it, make my changes to one file at a time, upload the changed files one-at-time and, after I'm happy with the way the tests have been going, it is then that I build a new installation package and go through the procedure again.

Of course, depending on the complexity of the extension, one can sometimes spend considerable time in changing one or two lines of code! However, there's no need to repackage the whole extension each time one is debugging one line of code. The simplest approach (that will save hours of waste) is to change the code on the test site and after doing that, maybe, then decide to release the extension as a new version.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38459
Joined: Sat Apr 05, 2008 9:58 pm

Re: Efficient workflow for developing extensions?

Post by Webdongle » Mon Mar 30, 2020 1:37 am

I edit the files on my PC and transfer them to the test site. That makes it easier to package the final extension and prevents having two different versions of the same file.

If you use notepad++ you can undo saved changes then re-edit, save again, upload and retest ;)

I also use Wamp on my PC and have two folder windows open. That way is just drag/drop from the development folder to the relevant localhost folder. imho that's quicker than ftp to a host server :D
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Achaa
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Mon Jul 29, 2013 8:25 pm

Re: Efficient workflow for developing extensions?

Post by Achaa » Mon Mar 30, 2020 2:54 pm

Perhaps I'm missing something here, but why not use Git?
"Experts often possess more data than judgement."
All suggestions are given with good intent.
http://arbitrarytimes.com Where I test stuff.... :pop

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38459
Joined: Sat Apr 05, 2008 9:58 pm

Re: Efficient workflow for developing extensions?

Post by Webdongle » Mon Mar 30, 2020 3:11 pm

Because the question was about workflow not collaborating with others.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Achaa
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 153
Joined: Mon Jul 29, 2013 8:25 pm

Re: Efficient workflow for developing extensions?

Post by Achaa » Mon Mar 30, 2020 3:15 pm

Webdongle wrote:
Mon Mar 30, 2020 3:11 pm
Because the question was about workflow not collaborating with others.
Well that comment makes no sense. I use Git for exactly this reason.
"Experts often possess more data than judgement."
All suggestions are given with good intent.
http://arbitrarytimes.com Where I test stuff.... :pop

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38459
Joined: Sat Apr 05, 2008 9:58 pm

Re: Efficient workflow for developing extensions?

Post by Webdongle » Mon Mar 30, 2020 6:24 pm

Sledge hammer to crack a nut maybe.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

Dawnbringer
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 29, 2020 1:23 pm

Re: Efficient workflow for developing extensions?

Post by Dawnbringer » Mon Apr 06, 2020 10:41 am

sozzled wrote:
Sun Mar 29, 2020 10:03 pm
Dawnbringer wrote:
Sun Mar 29, 2020 1:26 pm
I'm facing an issue when developing a Joomla extension, every time I change something in the code, I've to change the version number then repack the extension, and install it again. This becomes time-consuming after hours of work. Does anyone have a suggestion for a more efficient way?
I know the feeling! :)

When I'm developing a new extension for J! I have a folder on my PC where I store the files that will be used and, at the beginning of the development, I "package the extension" and install it on the target website where I'll be carrying out my tests. So, that's one time where I need to package and install (even if only to test that the extension installs).

One of the drawcards to writing plugins and modules for J! is that they're easier to develop than more extensive products such as components or templates. Plugins and modules usually involve about half-a-dozen files. Most of testing work usually discovers a problem or fault with one file or another. In my opinion, it really doesn't matter if we're discussing plugins, templates, components, modules, languages, packages or any other kind of extension. The approach is the same: one file at a time.

So, as an "efficient" way of managing the amount of time that one might spend in developing a Joomla extension, I build the installation package first, install it once (on a test site), test it, make my changes to one file at a time, upload the changed files one-at-time and, after I'm happy with the way the tests have been going, it is then that I build a new installation package and go through the procedure again.

Of course, depending on the complexity of the extension, one can sometimes spend considerable time in changing one or two lines of code! However, there's no need to repackage the whole extension each time one is debugging one line of code. The simplest approach (that will save hours of waste) is to change the code on the test site and after doing that, maybe, then decide to release the extension as a new version.
make my changes to one file at a time, upload the changed files one-at-time
So, can I do that? I'm currently working a single-php file plugin, so for example can I just replace the file thru SSH or FTP instead of repacking, versioning in XML, and reinstalling? That would save some time if yes.

Dawnbringer
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Mar 29, 2020 1:23 pm

Re: Efficient workflow for developing extensions?

Post by Dawnbringer » Mon Apr 06, 2020 10:43 am

Achaa wrote:
Mon Mar 30, 2020 2:54 pm
Perhaps I'm missing something here, but why not use Git?
Git is nice, but I can't see the use of it on this case. I mean, even if I use git, I still need to repack the files into a zip, change version in XML, then reinstall/update the extension in Joomla, and that takes a lot of time.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 38459
Joined: Sat Apr 05, 2008 9:58 pm

Re: Efficient workflow for developing extensions?

Post by Webdongle » Mon Apr 06, 2020 11:30 am

Dawnbringer wrote:
Mon Apr 06, 2020 10:41 am
... for example can I just replace the file thru SSH or FTP instead of repacking, versioning in XML, and reinstalling? That would save some time if yes.
imho that makes things complicated. Edit the master files on the computer with notepad++ and upload the edited master file(s). You can undo the edits in notepad++ and reupload. No need to change the version number because it is the same version. When you want to work on a newer version(at a later date) then create a folder for the new/improved version and copy the master files to that new folder edit the version number there. But for now just keep one set of master files with one version number.

methinks using localhost (like wamp) is quicker than remote host because drag/drop a copy (with two File Explorer windows open) is faster that ftp to the remote host. Also methinks less complicated.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8980
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Efficient workflow for developing extensions?

Post by sozzled » Mon Apr 06, 2020 7:12 pm

Dawnbringer wrote:
Mon Apr 06, 2020 10:41 am
So, can I do that? I'm currently working a single-php file plugin, so for example can I just replace the file thru SSH or FTP instead of repacking, versioning in XML, and reinstalling? That would save some time if yes.
Yes. Simple. Efficient. That's what I do sometimes.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

 

Post Reply

Return to “Joomla! 3.x Coding”