On 13 April 2013 16:08,  <span dir="ltr"><<a href="mailto:lionel@olpc-france.org" target="_blank">lionel@olpc-france.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div link="blue" vlink="purple" lang="FR"><div><div class="im"><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"></span><span lang="EN-US"><span style="color:#1f497d">> </span>My feeling is that we should target step 2 directly, because 1 -> 2 will waste too much work.</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"> </span><span lang="EN-US">The datastore and collaboration implementation is going to be pretty different, depending if we use Chromium or Webkit embedding. <span style="color:#1f497d"></span></span></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Not so waste than that. The step 1 need only to map a set of JavaScript functions to a set of Sugar functions. Once the list of Sugar functions is write, it’s not very complex to do. Except for the UI part, the Sugar JavaScript framework the process is pretty dumb:  call the right Sugar function. Step 2 will need more intelligence.</span></p>
</div></div></blockquote><div>I think it would be easier to evaluate if someone wrote down a proposal for the js API :)<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="purple" lang="FR"><div><p class="MsoNormal" style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US"> <u></u><u></u></span></p>
<div class="im"><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="color:#1f497d" lang="EN-US">> </span><span lang="EN-US">Consider also that a better way to communicate then "console-message" is not going to come for free.<span style="color:#1f497d"><u></u><u></u></span></span></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Good point. I must admit that I don’t know how to do that. BTW I wonder how PhoneGap/Cordoba is working. Because it has really the same thing to do: map a JavaScript API to system features (GPS, Phone, Camera, …). Plus PhoneGap/Cordoba is browser agnostic: it works on Android, Safari, BlackBerry, Windows Phone, webOS, … If we could retrieve and understand what sort of communication PhoneGap/Cordoba use, it could inspire us.</span><br>
</p></div></div></blockquote><div><br>Well, it's OS specific, but generally quite hacky. Slightly better than console-message though :)<br><br>Maybe the iOS approach could work for us. They load a gap_exec url inside an iframe, when the WebView notices that, it evaluates some kind of fetchMessage() method and handle the result.<br>
<br>Or if the iframe thing doesn't work you could poll but ugggh. They are actually doing that for some version of android, for the opposite direction though.<br><br>In WebkitGtk2 you can actually get the result of execute_script (though probably only from C code, you would need to wrap that up in sugar-toolkit or something).<br>
<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div link="blue" vlink="purple" lang="FR"><div><div class="im"><p class="MsoNormal" style="margin-bottom:12.0pt">
<span lang="EN-US"><span style="color:#1f497d">> </span>The only real advantage I see with doing step 1 first is that it would give us more time to migrate Browse to the same backend. <span style="color:#1f497d"></span></span></p>
</div><p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Not the only advantage. Another advantages I see:<u></u><u></u></span></p>
<p style="margin-bottom:12.0pt"><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><span>-<span style="font:7.0pt "Times New Roman"">          </span></span></span><u></u><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">Easier to do for a student,</span></p>
</div></div></blockquote><div>I agree on that. But I _hope_ we will have more people working on this, not just the GSOC student.<br> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div link="blue" vlink="purple" lang="FR"><div><p style="margin-bottom:12pt"><span style="font-size:11pt;font-family:"Calibri","sans-serif";color:rgb(31,73,125)" lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal" style="margin-bottom:12.0pt">
<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US"><span>-<span style="font:7.0pt "Times New Roman"">          </span></span></span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d" lang="EN-US">No need to change Sugar, so the framework will be compatible with Sugar 0.96/Sugar 0.98,</span><span lang="EN-US"><br>
</span></p></div></div></blockquote><div><br>Assuming you are willing to keep using console-message there :) It's probably the only possible approach on that webkit.<br><br></div>
</div>