Servage Magazine

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

Webpack demystified

Saturday, July 29th, 2017 by Servage
Unknown-1Webpack is one of the must-know tools for front-end developers who are working with Node.js. Webpack is a module bundler for JavaScript assets. However, it is also capable of doing much more than just that, making it a rather big and complex tool. Let’s clear the confusion around the many features of Webpack by checking what it’s most commonly used for and how it all works. Bundling Files One of the primary features of webpack is to bundle JavaScript files together. These files are often written by you and include npm packages that your application depends on. Webpack takes the files and dependencies and builds one JavaScript file, often called a bundle, from ...

Recover database records with soft deletion

Wednesday, July 26th, 2017 by Servage
trash-deleteSome websites allow you to delete your content, such as videos you have uploaded or even your whole user account. At least this is what it looks like for the end user. However, in most cases, the content is not actually deleted, which gives administrators an easy way to undo actions of users who make hasty decisions. This can be done using a technique called soft deletion. How Soft Deletion Works Soft deletion is incredibly simple to set up. All you need is one additional column in your database. The field is usually called deleted_at or is_deleted, depending on whether you want to know when a specific record was deleted. The deleted_at field ...

Learn about OAUTH

Thursday, July 20th, 2017 by Servage
oauthOAuth is an authorization standard that can be found on websites, APIs, web applications built with React or AngularJS and more. OAuth is often used to let other websites access user information on another website. OAuth can be used for various types of authorization, so let’s see how it works in more detail. Why OAuth? As mentioned previously, OAuth gives a website access to a user’s profile information on another website. When you sign up on a website, you have likely seen the option to sign up using your Google, Facebook or other account. In these cases, the signup process is handled by OAuth and your personal information, such as your name and ...

Introduction to Graph Databases

Friday, July 14th, 2017 by Servage
database-queryYou may have worked with relational databases such as MySQL before, but what about graph databases? Graph databases are data storages for the semantic web, and their structure differs from a typical relational database. Let’s have a closer look at how a database like this works and what it can be used for. Data Storage Model A relational database stores data in key-value pairs in rows of a table where a column (key) has a value. Graph databases are not tied to data structures such as columns or tables. Instead, a graph database uses nodes, properties and edges. Although these terms may be new to you, fortunately they map surprisingly well to the ...

CORS explained

Sunday, July 9th, 2017 by Servage
cors-hackerCross-origin resource sharing (CORS) is a feature that allows website content, such as external font files, to be requested between different domains. Although it doesn’t sound very obvious, CORS is used on a majority of websites. Let’s have a look into what CORS is all about and when it is used. Same-Origin Policy Before talking about CORS itself, let’s talk about a security feature related to it called the same-origin policy. It is a security feature built into web browser that prevents websites from sending certain types of requests to other websites. For example, www.example.com cannot send a POST request to www.example2.com using AJAX. The reason why this is blocked is because this ...

Why code debugging is essential and useful

Sunday, July 2nd, 2017 by Servage
debugDebugging and testing are two commonly overlooked topics in programming. The purpose of both is to make sure the code you write is working as expected. This article will briefly explain what debugging is and why you should have a debugger ready for action when it’s needed. What is Debugging? Let’s first discuss what debugging is. In one sentence, debugging means the inspection of source code and its behavior during runtime. One important tool used in debugging is the use of breakpoints. A breakpoint can be inserted to any non-empty line of code. If you have inserted a breakpoint to a certain line and start debugging, your program will pause its execution when it ...

What is JSON-LD

Sunday, June 25th, 2017 by Servage
json-ldYou don’t have to be a JavaScript developer to know JSON. It has become the standard for transferring data over the Internet, for example from back-end APIs to front-end applications. However, JSON-LD is a totally different story. It’s a relatively new and unpopular standard among developers, at least compared to JSON. JSON for Linked Data JSON-LD stands for JavaScript Object Notation for Linked Data. As the name suggests, it is used to represent linked data using JSON. It is meant to be as simple as possible for developers to convert their existing JSON to JSON-LD. Linked Data Explained So, what is this linked data? In order to understand linked data, one should have a basic ...

Free icons for web developers

Monday, June 19th, 2017 by Servage
iconsA website with no images would look quite dull, and making graphics from scratch can be a difficult task. Since not all developers are graphic designers, many free and paid icon sets and libraries have become popular among front-end developers. They allow you to easily place a large variety of icons on a website. Here is a collection of such icon libraries that are popular among developers in 2017. Glyphicons Glyphicons is an icon library that become popular with Bootstrap since it is built into the framework. Glyphicons has a special license that allows developers to use the Halflings icon set for free in their Bootstrap-powered websites. The Halflings set comes with over ...

What is new in PHP 7.1?

Monday, June 12th, 2017 by Servage
php-7-1PHP 7.1 was released at the end of 2016 and web servers are being upgraded to support the latest additions to the language. This is a good moment for developers to see what new features have been added to PHP in the newest version. Void Return Type Let’s start with something small and simple. PHP already has support for function return types, excluding the void data type. A void return type means that no value is returned from a function. In version 7.1, you can indicate this in the function signature by using the typical colon syntax that already works with other return types: protected function foo(string $value): void {}. Nullable Types PHP also already ...

How distributed high-availability databases work

Saturday, June 10th, 2017 by Servage
databaseSometimes a website becomes so popular it outgrows the single database model and the workload must be distributed across multiple database instances. Or perhaps the website is so critical it cannot tolerate database failures even for short periods of time. There issues can be overcome by setting up a high-availability database infrastructure with multiple servers. Master-Slave Architecture The master-slave architecture is a common way to distribute load between multiple databases. In this model, one server is chosen as a master server, which can be used to execute read and write actions. The master server’s database is then replicated in real-time to one or multiple slave servers. This works by creating a database user ...

Recent articles

Algolia – Powerful hosted search engine

Have you ever searched for something on a website without being able to find what you are looking for? Very likely. Implementing a powerful search engine for a website can be both difficult to make and resource intensive to use. A hosted search engine called Algolia aims to make this easier by moving the whole search process to their cloud-based search engine. What is Algolia? Algolia is a hosted text-based search engine for ...

Load-balancing web applications

Load balancing works by distributing the traffic of a single website across multiple web servers. This is important for large websites that receive so much traffic that a single web server is no longer enough to serve all visitors. It also adds a layer of reliability because if one of the web servers goes down, the others can continue to serve visitors with little to no impact to the website. Let’s ...

Web application uptime monitoring

High availability and uptime have become very important for websites and applications. Solving downtime issues should be taken care of quickly to avoid losing any visitors or profit when it comes to business websites. Fortunately, there are services that monitor websites, databases and servers around the clock and inform website administrators within minutes when something is not working as expected. Pingdom Although being a pricy service, Pingdom is one of the most popular ...

Tracking bugs and errors in web applications

Bug tracking just got easier! What could be worse than losing a customer or a regular visitor due to some unknown error that a website can’t handle? On some websites, customers can provide feedback and tell what happened if they land on an error page. Many visitors don’t spend the time to fill out such forms so developers never get to know what really happened. This time we will look into ...

Top Git Clients for Developers

Using a version control system (VCS) is one of the most valuable tools for a developer. If you code every day, you likely use Git or some other VCS daily too, or at least you should. Because Git is a big part of a developer’s daily workflow, it is good to choose your Git client wisely. So, let’s find out what are the pros and cons of some popular Git clients ...