Servage Magazine

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

Articles Tagged ‘development’

A Global Village

Monday, January 29th, 2018 by Helge
The Internet World Stats (IWS) organisation reported that we have reached a point, where over 1 in 2 people in the world havinternetusere some kind of access to the internet. - reaching 51.7% Internet user penetration in the world is a historical occasion! The IWS database shows there are now 3,885,567,618 Internet users in the world (source: http://www.internetworldstats.com/stats.htm). Why is this information useful? All these users are potential customers for businesses looking to expand online! Be part of that global marked and start your online business. Servage offers you all the services you require for that purpose. If you decide to create and host your website with Servage.net, you can get a ...

Documenting PHP APIs

Friday, December 8th, 2017 by Servage
APIA good documentation is a requirement for a good API. If you make a good public API but the documentation is lacking, your API will not see as big of an adoption as it would with a well-written developer-friendly API. Let’s have a look at how to write documentation for a PHP-based API and also what a documentation should have, no matter what language it is written in. Writing a Good API Documentation Before looking at how to write API documentation, let’s consider the things a documentation should have. We will be focusing on a REST API, although the points mentioned usually apply to other types of APIs as well. First of all, every ...

Getting started with Docker

Sunday, November 12th, 2017 by Servage
dockerDocker has been around for a few years now, and if you haven’t got your hands on it yet, now is your chance! Containers and virtualization have been used for a long time but Docker does it in a unique way, allowing developers to set up identical and lightweight environments for development, staging and even for production. Let’s dive into the idea behind Docker and how it can be used in a project. What is Docker? Docker is a software that lets you run lightweight containers with any type of software running inside. It can be a MariaDB database, Apache, Nginx, PHP or all of these at the same time. Containers are like virtual ...

Understanding Observables

Sunday, October 29th, 2017 by Servage
Advanced Javascript development - Part 4Observables are heavily used in frameworks like Angular. Observables are especially useful in cases where you have to respond to an event but don’t know in advance when that event is going to take place. Therefore, you can set up an observable and one or more observers that listen to the event. What Are Observables? Observables are one of the two main objects in the observer design pattern. In the observer pattern, observables are objects that one or multiple objects listen to for events they are interested in. The listening objects are called observers. How Observers Work For example, you can connect a button to an observable, and whenever the ...

Resolving Merge Conflicts in Git

Wednesday, October 25th, 2017 by Servage
gitSooner or later every developer working with Git encounters a merge conflict. Especially if you are working with other developers, it’s possible that the code you are working on is changed by someone else at the same time. When that happens, you have to choose whose work you want to keep and what to discard, or perhaps you want to combine them by taking a piece from both versions. Let’s see what tools are available to do this and how the “git mergetool” command works. How Merge Conflicts Happen A merge conflict happens when you edit a file that changes in the remote repository at the same time. When one developer first commits ...

How JavaScript Promises Work

Sunday, October 15th, 2017 by Servage
javascript-codeA promise is an object that represents an asynchronous action that is yet to be completed. Consider an HTTP request that loads the details of a user account. If the request is sent inside a promise, your application can continue to work on other tasks while the HTTP request is sent. When it completes, a function is called where you can handle the data that was returned. Let’s have a closer look at promises and what makes them so powerful. Creating a Promise A new promise can be created with the new keyword using the Promise class. Promises are created inside a function that performs asynchronous tasks. Therefore, you could have the following ...

Is Yarn package manager the successor of npm?

Friday, September 29th, 2017 by Servage
yarnNpm has been the most popular package manager for JavaScript with little competition for years. Starting from 2016, an alternative called Yarn has become more and more popular for managing dependencies in JavaScript projects. How is Yarn different, what can it do and is it better than npm? The Benefits of Using Yarn Probably the biggest advantage of Yarn is that existing projects using npm work with Yarn out of the box. If your project has a composer.json file with dependencies inside, you can use Yarn to install them. Another benefit of Yarn is its speed and performance. In almost all cases, it installs your dependencies to the node_modules directory faster than npm. It ...

Getting started with Gulp

Thursday, September 14th, 2017 by Servage
gulpGulp is a task runner for JavaScript that can automate away repetitive tasks so you can focus on coding instead. Gulp is an extremely versatile tool that can automate tasks from transpiling SCSS to live reloading with Browsersync. Let’s have a look at some of the most useful tasks you can automate with Gulp and a quick look at how to set it up. Transpiling SCSS Using a CSS preprocessor like Sass is quite common these days, especially when working with front-end frameworks because of how well it integrates with them. Sometimes it can be quite confusing to set up an automated transpiler that converts SCSS to CSS. Gulp makes this possible with ...

Building linked data APIs with API Platform

Saturday, September 2nd, 2017 by Servage
api-platformAPI Platform is a framework for building RESTful APIs using PHP. It’s built on top of Symfony 3, and creating your first RESTful API can be done in just 5 minutes. API Platform is specifically designed for building APIs that utilize linked data, which is often used by libraries, social network websites, online stores and other websites where data is strongly related to other data. Features Briefly API Platform comes with a big collection of features designed to make building APIs using linked data easy. It comes with a CRUD out of the box for create, read, update and delete actions like RESTful APIs usually do. It integrates well with Swagger, a tool ...

Hybrid mobile application with Ionic

Sunday, August 27th, 2017 by Servage
ionicIonic is a framework created with Angular for building cross-platform mobile applications using web technologies. The main language for developing with Ionic is TypeScript, which is based on JavaScript. Ionic allows you to create applications for the most popular mobile operating systems by maintaining only a single code base. Getting Started If you have used Angular before, getting started with Ionic is easy. If not, don’t worry—there’s only a few commands to run and your first project will be up and running. The recommended way to create a new Ionic project is to use the Ionic CLI which is a tool similar to the Angular CLI. It can be used to not only create ...