bookmarks, tag them, filter by tag, add notes Simple search Recommendations Clojure (server) + ClojureScript (client) Runs on Heroku Neo4j as a database Search is powered by ElasticSearch
(good Java interop) Leiningen for project automation and configuration (based on Maven) Dynamic typing (although type hints could be used) Number of standard immutable data structures (list (), vector [], map {}, set #{}) Immutability is preferred over mutability (for later number of tools exist: atoms, refs, transients, etc.) Nice destructuring capabilities
the basic building blocks of every program Related functions are stored in namespaces (roughly equivalent to Java's classes) Symbols (a, map, reduce) evaluate to some value from current scope Lists ((map identity [1 2 3])) are used to perform actions: their first element is operator and rest are arguments (so called prefix notation) All other expressions ("string", 42, :keyword) evaluate to themselves ; is used for comments
WSGI (Python) Requests and responses are represented as Clojure maps {:status 200 :headers {"Content-Type" "application/edn;charset=utf-8"} :body "[41 42 43]"} Responses are generated using the handlers - plain Clojure functions that take Ring request map as input and return Ring response map as output Additionally, requests could traverse a chain of middleware - something like interceptors, higher-order functions, that somehow modify request, response, or both Low-level HTTP interaction is delegated to the so called adapter (for instance, Jetty server or HTTP Kit)
connects handlers with specific routes - as a result a new Ring-complaint handler is obtained Also allows combining and nesting obtained route maps (defroutes internal-api (GET "/resources" req (retrieve-resources)) (POST "/resources/:id" [id :as {{e-mail :e-mail} :session}] (add-resource! e-mail id)))
like jQuery for the server Takes plain HTML as input, extracts some parts of it using selectors and chages them using transformers Template functions are simply Ring handlers Good for teams with a designer (deftemplate index "templates/index.html" [user] [:span#user] (content user)) Alternatives: Hiccup, Clostache, Clabango, Laser
but not only, clients for different data storages Thoroughly documented and tested Some of the libraries: Neocons - client for Neo4j server REST API Elastisch - client for ElasticSearch REST API Quartzite - scheduling library (uses Quartz Scheduler)
is written in Clojure) Uses Google Closure compiler to further minify and optimize obtained code cljsbuild Leiningen plugin automates compilation/ recompilation and other common tasks
files into JavaScript if Clojure-specific features are not used (for instance, concurrency, Java interop) cljx - uses it’s own source files with specific annotations, which define when given forms should be used (during Clojure compilation, ClojureScript compilation, or both) (defn current-date-time [] (let [time #+clj (java.util.Date.) #+cljs (Date.)] time))
selectors/ transformers API), so quite natural to use in pair with it Supports events (at js/document [«.ok-button»] (listen :click (fn [e] (.log js/console «clicked»)))) Alternative: Dommy
front- end tasks shoreleave-pubsub - implementation of Publish/ Subscriber model (useful for separating presentation and behavior) shoreleave-remote - simplified interface to creation of XMLHttpRequests as well as HTTP-RPC implementation
that supports Java (specifically, JARs/WARs) Heroku - nice «native» Clojure support Application could be automatically built and deployed from it’s source code using Git Phil Hagelberg (main developer of Leiningen) is in Heroku team