Servage Magazine

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

Archive for the ‘Tips & Tricks’ Category

Beautiful color selection made easy

Tuesday, April 17th, 2018 by Servage
Have you ever been trying to figure out how to get the colors for your web project design to match each other? Or have you ever been stuck trying to find suitable colors for a website that should match an existing logo to integrate in the corporate identity? Color selection can be easy if you know exactly what you want, but mostly you are starting from scratch, maybe with an idea or preset main color. However, how do you define proper fitting colors to go along with the main color, to both fit the intended design and be aesthetic at the same time? Maybe you have heard of complementary colors? Being ...

Create a cool CSS-based tab-menu

Tuesday, April 10th, 2018 by Servage
We received a lot of great feedback for our CSS-based dropdown menu, so I thought it would be time for another little tutorial. This time showing how to create a nice-looking tab-menu, based purely on HTML and CSS. See a live tabmenu example here. First, we want to have the menu code created in HTML. I find that the most appropriate way of doing this, is by creating the menu as a list. Thereby non-supporting browsers will still show the menu as a list, which somewhat resembles a menu. Everyone else will see the cool tab-menu :-) <ul class="tabmenu"> <li><a href="">Overview</a></li> <li class="active"><a href="">About</a></li> <li><a href="">Products</a></li> ...

Chip security flaws

Monday, January 8th, 2018 by Helge
Specter and Meltdown!  These are the names of the two potentially serious security holes in processors that were revealed during the past week. We will start by stating that, with certainty, we can't say exactly how serious the bugs are (or rather how easy they are to exploit). In any case, this is what we know so far: meltdown-spectre-100745814-large The security holes have been traced back to 2011. Initially, only Intel's processors were pointed out (something that, of course, was so bad considering the manufacturer's market dominance) but later at his has been revised and the problem, at least with Spectre, seems to apply to all major processor manufacturers. Simply described, it's all ...

Using Responsive Images in HTML5

Wednesday, December 27th, 2017 by Servage
responsive-designThe <picture> element has been part of HTML5 for a relatively long time. Surprisingly, the element is still quite rarely used, although it clearly has some benefits to it. Most importantly, you can choose which version of an image to load based on the screen size of a visitor’s device. Responsive Images: The Old Way Images are usually placed inside containers such as divs. If there is no CSS applied to the image, the image takes as much space as its dimensions are. In most cases, this causes the image to “overflow” the container div. The typical way of fixing this is to add “max-width: 100%” to the image. This resizes the image ...

PHP Handler Engines Explained

Thursday, December 21st, 2017 by Servage
phpAlmost all PHP developers must have heard of either mod_php, PHP-FPM or FastCGI before. However, you might not be aware of what they actually are and do behind the scenes of a web server or how they are different from each other. These handlers are a base requirement for the PHP language to run on web servers so it’s good to know how they operate. PHP Handlers Explained Briefly Regardless of what PHP handler a web server uses, the process of executing PHP code is mostly the same. A web server receives a request to serve a PHP page. It then sends the request to a PHP handler which processes the request, and ...

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

Looking at Bootstrap 4

Sunday, December 3rd, 2017 by Servage
Bootstrap4The development of the latest version of Bootstrap entered a beta stage this summer. Going from alpha to beta introduced some major changes, and now that Bootstrap 4 is in beta, there should no longer be many breaking changes. This gives us a good chance to look into the future and see what new is included in the latest version of most popular front-end CSS framework. The New Grid While the grid in Bootstrap is still divided into 12 columns, it now uses Flexbox by default. A new grid tier “xl” has also been added. This means you should use tiers one level higher than previously. For instance, col-md-4 in Bootstrap 3 is ...

API authentication using JSON web tokens

Wednesday, November 29th, 2017 by Servage
json-jwt-tokenThere are many ways to authenticate users in APIs: username and password combinations, OAuth 2 and API keys to name a few. Today we will be having a look at a rather new implementation called JSON Web Token, JWT for short. There are some noteworthy advantages in JWTs that we will be covering as well. What is a JWT? A JWT is a way to send and receive data between two parties in a secure way. The data a JWT contains is mostly up to you, although some metadata must be present. JWTs can be used as session tokens to authenticate against an API. As the name implies, a JWT is JSON and therefore ...

What to know to become a senior developer

Friday, November 24th, 2017 by Servage
developer-codeA senior developer is a higher position granted to experienced developers. Developers start as juniors when they join their first company and are eventually promoted to senior developers. What makes a developer a senior, what skills are required to become one and what are some common characteristics that differentiate a senior from juniors? Skills to Master Let’s start with something concrete that you as a developer can learn. Before qualifying as a senior developer, one of the things you should master is the art of debugging. Debugging gives you the ability to inspect your code at runtime. When you receive a bug report and have some kind of idea where the bug appears, ...