Skip to main content
Huy's site

Using tools with appropriate ability

As you may have learnt from my previous posts (blog post and fedi posts), I’m writing a client for lotide named Luna. And you might also have seen me saying it’s using Django as framework and my remark on it being unfitting. I am going to elaborate more on this in this post.

Django

Django is a batteries-included web backend framework. It includes:

  • web server
  • router
  • database connector and ORM
  • database migration tool
  • authentication
  • admin tool
  • command line framework
  • templating engines
  • internationalization tools
  • form handlers
  • email

There is a lot more that can be installed as plugins, and some of these tools can be unplugged from the INSTALLED_APPS in the settings. However, given that the default contains so much, it can be troublesome to get a minimal setup.

Luna

On the other hand, Luna is just a frontend for lotide (a server-side-generated frontend, not to be confused with JavaScript front end), alternative to its official front-end hitide.

I started writing this client (with Django) because:

  • This project (lotide) seems interesting and I’d like to work with it.
  • I don’t like the default client. Not that the default one is bad.
  • Unfortunately, I don’t program in Rust, and am not willing to, so contributing directly to hitide is unlikely.
  • This web framework (Django) seems popular, and some experience with if is required for some jobs so /shrug

It doesn’t need database handling, or administration, or emailing. I would definitely have no use for most, if not all of djangoadmin and manage.py commands.

Django is an overkill for Luna. Using a big tool for small task feels very clumsy, with all the tools you won’t use and tools that you have to use.

Alternatives

As I get quickly annoyed with the generated manage.py and the lengthy settings.py getting out of hand, I haven’t worked on the client for quite a while, and am planning to drop development if no one else is taking over.

I have also tried to rewrite it in Go, but it seems internationalization support for Go is quite lacking. So, I backed to a more familiar stack using Quart (with better support for asynchronous programming, though it might be another overkill) and Jinja (which has somewhat matured internationalization support) and renamed it to a less common name (Yue) to avoid name conflict which led me to call Luna’s package lotide_luna. I’m less motivated than before, and also have less time, so this will move much more slowly.


Would you like to discuss this post? Email me!

Fediring

Look at my fedi fellows' sites:
  1. Previous site
  2. What is Fediring?
  3. Next site

Articles from blogs I read

Supreme Count eliminates possibility of presenting exculpatory evidence to federal court

The Supreme Court eliminated the possibility of presenting exculpatory evidence to a federal co…

via Richard Stallman's Political Notes May 31, 2022

bleh

A few weeks ago, the maintainer of a project on SourceHut stepped down from their work, citing haras…

via Drew DeVault's blog May 30, 2022

Mesa, ImageMagick Packages Update in Tumbleweed

Snapshots for openSUSE Tumbleweed have been continuously released this month. This week we will loo…

via openSUSE News May 25, 2022
Generated by openring