Jump to content

Setup and Retrain


Recommended Posts

Hi All 

it has been along time since I did full scale development but I have a project in mind. Can someone please direct me the following into


A good coding tool to use? I have visual studio code for mac. I have a bitbucket account. and some documentation to remind me of how to setup the files and going over syntax stuff. 



Link to comment
Share on other sites

Lots of people are using VSC these days.  It should be fine.  The best PHP IDE by far is PHPStorm.  It's also $200 not including $160 a year for maintenance if you want to keep it updated.  There are lots of other editors that do a good job, but I don't see any reason to try and convince you to change.

VSC has built in git support so bitbucket should work great for you.  

The bigger question in regards to a "project" is whether or not you plan to utilize a framework.  The 2 premier PHP frameworks are Laravel and Symfony.  They are both very capable of supporting systems large and small.  

They both work well with the composer tool.  Taking a look at the documentation for either framework will lead you towards initial boilerplate installs and configuration using composer.

In my opinion, the most important thing to know about PHP is that composer exists, and is the dependency management tool that makes the PHP language relevant these days.  It's really the first thing you start with for any new project, in the same way that npm is the tool you start with for a node or react project.

Link to comment
Share on other sites

Thank you so much. I think I understand what you said LOL. I'll checkout composer. my past experiences were simple and not a huge design. This time I am doing more so trying to figure out the best way to start so when I add people they can jump in. thank you

Link to comment
Share on other sites

On 5/18/2020 at 8:29 AM, jayco said:

One more question am I better off developing on my mac (installing VSC and Composer) and pushing to my servers?

Yes, that is what most developers are doing.  Truthfully, I don't want to blow your mind, but for quite a while people have been using some form of virtualization as well.  That provided a best of both worlds, where you have a deployment server environment (usually centos, ubuntu or whatever) running in a virtual machine, with drives mapped into it from your mac.  For a time people were typically using virtualbox & vagrant.  You'd install these, grab a vagrant file for the os you wanted (often with a stack preinstalled), and vagrant would download and configure the virtual server in virtualbox.  This is still viable and works very well and is extremely simple.  You might try going down that path.  Setting up xdebug with any "remote server" even if it's a virtual machine running on your mac, can be a little complicated and have pitfalls, but otherwise, it's a great option.  Here's an example Centos7 with LAMP stack vagrant:  https://app.vagrantup.com/Gigasavvy/boxes/centos7-LAMP

More recently people have moved to utilizing containers.  The most popular container wrapper is Docker.  So now, people are using Docker instead of the vagrant/virtualbox combo more often than not.  There are some advantages in that docker is more compatible with running a cluster of virtual containers in the cloud, which is often done using an "orchestrater", the best known of which is Kubernetes.  

It doesn't really matter whether you grok all this stuff or not -- it's very sysadmin/devops specific stuff, but truthfully if you want to know what most companies that have SAAS or PAAS infrastructures or just large web based systems are doing, they are using Docker regardless of the stack.  

There are things as elaborate as Devilbox, which literally gives you a mega wamp/mamp style system, with options galore.  If you install Docker you can tryout things like Devilbox.  There's also Laradock which offers a similar even more development oriented docker file build that was put together for Laravel developers, but can be used more generically.

You can also look for more minimal docker files that just set up a few different containers (apache + mysql +php) for example and articles like this one that will walk you through creating a docker file from scratch to your requirements.  

Vagrant is still great and extremely simple, but Docker is more current as a development environment virtualization solution.  Unlike Vagrant, which just simplifies running a virtual linux server, Docker has some complexity specific to running containers, and certainly has a bigger learning curve, but if you want to do what most pro developers are doing, then I'd invest the time in playing with and learning the basics of Docker.  

If you just want to get a dev environment up that matches your target deployment environment, go with a vagrant.  In either case, you need a pretty good working understanding of linux and the different ways of installing from packages.  


Link to comment
Share on other sites

I also realized that you might be asking about deployment.  Again, this has a lot to do with the target production infrastructure.  Lots of companies have a Devops group to work on deployment.  More often than not, companies are using Github or Gitlab or Bitbucket.  From a simplicity point of view, a real simple way of handling deployment is:

You develop and test.  If you have lots of tests, which most companies do, then they are doing continuous integration, where test servers run on every branch, and merging code only happens if all the tests pass.  Then a manager/lead will do a final production merge, typically from a pull request, and version the code.  That build can then be gotten from the git repo, perhaps via a version tag.

What is even simpler for a small system perhaps with one developer is to use bitbucket or github with a private repo.  You set up a read only user that can checkout/pull from your repo, and you configure your production environment's effective user for the application as that user.   Getting the new build into production is as simple as git pull, or perhaps git checkout tag-name.


Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.