Servage Magazine

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

Archive for March, 2015

Maps, tiles markers and clustering

Saturday, March 28th, 2015 by Servage
maps-markersMany web applications are utilizing interactive maps to emphasize their geographic content. It is suitable in many cases like store locators, real estate listings, travel reviews etc., and maps have become a well known and easily understood element by visitors. Therefore maps are no longer just a smart little square somewhere, but in some web applications maps have become the centerpiece, taking up large parts of the screen space and being the main element the user interacts with. Maps Good examples of map driven applications utilize maps in different ways, but have in common that the map provides significant value for the user. Being able to implement maps nicely is therefore helping you to ...

Increase database performance for your website

Saturday, March 21st, 2015 by Servage
databaseThe database performance is a common bottleneck for websites. This is rarely due to the actual database server, but most often caused by misuse of the database connection by making overly complicated requests, forgetting to optimize indexes or field types, forgetting caching and other reasons. Fortunately it is quite simple to implement a wide range of improvements which really can make an overall difference for the user-perceived performance of your site. Let us say you have a site which on average uses 2 seconds to render in the browser. Analyzing the different parts of that load time, you could have an allocation similar to the following: Request to server: 200ms Webserver script execution: 1.000ms ...

Using and building own middleware in Laravel

Tuesday, March 17th, 2015 by Servage
middlewareWith Laravel 5 there are new possibilities using middleware. Essentially HTTP middleware is taking any request and doing "something" with it. For example Laravel has native middleware that can check authentication and authorization, so the framework can determine if the user is logged in and may perform a given action. If not, the middleware can redirect the user to a login page or display a relevant message. If the user is allowed, the middleware will let the request proceed without intervention. Another example could be to check for SSL encryption status. Some pages may require unencrypted requests (http), some may require encrypted requests (https), and some may work with both. This depends ...

Enrich your website with data from other services

Thursday, March 12th, 2015 by Servage
apiWhen novice web developers are confronted with the process of Application Programming Interfaces, the reaction is often a feeling of being overwhelmed - both with possibilities, but also with complexities. Understanding and utilizing the power of regular script based interactions between web server and database to render a meaningful HTML output is already pressing many hobby coders to the limit of their understanding. Illustrating interactions between multiple servers through APIs is adding to that complexity, and understandably often creating a reaction of confusion or uncertainty how these services interact technically. The purpose of this post is to demystify the API term, and explain in simple terms how a typical API interaction ...

Automating recurring tasks with cronjobs

Monday, March 9th, 2015 by Servage
cronjobWebsites often consist of information in a database that is shown to users in combination with design and layout, to provide a good representation of the content. For example a blog has posts, comments and author information in a database, which is displayed to visitors via a template through a browser. Systems like Wordpress provide a great foundation for such sites, because it provides the entire backend infrastructure for the content management, and at the same time offers great flexibility for customizing the visual output. Another example is an online store, which holds product information in a database, while showing it to customers on the website with a given design desired by ...

Using cache to optimize your website performance

Wednesday, March 4th, 2015 by Servage
cache-timeMost growing web projects will experience performance problems at some point. Usually this can be relieved by optimizing code and workflows. Especially database request are a big concern when it comes to optimizing website performance. These request happen while a script executes and must finish before the visitor can receive the response. This is often a bottleneck due to inefficient programming, and can be highly optimized. There are different approaches to this, and also very different stages during a response generation where caching can be applied. Therefore please take this as inspiration how to improve your site performance. The example below starts with the most generic caching available, ending up with the ...