Servage Magazine

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

Articles Tagged ‘development’

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

What does it take to build an API?

Tuesday, August 22nd, 2017 by Servage
api-cloudBuilding a fully functional API consists of multiple pieces that are eventually connected together, such as authentication, integration with external services and the core application logic. In this article we will see what it takes to build a full API and what you should consider when the time comes to build one. Authentication If you application has user accounts, you will need to handle authentication with your API. The first thing you should do is decide how users authenticate. Is it a traditional username and password combination, an API key, or perhaps something more advanced like OAuth 2? Either way, if your application handles login details, you should also set up an SSL ...

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

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

Top Git Clients for Developers

Tuesday, May 16th, 2017 by Servage
gitUsing 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 to find out the best one for you. SourceTree SourceTree is one of the most popular Git clients out there. It has a good graph tree feature to track what’s happening inside a project and all of its branches. SourceTree supports all ...

Common design-patterns explained

Tuesday, May 2nd, 2017 by Servage
design-patternsDesign patterns are used in software design to overcome common problems. For instance, what if you need a class that handles all database connections and you want to be able to create only one instance of that class? This is where design patterns are handy. They help you solve common design problems with universal solutions that you can also find in other applications. Singleton Pattern Let’s start with a simple pattern. Singleton is a design pattern whose purpose is to keep only one instance of a class. This way, there is no need to instantiate a new object every time you call a method. A singleton class can be created by making the constructor ...