Faster ways of developing for magento 2
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
2
down vote
favorite
What platforms do Magento 2 developers use to code live? By this I mean, make a change and view it in browser as soon as I save my file. I was thinking that I could use Nano to create files and do everything from command line. For my own live site, development is very slow as I have to:
1.) Download the file I wish to change from Filezilla
2.) Make changes to the file
3.) Re-upload the file to filezilla
4.) Terminal commands to upgrade and clear caches
This cannot be the most efficient way to develop surely. What do the rest of you do in order to develop for a live dev website?
magento2 development websites
add a comment |Â
up vote
2
down vote
favorite
What platforms do Magento 2 developers use to code live? By this I mean, make a change and view it in browser as soon as I save my file. I was thinking that I could use Nano to create files and do everything from command line. For my own live site, development is very slow as I have to:
1.) Download the file I wish to change from Filezilla
2.) Make changes to the file
3.) Re-upload the file to filezilla
4.) Terminal commands to upgrade and clear caches
This cannot be the most efficient way to develop surely. What do the rest of you do in order to develop for a live dev website?
magento2 development websites
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
What platforms do Magento 2 developers use to code live? By this I mean, make a change and view it in browser as soon as I save my file. I was thinking that I could use Nano to create files and do everything from command line. For my own live site, development is very slow as I have to:
1.) Download the file I wish to change from Filezilla
2.) Make changes to the file
3.) Re-upload the file to filezilla
4.) Terminal commands to upgrade and clear caches
This cannot be the most efficient way to develop surely. What do the rest of you do in order to develop for a live dev website?
magento2 development websites
What platforms do Magento 2 developers use to code live? By this I mean, make a change and view it in browser as soon as I save my file. I was thinking that I could use Nano to create files and do everything from command line. For my own live site, development is very slow as I have to:
1.) Download the file I wish to change from Filezilla
2.) Make changes to the file
3.) Re-upload the file to filezilla
4.) Terminal commands to upgrade and clear caches
This cannot be the most efficient way to develop surely. What do the rest of you do in order to develop for a live dev website?
magento2 development websites
magento2 development websites
asked yesterday
Greg
10710
10710
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday
add a comment |Â
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday
add a comment |Â
5 Answers
5
active
oldest
votes
up vote
3
down vote
There are all sorts of ways to handle this.
But, you should try to avoid doing code-editing and deploy the new code on live environment directly. The risk of introducing a bug is great since there has not been any non-live environment testing. And there is the reason that you mentioned: terminal commands, cache flush on live and other overhead repetitive activities that you want avoided.
One way is to place the code under .git (use github.com for example). The repository that you will have is merely a common ground for establishing a, so called, FLOW, between the live site and and development ones.
These links might be a good starting point to get to know the idea:
https://devdocs.magento.com/guides/v2.0/cloud/basic-information/starter-develop-deploy-workflow.html
https://github.com/rotati/wiki/wiki/How-we-use-master,-staging-and-stable-branch-in-Github
A tip: it is NOT as complicated as it looks. And, maybe these are not the best links to look at. But after this, you know what to look/search for.
And if you have no GIT experience, at the end, you will have GIT added to your skill set :)
add a comment |Â
up vote
3
down vote
Thinking that your questions is more about working on remote environments, so my answer centers around this.
The nowdays most used PHP IDE is PHPStorm, but other traditional IDEs are similar in this.
They have a remote deployment setting, which allows you to upload/sync files directly on save. Thats quite powerfull.
Or if you are more crazy, you can run such an IDE via X-Forwarding with SSH on the remote server. (this aproach has issues, and requires a few more things on the server)
We have for several years now also IDEs, which are made to be run on a remote server, and used over a webbrowser.
The first one is "cloud9 IDE", which was recently bought by Amazon and is now also available as an AWS service.
They originally were openSource, but I dont know the state of this.
https://aws.amazon.com/cloud9/?origin=c9io
The other now bigger one is Eclipse CHE, which is more about having a dedicated Docker setups managed over the IDE.
https://www.eclipse.org/che/
add a comment |Â
up vote
1
down vote
This one is newer https://github.com/rotati/wiki/wiki/Deployment-and-QA-Workflow
I use Kubuntu so:
a) You can use bitbucket is free for non public repo instead GIT.
b) For file editing I use Kate with plugin for sessions , with ssh connection (PHPStorm is not free)
c) for fast access to console Yakuake
c) digitalocean with droplets (cheaper cloud server)
d) enable developer mode via command line and change server caching to browser in magento settings.
e) for PSD to code very helpful apps Zeplin or Avocade or AdobeXD
add a comment |Â
up vote
1
down vote
In addition to the great answers already given, I would like to add another perspective. For the sake of the point I'm trying to make I'm gonna assume that the tools you mention are the only tools at your disposal. Disclaimer: You really should not edit 'live code' directly, as others have pointed out. This is just to illustrate my point.
Programming is all about automating things that otherwise would have to be done manually. This includes your own workflow. You say that you already work with the command line, so consider this:
Almost all OS's have a command line ftp client already installed, these offer most of the functionality of filezilla, be it without a gui.
So let's say we want to upload a file to the remote server, we are going to do something like this from the command line:
ftp myfile.php ftp.example.com/mydir
Now we need to log in remotely and clear the cache, something like
ssh example.com
clear-cache
This worklow, small as it is, is cumbersome, you will have to type a lot, and type it over and over again in the course of development.
But what if we combine these command in to a single .sh (on windows .BAT) file? We will call the file upload.sh and it will read something like this:
ftp myfile.php ftp.example.com/mydir
ssh example.com
clear cache
Now we only have to type ./upload.sh
and all three commands will be executed at once, a small but noticable improvement over the former situation. However, we still have to edit ./upload.sh every time we have another file to edit. We can tackle this with command line arguments, to read something like this (the '$1' is the variable that holds your command line argument)
ftp $1 ftp.example.com/mydir
ssh example.com
clear cache
Now we can type ./upload.sh myfile.php
(and make use of the autocomplete function of the command line shell) to upload any file we want. We can use another command line argument for the target directory, to make this a variable too.
Of course, you will soon notice that their are other repetitive tasks that need doing (typing your passwords for ftp and ssh for example). Also, if you've taken the advice from the other answers, you've started working on a local copy in stead of the live files, this will bring even more repetitive tasks, because now you will have to synchronize your local copy with the live files. (usually done with tools like git or mercurial).
Of course you can simply add these commands to an ever expanding uploads.sh, but you presumably will want to work on your project, not on writing your own home grown workflow tool. Luckily you don't have to because there are plenty of tools out there, and most are incorporated in IDE's like PHPStorm or Atom. These will give a lot of other perks too, like Magento aware syntax highlighting, auto indent, type hinting etc etc.
When working with others on bigger projects you will probably want to incorporate things like automated tests and quality
checks, and be able to publish (deploy) to more than a single server. We have now entered the realm of Continuous Integration and Continuous Deployment (CI/CD) and Devops, which are huge subjects and worth a Google search imho.
All this however, from IDE's to Git to the whole of CI/CD, started with a developer having the exact same problem as you and a mindset of 'automate everything'. Also, when there is no (affordable) tool available, writing your own scripts to automate (parts of) your workflow is a perfectly viable option, my colleagues and I use multiple custom scripts daily.
New contributor
add a comment |Â
up vote
0
down vote
1.2.3.idk if this is available in the linux version of filezilla, but in windows I select EDIT instead of DOWNLOAD and it gets downloaded as a temp file which filezilla monitors for changes, and reuploaded on save.
4.To avoid flushing cache and all that, set Magento to developer mode.
New contributor
add a comment |Â
5 Answers
5
active
oldest
votes
5 Answers
5
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
There are all sorts of ways to handle this.
But, you should try to avoid doing code-editing and deploy the new code on live environment directly. The risk of introducing a bug is great since there has not been any non-live environment testing. And there is the reason that you mentioned: terminal commands, cache flush on live and other overhead repetitive activities that you want avoided.
One way is to place the code under .git (use github.com for example). The repository that you will have is merely a common ground for establishing a, so called, FLOW, between the live site and and development ones.
These links might be a good starting point to get to know the idea:
https://devdocs.magento.com/guides/v2.0/cloud/basic-information/starter-develop-deploy-workflow.html
https://github.com/rotati/wiki/wiki/How-we-use-master,-staging-and-stable-branch-in-Github
A tip: it is NOT as complicated as it looks. And, maybe these are not the best links to look at. But after this, you know what to look/search for.
And if you have no GIT experience, at the end, you will have GIT added to your skill set :)
add a comment |Â
up vote
3
down vote
There are all sorts of ways to handle this.
But, you should try to avoid doing code-editing and deploy the new code on live environment directly. The risk of introducing a bug is great since there has not been any non-live environment testing. And there is the reason that you mentioned: terminal commands, cache flush on live and other overhead repetitive activities that you want avoided.
One way is to place the code under .git (use github.com for example). The repository that you will have is merely a common ground for establishing a, so called, FLOW, between the live site and and development ones.
These links might be a good starting point to get to know the idea:
https://devdocs.magento.com/guides/v2.0/cloud/basic-information/starter-develop-deploy-workflow.html
https://github.com/rotati/wiki/wiki/How-we-use-master,-staging-and-stable-branch-in-Github
A tip: it is NOT as complicated as it looks. And, maybe these are not the best links to look at. But after this, you know what to look/search for.
And if you have no GIT experience, at the end, you will have GIT added to your skill set :)
add a comment |Â
up vote
3
down vote
up vote
3
down vote
There are all sorts of ways to handle this.
But, you should try to avoid doing code-editing and deploy the new code on live environment directly. The risk of introducing a bug is great since there has not been any non-live environment testing. And there is the reason that you mentioned: terminal commands, cache flush on live and other overhead repetitive activities that you want avoided.
One way is to place the code under .git (use github.com for example). The repository that you will have is merely a common ground for establishing a, so called, FLOW, between the live site and and development ones.
These links might be a good starting point to get to know the idea:
https://devdocs.magento.com/guides/v2.0/cloud/basic-information/starter-develop-deploy-workflow.html
https://github.com/rotati/wiki/wiki/How-we-use-master,-staging-and-stable-branch-in-Github
A tip: it is NOT as complicated as it looks. And, maybe these are not the best links to look at. But after this, you know what to look/search for.
And if you have no GIT experience, at the end, you will have GIT added to your skill set :)
There are all sorts of ways to handle this.
But, you should try to avoid doing code-editing and deploy the new code on live environment directly. The risk of introducing a bug is great since there has not been any non-live environment testing. And there is the reason that you mentioned: terminal commands, cache flush on live and other overhead repetitive activities that you want avoided.
One way is to place the code under .git (use github.com for example). The repository that you will have is merely a common ground for establishing a, so called, FLOW, between the live site and and development ones.
These links might be a good starting point to get to know the idea:
https://devdocs.magento.com/guides/v2.0/cloud/basic-information/starter-develop-deploy-workflow.html
https://github.com/rotati/wiki/wiki/How-we-use-master,-staging-and-stable-branch-in-Github
A tip: it is NOT as complicated as it looks. And, maybe these are not the best links to look at. But after this, you know what to look/search for.
And if you have no GIT experience, at the end, you will have GIT added to your skill set :)
answered yesterday
Marjan
3916
3916
add a comment |Â
add a comment |Â
up vote
3
down vote
Thinking that your questions is more about working on remote environments, so my answer centers around this.
The nowdays most used PHP IDE is PHPStorm, but other traditional IDEs are similar in this.
They have a remote deployment setting, which allows you to upload/sync files directly on save. Thats quite powerfull.
Or if you are more crazy, you can run such an IDE via X-Forwarding with SSH on the remote server. (this aproach has issues, and requires a few more things on the server)
We have for several years now also IDEs, which are made to be run on a remote server, and used over a webbrowser.
The first one is "cloud9 IDE", which was recently bought by Amazon and is now also available as an AWS service.
They originally were openSource, but I dont know the state of this.
https://aws.amazon.com/cloud9/?origin=c9io
The other now bigger one is Eclipse CHE, which is more about having a dedicated Docker setups managed over the IDE.
https://www.eclipse.org/che/
add a comment |Â
up vote
3
down vote
Thinking that your questions is more about working on remote environments, so my answer centers around this.
The nowdays most used PHP IDE is PHPStorm, but other traditional IDEs are similar in this.
They have a remote deployment setting, which allows you to upload/sync files directly on save. Thats quite powerfull.
Or if you are more crazy, you can run such an IDE via X-Forwarding with SSH on the remote server. (this aproach has issues, and requires a few more things on the server)
We have for several years now also IDEs, which are made to be run on a remote server, and used over a webbrowser.
The first one is "cloud9 IDE", which was recently bought by Amazon and is now also available as an AWS service.
They originally were openSource, but I dont know the state of this.
https://aws.amazon.com/cloud9/?origin=c9io
The other now bigger one is Eclipse CHE, which is more about having a dedicated Docker setups managed over the IDE.
https://www.eclipse.org/che/
add a comment |Â
up vote
3
down vote
up vote
3
down vote
Thinking that your questions is more about working on remote environments, so my answer centers around this.
The nowdays most used PHP IDE is PHPStorm, but other traditional IDEs are similar in this.
They have a remote deployment setting, which allows you to upload/sync files directly on save. Thats quite powerfull.
Or if you are more crazy, you can run such an IDE via X-Forwarding with SSH on the remote server. (this aproach has issues, and requires a few more things on the server)
We have for several years now also IDEs, which are made to be run on a remote server, and used over a webbrowser.
The first one is "cloud9 IDE", which was recently bought by Amazon and is now also available as an AWS service.
They originally were openSource, but I dont know the state of this.
https://aws.amazon.com/cloud9/?origin=c9io
The other now bigger one is Eclipse CHE, which is more about having a dedicated Docker setups managed over the IDE.
https://www.eclipse.org/che/
Thinking that your questions is more about working on remote environments, so my answer centers around this.
The nowdays most used PHP IDE is PHPStorm, but other traditional IDEs are similar in this.
They have a remote deployment setting, which allows you to upload/sync files directly on save. Thats quite powerfull.
Or if you are more crazy, you can run such an IDE via X-Forwarding with SSH on the remote server. (this aproach has issues, and requires a few more things on the server)
We have for several years now also IDEs, which are made to be run on a remote server, and used over a webbrowser.
The first one is "cloud9 IDE", which was recently bought by Amazon and is now also available as an AWS service.
They originally were openSource, but I dont know the state of this.
https://aws.amazon.com/cloud9/?origin=c9io
The other now bigger one is Eclipse CHE, which is more about having a dedicated Docker setups managed over the IDE.
https://www.eclipse.org/che/
answered yesterday
Flyingmana
4,95631960
4,95631960
add a comment |Â
add a comment |Â
up vote
1
down vote
This one is newer https://github.com/rotati/wiki/wiki/Deployment-and-QA-Workflow
I use Kubuntu so:
a) You can use bitbucket is free for non public repo instead GIT.
b) For file editing I use Kate with plugin for sessions , with ssh connection (PHPStorm is not free)
c) for fast access to console Yakuake
c) digitalocean with droplets (cheaper cloud server)
d) enable developer mode via command line and change server caching to browser in magento settings.
e) for PSD to code very helpful apps Zeplin or Avocade or AdobeXD
add a comment |Â
up vote
1
down vote
This one is newer https://github.com/rotati/wiki/wiki/Deployment-and-QA-Workflow
I use Kubuntu so:
a) You can use bitbucket is free for non public repo instead GIT.
b) For file editing I use Kate with plugin for sessions , with ssh connection (PHPStorm is not free)
c) for fast access to console Yakuake
c) digitalocean with droplets (cheaper cloud server)
d) enable developer mode via command line and change server caching to browser in magento settings.
e) for PSD to code very helpful apps Zeplin or Avocade or AdobeXD
add a comment |Â
up vote
1
down vote
up vote
1
down vote
This one is newer https://github.com/rotati/wiki/wiki/Deployment-and-QA-Workflow
I use Kubuntu so:
a) You can use bitbucket is free for non public repo instead GIT.
b) For file editing I use Kate with plugin for sessions , with ssh connection (PHPStorm is not free)
c) for fast access to console Yakuake
c) digitalocean with droplets (cheaper cloud server)
d) enable developer mode via command line and change server caching to browser in magento settings.
e) for PSD to code very helpful apps Zeplin or Avocade or AdobeXD
This one is newer https://github.com/rotati/wiki/wiki/Deployment-and-QA-Workflow
I use Kubuntu so:
a) You can use bitbucket is free for non public repo instead GIT.
b) For file editing I use Kate with plugin for sessions , with ssh connection (PHPStorm is not free)
c) for fast access to console Yakuake
c) digitalocean with droplets (cheaper cloud server)
d) enable developer mode via command line and change server caching to browser in magento settings.
e) for PSD to code very helpful apps Zeplin or Avocade or AdobeXD
answered yesterday
BartZalas
32029
32029
add a comment |Â
add a comment |Â
up vote
1
down vote
In addition to the great answers already given, I would like to add another perspective. For the sake of the point I'm trying to make I'm gonna assume that the tools you mention are the only tools at your disposal. Disclaimer: You really should not edit 'live code' directly, as others have pointed out. This is just to illustrate my point.
Programming is all about automating things that otherwise would have to be done manually. This includes your own workflow. You say that you already work with the command line, so consider this:
Almost all OS's have a command line ftp client already installed, these offer most of the functionality of filezilla, be it without a gui.
So let's say we want to upload a file to the remote server, we are going to do something like this from the command line:
ftp myfile.php ftp.example.com/mydir
Now we need to log in remotely and clear the cache, something like
ssh example.com
clear-cache
This worklow, small as it is, is cumbersome, you will have to type a lot, and type it over and over again in the course of development.
But what if we combine these command in to a single .sh (on windows .BAT) file? We will call the file upload.sh and it will read something like this:
ftp myfile.php ftp.example.com/mydir
ssh example.com
clear cache
Now we only have to type ./upload.sh
and all three commands will be executed at once, a small but noticable improvement over the former situation. However, we still have to edit ./upload.sh every time we have another file to edit. We can tackle this with command line arguments, to read something like this (the '$1' is the variable that holds your command line argument)
ftp $1 ftp.example.com/mydir
ssh example.com
clear cache
Now we can type ./upload.sh myfile.php
(and make use of the autocomplete function of the command line shell) to upload any file we want. We can use another command line argument for the target directory, to make this a variable too.
Of course, you will soon notice that their are other repetitive tasks that need doing (typing your passwords for ftp and ssh for example). Also, if you've taken the advice from the other answers, you've started working on a local copy in stead of the live files, this will bring even more repetitive tasks, because now you will have to synchronize your local copy with the live files. (usually done with tools like git or mercurial).
Of course you can simply add these commands to an ever expanding uploads.sh, but you presumably will want to work on your project, not on writing your own home grown workflow tool. Luckily you don't have to because there are plenty of tools out there, and most are incorporated in IDE's like PHPStorm or Atom. These will give a lot of other perks too, like Magento aware syntax highlighting, auto indent, type hinting etc etc.
When working with others on bigger projects you will probably want to incorporate things like automated tests and quality
checks, and be able to publish (deploy) to more than a single server. We have now entered the realm of Continuous Integration and Continuous Deployment (CI/CD) and Devops, which are huge subjects and worth a Google search imho.
All this however, from IDE's to Git to the whole of CI/CD, started with a developer having the exact same problem as you and a mindset of 'automate everything'. Also, when there is no (affordable) tool available, writing your own scripts to automate (parts of) your workflow is a perfectly viable option, my colleagues and I use multiple custom scripts daily.
New contributor
add a comment |Â
up vote
1
down vote
In addition to the great answers already given, I would like to add another perspective. For the sake of the point I'm trying to make I'm gonna assume that the tools you mention are the only tools at your disposal. Disclaimer: You really should not edit 'live code' directly, as others have pointed out. This is just to illustrate my point.
Programming is all about automating things that otherwise would have to be done manually. This includes your own workflow. You say that you already work with the command line, so consider this:
Almost all OS's have a command line ftp client already installed, these offer most of the functionality of filezilla, be it without a gui.
So let's say we want to upload a file to the remote server, we are going to do something like this from the command line:
ftp myfile.php ftp.example.com/mydir
Now we need to log in remotely and clear the cache, something like
ssh example.com
clear-cache
This worklow, small as it is, is cumbersome, you will have to type a lot, and type it over and over again in the course of development.
But what if we combine these command in to a single .sh (on windows .BAT) file? We will call the file upload.sh and it will read something like this:
ftp myfile.php ftp.example.com/mydir
ssh example.com
clear cache
Now we only have to type ./upload.sh
and all three commands will be executed at once, a small but noticable improvement over the former situation. However, we still have to edit ./upload.sh every time we have another file to edit. We can tackle this with command line arguments, to read something like this (the '$1' is the variable that holds your command line argument)
ftp $1 ftp.example.com/mydir
ssh example.com
clear cache
Now we can type ./upload.sh myfile.php
(and make use of the autocomplete function of the command line shell) to upload any file we want. We can use another command line argument for the target directory, to make this a variable too.
Of course, you will soon notice that their are other repetitive tasks that need doing (typing your passwords for ftp and ssh for example). Also, if you've taken the advice from the other answers, you've started working on a local copy in stead of the live files, this will bring even more repetitive tasks, because now you will have to synchronize your local copy with the live files. (usually done with tools like git or mercurial).
Of course you can simply add these commands to an ever expanding uploads.sh, but you presumably will want to work on your project, not on writing your own home grown workflow tool. Luckily you don't have to because there are plenty of tools out there, and most are incorporated in IDE's like PHPStorm or Atom. These will give a lot of other perks too, like Magento aware syntax highlighting, auto indent, type hinting etc etc.
When working with others on bigger projects you will probably want to incorporate things like automated tests and quality
checks, and be able to publish (deploy) to more than a single server. We have now entered the realm of Continuous Integration and Continuous Deployment (CI/CD) and Devops, which are huge subjects and worth a Google search imho.
All this however, from IDE's to Git to the whole of CI/CD, started with a developer having the exact same problem as you and a mindset of 'automate everything'. Also, when there is no (affordable) tool available, writing your own scripts to automate (parts of) your workflow is a perfectly viable option, my colleagues and I use multiple custom scripts daily.
New contributor
add a comment |Â
up vote
1
down vote
up vote
1
down vote
In addition to the great answers already given, I would like to add another perspective. For the sake of the point I'm trying to make I'm gonna assume that the tools you mention are the only tools at your disposal. Disclaimer: You really should not edit 'live code' directly, as others have pointed out. This is just to illustrate my point.
Programming is all about automating things that otherwise would have to be done manually. This includes your own workflow. You say that you already work with the command line, so consider this:
Almost all OS's have a command line ftp client already installed, these offer most of the functionality of filezilla, be it without a gui.
So let's say we want to upload a file to the remote server, we are going to do something like this from the command line:
ftp myfile.php ftp.example.com/mydir
Now we need to log in remotely and clear the cache, something like
ssh example.com
clear-cache
This worklow, small as it is, is cumbersome, you will have to type a lot, and type it over and over again in the course of development.
But what if we combine these command in to a single .sh (on windows .BAT) file? We will call the file upload.sh and it will read something like this:
ftp myfile.php ftp.example.com/mydir
ssh example.com
clear cache
Now we only have to type ./upload.sh
and all three commands will be executed at once, a small but noticable improvement over the former situation. However, we still have to edit ./upload.sh every time we have another file to edit. We can tackle this with command line arguments, to read something like this (the '$1' is the variable that holds your command line argument)
ftp $1 ftp.example.com/mydir
ssh example.com
clear cache
Now we can type ./upload.sh myfile.php
(and make use of the autocomplete function of the command line shell) to upload any file we want. We can use another command line argument for the target directory, to make this a variable too.
Of course, you will soon notice that their are other repetitive tasks that need doing (typing your passwords for ftp and ssh for example). Also, if you've taken the advice from the other answers, you've started working on a local copy in stead of the live files, this will bring even more repetitive tasks, because now you will have to synchronize your local copy with the live files. (usually done with tools like git or mercurial).
Of course you can simply add these commands to an ever expanding uploads.sh, but you presumably will want to work on your project, not on writing your own home grown workflow tool. Luckily you don't have to because there are plenty of tools out there, and most are incorporated in IDE's like PHPStorm or Atom. These will give a lot of other perks too, like Magento aware syntax highlighting, auto indent, type hinting etc etc.
When working with others on bigger projects you will probably want to incorporate things like automated tests and quality
checks, and be able to publish (deploy) to more than a single server. We have now entered the realm of Continuous Integration and Continuous Deployment (CI/CD) and Devops, which are huge subjects and worth a Google search imho.
All this however, from IDE's to Git to the whole of CI/CD, started with a developer having the exact same problem as you and a mindset of 'automate everything'. Also, when there is no (affordable) tool available, writing your own scripts to automate (parts of) your workflow is a perfectly viable option, my colleagues and I use multiple custom scripts daily.
New contributor
In addition to the great answers already given, I would like to add another perspective. For the sake of the point I'm trying to make I'm gonna assume that the tools you mention are the only tools at your disposal. Disclaimer: You really should not edit 'live code' directly, as others have pointed out. This is just to illustrate my point.
Programming is all about automating things that otherwise would have to be done manually. This includes your own workflow. You say that you already work with the command line, so consider this:
Almost all OS's have a command line ftp client already installed, these offer most of the functionality of filezilla, be it without a gui.
So let's say we want to upload a file to the remote server, we are going to do something like this from the command line:
ftp myfile.php ftp.example.com/mydir
Now we need to log in remotely and clear the cache, something like
ssh example.com
clear-cache
This worklow, small as it is, is cumbersome, you will have to type a lot, and type it over and over again in the course of development.
But what if we combine these command in to a single .sh (on windows .BAT) file? We will call the file upload.sh and it will read something like this:
ftp myfile.php ftp.example.com/mydir
ssh example.com
clear cache
Now we only have to type ./upload.sh
and all three commands will be executed at once, a small but noticable improvement over the former situation. However, we still have to edit ./upload.sh every time we have another file to edit. We can tackle this with command line arguments, to read something like this (the '$1' is the variable that holds your command line argument)
ftp $1 ftp.example.com/mydir
ssh example.com
clear cache
Now we can type ./upload.sh myfile.php
(and make use of the autocomplete function of the command line shell) to upload any file we want. We can use another command line argument for the target directory, to make this a variable too.
Of course, you will soon notice that their are other repetitive tasks that need doing (typing your passwords for ftp and ssh for example). Also, if you've taken the advice from the other answers, you've started working on a local copy in stead of the live files, this will bring even more repetitive tasks, because now you will have to synchronize your local copy with the live files. (usually done with tools like git or mercurial).
Of course you can simply add these commands to an ever expanding uploads.sh, but you presumably will want to work on your project, not on writing your own home grown workflow tool. Luckily you don't have to because there are plenty of tools out there, and most are incorporated in IDE's like PHPStorm or Atom. These will give a lot of other perks too, like Magento aware syntax highlighting, auto indent, type hinting etc etc.
When working with others on bigger projects you will probably want to incorporate things like automated tests and quality
checks, and be able to publish (deploy) to more than a single server. We have now entered the realm of Continuous Integration and Continuous Deployment (CI/CD) and Devops, which are huge subjects and worth a Google search imho.
All this however, from IDE's to Git to the whole of CI/CD, started with a developer having the exact same problem as you and a mindset of 'automate everything'. Also, when there is no (affordable) tool available, writing your own scripts to automate (parts of) your workflow is a perfectly viable option, my colleagues and I use multiple custom scripts daily.
New contributor
edited yesterday
New contributor
answered yesterday
Douwe
1114
1114
New contributor
New contributor
add a comment |Â
add a comment |Â
up vote
0
down vote
1.2.3.idk if this is available in the linux version of filezilla, but in windows I select EDIT instead of DOWNLOAD and it gets downloaded as a temp file which filezilla monitors for changes, and reuploaded on save.
4.To avoid flushing cache and all that, set Magento to developer mode.
New contributor
add a comment |Â
up vote
0
down vote
1.2.3.idk if this is available in the linux version of filezilla, but in windows I select EDIT instead of DOWNLOAD and it gets downloaded as a temp file which filezilla monitors for changes, and reuploaded on save.
4.To avoid flushing cache and all that, set Magento to developer mode.
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
1.2.3.idk if this is available in the linux version of filezilla, but in windows I select EDIT instead of DOWNLOAD and it gets downloaded as a temp file which filezilla monitors for changes, and reuploaded on save.
4.To avoid flushing cache and all that, set Magento to developer mode.
New contributor
1.2.3.idk if this is available in the linux version of filezilla, but in windows I select EDIT instead of DOWNLOAD and it gets downloaded as a temp file which filezilla monitors for changes, and reuploaded on save.
4.To avoid flushing cache and all that, set Magento to developer mode.
New contributor
New contributor
answered yesterday
Ady
11
11
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f241690%2ffaster-ways-of-developing-for-magento-2%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Is your question maybe more precise about "how to properly develop on a remote server?"
â Flyingmana
yesterday