JSFoo 2017

JSFoo is a conference about JavaScript and everything related.


Robust UI development with ClojureScript

Submitted by Sandilya Jandhyala (@jysandy) on Wednesday, 14 June 2017

Section: Full Talk Technical level: Intermediate Status: Rejected


ClojureScript is a variant of the functional programming language Clojure that compiles to JavaScript. Central philosophies of Clojure (and ClojureScript) are the notions of immutability and the separation of immutable, unchanging values from mutable state.
This talk will be an overview of ClojureScript and its ecosystem from a philosophical and architectural perspective, with the aim of showing the audience how these tools and architectures enable fast development while at the same time writing correct, bug-free code. I’ll explain how ClojureScript’s immutable data structures and its tools for carefully managing state can make programs easier to understand in and of themselves. Then I’ll talk about some ClojureScript tools and libraries.


Broadly, this is how I plan to structure my talk:
- Discuss the importance of state management in user interfaces. A user interface is a giant blob of state. How do we manage this?
- Introduce ClojureScript, its philosophy of immutability and separation of values from state. How do you get anything done if you can’t mutate? What are the tools for state management in ClojureScript? How does this make it a good fit for React?
- Talk about Reagent, a ClojureScript wrapper for React. I’ll show how Reagent components can be written expressively as just a function of their parameters(props), and how Reagent atoms can be used to manage state.
- A nice consequence of ClojureScript’s philosophy of carefully putting state in atoms is that hot code loading is simple to implement. I’ll talk about Figwheel, a hot code loader for ClojureScript. Figwheel makes feedback cycles very quick during development compared to traditional dev servers that refresh your browser when you change your code. This section will include a demo.
- Can we make state mutations and side effects more predictable, instead of scattering them about our application? I’ll talk about re-frame, an application framework and state container based on Reagent. I’ll discuss the architecture of a re-frame app and its approach to working with side effects.
- Talk about clojure.spec, a new library for specification and runtime validation of data. spec is not a type system; it is a system for specifying data as a composition of predicates. I’ll briefly cover the scope of spec, then explain how spec can be used with re-frame to validate the entire application state at runtime and detect errors quickly to avoid invalid and inconsistent state. This section will also include a small demo.

Speaker bio

Sandy is a developer at Nilenso, where he writes production quality Clojure and ClojureScript for their clients. Sandy spoke about clojure.spec as well at the Bangalore Clojure meetup – see the link section for the code.




Preview video



  •   Sandhya Ramesh (@sandhyaramesh) 2 years ago

    Hello! Thank you for submitting to JSFoo. In order to evaluate your proposal, we need your slide deck and a two minute self recorded preview video of you walking us through the talk. Please edit your proposal and add them at the earliest. Thanks.

    •   Sandilya Jandhyala (@jysandy) Proposer 2 years ago

      Hi! I’m working on my slides at the moment – I expect to be ready with a draft deck by this week. I’ll add them as soon as they’re mostly complete content-wise.

  •   Sandilya Jandhyala (@jysandy) Proposer 2 years ago

    I’ve added the link to my draft slides. They are very much a work in progress – I’d like to flesh out the introduction more with a brief list of clojurescript features and a discussion on the community and ecosystem. The code examples shown also need some cleaning up, they are very cluttered and dense currently. I also want to flesh out some content around figwheel and re-frame, and add some re-frame code snippets. However the general outline of the talk is there.
    I’ve also removed the last two points in the abstract about ClojureScript pain points and the future roadmap, mostly because of time constraints, and also because they don’t really fit in very well with the general theme of the talk.

  •   Sandilya Jandhyala (@jysandy) Proposer 2 years ago

    Hi! I’m working on my video currently – I expect to upload it next week after another retake. I’ve also changed the title of my talk, because the old title was quite a mouthful and not very good.

  •   Sandilya Jandhyala (@jysandy) Proposer 2 years ago

    @sandhyaramesh I’ve added in my preview video.

Login with Twitter or Google to leave a comment