maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Nokia Web Runtime developer questions (https://talk.maemo.org/showthread.php?t=38214)

qgil 2009-12-23 15:07

Nokia Web Runtime developer questions
 
Do you have questions about Nokia Web Runtime in Maemo? As announced in the Maemo Summit, it's coming for Maemo 5 and the Maemo 6:

We have still some months to go. Now starts to be a good time to share questions about this developer technology, so we can fine tune the developer documentation.

Nokia Web Runtime will be landing on Maemo and Symbian (S60 had it for a while but the new generation based on Qt and WebKit is a much more powerful beast). Web Runtime will be positioned as an entry point for cross-platform development and the expectation is to have the majority of developers using this technology, leaving the native Qt based development for specific and justified cases where more complexity and performance is needed.

In fact it is very possible that some of you considering Qt now for cross-platform development will end up using Web Runtime instead.

It is also possible that some of you power users not thinking of learning C, C++ or even Python will end up giving a try to the Javascript based Web Runtime, turning yourselves into developers as well.

So please, share your questions and thoughts here. I can't promise any answers soon but I can grant you that such questions will be taken into account when writing the documentation, helping us to bring the first Nokia Web Runtime releases for Maemo with documentation more suitable for your needs.

Since the Nokia Web Runtime is a cross-platform technology, most of the documentation will be just as cross-platform in itself. However, depending on your feedback we might have some content in the Maemo Developer Guide providing the extra bits interesting to Maemo developers, linking to the original and independent Web Runtime documentation for the rest.

Fargus 2009-12-23 15:22

Re: Nokia Web Runtime developer questions
 
Is it possible to disable the Web Runtime on an individual device?

qgil 2009-12-23 15:32

Re: Nokia Web Runtime developer questions
 
Mmm this is like asking whether you can disable Hildon on an individual device. Why would you do that?

PS: alright, not a good example since Hildon is providing the Desktop as well. Let's say that it's like willing to "unable" Python (in an hypothetical case where Python would be available and pre-installed).

Btw, if in the future there are pre-installed widgets/apps developed with Web Runtime, "disabling" it you loose those apps. Why a user would like to do that?

go1dfish 2009-12-23 15:39

Re: Nokia Web Runtime developer questions
 
Will flash be supported in the n900 web runtime?

If not, will a js interface to phonon or similar be provided for multimedia capabilities?
This would be preferable anyway, and would be the only way such apps could work on s60 I imagine.

Any timeframe for when this will become available for Maemo5?

go1dfish 2009-12-23 15:43

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by qgil (Post 439151)
Mmm this is like asking whether you can disable Hildon on an individual device. Why would you do that?

Btw, if in the future there are pre-installed widgets/apps developed with Web Runtime, "disabling" it you loose those apps. Why a user would like to do that?

On the n900, if something goes unused by me, and I have any inkling of an idea it's eating juice, I kill it.

Web Runtime widgets would be no exception. And given the additional overhead (particularly on the GTK based Maemo5), I'd likely be even more apt to try to disable these until they prove useful to me as a user or developer.

This concern primarily applies to widgets though, I don't really desire to disable the runtime, but I would be less likely to use a Web Runtime based widget due to the potentially significant overhead. For an application, this does not bother me.

Will the visible/not-visible signals sent to hildon desktop widgets be accessible to Web Runtime Widgets to prevent unnecessary battery drain?

qgil 2009-12-23 17:22

Re: Nokia Web Runtime developer questions
 
I *think* Web Runtime will be only opt-in in Maemo 5: you will get it only if you install something using it.

In Maemo 6 it will be pre-installed as official runtime, next to Qt that will be the official native environment. All the rest (including GTK+) will come only when users install apps depending on them.

There is a timeline at http://www.slideshare.net/santtuahon...ia-web-runtime (linked in the first post).

jsuggs 2009-12-23 17:36

Re: Nokia Web Runtime developer questions
 
What about using common js libraries (ie. jquery). Will you need to have it a part of your local "widget" or will there be some ones available system wide? I'd hate to have 5 widgets all using a common library and each having to load its own copy of a single library.

Bundyo 2009-12-23 21:20

Re: Nokia Web Runtime developer questions
 
I'll repost my questions from Maemo Developers here:

Quote:

Does Nokia WRT have full access to the system and if limited, what is allowed? Desktop Widgets, access to system tray, file system (probably limited), any WebGL patches?

Are there going to be any javascript frameworks included and how easy will it be to get one in? I prefer Mootools for instance. Easy access to Clouds, CDN, etc? Choice of IDEs?

Fargus 2009-12-23 21:40

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by qgil (Post 439281)
I *think* Web Runtime will be only opt-in in Maemo 5: you will get it only if you install something using it.

In Maemo 6 it will be pre-installed as official runtime, next to Qt that will be the official native environment. All the rest (including GTK+) will come only when users install apps depending on them.

There is a timeline at http://www.slideshare.net/santtuahon...ia-web-runtime (linked in the first post).

qgil, thanks for answering.

Firstly I am actively checking dependancies for Python at present as my personal preference is to avoid it like the plague. I am not a fan of Byte code and virtual machies, especially on a mobile. If this is being released for N900 I seriously hope it comes with a hge banner on associated apps.

If JScript and the bundle of security issues associated with it are bundled in with Maemo 6 and no way is found to disable them then I will be dumping the platform for development and end use. I am all for people having the choice to use this technology but forcing it on users smacks of Steve Jobs and MS. Thanks but no thanks.

Short summary: by all means develop the sub-systems but don't force us down the Android route. If I wanted an Android machine I would have bought one for much less cash.

Bundyo 2009-12-23 21:45

Re: Nokia Web Runtime developer questions
 
Well, Python apps are about 6+ MB in Application Manager. WRT apps will be 10+ so they will be easily recognizable too :D

Fargus 2009-12-23 21:53

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Bundyo (Post 439567)
Well, Python apps are about 6+ MB in Application Manager. WRT apps will be 10+ so they will be easily recognizable too :D

Thanks for the heads up on WRT apps, was aware of that for Python already. As long as we have the choice to not use the platform that fine. Yes I am aware that it will reduce the number of available apps but worth it for me.

Thans for beig so civil in response too: so much more friendly here than OB seems to think! :)

go1dfish 2009-12-24 17:07

Re: Nokia Web Runtime developer questions
 
Thanks for the info qgil

Will it be possible to disable same-domain restrictions in web runtime apps? i.e. will it be possible to perform AJAX calls to external domains from within a web runtime app.

Still really curious about multimedia access from web runtime, what (if any) will be the preferred way to play audio/video?

Is there any documentation available for this that isn't a slideshow?

qgil 2009-12-26 10:51

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by go1dfish (Post 440514)
Is there any documentation available for this that isn't a slideshow?

Have you checked the third link in my first post? http://www.forum.nokia.com/Technolog...s/Web_Runtime/

There is deeper documentation there including API docs. Although the Web Runtime 2.0 coming to Maemo is more complex, reading about S60 1.x Web Runtime is useful for starters.

We are writing the documentation for 2.0 and this is precisely the reason of this thread. :)

I was expecting a bit more of developer questions, honestly. I'll try to find some answers to the technical questions in advance once everybody is back from holidays - myself included. :)

go1dfish 2009-12-26 17:53

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by qgil (Post 442031)
I was expecting a bit more of developer questions, honestly. I'll try to find some answers to the technical questions in advance once everybody is back from holidays - myself included. :)

Ok here's some others then:

Will there be any way to integrate with the current Maemo theme inside a Web Runtime app? Like a dynamic CSS provided through Web Runtime that would allow me to specify certain classes in my elements to get at the correct gradient backgrounds and colors for instance

Will it be possible to embed the Web Runtime in a 'normal' C/C++/Python based Qt application on Maemo, similar to the way you would embed a QWebView?



Quote:

Originally Posted by qgil (Post 442031)
Have you checked the third link in my first post? http://www.forum.nokia.com/Technolog...s/Web_Runtime/

There is deeper documentation there including API docs. Although the Web Runtime 2.0 coming to Maemo is more complex, reading about S60 1.x Web Runtime is useful for starters.

All the documentation I've found so far is for S60 Desktop Widgets, I have no desire to develop for S60, and am more interested in a WRT based application than a widget, so I guess I'll have to wait on the new docs. But I'll skim through these.

Flandry 2009-12-26 21:06

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Fargus (Post 439563)
qgil, thanks for answering.

Firstly I am actively checking dependancies for Python at present as my personal preference is to avoid it like the plague. I am not a fan of Byte code and virtual machies, especially on a mobile. If this is being released for N900 I seriously hope it comes with a hge banner on associated apps.

If JScript and the bundle of security issues associated with it are bundled in with Maemo 6 and no way is found to disable them then I will be dumping the platform for development and end use. I am all for people having the choice to use this technology but forcing it on users smacks of Steve Jobs and MS. Thanks but no thanks.

Short summary: by all means develop the sub-systems but don't force us down the Android route. If I wanted an Android machine I would have bought one for much less cash.

Echoes my thoughts: will this be optional, and if not, why not? Why break something that works fine?

Please don't make Maemo.6 the first step down.

j.s 2009-12-27 06:50

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Bundyo (Post 439567)
Well, Python apps are about 6+ MB in Application Manager. WRT apps will be 10+ so they will be easily recognizable too :D

Are you sure? I think Attitude showed as much less than that. I don't think the storage cost of python was shown in the Application Manager listing for Attitude.

Sasler 2009-12-27 07:29

Re: Nokia Web Runtime developer questions
 
What is the estimated performance hit compared to native Qt?

kryptoniankid17 2009-12-27 07:54

Re: Nokia Web Runtime developer questions
 
playing around with it at a lounge a chick walks up to me asks can she see it. show her youtube and she loves how it looks and behaves like an actual desktop. gives me her nunber and says i like your phone.

kryptoniankid17 2009-12-27 07:56

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by kryptoniankid17 (Post 442741)
playing around with it at a lounge a chick walks up to me asks can she see it. show her youtube and she loves how it looks and behaves like an actual desktop. gives me her nunber and says i like your phone.

wow wrong thread sorry guys.

Bundyo 2009-12-27 08:06

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by j.s (Post 442722)
Are you sure? I think Attitude showed as much less than that. I don't think the storage cost of python was shown in the Application Manager listing for Attitude.

I meant the installation size of the first python app you install along with all dependencies, regardless of where are they installed. App manager shows 6.3MB for Attitude on my N900.

Quote:

Originally Posted by Sasler (Post 442732)
What is the estimated performance hit compared to native Qt?

Very Big. Javascript and HTML are not compiled, they are interpreted. JIT may help, but not much.

Flandry 2009-12-27 14:34

Re: Nokia Web Runtime developer questions
 
You have to click on the app in app manager and look at the installed size; the "size" that it shows on the listing page is just for the specific package, not its dependencies. Of course, you can always just look at the dependency list at that point, too. ;)

On an unrelated note, an N900 user walks into a bar...

Bundyo 2009-12-27 16:43

Re: Nokia Web Runtime developer questions
 
You are wrong. The size in the list is the download size. If you didn't install the dependencies before, they will add up.

Anyway, the point was different. What I originally meant was that if you don't have Python installed, the apps that require it are easily spottable.

Now back to the topic. I think the most interesting question is which engine the WRT will use - gecko or webkit?

j.s 2009-12-27 16:49

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Bundyo (Post 443044)

Now back to the topic. I think the most interesting question is which engine the WRT will use - gecko or webkit?

Doesn't post #1 in this thread by qgil strongly imply webkit, at least for maemo 6?

go1dfish 2009-12-27 16:50

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Bundyo (Post 443044)
Now back to the topic. I think the most interesting question is which engine the WRT will use - gecko or webkit?

It will be based on webkit.

A couple of weeks back I was fortunate enough to meet Rajesh (the guy who made many of these slides) and asked if the move to Qt in Maemo6 would affect their choice of gecko as the microB browser engine.

I was told that they would continue using Firefox as the main browser, and Webkit would be the preferred rendering engine for web apps.

Makes a lot of sense to, gecko is generally better from a compatibility perspective, and webkit is much lighter. Not to mention webkit 'comes for free' with qt 4.4+ already.

Bundyo 2009-12-27 16:57

Re: Nokia Web Runtime developer questions
 
Of course that will mean two browser engines in memory, so they better be prepared...

Flandry 2009-12-27 19:13

Re: Nokia Web Runtime developer questions
 
It just gets worse. :/


Quote:

Originally Posted by Bundyo (Post 443044)
You are wrong. The size in the list is the download size. If you didn't install the dependencies before, they will add up.

Hmm that's actually true. I remember being curious about this a while back when deciding how to do a package and had come to the wrong conclusion. I'm glad HAM is doing it closer to the "right" way.

go1dfish 2009-12-27 19:25

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Flandry (Post 443144)
It just gets worse. :/

Am I the only one finding your comments in this thread hilariously ironic considering your signature? ;)

Quote:

Originally Posted by Flandry (Post 443144)
"Apple makes its things great by leaving features out, Nokia somehow believes that adding more makes its products great." Now that is spin! (See iPhone Syndrome in action?)


Flandry 2009-12-27 19:33

Re: Nokia Web Runtime developer questions
 
I can see that some might see it that way, but it's not really the case. Adding a mandatory javascript app layer to an OS doesn't add functionality, it takes it away (less battery life/performance). You can't do anything new with it that can't be done better without it. I.e. not really a feature...

It's rather like Apple calling the no user multitasking a feature, or the nonremovable battery. Both are "features" that restrict user options.

Edit, rather than continue posting off topic: i can see the point that it is a feature to developers in your reply, but would argue that in this case that does not imply a user feature, and here's why.

First, battery capacity is the one mobile device hardware component that is essentially stagnant. The only way we get better battery life is by using a bigger battery or making the software or hardware more efficient. Moore's "law" has made a pocket computer phone a possibility in the N900, but we already know the M6 device is going to be using the same SOC--in fact, it's almost going to be the same as the N900 in hardware--so we're really not getting a significant bump in efficiency from the hardware. At the same time, we'll probably see more RAM and hopefully a magnetometer and bigger screen. It seems to me that the N900 has sufficient battery life, but only just.

Now, given that, what would your strategy be to evolve N900/Fremantle into a killer device that is going to rule the high-end mobile device world, one that will be light enough to get greater market penetration and have battery life to break into the much larger market of people not specifically looking for a computer?

Well, i'd use step 4 to hone and refine the software and drivers so that step 5 can slim down and last longer. So that it actually represents the lean, mean product of 5 steps of evolution, rather than the fifth step in a tech demo random walk.

Let's see Nokia's plan: hey, let's throw in an extra layer of cruft that takes up a large chunk of RAM and more cycles. Maybe we can draw developers from Palm, Android, and iPhone so that we can pad out our repo with lots of shiny apps and won't have to use these old boring compiled ones our community has been polishing and refining for a few iterations. By conforming to the rest of the mobile device world, we can really make our product stand out. After all, we have universal name recognition as a provider of great apps, ergonomics, PDAs, and polish. Why would anyone in their right mind not flock to our banner then?

Hmmm. My second point was going to be that reducing the barrier to developer entry to that degree doesn't promote useful development or apps, but i don't really think a second point is even necessary. This has all the earmarks of a pointy-haired manager at the wheel, so i guess we can just hold on to our owls and hope for the best.

go1dfish 2009-12-27 19:46

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Flandry (Post 443161)
I can see that some might see it that way, but it's not really the case. Adding a mandatory javascript app layer to an OS doesn't add functionality, it takes it away (less battery life/performance). You can't do anything new with it that can't be done better without it. I.e. not really a feature...

It's rather like Apple calling the no user multitasking a feature, or the nonremovable battery. Both are "features" that restrict user options.

I tend to look at it in the light that User Freedom is (in most cases) directly proportional to Developer Freedom.

It's true that 2 different browser engines are going to use more resident memory, and CPU cycles if both are in active use simultaneously. The same is true of including both GTK+ and QT4 widget libraries.

I really only think we will see a significant battery hit if developers misuse the feature, and ignore these relevant concerns, the same problems we already see with native widgets and apps.

It fits with nokia's stated vision of Maemo, the desktop experience on a mobile. How many rendering engines do you have installed on your desktop?

We're still on the cusp of such an experience being at all feasible on devices of this size. But the amount of memory nokia will be able to cram into these is only going to get bigger.

Bundyo 2009-12-27 20:05

Re: Nokia Web Runtime developer questions
 
Its not really the same. Javascript is both slow and hits directly the processor (for a longer time than native) even if lazy loading is used (if evaluation is postponed, it will hit the CPU eventually with the exact same results) and regardless if it is misused or not (you will probably have access to underlying libs to speed up some calculations, but for GUI you're alone with HTML and JS in your hands).

jwi 2009-12-27 22:52

Re: Nokia Web Runtime developer questions
 
It's very hard to understand, why someone would hate the idea getting wrt to maemo. Its cool technology for hacking for example nice looking easy use front ends for web servives etc. Its cool that we have many choices. We all dont want to write assembler to get some simple things done... :) Its not good for every use, but when its used correctly, its nice technology.

Bundyo 2009-12-28 00:17

Re: Nokia Web Runtime developer questions
 
Just to clarify - I'm not against, just pointing some facts. :)

Flandry 2009-12-28 01:12

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by jwi (Post 443322)
It's very hard to understand, why someone would hate the idea getting wrt to maemo. Its cool technology for hacking for example nice looking easy use front ends for web servives etc. Its cool that we have many choices. We all dont want to write assembler to get some simple things done... :) Its not good for every use, but when its used correctly, its nice technology.

I explained it clearly and in full detail already, but it comes down to this: it's not optional, and it will reduce battery life...while giving no unique benefit. That is more than enough reason for me to be opposed.

Make it entirely optional and i have no objections.

Also, nice hyperbole with the assembler comment.

j.s 2009-12-28 01:28

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Flandry (Post 442964)
Of course, you can always just look at the dependency list at that point, too. ;)

Well, when I look at the dependencies for mplayer, I see a very long list of libraries with no easy way to compare the versions to the exiting libraries on the device. File names did not seem to be related.

Bundyo 2009-12-28 05:55

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Flandry (Post 443432)
I explained it clearly and in full detail already, but it comes down to this: it's not optional, and it will reduce battery life...while giving no unique benefit. That is more than enough reason for me to be opposed.

Make it entirely optional and i have no objections.

Also, nice hyperbole with the assembler comment.

It is optional to reduce battery life... :D - WRT will be integrated in Maemo 6, but the choice to use it is entirely your own.

And it is completely optional in Maemo 5.

qgil 2009-12-28 08:06

Re: Nokia Web Runtime developer questions
 
Quote:

Originally Posted by Flandry (Post 443432)
while giving no unique benefit.

The main benefit of the Web Runtime is fast development with a programming language widely known. This has the potential of producing plenty more apps with a lower cost.

jwi 2009-12-28 08:19

Re: Nokia Web Runtime developer questions
 
One thing that I don't understand is that how could wrt reduce battery life if it's not used? Of course it does, when you run apps on it, but you don't have to do that.

If we get good emulator for wrt for maemo and at least same features that it has in Symbian, im gonna bed very exited. I have tested Symbian it worked very well. (I did app which used Google maps and GPS).

voracity 2009-12-28 11:41

Re: Nokia Web Runtime developer questions
 
I don't think Flandry is being straightforward with his concerns. I doubt he is worried about WRT affecting battery life. Even if it was shown that WRT had a positive effect on battery life, he would still be unhappy with WRT. My guess is that he is worried that the nature and philosophy of the phone will shift from a Linux hacker & power user device, to a treat-the-user-like-a-baby iPhone-clone.

I don't share those concerns and neither would the many, many people whose lives could be improved (or at least, made a little more fun) by using a device with those abilities out-of-the-box.

That's not to say I don't have my concerns. I am quite disappointed to see that WRT will use webkit rather than gecko (on philosophical grounds). So, out of curiosity, why was webkit chosen?

Bundyo 2009-12-28 13:08

Re: Nokia Web Runtime developer questions
 
At least for full compatibility with S60.

Flandry 2009-12-28 14:39

Re: Nokia Web Runtime developer questions
 
1 Attachment(s)
Quote:

Originally Posted by j.s (Post 443444)
Well, when I look at the dependencies for mplayer, I see a very long list of libraries with no easy way to compare the versions to the exiting libraries on the device. File names did not seem to be related.

I think we may be off on different tangents here but you can see python-related dependencies very clearly, which was what i was talking about.

Getting to the root of that particu.ar issue (being able to tell which apps use the different interpreters and runtime libraries) I would be in favor of a "Language" tag requirement in maemo packages that would let you tell at a glance whether an app is based on python, javascript, C, etc..


All times are GMT. The time now is 10:29.

vBulletin® Version 3.8.8