9

I want to create one application and it should work on both desktop (without internet connection) and in the web. The applications should be the same (I mean UI and code) and work on both web and desktop (or maybe with a little difference)

As server side and desktop application programming language I decided to use Python.

As UI I want to use HTML5 + Javascript (JQuery) + CSS

So, can you help me what tools should I use? I mean maybe some frameworks for my task. What framework should I use in the web and what in the desktop (maybe in desktop it will be some kinda of wrapper for my web version with webkit engine?)?

pleerock
  • 18,322
  • 16
  • 103
  • 128
  • Really, unless you're hard pressed for resources, your best bet is to just run a web server on the end user's computer on a non-standard port. As far as I know, there's no easy way to package a Python web application and make it work without a server, nor is there an easy way to take a desktop application and convert it into a website. – Corbin Jun 01 '12 at 06:32
  • I dont need any server's capabilities in my application. My application would solve simple tasks such as read user data, write it and so. I think the problem is in UI (how does it work on desktop (with webkit engine or something else)) and in the same framework which would work without dependence of server or desktop – pleerock Jun 01 '12 at 06:40

3 Answers3

5

My question was 1 year ago, but now it seems that I found something that is really interesting and seems to be good condidate to use on multiple devices. Its Apache Cordova

It is open-source and has a lot of supported platforms, both mobile and desktop.

[UPDATE] Jan, 2016:

Things have changed in last 4 years and now the good choose looks like is atom electron. This is exactly what I wanted 4 years ago.

pleerock
  • 18,322
  • 16
  • 103
  • 128
  • Hi there. And what about the data syncing ? Like when the user is offline, he/she will do stuffs in the desktop app and later when connected to internet the db in the server will have to sync all the data processed offline. How did you handle this situation ? – Rabin Lama Dong Oct 05 '18 at 14:36
4

I suggest you use web2py. You can create webapps that work offline, and you can package them for any platform.

marbdq
  • 1,235
  • 8
  • 5
  • Looks great! But I can't find any information about creating offline webapps? Can you say me where did you get it? Thank you. – pleerock Jun 01 '12 at 07:45
  • Check this out: http://web2py.com/books/default/chapter/29/14#How-to-distribute-your-applications-as-binaries – marbdq Jun 01 '12 at 08:59
2

Take a look at Pyjs for the UI. The server will still be your problem though.

Ignacio Vazquez-Abrams
  • 776,304
  • 153
  • 1,341
  • 1,358