Servage Magazine

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

Archive for July, 2017

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, cannot send a POST request to 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 ...