Servage Magazine

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

Archive for September, 2016

Preprocessing HTML using pug

Friday, September 23rd, 2016 by Servage
pug-templatePug is a templating engine that aims to make writing HTML files faster and easier. In fact, Pug could be said to be an HTML preprocessor. You have probably heard or used CSS preprocessors like Sass or Less. Pug is very similar for HTML; you write it using a special syntax and compile it into plain HTML. Let’s have a look at how easy using Pug is and why you should consider using it. In this article we will not set up a Pug development environment, but instead we will talk about what Pug is and in what situations it can be a good addition to your technology stack. What is Pug? If you ...

Tricks in PhpStorm to save your development time

Monday, September 19th, 2016 by Servage
phpstormPhpStorm is one of the most popular PHP integrated development environments (IDEs) in 2016. It has a huge amount of features and even experienced developers regularly come across new features they haven’t known before. Next we are going through some handy tools and shortcuts that are built into PhpStorm but may be difficult to find out on your own. PhpStorm is full of useful keyboard shortcuts. Here are a few that you will surely find useful. Keep in mind that these may be slightly different for you depending on your operating system and PhpStorm version, but these are the default ones for Windows. Ctrl + Shift + N: Find a file in your ...

Handling JSON with PHP

Monday, September 12th, 2016 by Servage
jsonJSON is a data serialization format that has become the de-facto standard for transmitting data between applications. It is more and more often preferred over its competitor XML thanks to being lightweight, human-readable and widely supported. JSON is also supported by PHP, so let’s see how PHP can be used to read and write JSON. Creating a JSON Object PHP has two functions that are often used to deal with JSON: json_encode() and json_decode(). These functions have been built in to PHP since 5.2.0. First, let’s see how we can use json_encode to create a new JSON object. Before we get started, it’s good to know what kind of data can be turned ...

Gitflow workflow explained

Tuesday, September 6th, 2016 by Servage
gitflowGit or an equivalent version control system (VCS) is an essential tool in web development. No matter what VCS you use, it is good to know the basics of Git since it is by far the most popular choice these days. Git is a versatile tool and there are multiple ways, also called workflows, to use it. One popular workflow is the Gitflow workflow, which we will cover in this article. Branches in Gitflow Many Git workflows use one branch to track the history of a project. Most often this is the master branch. In Gitflow there are two branches for this purpose: master and develop. The develop branch contains the latest features ...