SlideShare a Scribd company logo
How Midjournal Use
Clojure?
Presented by Asep Bagja Priandana
Twitter: @bepituLaz
What is Midjournal?
We are a new form of media company that
embrace long form journalism for Indonesia
middle-class.
Everyone can be a writer, but your writing will be
curated by our editor.
Midjournal A Year Ago
Midjournal Now
(in Production)
Read and Write
Midjournal Now
(in Development)
Read and Write
Sync
Read Only
Why Clojure?
Functional programming
Composable (No need full stack framework)
It’s Lisp
On top of JVM
Project automation with Leiningen
REPL
Clojure is Still Not For
Geniuses (Like Me)
(function argument argument and-argument whatever-argument)
That syntax above covers a solid 90% Clojure code. A few more things for writing
Clojure code are:
; a comment
‘a-symbol
:a-keyword
“a string”
[a vector]
{:a map}
Library in Our Clojure
Application
Compojure is a routing library
Enlive is a selector-based templating library
Midpress is our open-sourced library
Ring is HTTP server abstraction library
Let’s tear it down!
Compojure
It's a small HTTP routing library for Ring that allows web applications to be composed
of small, independent parts.
Sample routing:
(GET “/user/:id” [id]
(str “<h1>Hello ” id “</h1>”))
Compojure supports GET, POST, PUT, DELETE, OPTIONS, PATCH, and HEAD.
Enlive
The magical templating library.
The HTML from front-end developer:
<h2 class="title">The Dummy Title</h2>
The Clojure code to transform the above HTML code:
(deftemplate tpl-home "home.html”
[home-data]
[:h2.title] (content (:title home-data)))
It will render on the front-end
<h2 class="title">The Title From Database</h2>
Midpress
Our open-sourced library for interacting with WordPress WP-API
(https://github.com/Midjournal/midpress)
Sample code:
(the-loop {:url "http://yourdomain.com/wp-json"})
It will transform JSON string from WP-API into Clojure's vector and map data structure
Ring
Handler
Request
Response
Middleware
Ring is a Clojure web applications library inspired by Python's WSGI and Ruby's Rac
How Do You Deploy The
Application?

More Related Content

PPTX
Educacion a distancia
PPTX
Aprendizaje autonomo
DOCX
Linea de tiempo historia de la facultad de estidios a distancia
DOCX
Catedra cuadro 1
DOC
Prtafolio de evidencias ...
PPTX
El Tutor en Educación a Distancia
DOCX
ROL DEL ESTUDIANTE EN LA MODALIDAD A DISTANCIA
PPT
EDUCACIÓN A DISTANCIA
Educacion a distancia
Aprendizaje autonomo
Linea de tiempo historia de la facultad de estidios a distancia
Catedra cuadro 1
Prtafolio de evidencias ...
El Tutor en Educación a Distancia
ROL DEL ESTUDIANTE EN LA MODALIDAD A DISTANCIA
EDUCACIÓN A DISTANCIA

Similar to How Midjournal Use Clojure? (20)

PPTX
Java programming language
PDF
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
PPTX
Angular Js
PDF
Best node js course
PDF
Javascript beginner-handbook
PDF
javascript-beginner-handbook.pdf
PPTX
What is java?-Saurabh Upadhyay
PDF
Languages used by web app development services remotestac x
PDF
Seeking Clojure
PPTX
Node js Powerpoint Presentation by PDEU Gandhinagar
PDF
Java Full Stack Developer Interview Questions PDF By ScholarHat
PDF
Building APIs using Laravel - A simple approach to scale
PPTX
Angular interview questions
PDF
James Baxley - Statically typing your GraphQL app
PPTX
Lecture 1.1 - Introducing Java.pptx3eeeee
DOCX
Java script hello world
PDF
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
PDF
NodeJs Frameworks.pdf
PDF
Lessons learned from a large scale OSGi web app
PPT
Java tutorial for beginners | Java Features
Java programming language
PJ_M01_C01_PPT_Introduction to Object Oriented Programming Using Java.pdf
Angular Js
Best node js course
Javascript beginner-handbook
javascript-beginner-handbook.pdf
What is java?-Saurabh Upadhyay
Languages used by web app development services remotestac x
Seeking Clojure
Node js Powerpoint Presentation by PDEU Gandhinagar
Java Full Stack Developer Interview Questions PDF By ScholarHat
Building APIs using Laravel - A simple approach to scale
Angular interview questions
James Baxley - Statically typing your GraphQL app
Lecture 1.1 - Introducing Java.pptx3eeeee
Java script hello world
Node Js Non-blocking or asynchronous Blocking or synchronous.pdf
NodeJs Frameworks.pdf
Lessons learned from a large scale OSGi web app
Java tutorial for beginners | Java Features
Ad

Recently uploaded (20)

PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
top salesforce developer skills in 2025.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Computer Software and OS of computer science of grade 11.pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
medical staffing services at VALiNTRY
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
top salesforce developer skills in 2025.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Adobe Illustrator 28.6 Crack My Vision of Vector Design
How to Migrate SBCGlobal Email to Yahoo Easily
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
How to Choose the Right IT Partner for Your Business in Malaysia
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Computer Software and OS of computer science of grade 11.pptx
Operating system designcfffgfgggggggvggggggggg
Digital Systems & Binary Numbers (comprehensive )
Wondershare Filmora 15 Crack With Activation Key [2025
Softaken Excel to vCard Converter Software.pdf
medical staffing services at VALiNTRY
Ad

How Midjournal Use Clojure?

  • 1. How Midjournal Use Clojure? Presented by Asep Bagja Priandana Twitter: @bepituLaz
  • 2. What is Midjournal? We are a new form of media company that embrace long form journalism for Indonesia middle-class. Everyone can be a writer, but your writing will be curated by our editor.
  • 5. Midjournal Now (in Development) Read and Write Sync Read Only
  • 6. Why Clojure? Functional programming Composable (No need full stack framework) It’s Lisp On top of JVM Project automation with Leiningen REPL
  • 7. Clojure is Still Not For Geniuses (Like Me) (function argument argument and-argument whatever-argument) That syntax above covers a solid 90% Clojure code. A few more things for writing Clojure code are: ; a comment ‘a-symbol :a-keyword “a string” [a vector] {:a map}
  • 8. Library in Our Clojure Application Compojure is a routing library Enlive is a selector-based templating library Midpress is our open-sourced library Ring is HTTP server abstraction library
  • 10. Compojure It's a small HTTP routing library for Ring that allows web applications to be composed of small, independent parts. Sample routing: (GET “/user/:id” [id] (str “<h1>Hello ” id “</h1>”)) Compojure supports GET, POST, PUT, DELETE, OPTIONS, PATCH, and HEAD.
  • 11. Enlive The magical templating library. The HTML from front-end developer: <h2 class="title">The Dummy Title</h2> The Clojure code to transform the above HTML code: (deftemplate tpl-home "home.html” [home-data] [:h2.title] (content (:title home-data))) It will render on the front-end <h2 class="title">The Title From Database</h2>
  • 12. Midpress Our open-sourced library for interacting with WordPress WP-API (https://github.com/Midjournal/midpress) Sample code: (the-loop {:url "http://yourdomain.com/wp-json"}) It will transform JSON string from WP-API into Clojure's vector and map data structure
  • 13. Ring Handler Request Response Middleware Ring is a Clojure web applications library inspired by Python's WSGI and Ruby's Rac
  • 14. How Do You Deploy The Application?