<div dir="ltr">Hi lionel,<div><br></div><div style>1)Done with setting up of virtual box and installed sugar. Seems to be working fine.</div><div style> But, while running the Sugar in it, it slows down the pc a lot and various other issues come in while developing activities.</div>
<div style> I guess it is better if I switch to Ubuntu asap while hacking.</div><div style><br></div><div style> 2)It was a good read . Now, I have a basic understanding how activities are developed and packed right from</div>
<div style> making a standalone python program to packaging and distributing the activities.</div><div style> I did install the helloworld activity and it seems to working fine.</div><div style><br></div><div style>
3)I must admit, it is impressive work. <br></div><div style> Went through your manual and understood how the enyo framework alongwith,"connect" and "sendmessage" methods were used to interact between the user interface, javascript and python code</div>
<div style><br></div><div style><br></div><div style><br></div><div style>I needed some clarifications,</div><div style>Honestly, i did not grasp the "console part", which needed improvement. </div><div style>Were you talking about the "connect" and "sendmessage"?</div>
<div style><br></div><div style>And, regarding the UI part, should I just create CSS files to replicate default sugar toolbars and other sugar user interfaces? </div><div style><br></div><div style><br></div><div style><br>
</div><div style><br></div><div style><br></div><div style><br></div><div style>Also, looking forward to the IRC meeting on html activities on Mon. :)</div><div style><br></div><div style><br></div><div style><br></div><div style>
<br></div><div style>Regards,</div><div style>Suraj</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 6:51 PM, <span dir="ltr"><<a href="mailto:lionel@olpc-france.org" target="_blank">lionel@olpc-france.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="FR" link="blue" vlink="purple"><div><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Hi Suraj,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">To initialize your knowledge about the project, I can suggest you several steps:<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">First, install Sugar on your computer. I understand that you're on Windows but it's pretty easy to install SugarOnAStick in a Windows VirtualBox. It's a good way to discover it. Have a look on [1] (in French but easy to translate or follow steps using screen capture). <u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Second, learn how Sugar activity are developed and packaged today. The better introduction about that is in the great book of James, "Make your own Sugar activities" [2]. It will be very interesting for you too to install and explore the HelloWorld Activity [3] in your VirtualBox.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Third, explore the first experience of Sugar HTML5 activities I've wrote. A chapter in the book "Make your own Sugar activities" talk about that [4]. Gridpaint [5] is one of the first activity to use this framework. Install it and try to understand how it works: have specifically a look on Log (using Log activity) then to Enyo.py and Sugar.js files.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Once you've done it, there is few issue with the current way of works of this first Sugar HTML5 framework:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span>1.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It depends on "console-message" to interface WebKit and JavaScript. It's a bad hack. This message could be deprecated on future version of WebKit. We should work one another interface. Exploring PhoneGap/Cordoba way of working for iOS (using a hidden Iframe) could be interesting.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span>2.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It depends of the standard Sugar Toolbar and HTML5 controls don't have the Sugar Look&Feel. We want integrate the full Sugar UI into the Sugar HTML5 framework. So we need CSS files and an API to match the Sugar controls and features.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span>3.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">It don't expose the Sugar feature into JavaScript. So each time the HTML5 application want to call Sugar, it need to call Python code. The Sugar HTML5 framework should expose natively main Sugar features: specifically DataStore (read/write to Journal), telepathy (Collaboration).<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt;vertical-align:middle"><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><span>4.<span style="font:7.0pt "Times New Roman""> </span></span></span><u></u><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Finally, as you read in this thread, embedding a WebView is not necessarily the best solution to write a Web activity. BTW as a first approach to the problem, we could start with it.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Point 2 could be started very quickly. You just had to list all Sugar Controls then think how they could be designed as HTML5 controls.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal" style="margin-left:27.0pt"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">Lionel.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin-left:27.0pt"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""> <u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">[1] </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://olpc-france.org/blog/2013/02/decouvrez-sugar-depuis-votre-machine/" target="_blank"><span lang="EN-US">http://olpc-france.org/blog/2013/02/decouvrez-sugar-depuis-votre-machine/</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">[2] </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://www.flossmanuals.net/make-your-own-sugar-activities/" target="_blank"><span lang="EN-US">http://www.flossmanuals.net/make-your-own-sugar-activities/</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">[3] </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://activities.sugarlabs.org/fr/sugar/addon/4418" target="_blank"><span lang="EN-US">http://activities.sugarlabs.org/fr/sugar/addon/4418</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">[4] </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://en.flossmanuals.net/make-your-own-sugar-activities/developing-sugar-activities-using-html5/" target="_blank"><span lang="EN-US">http://en.flossmanuals.net/make-your-own-sugar-activities/developing-sugar-activities-using-html5/</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif"">[5] </span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""><a href="http://activities.sugarlabs.org/fr/sugar/addon/4647" target="_blank"><span lang="EN-US">http://activities.sugarlabs.org/fr/sugar/addon/4647</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif""><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">De :</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> suraj ks [mailto:<a href="mailto:suraj.gillespie@gmail.com" target="_blank">suraj.gillespie@gmail.com</a>] <br>
<b>Envoyé :</b> lundi 15 avril 2013 22:27<br><b>À :</b> Daniel Narvaez; <a href="mailto:lionel@olpc-france.org" target="_blank">lionel@olpc-france.org</a><br><b>Cc :</b> Sugar-dev Devel; Manuel Quiñones<br><b>Objet :</b> Re: [Sugar-devel] Hacking on HTML activities UI (was Re: GSoC 13)<u></u><u></u></span></p>
<div class="im"><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal">Ok,<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><p class="MsoNormal">In a nutshell,<u></u><u></u></p><div>
<p class="MsoNormal">These are the tasks for this project.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Going by the way Lionel suggested,<u></u><u></u></p></div><div>
<p class="MsoNormal">Create a sugar activity with full screen web view control.<u></u><u></u></p><div><p class="MsoNormal">Modify the current js framework and make use of "native features" to be able to write html activities in Sugar.<u></u><u></u></p>
</div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Lionel mentioned,<u></u><u></u></p></div><div><pre style="white-space:pre-wrap"><span style>"The step 1 need only to map a set of JavaScript<u></u><u></u></span></pre>
<pre><span style>functions to a set of Sugar functions. Once the list of Sugar functions is<u></u><u></u></span></pre><pre><span style>write, it’s not very complex to do."<u></u><u></u></span></pre><pre style="white-space:pre-wrap">
<span style="font-family:"Arial","sans-serif";color:#222222">So find those functions and tweak them to support the same.</span><span style><br><br><u></u><u></u></span></pre></div><div><p class="MsoNormal">
And of course, work on the UI part.<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Please correct if I'm wrong.<u></u><u></u></p></div></div><div><p class="MsoNormal">
<u></u> <u></u></p></div><div><p class="MsoNormal">Also, how are we going to get the <span style>JS and Sugar to communicate without the console?</span><u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p>
</div></div><div><p class="MsoNormal"><u></u> <u></u></p></div></div></div></div></blockquote></div><br></div>