Servage Magazine

Information about YOUR hosting company – where we give you a clear picture of what we think and do!

Comparing development environments

Sunday, April 2nd, 2017 by Servage

development-environmentWhen it comes to web development, there are many development environments to choose from. Roughly speaking, a development environment means the computer on which you run the applications you are developing. Such a computer can be virtual or physical and local or remote. This time we will compare popular development environments, such as Vagrant, and see what advantages and disadvantages each has.

Vagrant

Vagrant is one of the newest and most used development environments by professional developers. Here is how it works: You install Vagrant and a virtualization environment compatible with it, either VirtualBox or VMWare. Next, you open a command line and tell Vagrant which type of development environment you would like to set up. If you are a Laravel developer, you can run “vagrant box add laravel/homestead” and a Linux virtual machine with everything preinstalled will be downloaded for you. This includes a web server with PHP support, a database server, Git, NodeJS and much more. When you start the virtual machine, you will have an identical development environment with every other developer who has downloaded the same Vagrant virtual machine, also called a box.

This is what makes Vagrant so popular. You can install a fully-featured development environment within minutes that is identical with everyone else. This avoids issues such as “What operating system are you using?”, “What version of PHP do you use?” and “Works on my machine”.

XAMPP and WampServer

These two are somewhat similar with Vagrant. Probably the biggest difference is that when using XAMPP or WampServer, the application you are developing is running on the same operating system you use for development so this does not solve the issues between different operating systems that Vagrant does. Not all code is 100% compatible between operating systems. The file system structure and even paths to files are defined in different ways. For instance, a Windows computer does not have a /var directory or even use slashes as directory separators.

If you are not careful with this type of things, you may end up with code that works in your environment but not for someone else. In addition, it is considered good practise to run development environments inside virtual containers because you can easily swap between environments that have different software installed on them. This allows you for instance to switch between different versions of PHP and MariaDB quickly and easily.

Remote Web Server

A remote development server works by uploading files using FTP or other means to a web server when changes to code are made. This adds a slight delay to development since the uploading process usually takes a few seconds. Remote web servers are good for staging and production environments, but since code changes quickly during development, they are not so efficient as development environments. The good side of remote web servers is that they usually run on an almost identical setup as a production server.

Conclusion

In conclusion, it could be said that Vagrant is the preferred way to do local development in 2017. Whatever environment you choose, make sure that the environment is as close as possible to that of other developers and your staging and production server.

Comparing development environments, 5.0 out of 5 based on 2 ratings
Categories: Software & Webapps

Keywords:

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

No comments yet (leave a comment)

You are welcome to initiate a conversation about this blog entry.

Leave a comment

You must be logged in to post a comment.