Servage Magazine

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

Archive for October, 2016

Application deployment with Capistrano

Thursday, October 27th, 2016 by Servage
capistranoHave you ever found yourself doing the same tasks to deploy an application again and again? Perhaps some of those repetitive tasks could be automated? Fortunately, there are free and open-source solutions available! One of the most recognized automated deployment tools is called Capistrano. What is Capistrano? Capistrano is a tool written in Ruby that allows you to automate application deployment to a Linux server using by executing commands over SSH. It is possible to automate the whole deployment process from start to end using Capistrano. What is required? Since Capistrano and also its configuration files are written in Ruby, some Ruby knowledge is required to create a deployment configuration. However, Capistrano aims to make ...

Best practices for designing a REST API

Saturday, October 22nd, 2016 by Servage
restThanks to things like the Internet of Things, Application Programming Interfaces (APIs) have become a big part of the internet. In addition to this, many applications allow other applications to integrate with them. Both of these features often happen using an API. Understanding how APIs work, and even better, understanding how to design them, is a valuable skill. So, what makes a good REST API? Resource names One of the first questions that comes to your mind when designing an API is probably this: What should a URI look like? A URI is the address to a resource, such as a user account. A URI might look like this: “/users/1/products/2”. Should these resources ...

Autoloading PHP classes with Composer

Sunday, October 16th, 2016 by Servage
composerComposer is a famous PHP dependency manager. It can be used to easily download and keep third-party libraries your application depends on up-to-date. This is the most popular use case for Composer, but the library has another great feature: class autoloading. What is class Autoloading? Before we continue, let’s make sure you have a solid grasp on the definition of autoloading. Autoloading means you can load external libraries into your own PHP files without having to manually locate the files using the include() or require() statements. If you do it this way, you would eventually end up having many include statements. How to autoload classes When you install a library, Composer generates an autoload.php file ...

HTTP requests with Guzzle in PHP

Tuesday, October 11th, 2016 by Servage
guzzleGuzzle is an HTTP client that makes it possible to send HTTP requests using PHP. This allows you to communicate with other services, such as APIs, without resorting to external applications or languages other than PHP. Guzzle supports many HTTP methods such as GET and POST requests, custom header fields and and even file uploads. GET and POST requests are the most common types of requests, so let’s see how they work with Guzzle. Let’s start with the easiest request type: GET requests. Whenever you visit a website, your browser sends a GET request to a server. With Guzzle, you can send a GET request with PHP instead and optionally fetch the ...

What is new in Bootstrap 4

Friday, October 7th, 2016 by Servage
Bootstrap4Bootstrap 4 has been in public alpha since August 2015. Some deem it stable enough while other developers are waiting for a more stable release. Whether or not you are moving to the next version just yet, it is good to be aware of the upcoming changes. In fact, Bootstrap 4 has quite a lot of new and interesting updates to offer! Introducing Cards Cards are a new type of container in Bootstrap 4. They are meant to replace panels, wells and thumbnails. That’s a lot for one component to replace, but cards are designed to be a combination of all these three components. A card has a panel-like heading and a content ...

What is ECMAScript?

Sunday, October 2nd, 2016 by Servage
ecmascriptECMAScript is something you must have heard a lot recently if you are a front-end developer. It is becoming more and more widely used, there are multiple versions of it and new versions make JavaScript better and easier to write. But what exactly is ECMAScript? Let’s find out! History of ECMAScript Originally, JavaScript was created for Netscape. The goal of the language was to allow writing code similar to Java but making it easier to learn. There used to be multiple versions of JavaScipt, such as Microsoft’s JScript. When Internet Explorer gained more popularity, Netscape quickly lost its user base. During that time, a new standard called ECMAScript was created with the intent ...