Servage Magazine

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

Archive for the ‘Software & Webapps’ Category

Create nice documentation for your PHP code

Tuesday, April 3rd, 2018 by Servage
It's a common problem amongh developers that insufficiently or no documentation of code causes problems, delays, misunderstandings. Even code you wrote yourself could look really strange after a while, when you no longer remember what's exactly going on. At this point a good documentation could help you save time and nerves. PhpDocumentor is a good script that generates documentation for your code based on inline comments in your script files. It can generate various output formats, has different themes, and is very customizable. It only requires that you actually commend your code. You can read how to comment your code easily in the PhpDocumentor manual. There are a ...

Introduction to NoSQL

Saturday, December 16th, 2017 by Servage
databaseWhen working on websites and applications, there are many databases to choose from. The most common choice for websites is MySQL or MariaDB, which are essentially the same database systems. Another alternative that has gained popularity recently is NoSQL databases. Today it’s time to look at how NoSQL databases work, how they differ from MySQL and if there are any benefits in using a NoSQL database instead. What is NoSQL? You have likely used either MariaDB or MySQL in the past. Both of these are relational databases and differ from NoSQL databases quite a lot. The first misconception about NoSQL is that it wouldn’t use SQL like the name might suggest. In fact, ...

FTP Integration for Web Applications

Monday, December 11th, 2017 by Servage
FTPOn some websites, you need the ability to modify files stored on a web server. You might want to upload new files, rename them and download some to your computer. In general, there are two choices for implementing this: FTP or a file manager GUI embedded to a web page. This time we will focus on a hybrid solution between these two, which allows you to integrate an FTP client as part of a website. Method 1: net2ftp Let’s start with a rather old but de-facto web-based FTP client. net2ftp is indeed quite old and has not been updated since 2013. However, it has been the only viable solution for integrating FTP with ...

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 ...

HTTP requests with the new Angular 4 HTTP Client

Tuesday, November 7th, 2017 by Servage
angular-4Angular 4.3 comes with a new way of sending HTTP requests: the HttpClient class. The older Http class can still be used and it is not deprecated, at least for now. However, HttpClient brings some new features and will likely replace the old class in the future. Let’s go through some of the features the new HttpClient has to offer. Modifying Requests with Interceptors One of the handy new features is the ability to intercept HTTP requests with interceptors. Intercepting a request means modifying it on the fly. One common use case for interceptors is to attach a session token to every request automatically to easily authenticate with an API. Interceptors are classes that ...

What are progressive web apps

Thursday, November 2nd, 2017 by Servage
web-appThe term progressive web app (PWA) is a hot trend right now. It all started back in 2015 and quickly became popular due to the advantages it offers over traditional mobile applications. But what is a progressive web application? How does it differ from a typical mobile or web application? Let’s find out what the term PWA actually means and what makes an application a progressive web application. The Definition of Progressive In one sentence, a progressive web application is a website that looks and works like a mobile application. Modern HTML5 and CSS3 features allow developers to replicate many of the features native applications can do: storing data locally, using animations to ...

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 ...

Permission Management in PHP with Bouncer

Saturday, October 21st, 2017 by Servage
php7Permission management doesn’t sound like an easy task. Fortunately, a PHP package called Bouncer makes it rather simple. Bouncer not only handles permissions but also user groups, and you can assign permissions to those groups. For example. You can allow editors to create blog posts with only a few lines of code. Installing Bouncer Since Bouncer is a PHP package, to no surprise it can be installed using Composer by running “composer require silber/bouncer”. Bouncer is a Laravel package so therefore it only works with Laravel projects. As usually with Laravel packages, you have to add the new package to the providers array of config/app.php: “Silber\Bouncer\BouncerServiceProvider::class”. Also add the following to the aliases ...

Building a Front End with Ember.js

Sunday, October 8th, 2017 by Servage
emberEmber.js is yet another JavaScript framework for building the UI for web applications. While there seems to be many JavaScript frameworks out there at the moment, each of them is targeted for a specific use case, or at least is more suitable for something than the others. Usually a single framework is not always the best choice for all kinds of websites and web applications. Let’s explore Ember together and figure out how it works and what types of websites benefit from it the most. Ember.js Quick Start If you have ever worked with Angular, chances are you find getting started with Ember quite easy. The process of setting up your first Ember ...

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 ...