September 11, 2024
October 3, 2022
Blog

👮‍♂️ There Is A New Manager In Town

After years of using Electron, we have decided to rewrite Manager entirely from scratch in C#. The result is a much lighter and more stable manager that better integrates with the host OS. It also allows us to reuse parts of Core (our .NET SDK) and DesktopUI.

Matteo Cominetti
COO at Speckle
Contents
🥱TL;DR
We have released a brand new version of Speckle Manager! Check it out from our downloads page, and keep reading to know how we got there 🙇.

Context

Deploying desktop applications comes with its own unique set of challenges.

On the web, we have pipelines that automagically handle everything, we can ship new versions of our server and services in minutes, and users don’t even notice when this happens!

On the contrary, in desktopland, things are more complicated as we have to work within an environment we do not control: the end users’ systems.

In our specific case, when deploying Connectors for Speckle, we need to make sure of a few things:

  • support different operating systems (and in some cases, different architectures as ARM or Intel)
  • support all sorts of possible setups like virtual machines, local and system-wide installations, offline installations, and more
  • deal with obscure restrictions set up by corporate IT departments
  • deploy apps that are not standalone, but plugins that need to work within very specific configurations and limitations set by the vendors
  • ability to frequently update (and sometimes downgrade) Connectors
  • notify users that updates are available
  • let the user manage one or more Speckle accounts

And this is where Manager comes into play, it’s a solution to most of the above; it lets users install Connectors with ease and manage their Speckle Accounts from one single place.

The Old Manager 🧓

The very first iteration of Manager was developed in 2019 for Speckle v1 using Electron.

At the time, there were not many cross-platform frameworks, and the idea of being able to use JavaScript and web UI components was quite appealing - it was definitely the best choice at that time, and it has served us well for many years now.

However, with time, we started seeing some of its shortcomings as well:

  • Electron is known for being quite resource intensive
  • We needed a full-blown client-server architecture inside a single desktop application. This made the code base messier and the development experience a bit painful
  • From UI elements to system-specific behaviors, Electron always felt a bit forced, and we often found unexpected behaviors (partly also due to the technical debt accumulated over years of development by different people)

The New Manager 👮‍♂️

Being Manager such a critical piece of our infrastructure and Speckle’s distribution, we decided to set off and try to improve things. We first started by looking at what new cross-platform frameworks had been developed; here are a few of the most notable ones:

Ultimately, given the progress in .NET Core, advances in the Avalonia framework, and our team was already familiar with it, we decided to set on that.

In just two weeks, we had an early alpha version of Manager, rewritten entirely from scratch in C#, ready for some internal testing.

After some additional refinement, we got:

  • a much lighter and more stable software. The performance has increased, and RAM consumption decreased
  • a better developer experience, and the possibility of reusing parts of Core (our .NET SDK) and DesktopUI (the interface shared by most of our Connectors)
  • a desktop app that better integrates with the host OS
  • hopefully fewer bugs 😉

Challenges

Most of the challenges came from parts of the application that previously were handled automatically by Electron; we now had to write most of these ourselves, such as installation and automatic updates.

Automatic Updates were resolved with a brilliant NuGet Package called NetSparkle that works cross-platform and took very little time to implement.

Installation on Windows was taken care of by InnoSetup, while on Mac, we just opted to create a classic dmg with another NuGet Package. An unexpected hiccup was supporting both the Intel and ARM chips on Macs, but luckily we found a tool called lipo that allowed us to create a Universal Binary release and not have two separate installers for Mac.

Conclusion

We feel like this transition has been worth it, although users are just starting to migrate, so we’ll only know fully in some weeks.

We’re also quite confident about the stack we chose; it is probably the best choice for us at this stage - but it doesn’t mean it’ll be in 5 years. Like all things, it’s crucial never to be afraid of experimenting and iterating!

Now, what are you waiting for?

👉 Check out the new Manager! 👈

Lots of kudos to all the open-source projects that have made this possible, just to name a few:

What's Next

Join us at SpeckleCon, where you and your team can present projects you are proud of. Showcase how you leveraged Speckle's connected and collaborative aspect, and let’s shape the future of AEC together!

More about SpeckleCon!

Subscribe to Speckle News

Stay updated on the amazing tools coming from the talented Speckle community.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
Author
Matteo Cominetti
COO at Speckle

Visit LinkedIn