Posts

Showing posts from November, 2014

REST: Uniform interface

In the previous post REST architecture style was discussed, one of the pillars of which is the uniform interface which is the topic of the current post. While REST is not limited by a particular protocol, HTTP is the protocol which is used to implement RESTful applications  in day-to-day life, so the discussion below will be based on HTTP. What the REST puts a constraint on is the interface, in other words, interaction and implementation details are guided by a set of rules.
The constraints on the service interface in order to be called REST as described in the Dr. Roy Fielding’s thesis are: identification of resources; manipulation of resources through representations; self-descriptive messages; hypermedia as the engine of application state.
World Wide Web widely uses three technologies - hypermedia, HTTP and URI - which can be be adopted for creation of Web services or APIs in modern jargon. Not every service or API  that relies on HTTP protocol can be called RESTFul, another term mean…

What is REST?

REST stands for REpresentational State Transfer, a term coined by Dr. Roy Fielding in his seminal work Architectural Styles and the Design of Network-based Software Architectures. In a nutshell, it is an architectural style for building applications for the Web.
Firstly, REST is based on a Client-Server style which is widespread in network-based systems, and one of its main virtues is separation of concerns that can lead to the simplification of the server component’s implementation. Secondly, the server side of an application built using REST style is stateless, while all the state is maintained by a client and sent to the server when necessary. For example, if a customer browses a store data, the information may be paginated and when the customer presses the “next” button, client informs the server what page number it wants to see in contrast to the situation when the server stores the context information of its interaction with a client. The upside of such an approach could be impro…

Understanding Bootstrap 3 Grids

Image
In a previous post Twitter Bootstrap essentials were discussed. Today we'll survey an important part of the framework called grid.

Bootstrap grid is a structure which allows one to create page layouts. Grids can contain up to 12 columns in each row, if you place more than that, additional columns will be wrapped onto the next line. Moreover, each column can have a width of more than one, but the sum should be equal to 12 as is shown on the image below. For example, you could have 12 columns of width 1 or 6 columns of width 2 or 2 columns of width 6 or even 3 columns of widths 3, 6 and 3. It is important that the sum should be equal to 12.
A snippet of code showing a basic grid structure is shown below. The grid, as well as all site content, should be wrapped in a divwith a .container or .container-fluid class. Then everything that is to be placed into a grid should be divided into rows an the content of rows should be subdivided into columns. The only possible children of divs …