Clojure web dev history

20
Clojure Web Dev History Ikuru K @ Shibuya Java #19

Transcript of Clojure web dev history

Page 1: Clojure web dev history

Clojure Web Dev History

Ikuru K @ Shibuya Java #19

Page 2: Clojure web dev history

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

Page 3: Clojure web dev history

Clojure web dev history

1. Servlet + Clojure as a library (2007 ~ 2008)2. Ring (2009)

a. Compojure3. ‘Frameworks’

Page 4: Clojure web dev history

Year 2007: Clojure = Java Library

Page 5: Clojure web dev history

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

Page 6: Clojure web dev history

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

Page 7: Clojure web dev history

Trend: More with Clojure!

Java

Clojure

Clojure

Java(libs)

Page 8: Clojure web dev history

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

Page 9: Clojure web dev history

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

Page 10: Clojure web dev history

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

Page 11: Clojure web dev history

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

Page 12: Clojure web dev history

Luminus

- Libraries combined for you- Battery included- lein new luminus foo-proj

- Customizable via lein template switch- Optional cljs setup

- Maintained- Very popular

Page 13: Clojure web dev history

Pedestal

- Ring: Middleware, Pedestal: Interceptor- Backed by Cognitect- Async support

Page 14: Clojure web dev history

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

Page 15: Clojure web dev history

Arachne

- Aims to be a full stack framework- Developed by Cognitect Employee- Currently in alpha, promising

Page 16: Clojure web dev history

Duct (2)

- Component lib replaced with Integrant- Evolving into a full stack web framework with

inspirations from Arachne- More lightweight compared to Arachne

Page 17: Clojure web dev history

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

Page 18: Clojure web dev history

Extra: Macchiato

- Ring on Node.js!

Page 19: Clojure web dev history

Summary

- , Everywhere

- Ecosystem built by community- JVM: Arachne vs Duct- Node.js: Macchiato?

Page 20: Clojure web dev history

Thanks!