Live data from Hacker News

Ask HN: How to create web, mobile, and desktop apps from a common code base?

news.ycombinator.com

11–20 of 30 posts

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#12

Consider .Net Core it requires c# but all the desktops and android are supported. I don't know about iOS

iOS is supported even better than Android. You can experimentally build applications with NativeAOT for it and there's even native Swift interop[0] bypassing ObjC in the works (the motivation behind it is somewhat elusive to me but hey!)

[0] https://github.com/dotnet/runtime/issues/93631

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#13
post #8
post #4

Earlier quoted context omitted.

One of the versions will be a website, but I want mobile and desktop versions to be able to operate in offline mode with a local database.

Have you seen PWAs? https://www.google.com/search?q=pwa Websites already have access to offline storage via the localStorage API. When the user installs a PWA, it gets additional permissions which make it even more similar to a native app.

As a web dev, I'd recommend against this. They have pretty shitty UX and always feel like second class citizens...

If you want your users to be happy, make a proper app

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#16

Consider .Net Core it requires c# but all the desktops and android are supported. I don't know about iOS

Is it .NET Core or just .NET? I think .NET Core was renamed to just .NET a while back but it's impossible to keep track of what's what after the many naming convention changes the team regularly makes.

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#17
post #8

Earlier quoted context omitted.

Have you seen PWAs? https://www.google.com/search?q=pwa Websites already have access to offline storage via the localStorage API. When the user installs a PWA, it gets additional permissions which make it even more similar to a native app.

As a web dev, I'd recommend against this. They have pretty shitty UX and always feel like second class citizens... If you want your users to be happy, make a proper app

Plus, I'm pretty sure localStorage is limited to 5 MB of data.

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#18

Consider .Net Core it requires c# but all the desktops and android are supported. I don't know about iOS

Is it .NET Core or just .NET? I think .NET Core was renamed to just .NET a while back but it's impossible to keep track of what's what after the many naming convention changes the team regularly makes.

It was renamed only twice. Once, after a clean break, rewrite and going open source, from .NET Framework to .NET Core. Then, from .NET Core to .NET to indicate a single platform going forward.

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#19

Consider .Net Core it requires c# but all the desktops and android are supported. I don't know about iOS

In my opinion .NET is just not there yet. MAUI (the microsoft UI framework and Xamarin successor) does not support Linux or WASM and the main alternatives Uno Platform and Avalonia UI that do support Linux+WASM may be usable for smaller feature sets but as soon as it comes to more complex scenarios or library support, there is so much room for improvement.

Furthermore, the deployment size of .NET is HUGE and NativeAOT is really hard to accomplish as soon as you have a few libraries. Startup times are also not that impressive and deploying for all platforms is really a pain.

For comparison the size of a simple hello world Android App

  .NET > 70MB
  Flutter 
That may sound like it's not relevant, but believe me, it is.

Re: Ask HN: How to create web, mobile, and desktop apps from a common code base?

#20
I would recommend Capacitor JS for mobile, responsive CSS (or CSS utility libs such as PrimeCSS, PrimeFlex, or tailwind), and any JS state based library (React, Preact, etc).

Many people underestimate the power of webview based tech in mobile. For most usecases, webview based tech does just fine.

Post reply on HN