Current best way to turn an existing web app into a desktop app without reprogramming it?

308 views Asked by At

I'm looking for a way to take an existing web app programmed in simple HTML4, CSS, and jQuery/Javascript and deploy it as a desktop app that needs no internet access and accesses a local or intranet database. Is there a solution to do this without reprogramming the whole thing in a desktop targeted programming language? I've looked at tons of other similar stackoverflow posts but they all seem outdated or slightly different (they suggest google gears for example). Is there a current and best accepted solution to do this?

Edit: I say without reprogramming. I should have worded that as with as little reprogramming as possible. Also, I'm not afraid to do other programming around the website, such as an application with an embedded browser.

3

There are 3 answers

0
dallin On BEST ANSWER

A year later, I found PHP Desktop (https://code.google.com/p/phpdesktop/). I can't recommend it enough. It is a free, open source project that embeds the lightweight Mongoose server, a PHP Interpreter, and the Chromium Embedded Framework into a single exe. If you're not a PHP fan, there are other variations, such as Python, also available.

All you do is place your web root folder in the same folder as an exe file and then run the exe. Blammo! Your web app looks and behaves exactly like a desktop app. It's super easy to setup. There's also a lot of customization by changing the exe name and icon and editting a settings.json file. You really can't tell the difference between your web app and a desktop app. We're planning on packaging the folder into an installer and selling it as a desktop application and I don't think anyone will ever realize they are running a web app.

1
Hugo Dozois On

Well actually, if there are no links to any other websites, then someone can run it directly from his browser in localweb without the need of any internet connection.

Your browser is an interpreter for html and javascript so, all you would have to do is like put everything in a folder and launch the base html page.

If you want to have it like a desktop app without launching the browser, that can get complicated. Everything depends of how your app is made.

0
GrayFox374 On

Why? If you are accessing an intranet database then you can access an internal web server. If that is the case, then leave it as a web app that simply does not go out onto the Internet. There are probably millions of web apps that function this way. Think about the question. There is no way to do this without reprogramming. The targeted platforms and fundamentally different paradigms. HTML and CSS and jQuery/JavaScript are designed to run inside a browser. Desktop applications have no such constraint. If it is an app simple enough to be boiled down to your basic DB CRUD app, then just bite the bullet and knock it out. You can salvage most of the logic from jQuery/JavaScript, as that is where the action takes place, but the UI will need heavy revamping. You should examine the business needs, and build the right app for the requirements. And if you have to rewrite code to do it, well, that's why you make the big bucks. ;-) So to summarize, first answer, there is no current best way. Most shops will simply build against multiple platforms. Two, no. There may be some archaic or esoteric witchcraft out there to do this, but I don't know of any, and I am certain it wouldn't be pretty. Third question restates the first. You crippled yourself with the without reprogramming clause. Why are we in this profession?? To code!!! If the powers that be want to reinvent the wheel, smile and bill them for it.