Getting started with RESTful APIs using the Flask microframework for Python

Getting started with RESTful APIs using the Flask microframework for Python In this tutorial we are going to learn how to create a simple REST API using Flask Python and SQL Alchemy. A good RESTful API structure imples the logical segmentation from the Models and the Data, but for this tutorial purpose we will create everything on the same file. One other thing that we will be using is a virtual environment because we can have a clean and isolated environment that doesn’t depend/share on other virtual environments' libraries and doesn’t access global installed libraries on your »

Extending backbone's requests with custom headers

We have all but love for backbone around here. But although it's pretty flexible and complete, sometimes you just need that something that doesn't quite work the way you need, like adding custom headers to every single request. You could be tempted to add a sync function on every model and collection and add your custom headers there, but besides multiplying your code many times, if your project is going on for more than a few weeks you might have some serious copy pasting to do. There is a simpler, easier and prettier way of adding for example, a bearer »

Backbone App - End to End: Connecting to an external API

This article is the third article in the Backbone App - End to End series. In the previous article we created a basic design pattern to structure your backbone app. In this article we shall hook our previous work with a live external API that contains movie data, and we will hook it up with our search page. Right now you should have: Movie Model: MovieApp.Models.Movies = Backbone.Model.extend({ initialize: function(options) {}, }); Movie Collection: var Movies = Backbone.Collection.extend({ initialize: function(options) {} }); Movie, home and search page Views: MovieApp.Views.MovieView = Backbone.View.extend({ initialize: function(options) {} }); MovieApp. »

3 Layer Architecture

There is a magical creature we've been chasing throughout multiple projects, plotting and planning with some beautiful minds, and it has a name: The 3 Layer Architecture. In short, the 3 Layer Architecture allows small development teams to build an API-centric, scalable and secure project. The structure is based on compartmentalised communication through message queueing. All you need are 3 VPS servers and some open source software. The beauty lies in the logic and minimal cost - the proof in the ease of explaining it. The architecture is outspoken (restful) API Centric, with MQ (message queuing) as backbone. What makes »