<br><br>On Thursday, 7 November 2013, NoiseEHC wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi!<br>
<br>
Just to prove that it can be done, I have hacked a little bit more on the native HTML activity which can be found here:<br>
<a href="https://github.com/NoiseEHC/sugar-webkit-native" target="_blank">https://github.com/NoiseEHC/<u></u>sugar-webkit-native</a><br>
<br>
I tried to create virtual pages by using WebKit1's or Soap's url rewriting callbacks but it turns out that no matter what you do, the thing wants to use the data from the TCP stream... So I turned to starting a (Soap) HTTP server inside the native activity (on a random port) and it works. Now the activity runs from localhost (/activity and /web subfolders) and there is a virtual folder called /journal. It has only one hacked file, the /journal/journal.html, which has links to all the things in the journal. It queries the journal service via DBUS. I have to tell you that working with GVariant from C is a real PITA, so I did not implement the load/store of the real journal files, but it is clearly possible... (Beware, it leaks every possible resources, it is just a proof of concept.)<br>
</blockquote><div><br></div><div>Can you explain more in detail what you have in mind with journal? I won't ask you to complete the prototype given your bad experience with GVariant :)</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Now, I do not know what is the problem with WebKit1, it seems to work for me, and at least it does not crash on an XO-1.75 as WebKit2 does. On the other hand I cannot try it on my XO-1.75 as it is not possible anymore to install webkitgtk-devel on the machine as I told you last time...<br>
<br>
This whole project has the following benefits:<br>
- It is much-much faster than the python one. It does matter on an XO.</blockquote><div><br></div><div>What is faster exactly? I can imagine startup time, anything else?</div><div><br></div><div>I had proposed to write the web activity stub in C given memory and startup performance gains. Not everyone was favourable. I think it would be fine if we can keep it really simple. It's somewhat worrying that you already run into annoyances with GVariant... Not many regular Sugar contributors are familiar with C (maybe I'm the only these days). The risk is that it will become a piece of code no one is able or wants to hack on.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- It does not depend on the WebKitGTK python bindings to be maintained, it can use all WebKitGTK's features.</blockquote><div><br></div><div>I don't see that as a real advantage. With gobject introspection bindings are mostly automatic and, as far I know, the whole C api is already covered.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- It does not have a dependency on Node.js.</blockquote><div><br></div><div>Neither the current code does. Node is used for developer tools only, it's not running inside sugar or activities.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- It does not use WebSocket, which would require using WebKit2...<br></blockquote><div><br></div><div>Why would WebSocket require WebKit2? WebKit1 and WebKit2 are basically two different APIs for the same rendering engine (with 1 being deprecated).</div>
<div><br></div><div>That said, I will probably be the happiest if we can implement the whole API without the WebSocket server, but we need to prove that's possible. Let's figure out a plan for Journal first, then we can look into the smaller bits.</div>
<div><br></div><div>Thanks!</div><br><br><br>-- <br>Daniel Narvaez<br><br>