Doing development within Joomla....

PHP Tools [?] extends Visual Studio with set of advanced features to work more efficiently with PHP code.

Doing development within Joomla....

Postby TheEdge » March 1st, 2018, 10:54 am

Hi,

I need to do some custom work in the Hikashop (https://www.hikashop.com) plugin.

Ultimately this will be a fresh install of Joomla with this component installed running on a Linux server in the cloud.

I am looking for suggestions for the best way to use PHP Tools in this scenario.

1) Do I setup a Windows LAMP install or do I access the Linux installation directly? Or should I create a local Linux VM with the same J! install and then "easily" publish to the remote machine? Does the publish mechanism detect changed files? Ideally I only want to sync any files from a) or b) below and not touch anything else in the Joomla install folder.
2) How should I configure my project in PHP Tools. Conceptually I will be:
a) Editing an existing php file(s) within the HikaShop plugin
b) Adding some extra PHP, JS files to support my changes in a)
As I want to "Run and Debug" do I include the entire Joomla folder tree as my project?

All pointers and suggestions greatly appreciated.
TheEdge
 
Posts: 3
Joined: March 1st, 2018, 10:39 am

Re: Doing development within Joomla....

Postby Miloslav Beno » March 5th, 2018, 9:59 am

Hello,

Thanks for the question.

There isn't right or wrong approach about this. But what I would do is to setup local environment so I can play with it locally and ten publish the results to the prouction, or staging first. If you have staging environment.

1.) To be as close as possible to the production environment I would setup Linux VM with the same J. Or if you do not want to hassle just go with Windows LAMP, it would work as well. But it's hard to realize all the differences there might be.

2.) You are going to create a new project from existing sources. Copy all the files including Joomla to some local folder and use this option to create a project. Then in project properties setup Custom server with url of LAMP or Linux server.

3.) If you are using Linux VM you want to setup publishing on Run. You can do it in the project properties as well. In the first run it will publish everything, but in the second it will update just changed files.

4.) You will be able to run and debug in both scenarios

This is development, then you want to push to production or staging.

There are so many options how to do this. e.g. We have a git setup with continous deployment to our staging server. When we think it's ready for production we just swap with with production slot.

This might be overkill for some project, but it works for us well. You might just want to copy the files to production or staging. You can do that as well. However we currently do not have a sync option, so first publish is always pushing the whole thing which you do not want do to at production, but you can do it to staging or you can publish to different directory in the production server if you really want to and then rename the directories. But it's not quite that nice as having staging environemnt :-)

But if you want to directly publish to the production, use other tool for deployment, e.g. WinSCP

Please let me know if you'd have any other question.
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Doing development within Joomla....

Postby TheEdge » March 6th, 2018, 7:38 am

Hi Miloslav,

Thanks that gives me a heap to work with. Is a better publish mechanism on the road map?
TheEdge
 
Posts: 3
Joined: March 1st, 2018, 10:39 am

Re: Doing development within Joomla....

Postby Miloslav Beno » March 6th, 2018, 8:19 am

Hi,

No problem, just ping us if you'd need anything or you would have some suggestions for us.

There are couple of improvements for the publish in the roadmap:
- 1.) initial publish will not be required, we would sync with the remote system
- 2.) Project from Remote sources wizard
- 3.) For production sync/publish it's not designed completly yet because we want to put emphasis on the good approach of doing things. We do not like to tweak with production environment directly, although we understand sometimes that's the process.

Any thoughts or suggestions are appreciated.

Thanks!
Miloslav Beno │ DEVSENSE s.r.o. │ @miloslavbenomiloslav@devsense.com
User avatar
Miloslav Beno
 
Posts: 1252
Joined: January 7th, 2012, 8:36 pm

Re: Doing development within Joomla....

Postby TheEdge » March 18th, 2018, 3:59 am

Hi Miloslav,

Having used other tools that implement 2) this makes development really simple.

The extension to 2) is that if this is via SSH or FTP then saves etc. automatically are on the target machine and running/debugging becomes seamless. Furthermore if say for example you were able then to *exclude* certain files or folders when doing this leaving you only with the files you are actually changing. So for instance if you are doing a plugin development on a J! system then I could link to that website and only include the plugin files (or folders) I am working on.

When it comes to publishing things I would then like to be able to setup a "publish step" similair to say what VS does for WebDeploy and IIS/.NET where I could then take the files I am working on and push them (sync them) to a production server.

The key here is to exactly determine which files from the larger system (J!) are being worked on. A nice feature here would be that if a file that was touched that was NOT part of the restricted set (say I mistakenly edited a J! core file) that this would trigger an error, ask me if I wanted to include this in the project etc.

By treating everything as file based whether it is local/ftp/ssh/webdav etc. makes for a smoother and consistent development experience IMHO.

Appreciate you allowing me to put in my 2c worth.
TheEdge
 
Posts: 3
Joined: March 1st, 2018, 10:39 am


Return to PHP Tools

Who is online

Users browsing this forum: No registered users and 63 guests

cron

User Control Panel

Login

Who is online

In total there are 63 users online :: 0 registered, 0 hidden and 63 guests (based on users active over the past 5 minutes)
Most users ever online was 256 on March 28th, 2024, 9:42 am

Users browsing this forum: No registered users and 63 guests