Servage Magazine

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

Archive for October, 2017

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

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

Angular 4 Best Practices

Monday, October 2nd, 2017 by Servage
angularAngular is one of the most popular front-end frameworks. Developers sometimes prefer to use their own approach when it comes to naming conventions, whitespace usage, file structure and so on. However, if every developer chooses their own path to follow, managing a single code base in a team becomes quite challenging. To solve this, Angular has a set of rules that all developers should follow when working on an Angular project. Let’s have a look at those recommendations set by the team behind Angular. File Names Let’s start with file and directory naming conventions. By following the Angular naming conventions, you can easily identify what a file does just by looking at the ...