Difference between revisions of "Summer of Code/2014/sugar cordova"

From Sugar Labs
Jump to navigation Jump to search
Line 1: Line 1:
 
__NOTOC__ <!-- Please fix Section Header lengths to make a usable Table of Contents. (Use other means to format those lines). -->
 
__NOTOC__ <!-- Please fix Section Header lengths to make a usable Table of Contents. (Use other means to format those lines). -->
 +
{{Box|'''Project blog:''' http://sugarcordova.blogspot.in/}}
 
==About me==
 
==About me==
  

Revision as of 10:36, 28 May 2014

Project blog: http://sugarcordova.blogspot.in/

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.

The figure below 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.

Figure1

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.

Figure2

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.

Figure3


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.The high level view of the architecture to be built can be specified as follows.The cordova plugins will interact with the sugar platform through the sugar API (we need to develop that) and with the webview through its native API.This will then provide a javascript API to developers for their apps.

Figure4

Hence as per the above diagram we shall be building the cordova plugins, sugar api which interacts with the cordova plugins,the native cordova api which interacts with the webview and the javascript API which allows the developers to make their apps directly on HTML,CSS and JS using the device functionality through plugins and customs plugins.

So in a nutshell we shall develop the middle layer, which shall help the HTML apps to communicate with the sugar platform beneath.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.So the final goal of the project is to provide the javascript APIs for the developers and code some sample apps which depict the usage of those APIs in the real environment

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.

April 21 –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 – May 31 – Code up the sugar APIs required for the further building the cordova plugins
May 31 - June 15 - Code the cordova plugins and the corresponding code in the cordova native APIs , write the javascript APIs
June 15 - June 30 - Make a sample activity to show the working of the architecture developed
Mid Term Examination
July 1 - July 15 - add more plugins, improve upon the existing code as required
July 15 - July 31 - write the corresponding activities for the plugins added above and test the work done till now
August 1 - August 18 - Document the work, APIs and improve upon the existing project

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.

Puneet kaur sugar development environment setup.jpg

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 am so fascinated with the project that I would love to work on it even outside GSOC. Would love to contribute to this opensource community which has indeed given the world a beautiful product which helps in learning. I have always been attracted to the education world and sugar labs has developed a wonderful solution to the problem the kids face.I see a lot of poor kids out there in my own land and feel sorry for them as they don't have access to the right education tools they must have. Hence, I feel a natural inclination towards this community and indeed wish to bring sugar labs to a much larger scale than is presently where each kid of the world experiences the joy of learning interactively. For somewhere down the line the root cause of all the ill in the world - crimes etc are related to the fact that the kids are not provided with the right set of values and education they must have been taught at that early stage. So sugar forms an essential part of this vision and would be great to see the kids in my country using it and benefiting.Hence I wish to contribute to the project as a part of giving back to the world what I have gained from it so far. would love to contribute to sugar otherwise also if not as a part of gsoc and specially take up this project as it fascinates me.

Please include the category tag at the bottom of your page: