Abishek Goda
My Experiments Learning Lisp

My Experiments Learning Lisp

Modern web application development using Common Lisp

Including bells and whistles - auth0, sendgrid, angular and REST style API.

Abishek Goda's photo
Abishek Goda
·Nov 2, 2021·

3 min read

This is the topic that I am most invested in when it comes to Common Lisp. I've been into web development pretty much my entire career (barring a decade that I spent working on hardware). I've dabbled in the whole spectrum, from multiplexing PHP code into Vanilla HTML to Django templates to REST-style API. Ok, I haven't done any GraphQL or gRPC at this time. I just hit a sweet spot/comfort zone with REST-style API.

I kinda love what angular does for frontend application development. My only issue with angular is the frequent release cycle. By now, I am very comfortable with the angular CLI workflow over typescript. And with UI libraries like antd or primeng, I am very much covered for the whole spectrum of applications that I am interested in building. So I am unlikely to budge from angular for the frontend.

I love what clojurescript did with react. I've been trying to learn some react myself to achieve closer integration with the backend. But then it just doesn't seem to work that way. Besides, react, and vue and all the other newbies seem to move toward standalone frontend SPA frameworks rather than work as part of a templating system. Angular already fits this bill very well for me.

For the new side-project that I am currently working on, I am using an angular frontend. This much is predictable. I spent some time choosing between Django and FastAPI. But then I had a thought: why not use Common Lisp instead? It is a side project anyway. And I am only going to generate JSON data using the backend. It can't be that hard, right?

Here are the constraints I am adding to make this challenging:

  • I am not using a framework. I am just building on top of hunchentoot with easy-routes.
  • For authentication, I need to hook up my API to auth0. This is a challenge I added to up my game. I'll be writing a simple set of defuns to talk to auth0 using drakma,flexi-streams, jonathan and jose. If I get it to work, I'll really think about making it a library that everyone can leverage. But am not yet at a level where I write reusable common-lisp code.
  • I'll be using Sendgrid for emails. Sendgrid allows SMTP interface, so that'll be the fallback. I am trying to see if I can build a library to interface with Sendgrid using drakma to use the templating system from within Sendgrid. Again, this is lower in priority, but if I get it to work, I'll try to make it reusable.
  • Try and follow the 12 factor methodology as much as possible.

This is going to be fun. This side-project is something I need to build for myself. So hopefully, I'll be able to get it working and eventually enable other people like me to benefit from it.

 
Share this