Skip to content

Instantly share code, notes, and snippets.

View lamp's full-sized avatar
🇨🇦

@lamp lamp

🇨🇦
View GitHub Profile
(defn add-statuses [instalments effective-date]
(map (fn [current previous]
(assoc current :status (cond
(<= (:due-date current) effective-date) :due
(<= (:due-date previous) effective-date) :open
:else :scheduled)))
(partition 2 1 [{:due-date 0}] instalments)))
vs

SPA Single page architecture lib design "Spah"

Assumptions:

  • Host API is RESTish
  • All host-client transfer is with JSON and all client-host transfer is with POST and multipart POST.
  • Client-side progressive enhancements are the responsibility of the developer
  • The server-side portion of the library will be ruby-based, and the client-side portion will be jquery-based, but the DTOs used to communicate between two will be thoroughly documented to allow drop-in replacement on either side.