Async: Both JavaScript and the GNOME platform have heavily evolved since then, which led to outdated programming techniques and recurring performance stability problems. One of the main issues was the extension's handling of asynchronous programming such as network requests since async/await didn't exist at that point. Therefore one of my main goals with SimpleWeather was to elegantly handle any asynchronous programming with promises.
Engineering case study · GNOME Shell
Engineering SimpleWeather.
A behind-the-scenes look at the architecture, tooling, and maintenance of the production desktop software.
The engineering brief
Learning from the mistakes of the previous idea.
SimpleWeather was built as the TypeScript successor to OpenWeather Refined. The architecture of SimpleWeather was guided by the mistakes of the previous extension, which mostly had to do with it being a product of 2011 that was still being maintained in 2024.
Separation of Concerns: The old extension's UI system was directly connected to the network system. This led to many performance issues. Because the networking, application state, and GUI layers were tightly coupled, the GUI could not be updated independently of a network request. This meant that updating the UI was extremely difficult, changing a setting caused a new network request, and that the weather API's JSON output was directly tied to the UI. SimpleWeather had to separate the network connection and weather state from the UI frontend.
Performance: Because of the aforementioned issues, the old extension was full of performance issues and performance was a common complaint among users (#86, #99, #107, #110). Minor performance hiccups may not be a critical issue in something like a Desktop app, however a GNOME Shell extension runs on the same process as the desktop shell, which means any freezing or slow-downs can affect the whole system, and not just the app itself.
Experience: OpenWeather Refined was the first project that I shipped that gained a real user base. I learned a lot in my year of running this extension, including experiencing failure because of poorly designed behavior (#32), poor testing (#40), and unforeseen issues (#49). The goal of SimpleWeather was to have an extension that could reliably ship stable updates and working features, which lead to me doing more rigorous testing and using the development version myself for a while before shipping a new release.
Interface gallery
Layouts, themes, and locales.
A separation of concerns makes it easy to customize layouts, themes, and translations, without having to worry about what the weather API or networking conditions look like.
Global engineering
International by Design
International support is built into SimpleWeather and evident in its data model and display. First-run behavior is optimized to the user's system settings and location so that the initial experience feels right at home.
Unit safety
Measurements, Not Numbers
Weather values are stored in measurement classes such as Temp, Speed, Pressure, and RainMeasurement. Instead of doubles being thrown around where they could potentially be mixed up, each measurement is stored in a way that hides the unit from the programmer. Internally it holds an imperial measurement, but in order to receive the display string the program must pass in a specific unit to be used.
This makes it much harder for a unit mismatch to occur and ensures that units are only shown to the user in their configured unit. It also keeps variable names cleaner, since the unit no longer needs to be encoded in the name. That eliminates names like windSpeedKph, which always felt a bit like Hungarian notation to me. It also makes the type system aware of the unit, which lets me take full advantage of a typed language.
new Temp(fahrenheit)→temp.display(config)→User-Friendly Stringlocation, gettext, env, GNOME settings, and Intl
Localization
26supported languages
The GUI is localized based on the user's system settings and environment. Language, units, and clock format are all chosen based on what is most natural for the user.
First-run configuration
Regional Behavior
On first run, SimpleWeather determines the country from its location lookup and falls back to the system locale if the location service is unavailable. It then chooses a sensible set of units for that country. China also uses a different search provider because of regional Internet restrictions.
United States
°F · mph · inHg · in · mi
Nominatim searchUnited Kingdom
°C · mph · hPa · mm · mi
Nominatim searchNordics
°C · m/s · hPa · mm · km
Nominatim searchChina
°C · km/h · hPa · mm · km
Open-Meteo searchEverywhere Else
°C · km/h · hPa · mm · km
Nominatim search
The engineering result
Engineering for Real Life.
SimpleWeather began as a response to the failures of OpenWeather Refined that I encountered while maintaining the old code. The rebuild was designed with a completely new architecture and a focus on stability. SimpleWeather wasn't designed as a personal project to get thrown away when I'm done working on it; it was designed as a real piece of software that people around the world could rely on everyday.
Review the implementation
Read the code and docs.
The complete project is developed publicly and guided by what the community wants to see.