Fork me on GitHub
#membrane
<
2023-10-13
>
Thomas Cothran16:10:49

I’m curious about membrane’s current capabilities, and the experience of building an application with it. Suppose you are considering building an application in Membrane in an enterprise context. The requirements would be to support web and desktop, and possibly mobile apps in the future. An appealing visual design is important, and the idea would be to lower the effort supporting multiple platforms. Startup speed is important on desktop. What questions would you about the requirements to determine if membrane is a good candidate?

phronmophobic20:10:27

tldr: I don't think membrane is a great fit for your use case right now, but I hope that it will be someday! Membrane is still in beta and there are still some uses cases that are weakly supported. Just to cover the requirements you listed: • support web and desktop: The primary focus for membrane is desktop. There is some support for web, but it's mostly proof of concept. The main graphics backend draws to canvas with webgl. However, most applications would probably prefer a UI library that uses HTML for graphics. If your use case was one where webgl is preferred, it could be workable, but would still require some investment. • possibly mobile apps in the future: Membrane is probably more likely to get first-class mobile support before first-class web support, but the current mobile support is iOS only and very proof of concept. • An appealing visual design is important: While it's possible to build good looking apps with membrane, it's not currently well supported. • Startup speed is important on desktop: Membrane can be compiled with graalvm's native image. I've haven't tried this for desktop, but this is probably the most straightforward requirement for membrane. Just based on your listed requirements, I don't think membrane is the best option available. However, there are still some reasons why you might choose membrane anyway: • Membrane is simple. Most popular frameworks offer a bunch of functionality out of the box. If you're building an app that looks like existing apps, then these frameworks can be very helpful. However, the less your app looks like other apps, the more important it is to have simple pieces that you can rearrange and remix with custom components. In my biased opinion, membrane offers much more flexibility than other options. • Membrane is stable. Membrane builds on top of a very stable basis (ie. Clojure) and I don't intend on arbitrarily making breaking changes. • Membrane runs on the JVM. If your app leverages the JVM and its ecosystem, then you can directly leverage everything it offers. Swing and JavaFX aren't very easy to use. It's possible to split your app into a jvm backend with a browser-based frontend, but this is fairly painful and introduces a ton of complexity. However, if you're building a web based UI anyway, then JVM integration doesn't necessarily help that much. I think the ideal use case for membrane right now would be for internal tools that leverage JVM based clojure libraries. I'm currently working to expand the scope of use cases where membrane excels. In many ways, I hope that the case for membrane is similar to the case for Clojure. The ecosystem is smaller (much, much smaller in membrane's case), but you get to work with simpler stuff. Let me know if you have any other questions!

Thomas Cothran23:10:57

I'm already sold on Membrane's ultimate value proposition 🙂 With the visual design, is the difficulty there that membrane doesn't provide all the necessary primitives, and one would have to drop down to the host system? Or is it more along the lines that meander has all the pieces, but they're not bundled together in a convenient framework (like a css framework)?

phronmophobic19:10:56

I would say the difficulty is closer to the second explanation. There's no convenient design framework/library. I also interpret the "An appealing visual design is important" requirement as saying that you're targeting a certain amount of polish for your app. I think it's possible to build a polished app in membrane, but I do think it will require building some features that would otherwise already be provided. Some of the features you may have to spend time on for a polished app: • packaging your app for distribution • animations • focus management (eg. tab to switch focus between focusable elements) • common UI components: eg. tabbed panes, sliders, toggles, date pickers, formatted text editors, etc. • accessibility I believe all these features can be provided as simple, reusable pieces, but I just want to give an honest assessment of membrane's current status.