Well, actually 3 if you count the old QScriptEngine that has the nice debug interface.
I'm afraid that QScriptEngine will have to bite the dirt first and there will be no replacement in place that would provide decent in app debugging capabilities.
Of cause one could hope they will get rid of QJSEngine all together, keep QScriptEngine for scripting and use v4vm only for QQmlEngine.
on a side note: qml and webkit, i haven't looked into it in detail, but are they actually deploying v8 code twice once as part of qml and once as part of web kit? Thats not elegant, there should be a shared v8 library used by all modules.
Than there would be still 3 engines but at least one for each separate module.
links?
David X.
Last edited by DavidXanatos; 31st May 2013 at 18:08.
It does not really be maintained as its functionality is finished. QML on the other hand is actively developed.
QScriptEngine is likely to stay because of licensing policies (especially the commercial license).Of cause one could hope they will get rid of QJSEngine all together, keep QScriptEngine for scripting and use v4vm only for QQmlEngine.
Most probably yes.on a side note: qml and webkit, i haven't looked into it in detail, but are they actually deploying v8 code twice once as part of qml and once as part of web kit?
This would require both modules to be released together which is agains the policy introduced in Qt5 where independent modules can be released separately.Thats not elegant, there should be a shared v8 library used by all modules.
I would start with the docs and DevDays videos on QML.links?
Last edited by wysota; 31st May 2013 at 21:55.
In which way does the licensing policies play here a role?QScriptEngine is likely to stay because of licensing policies (especially the commercial license).
No, they would use a shared library.This would require both modules to be released together
They wouldn't have to be together just use the same shared v8.dll
Are there no text articles describing the stuff, other than the docs themselves?DevDays videos on QML.
Hmm.. somehow I thought V8 was LGPL which would prevent statically compiling it into closed-source projects but it seems it is BSD.
The point is now QtWebKit and QtQml can use different versions of V8. Release schedules of QtWebKit and QtQml are quite different.No, they would use a shared library.
They wouldn't have to be together just use the same shared v8.dll
I don't have any specific links for you right now. Most that I've learn with regard to this subject was by studying QtQml internals myself. Nasty hacks to work around Qt's property system in QML is one of the example areas.Are there no text articles describing the stuff, other than the docs themselves?
True, I also don't find that likely. Too bad though, having a high performance engine available would have been nice and that was probably even the original intent.
Well, "first" in this context still means Qt6, it is more likely that QJSEngine's internals will change earlier than that.
Ideally QQmlEngine would have used QJSEngine and so it could switch to something else while keeping QJSEngine and deprecating QScriptEngine.
But alas it derives from it, so unless QJSEngine is two different things internally (very unlikely!), it will become an engine optimized for the QML use case.
My take is that the needs for in-application scripting, especially due to the easy way of accessing application provided infrastructure from scripts, can easily be fulfilled by QScriptEngine.
While they obviously can't get rid of QJSEngine as a class, my guess is that it will become an implemetation detail of QQml and QScriptEngine stays the main in-application scripting facility.
WebKit is special, its Qt "frontend" is part of the WebKit, not WebKit part of Qt. So it is more a separate project that is being worked on by some developers who also happen to be developers on Qt-Project.org
WebKit might also switch to a different JS engine at some point.
Regarding QML:
a QML document describes a tree of element, much like XML but with less verbose syntax. Each element type is specified either by another QML document or a C++ class registered with the QML type system. The requirement for the latter is that the class derives, directly or indirectly, from QObject and that it can be created without arguments.
As Qt developers we often create trees of QObjects, e.g. QWidget trees, QStateMachine with nested states, etc.
QML can be used to do that in a less hard-coded fashion, e.g. if the tree in question needs to be changable without changing the binary.
Since all nodes in such a tree are essentially QObject instances, they have the capability of signals, slots and properties. QML allows to call slots, connect to signals and read/write properties. One really nice feature is that properties can not only be assigned a fixed value but an expression containing other properties and that expression is automatically reevaluated whenever one of its contained properties changes its value.
The latter is of course especially nice in UI code, where e.g. a button's enabled state often depends on some other UI element's content.
But it can be useful for other object hierachies as well, it is mostly a matter of getting used to this form of state propagation.
Cheers,
_
DavidXanatos (1st June 2013)
This clears up some things I think, thx.
Assuming that QJSEngine may become an implemetation detail of QQml and QScriptEngine will stay for application scripting, it may be an interesting option to create a fork of the current v8 based QJSEngine with an exposed debug interface for in app debugging, and those use cases where a lot of JS performance is needed and the slow interface for QObject is not significant.
But you are probably right that Qt wont maintain 2 scripting engines that basically do almost the same, just with different performance and platform compatibility.
So if there is a need for such a thing it would have to be some extern component maintained by some 3rd party.
Cheers
Nothing can stop you from extracting QJSEngine code, renaming it to QV8Engine and making it a separate library.
I would assume the Trolls will want V4 to be as fast as V8. Since it's JIT, execution speed (of the compiled code at least) should be similar.But you are probably right that Qt wont maintain 2 scripting engines that basically do almost the same, just with different performance and platform compatibility.
So if there is a need for such a thing it would have to be some extern component maintained by some 3rd party.
That is my understanding is well
Cheers,
_
Let me quote the article:
If they do a JIT again despite knowing that it is odd to fail on WinRT this would be a major MAJOR F*** up.
Even if many people don't like win 8 in general and WinRT in particular, I think M$ will be throwing enough money on this until WinRT gets it market share, i mean from a user point of view its not worse than iOS, its the same jailed not really general purpose proprietary computing device.
Also I think that windows phone has the same kernel as win RT so it will have the same limitations.
Qt shouldn't develop solutions that would fail on this platforms.
David X.
Last edited by DavidXanatos; 2nd June 2013 at 08:02.
Bookmarks