Post on 21-Jan-2018
Clojure Web Dev History
Ikuru K @ Shibuya Java #19
About me:
- Web developer Work at Cybozu Startups, Inc- Company Clojure Story: https://clojure.org/stories/cstap
- HN: iku000888- https://github.com/iku000888- https://twitter.com/iku000888
Clojure web dev history
1. Servlet + Clojure as a library (2007 ~ 2008)2. Ring (2009)
a. Compojure3. ‘Frameworks’
Year 2007: Clojure = Java Library
Dec 11, 2007 @ mailing list...
> I was also wondering what the web programming story is for clojure. Is there a preferred approach?
Rich: Not yet. I hope to provide a simple servlet implementation that will route requests to Clojure fns, and a simple HTML macro system like CL-WHO et al. After that I would be interested in input on how best to provide Clojure as a web scripting engine like JSP
- https://groups.google.com/forum/#!searchin/clojure/web|sort:date/clojure/YVoxROEaT6M/s9Pu-ZQ2PPgJ
Webjure (Jan 16, 2008)
- Servlet- Dispatch to clj functions- Basic HTML templating- Basic sql/jdbc setup- Ajax repl(!)- 〜proof of concept- https://github.com/tatut/Webjure- https://groups.google.com/forum/#!msg/clojure/xC8HpZp5kMU/H-Y84DBXS7cJ
Trend: More with Clojure!
Java
Clojure
Clojure
Java(libs)
Break through: Ring (~2009)
- Request/response as clojure map- Extensible via middleware- Adapter with existing Java web servers (Jetty
etc)- Inspired by Rack(Ruby), WSGI(Python)- Dominant standard for Clojure web dev- https://groups.google.com/d/msg/clojure/D3yXjLWqjyQ/Qq83HDO43BIJ
Compojure 〜2009
- Started off as a servlet Clojure stack- Servlet adapter + HTML templating + routing- Most of the features moved into Ring- Now a routing Library
- To be replaced with ataraxy- ‘ant run’ + build.xml
- https://github.com/weavejester/compojure/tree/2e01266bcdcaa2565d189205f392c301b7aeca65
Noir
- 1.0.0 on 2011- Built on compojure- Bundles Session, Cookies, Validation etc- Quick Start = Initially extremely popular- Lacked extensibility/flexibility- Deprecated in 2012
Conjure 〜2010
- Aimed to be like Ruby on Rails- Scaffolding- Tasks via dedicated lein plugin- MVC(?)
- Did not cross the chasm- Lot to learn
- Might as well roll your own
Luminus
- Libraries combined for you- Battery included- lein new luminus foo-proj
- Customizable via lein template switch- Optional cljs setup
- Maintained- Very popular
Pedestal
- Ring: Middleware, Pedestal: Interceptor- Backed by Cognitect- Async support
Duct
- Stuart Sierra’s Component framework applied to web development
- Component?- Manage Lifecycle of app components
- DB, web server etc.- System = reified object, not in code
Arachne
- Aims to be a full stack framework- Developed by Cognitect Employee- Currently in alpha, promising
Duct (2)
- Component lib replaced with Integrant- Evolving into a full stack web framework with
inspirations from Arachne- More lightweight compared to Arachne
Extra: asked
- @defn podcast https://defn.audio/- Q: Pedestal?
- A: Features are cool, but never had to use it.- Q: Arachne?
- A: Data centric approach was good, but using was tedious, so made integrant + duct
Extra: Macchiato
- Ring on Node.js!
Summary
- , Everywhere
- Ecosystem built by community- JVM: Arachne vs Duct- Node.js: Macchiato?
Thanks!