Summer of Code/2014/sugar cordova
About me
My name
Puneet Kaur
What is your email address?
puneet.gkaur@gmail.com
What is your Sugar Labs wiki username?
Puneet Kaur
What is your IRC nickname on irc.freenode.net?
puneet_kaur
What is your first language? (We have mentors who speak multiple languages and can match you with one of them if you'd prefer.)
English
Where are you located, and what hours (UTC) do you tend to work? (We also try to match mentors by general time zone if possible.)
Delhi, India Work time are not fixed, work as I get time from my regular coursework
Have you participated in an open-source project before? If so, please send us URLs to your profile pages for those projects, or some other demonstration of the work that you have done in open-source. If not, why do you want to work on an open-source project this summer?
Did contribute a little to the sugar project.A small contribution can be found here[1] .This patch was possible only by the cooperative support of Gonzalo. I worked on sugar in August - September last year. I went through the paint code to know the possible ways by which we can incoporate the functionality of saving the tool state at which the user left before saving the activity.This is done by storing the values of the tool and its corresponding state in form of json.I wish to contribute more to this wonderful community with supportive people around and that's why I am applying this time to gsoc. I hope to make a good contribution to the community. Many communities dont really care about different people writing to them or review their mails and respond in time. The best part I love about the sugar community is that whether its walter bender or gonzalo or lionel or anybody else, they will surely make it a point to respond back to the people in the best possible manner and never hesitate sharing their knowledge with other.This is the reason why I too wish to be a part of this community where people care for and support each other.
About your project
What is the name of your project?
Cordova container for sugar platform
Describe your project in 10-20 sentences. What are you making? Who are you making it for, and why do they need it? What technologies (programming languages, etc.) will you be using?
This project is aimed at building a new platform on cordova for sugar. It shall help us to build activities for mobile using html,js and css and the interaction with the device's native api can be provided by invoking the javascript libraries. These libraries provide device specific native backing code.We can access the camera functions and many others using javascript alone.So basically the mobile apps can be built in js rather than native code which implies that knowing the native code to built an activity and to interact with device functionality is no longer a neccesity.The technologies required to complete this project are javascript,python programming knowledge and sugar built, cordova platform for developing upon.
To allow the web developers to interact with the device's native functionality, we shall build a communication between the python and javascript part by using the sugar web architecture.Once that is done, we then need to add to the cordova-js project of cordova - which provides the common API's for sending messages and triggering error and success callbacks with native framework responses.
Figure1 shows how the hybrid apps help the developers to port their applications to different platforms using the cordova platform and give a view why developing the cordova container for sugar would be useful.
Also the application build using HTML,CSS,JS can be designed to run over various devices which in turn provides the developer to develop apps which are universal in nature. This can be achieved by making the design responsive which adapts according to the device's features.This forms a key reason why we would want to develop using HTML,CSS and JS usiing the cordova platform.The concept can be explained by the following image.
The main part allowing the interoperability of the html apps over different platforms is the cordova libraries that provide the javascript APIs.The high level view of the cordova architecture which allows seamless operation over different platforms can be explained as below.The native platform API's are first developed which communicate with the cordova libraries, these native cordova libraries then communicate with the javascript APIs which the developer uses to develop his HTML, CSS and JS application.
As a part of this project our major goal would be to develop the middle layer, which shall help the HTML apps to communicate with the sugar platform beneath.Hence we shall build the cordova part as well as the native APIs needed to communicate with the cordova middle layer.Finally we shall provide the javascript APIs though which the developers can make their HTML apps for the sugar platform.
What is the timeline for development of your project? The Summer of Code work period is from May 19 - August 22; tell us what you will be working on each week. (As the summer goes on, you and your mentor will adjust your schedule, but it's good to have a plan at the beginning so you have an idea of where you're headed.) Note that you should probably plan to have something "working and 90% done" by the midterm evaluation (27 June); the last steps always take longer than you think, and we will consider cancelling projects which are not mostly working by then.
March 9 – March 15 – Understand the high level architecture of project , go through the code of different platforms, come out with plan for sugar lab platform
March 16 – March 22 – Look into the corresponding code of sugar labs , how the cordova plugins can be made from the present sugar code
March 23 – March 29 – Understand the sugar code required for implementing the the functionalities
April 1 – 12 – Buffer Period (Have sessional exams in college)
April 13 –May 19 – Talk with my mentors and discuss a clear outline of the project, define steps to approach the problem and discuss ways by which we can attack the issue, understand all the technicalities required for the project - the sugar -web architecture through the code, the record activity and other python code on which we shall be developing, start coding in python as required
May 19 – June 15 – Build the architecture for the python-javascript for the cordova container
June 15 - June 30 - Make a sample activity to show the working of the architecture developed
June 31 - Mid Term Examination
July 1 - July 20 - Refine the code developed till now, add more functionality and features, remove errors
July 20 onwards – Document all the new API's of the JavaScript library made till now, add more
Convince us, in 5-15 sentences, that you will be able to successfully complete your project in the timeline you have described. This is usually where people describe their past experiences, credentials, prior projects, schoolwork, and that sort of thing, but be creative. Link to prior work or other resources as relevant.
I have already worked on sugar before, configured it and been with it for a few months, so I think I can develop on it.Same goes for cordova as well.Have developed apps on phonegap cordova.Hence I felt I would be in a position to help out in this project. Previously apart from sugar and phonegap I have done projects on C, php and java.
I have added all my project and their code on github , you can have a look [2]
Some of my earlier projects include :
- Flowchart Generator - It was developed using C language.It takes input as a C programs and extracts the control units out of it and analyses the flow structure to finally output a corresponding graph matrix for the program.This helped to automatically generate test cases for a given program.This project was made use in the program submission portal whereby the students submitted programs as a part of their assignment.The students programs were run for all the test cases generated from the teacher's program ( a program submitted by the teacher was considered to be correct).The project allowed to generate the corresponding graph matrix of the teacher's code and hence helping to generate the test cases based on which the accuracy of the students code was tested.
- Data Enrichment through Twitter and Google API : I did this project as a part of my internship.This project was developed basically in Java.The aim was to dig out the information about Food Poisoning Incidents in Singapore and the analyse the results in a systematic manner to join the dots and draw some conclusions based on it.We extracted the tweets related to food poisoning by specifying some parameters and then fetched information from a particular site which mentioned about the restaurants and their location.Also Google Map API was used to find the location of the restaurants, and some more information from the different blogs fetched and filtered out to draw useful conclusion related to the food poisoning incidents.
- Amazon In App Purchase : Integrated the amazon in app purchase feature in the phonegap android app, the corresponding code can be found on the github site.
- Integration of dropbox sync feature in Android Phonegap App : Integrated the dropbox sync API with the android phonegap app which allowed to sync and upload / download the objects using the the dropbox sync API
- Paint Alarm PhoneGap App : In a alarm clock application build on phonegap, I provided the feature to draw and paint your own wallpaper.Here the cordova's camera feature was also used.User had an option to include the picture from the gallery or click it right from the camera and insert in the canvas upon which he could draw.This picture was then stored in the phone memory and could be uploaded to the user's dropbox account using the dropbox sync API
- Online Treasure Hunt : Made an online PHP game for our technical fest.MySQL was used at the backend to store the information and the php logic was used to determine whether the user should be allowed to go to the next level. The leader board was developed according to the time taken by the user to solve the questions.
- Have been a part of website team of the CSI(Computer Society of India) technical society of our college for three consecutive years and have helped develop sites for the society and fest.
- Have contributed to sugar in past[3]
You and the community
If your project is successfully completed, what will its impact be on the Sugar Labs community? Give 3 answers, each 1-3 paragraphs in length. The first one should be yours. The other two should be answers from members of the Sugar Labs community, at least one of whom should be a Sugar Labs GSoC mentor. Provide email contact information for non-GSoC mentors.
Lionel : Today, Sugar activities written using the Sugar Web Framework had limited features because they can't benefit to device capabilities (camera, audio/video capture, accelerometer, network detection, ...). Integrating a PhoneGap container into Sugar will allow to provide the same level of features to Sugar Web activities than existing Sugar activities. Plus it will allow to web developers familiar with PhoneGap/Cordova framework to easily port or adapt their applications to Sugar. So we could expect to enhance the community of developers.
Suraj KS : Writing activities using HTML5/JavaScript has already given a big boost to Sugar. Once we can get wrap it in a Cordova/Phonegap container, it'll transform Sugar Web activities to a whole new level by utilizing the PhoneGap features. This could further attract many more developers towards Sugar and thereby improving both the quality and quantity of Sugar activities.
Puneet Kaur : I think once this project is completed it will help people to develop activities directly on html,js and css and the developers don't even need to know the native language in order to interact with the device functionalities like camera etc.This will lead to a great expansion of sugar as all the mobile developers who know to code in html,js and css which isn't much difficult can easily pull in all the cool functions here and make the interaction with the sugar platform much more entertaining than before without much of an effort !
What will you do if you get stuck on your project and your mentor isn't around?
Get in touch with other people of the community who can help.I think I would get some help from other experts in the community.Ask questions over IRC channel.Ask question in other doubt forums.Try searching on my own. Get in touch with people outside the community who can help. For the cordova related help, will ask people from the cordova community for help and do the brainstorming on my own. Try possible methods.Debug it.Analyze why it went wrong or what should be done based on my previous experience.
How do you propose you will be keeping the community informed of your progress and any problems or questions you might have over the course of the project?
I'll blog about the progress and ask my queries to my mentor, ask on IRC or over the mailing list
Miscellaneous
We want to make sure that you can set up a development environment before the summer starts. Please do one of the following: Send us a link to a screenshot of your Sugar development environment with the following modification: when you hover over the XO-person icon in the middle of Home view, the drop-down text should have your email in place of "logout". Send us a link to a pull request or merge request you have made on a Sugar or Sugar activity bug.It's normal to need assistance with this, so please visit our IRC channel, #sugar on irc.freenode.net, and ask for help.
Describe a great learning experience you had as a child.
Drawing, Painting and Art. I loved to draw things.Sketch them,paint them in different colors.Drawing basically used to provide a way to unlimited creativity.It used to present a simple blank paper upon which we could lay our imagination in the way we wanted.It new no boundaries and that's what made me fall in love with art.
Is there anything else we should have asked you or anything else that we should know that might make us like you or your project more?
I have worked with sugar before and that I consider would help me to dive in this project.Also have contributed to some phonegap android apps which are based on cordova.Hence I think I should be able to contribute to this project.