XF 2.1 WHich editor and which concept you use?

Robert9

Well-known member
I still dont know which is the best system to work. I had Windows / Linux on two computers till now.

When i work with KOMODO i change the files/write code directly at the server. Also i set my breakpoints in that files at the server.

When i have worked with PHPSTORM i need to change/code at my harddisc, upload (automatically) and set the breakpoints also local.

Now i have installed WSL und the new PHPSTORM 19.3.
As project dir i have set

C:\Users\Name\AppData\Local\Packages\CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc\LocalState\rootfs\var\www\html

but i am not shure if this is possible to have only these files, because i understand theat PHPSTORM wants to have local and remote files.
I will see it this night, maybe.


But here is still my question how do you work?

Local files (win) to code, upload, remote files (linux) for xdebug
WSL local files = remote files? Possible? (i am afraid about file permissions)
Pure Linux; local files = remote files, maybe possible with KOMODO on linux?
Win + Komdo; local files (win) and remote files (linux), but change code at remote.


I like the idea to work directly in the web-root; to have all files only one time, while since now i dont know how to.
 
After years of developing using VMware, I swapped to using a remote development server - mostly so I could just leave it running and not have things break when Windows decided to force a reboot on my dev machine overnight. It also allows me to swap to developing on my laptop when I'm working away from the office. My dev machine is a powerful workstation which drives a triple monitor display - something my laptop can't do.

I use a hosted VPS which is built (almost) identically to my production servers running a LEMP stack with other development tools available that aren't on my production servers. My VPS provider has an external firewall system which I can easily configure using their web interface, so the dev machine is not accessible to anyone else.

I use PhpStorm on Windows to develop and sync files between the server and local - I use Atlassian Sourcetree as a Git GUI which requires that files be local for me to check them in and manage them.

I've developed a system which is a little cumbersome and requires me to be pretty strict with my development processes - but it works well and has some other benefits as well.

The main gotcha is that you have to remember to sync changes made on the server back to the local filesystem so you can check them into source control. So any template / listener / phrase / etc changes need to be sync'd and any time you run a CLI dev command (eg create / bump / build / etc), you'll also need to sync the changes.

I also develop using two branches - I have a develop branch which I sync all the _output files to and a master branch which I sync all the _data files to. This requires a strict development process because you need to merge the branches before building a release.

This two-branch approach isn't strictly necessary anymore with the XF 2.1 install addons from zip files functionality. I developed this process when I was using automated deployment tools (aTech Deploy) to push addon updates out to my production servers and didn't want to have dev output files on production servers.

Now I find it's actually much quicker and easier to just deploy addons by hand using the zip file installs - especially with the build.json file allowing me to manipulate the release files to update composer requirements before deployment and so on.

I might actually re-assess whether it's worth continuing with using two branches for development - it would simplify things significantly reverting back to using a single branch.

I'm not necessarily recommending that you take the same that I do to development using a remote server - I'm sure there's an easier way of doing things that might suit you better - but I'm happy with my approach for now.

One thing I will never do is run XAMPP locally - I tried that once and it messed up my system pretty badly. I prefer to develop in a Linux environment too - since my production servers are all Linux, I can build and test tools on my dev server that I can also run on my production servers.

I've not spent enough time with WSL to work out whether it would do the job I need. Either way - it's nice to keep my dev machine somewhat cleaner by not having a virtual machine / vagrant install happening locally.

PS. have you seen the Scotch Box instructions in the dev documentation? https://xenforo.com/xf2-docs/dev/#setting-up-a-local-server - it might give you what you need?
 
Thank you. :)

My Linux server is Ubuntu Server 18.4 on a Lenovo x200t from 1867; after solving some issues, i can work with PHP Storm / Komodo and Windows VS or Netbean. But most of time i use Komodo to code directly on the server.

The WSL is now running on a AMD R5 3600, 32GB, M2 without Defender, and it works really nice and without any waiting time or problems.
Here i have now the new PHPSTORM to use the new functions for WSL.

My question is still, how can i use only one time an XF without any upload or download.

Maybe i should try the whole thing on a linux machine without windows oronlyon windows. Till now i have not tried it. Maybe with komodo it is possible to have only one version of XF, while the PHPSTORM gives my much, much more information.

What i also miss is to go back in a script. :)
 
Back
Top Bottom