Here's a summary of the themes discussed on Hacker News regarding Microdot:
Simplicity and Minimalism
A central theme of the discussion is Microdot's small codebase and its ability to offer core web framework features in a concise package. Users frequently compare its size to the early days of other frameworks, highlighting a desire for simplicity in modern development.
- "It’s great on esp32 with MicroPython. Even has support for server sent events (SSE). Paired with htmx, SSE gives some fun intetactive web experience for iot devices - instant GPIO status indicators etc. Loved tinkering with it. The source code is very readable too." - enkrs
- "Sounds like this framework is comparable in size to the original Rails, which clocked in at under 1000 lines of code (microdot is 765 lines per the article)." - cout
- "I'm not sure there's anything "impossible" about how small this is. You don't really need a lot of lines of code to support routes, request and response and nothing else. If anything, 765 lines of code for this is quite a lot." - iLoveOncall
- "Yeah, it's an over exaggeration to say "impossibly small", it's a pretty normal size for a minimal routing class..." - illegaly
- "travisgriggs: Numerous comments on the “impossibly small” bit in the title. It makes me wonder if it was put there as a bit of tongue in cheek, less as a brag. E.g. The “it doesn’t have to be that big” Microdot web framework (which I honestly first thought had something to do with Microdot anti theft devices that they put on cars around me). Elsewhere on HN right now is a post about a dermatologist vibecoding an app for skin stuff. I view the “need/use ai for coding” as an indictment against how complex software development has become. What I think we marvel at is the surprise that sometimes reall can be just that simple. 99% of the people who are using Django/flask/etc don’t really understand how they work under the hood all that well. And so it’s always an “is that all??” moment when we do these “back to the basics” exposé’s where we show that 80% of our needs are covered by something simple and understandable." - travisgriggs
MicroPython and IoT Suitability
The discussion frequently touches upon Microdot's ability to run on MicroPython, making it particularly relevant for Internet of Things (IoT) devices. Users share positive experiences and express interest in using it for embedded systems.
- "It’s great on esp32 with MicroPython. Even has support for server sent events (SSE). Paired with htmx, SSE gives some fun intetactive web experience for iot devices - instant GPIO status indicators etc. Loved tinkering with it. The source code is very readable too." - enkrs
- "ou122: I would love to try this on my ESP32-C3 Super Mini, the small web framework on the small WiFi-capable microcontroller."
Scalability and Performance Expectations
There's an ongoing debate about the performance implications of a minimal framework. While some believe simplicity implies limitations, others argue that for many embedded use cases, Microdot's performance is more than adequate. The author clarifies that unreasonable performance expectations should not be placed on microcontrollers.
- "Tepix: I looked at your benchmark article. I would like to see how many requests per second these SoCs with your server can manage on a simple task (printing the current time) - both with http and https. Cheers!"
- "miguelgrinberg: You are more than welcome to evaluate Microdot on the specific device you are interested in. It is good to keep in mind that people don't run web apps on microcontrollers because they have good performance. Don't expect any miracles."
- "motorest: > I'm not sure there's anything "impossible" about how small this is. You don't really need a lot of lines of code to support routes, request and response and nothing else. If anything, 765 lines of code for this is quite a lot. How do you explain why virtually all frameworks end up requiring an order of magnitude more LoC?"
- "iLoveOncall: Because they support a lot more features?"
Framework Design Philosophy and Evolution
The discussion also delves into the broader context of web framework design. Comparisons are drawn to older frameworks like Rails and Bottle, and there's an appreciation for the original design intent behind Microdot. The recent migration to Microdot 2 is also a point of discussion regarding backward compatibility and framework evolution.
- "cout: Sounds like this framework is comparable in size to the original Rails, which clocked in at under 1000 lines of code (microdot is 765 lines per the article). I don't know if the original Rails would have run on mruby though (if it had existed at the time), and Rails certainly did a lot of things the author of microdot would have considered "dark magic"."
- "graemep: It looks a lot like Bottle[1] but with MicroPython support. [1] https://bottlepy.org/docs/dev/"
- "cryptoboy2283: https://github.com/miguelgrinberg/microdot > Migrating to Microdot 2 You gotta be kidding..."
- "zem: it's literally there in the linked readme: Version 2 of Microdot incorporates feedback received from users of earlier releases, and attempts to improve and correct some design decisions that have proven to be problematic. For this reason most applications built for earlier versions will need to be updated to work correctly with Microdot 2. The Migration Guide describes the backwards incompatible changes that were made."
Comparison to Modern Development Complexity
Several users reflect on how Microdot's simplicity stands in contrast to the perceived complexity of modern software development, particularly with the rise of AI coding assistants. They express a desire for more understandable and foundational tools.
- "travisgriggs: ... Elsewhere on HN right now is a post about a dermatologist vibecoding an app for skin stuff. I view the “need/use ai for coding” as an indictment against how complex software development has become. What I think we marvel at is the surprise that sometimes reall can be just that simple. 99% of the people who are using Django/flask/etc don’t really understand how they work under the hood all that well. And so it’s always an “is that all??” moment when we do these “back to the basics” exposé’s where we show that 80% of our needs are covered by something simple and understandable."
- "chuckadams: ... One other way to look at it is that software is realizing enough of the dreams of reusability that cobbling together scripts at such a high level with only the smallest understanding is finally becoming possible. I'm not going full Pangloss here, development is still a massive clusterfuck in many places and probably always will be by its nature, but the frontiers have pushed waaaaay back since I got started."
- "bdcravens: ...The last large app I built in CFML (ColdFusion) was based on FW/1, which is a MVC framework in less than 1800 lines (including comments). No external dependencies, but to be fair, the CFML application server bakes in pretty much every dependency that most applications would ever need."
Author Engagement and Specific Use Cases
The author of Microdot, Miguel Grinberg, actively participates in the discussion, answering questions and providing context for his work. One notable exchange involves a user inquiring about controlling a heating unit, leading to a discussion about reverse-engineering APIs for smart home devices.
- "miguelgrinberg: Always a nice surprise to find my stuff on the front page. If you have any questions about Microdot, I'm here to answer them!"
- "xrd: I really love this post. The author did a great job with their writeup, and that probably came from a clear presentation. I'm fascinated by your approach where you used your own temperature and humidity monitors. Apologies if this is in the links in the article, but I wondered how you controlled your heating unit. The reason I ask is that I have a nest device talking to my AC unit, which means I'm locked into the Google ecosystem. It works well, but it doesn't connect to the Home Assistant system for everything else in the house. I would like to remove the Nest dependency, or at least have multiple ways I could start optimizing the power utilization of my AC unit."
- "miguelgrinberg: Thanks. The smart heating device in question is one that is fairly popular in Ireland, but I believe it isn't sold elsewhere. The brand is Climote (https://www.climote.ie/). As part of the service, this controller gives you the option to send commands through an app, or by sending SMS (the device comes with a SIM card and gets its own mobile number). The commands would allow you to ask if the heating is running or not, to turn the heating on or off, and so on. I first implemented the SMS interface with Twilio, but then found that the number of texts you can send to the device is capped. I don't remember what was the monthly allowance, but I reached it in a few days after querying the device every 15 minutes or so 24/7. I then found a project on GitHub with the reverse-engineered API that the phone app used to send commands. So I then reimplemented the command logic using this API to be able to talk to the controller without limitations. I'm not familiar with the Nest devices, but I'd suggest you do a search on GitHub to see if someone figured how to reverse-engineer its API."