Added by Leo D on April 22, 2015 at 6:30pm — No Comments
The slightly misnamed SOAP (Simple Object Access Protocol) protocol is in a sense a type-strong version of the much better know JSON interchange format. The Ruby community clearly doesn't have as much affection for SOAP as the Java and .Net communities, but that makes sense as Ruby is a dynamic language with duck typing, which meshes better in philosophy with the lightweight JSON format, rather than the much more expressive and heavyweight SOAP format.
If given the choice between…Continue
Added by Leo D on March 9, 2015 at 7:00pm — No Comments
In one of my recent projects, I needed to import a lot of data from csv files into a database as persisted domain objects in a web application. This file import functionality wasn't just for application bootstrapping or a one-time legacy data migration, but for a recurring task that allowed the web app to receive updates from a third party vendor.
The number of records in each file could reach into the millions, so I knew from the outset that the plain-vanilla method of creating…Continue
Added by Leo D on September 16, 2014 at 3:00pm — No Comments
In the past few years, I've written a few json API's in rails. There are a few trends driving the popularity of API's, one being Service Oriented Architecture, and another being client side rendering.
Service Oriented Architecture can apply to all services, not just browser accessible ones. It consists of making services available via a standard like SOAP or JSON, to increase re-usability and modularity, SOAP and JSON being the two most popular SOA protocols. SOAP is XML-based,…Continue
Added by Leo D on September 5, 2014 at 5:00pm — No Comments
Given any sequence of simple assignment statements concluded by a return statement, we can view the whole sequence
as a function that executes the first statement,
and then executes and returns a function that contains the rest of the statements.
For example, this sequence of two statements, which results in 6,
x = 3;
can be re-written as: