I'm curious about the development of web programs for both desktop and mobile applications. Do developers typically write two separate codebases—one for desktop and another for mobile (like iPhone and Android)—or is there a single code that adjusts responsively for both platforms? For instance, when I access a website from my phone versus my laptop, are these experiences managed by different codes? I realize there's usually a web version and a mobile app version. Any insights would be greatly appreciated!
4 Answers
There are native apps built specifically for each platform (like Windows, iOS, Android, etc.), and then there are hybrid apps that allow you to build once and deploy across multiple platforms. Web apps just need a browser to run, but each OS has its own browsing software.
Typically, you'll have one common backend and separate codebases for the frontend, which can make it easier to customize for each platform's quirks.
In most cases, you'll have a backend server that both desktop and mobile apps connect to for data. The frontends can vary a lot though. There are frameworks like Dioxus, Flutter, and even game engines like Godot that allow code sharing for web, desktop, and mobile. Just keep in mind that using these can lead to issues like larger app sizes and complexity, plus they might limit access to some specific device features. Alternatively, you could go with separate codebases for each platform, which allows for tailored features but requires more work to implement and test everything across the board.
For web applications, you’d usually implement responsive design, which uses CSS to resize elements depending on the screen size. But remember, desktop applications are generally not considered web apps. For example, programs like Microsoft Word or Adobe Photoshop don't operate inside a browser.

Thanks for the helpful links!