maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Port an application written in Java Script (https://talk.maemo.org/showthread.php?t=58395)

maemo.learner 2010-07-13 22:16

Port an application written in Java Script
 
Hello ,

I have an application written in completely in Java Script and I want to port it on a Maemo Platform. Its basically an spreadsheet application.

I recently installed Maemo 5 on Ubuntu 10.04.

I am newbie to development on maemo.

Is it possible to port it on Maemo Platform ? How should I start ?

Kindly help .

uTMY 2010-07-13 22:24

Re: Port an application written in Java Script
 
javascript will run in the context of the various browsers just fine so unless you are using platform specific calls of some form or other then it ought to run pretty much as is.

Of course as suggested you should not confuse Javascript (aka ecmascript) with Java which is entirely a different animal.

rgds

Nokia 5700 2010-07-13 22:25

Re: Port an application written in Java Script
 
Do you mean Java like in SE or web-Java scripts?
Both are possible, a .js works through MicroB/the webbrowser.

maemo.learner 2010-07-14 07:50

Re: Port an application written in Java Script
 
Quote:

Originally Posted by uTMY (Post 750884)
javascript will run in the context of the various browsers just fine so unless you are using platform specific calls of some form or other then it ought to run pretty much as is.

Of course as suggested you should not confuse Javascript (aka ecmascript) with Java which is entirely a different animal.

rgds

Thanks for the reply.

I already managed to open my application using a browser. I used Qt demo browser for that.

But somehow I want to develop it independent of Browser. How can I do that ?
So that a person, unknown of the fact that it's an Java script application, can open that app by clicking its icon on maemo device.
I want a way out of this . How should I start ? I have the code with me written in Java Script. How can I use this Java script code from now on to build an application ?
Kindly Help .

antoarts 2010-07-14 08:05

Re: Port an application written in Java Script
 
No idea really, but I guess you should develop some kind of interpreter able to read the js and execute it. You would have to do that in another language and it could be rather complex. I'm kinda sure there are open source alternatives (such as Gecko (?) in firefox)

jmvh 2010-07-14 08:12

Re: Port an application written in Java Script
 
Quote:

Originally Posted by maemo.learner (Post 751205)
I already managed to open my application using a browser. I used Qt demo browser for that.

But somehow I want to develop it independent of Browser. How can I do that ?
So that a person, unknown of the fact that it's an Java script application, can open that app by clicking its icon on maemo device.

JavaScript is meant to be run in a browser. If you just want to be able to launch the app from your desktop, the easiest way would be opening the app in a browser, creating a bookmark and placing that bookmark on the desktop.

If that's not enough, there are basically two options:

1. Rewrite the whole application in another programming language
2. Find out if there is a tool around that's able to compile the JavaScript app to native code.

Both options will require work depending on the size of your code. I'd just stick to running it in a browser.

antoarts 2010-07-14 08:15

Re: Port an application written in Java Script
 
Agree with jmvh, I don't think it's worth it

attila77 2010-07-14 08:29

Re: Port an application written in Java Script
 
The ideal solution is Nokia's WebKit based WRT (web runtime), but it has not yet been publicly released for the N900. As an alternative, currently QtWebkit can be used to bootstrap the html/javascript app (either from C++ or from Python).

uTMY 2010-07-14 10:58

Re: Port an application written in Java Script
 
for some background info ...

http://en.wikipedia.org/wiki/JavaScript

rgds

voracity 2010-07-14 13:02

Re: Port an application written in Java Script
 
What attila77 has suggested is your best bet, particularly if it's either pure html/javascript/etc. or the back-end is hosted on a public website and your intended users will always have internet access.

If the back-end is not public (or meant to be run on the same computer as the javascript, etc. code), you can get away with just porting it to Python 2.5 and running a simple Python web server (NOTE: for security, make sure it can only be accessed locally and block non-localhost referers!) If that's the way you want to go, look up "simple python web server" in Google. You can also combine that with QtWebkit (not that I have any experience with it).


All times are GMT. The time now is 15:58.

vBulletin® Version 3.8.8