Dmitri Sotnikov, an expert in Clojure and the creator of Kit, discusses the development and collaboration behind the Kit framework and its comparison to Rails. They also explore HTMLX, a server-side rendered framework, and the trade-offs between SPAs and server-side rendering. An upcoming workshop on building applications with Kit is also highlighted.
Kit framework simplifies Closure app development by providing easy integration of new modules and custom templates.
Avoiding complexity and focusing on simplicity, modularity, and maintainability is key when developing backend applications in Closure.
Deep dives
Dimitri's Journey with Closure and Open Source Development
Dimitri shares his experience with using Closure professionally and how it led him to write libraries and frameworks to make Closure more accessible to newcomers. He also discusses his book on structuring Closure web apps and highlights the collaboration on the kit framework, which improves on previous frameworks like Luminous and modernizes Closure app development. Kit addresses the challenge of adding functionality to existing projects with its template system, allowing for easy integration of new modules and the creation of custom templates from GitHub repos.
Advantages and Pitfalls in Backend Application Development
Dimitri emphasizes the importance of avoiding the complexity trap when developing backend applications. He advises against designing for future problems and instead recommends focusing on solving the present problem while keeping the infrastructure as simple as possible. Dimitri suggests using Postgres as the database, implementing queues for data integrity, and utilizing a single Postgres instance even as the app scales. He also advises against premature optimization and overly clever solutions, emphasizing the value of simple, modular, and easily maintainable code.
Structuring Backend Applications in Closure
Dimitri provides recommendations for structuring backend applications in Closure. He suggests organizing the application into independent components such as services, databases, and queues. Dimitri advises against immediately adopting microservice architecture unless necessary, as it introduces complexity and can make local development more challenging. He encourages developers to keep functions short, leverage Closure's immutability, and use pipelines of functions for data transformation. Dimitri also highlights the benefits of using transit for data sharing, but warns against creating transit-specific types that may hinder interoperability with non-Closure clients.
Frontend Development with Reframe and HTMLX
Dimitri discusses frontend development options with reframe and HTMLX. He compares reframe to the MVC pattern, with events and subscriptions serving as controllers and views respectively. Dimitri notes that reframe, using reagent and React, provides a strong tooling experience and allows for a single runtime throughout the app, making scaling and server interactions straightforward. He also explains the concept of HTMLX, which relies on server-side rendering with Closure and avoids dependencies on client-side JavaScript. Dimitri recommends choosing the appropriate approach based on the application's complexity and the need for client-side state.