blob: 3d462238d206889ad6f6f2b9f849d9b6a3dd0dfe [file] [log] [blame]
#summary tracks progress for the "integration with external apis" project.
#labels Phase-Requirements
<wiki:toc max_depth="3" />
= 1. Introduction =
This page is tracking of progress for GSoC 2011 Project: Integration with External API's
----
= 2. Requirements =
== 2.1 Melange Lists ==
===Overview===
Basically an export button for each lists on Melange that triggers an export mechanism to Google SpreadSheets. (including OAuth roundtrip, access token storing on datastore)
===Problems & Solutions===
* *Problem:* exporting a JavaScript list
* *Solution:* export spreadsheet on client side. Implement JS methods over GData Protocols.
* *Problem:* Making cross domain requests
* *Solution:* Use an proxy url to emulate cross-domain requests. See blog post from [http://melange-dev.blogspot.com/2011/08/gsoc-2011-integration-with-external.html, week10] and [http://melange-dev.blogspot.com/2011/08/gsoc-2011-integration-with-external_08.html Week11].
* *Problem:* Uploading chunks of data.
* *Solution:* For current Spreadsheet API it's not possible to add multiple rows with a batch requests. We used uploading document as csv and converting it to native spreadsheets format after upload. Uploading multiple chunks of a big data prevents converting after upload. So we can't export very large lists.
===Result===
== 2.2 Student Proposals ==
===Overview ===
Students will be able to edit their proposals through tinyMCE editor or link to a Google Document file. There will be a "Sync Now" button to syncronize proposal that Melage holds with actual Google Documents file.
===Problems & Solutions ===
* *Problem:* Student may not be awere that proposal is syncronised only when he/she clicks "Sync Now" button.
* *Solution:* Give responsibility to student.
* *Problem:* As Google Documents stores HTML files in full-HTML form (including images, css files etc.) a method must be implemented to embed that document to actual proposal entry.
* *Solution:* Google Documents no longer supports HTML editing. We export document format documents as HTML. This document comes style embed in.
=== Result ===
Syncing proposal is student's responsibity. Student selects it's document through an autocomplete widget after logged in to Google Documents.
== 2.3 Surveys (issue 1243) ==
===Overview===
Export a survey as either a pdf, google doc, plain text, something to save the entire webpage view.
== 2.4 Tracking Numbers (issue 1239) ==
=== Overview ===
Program administrators have spreadsheets that will enable students to have tracking numbers for their welcome packages and tshirts. Same for payment status.
== 2.5 Export Melange stuff for developers' use ==
=== Overview ===
Export some statistics and data to Google Documents to work on or to integrate with other services like Fusion Tables.
----
= 4. Project Timeline =
This table is based on deliverables.
|| 25 May - 31 May (Week 1) || Add Google Data packages to Melange. ||
|| 1 June - 7 June (Week 2) || Add related fields create required models. ||
|| 8 June - 21 June (Week 3,4) || Integrate OAuth. ||
|| 22 June - 12 July (Week 5,6,7) || Student proposal syncing. Write tests if possible. ||
|| 13 July - 15 July || Midterm Evaluation. ||
|| 15 July - 19 July (Week 8) || Learn how Melange lists actually works. ||
|| 20 July - 2 August (Week 9,10) || Melange List exporting. ||
|| 3 August - 17 August (Week 11,12) || Work on open issues about APIs. issue 1239, issue 1243 ||
|| 17 August - 26 August (Week 13) || Export Melange stuff for developers' use ||
= 5. Design & Terminology =
== 5.1 Open Auth Roundtrip ==
https://lh3.googleusercontent.com/-G5GUxfUdXS0/TgC_I0dXVmI/AAAAAAAAADI/hAGOlYZngq0/s640/MelangeOAuth%252520%2525281%252529.png
== 5.2 Popup OAuth Mechanism ==
It's important to authenticate user without leaving page especially if user has some unposted data on page. Popup mechanism works in the following way.
* Developer includes 'melange.gdata.core.js' dependency to it's page that uses GData features.
* A function that uses GData features turns itself to a login required function with myfunc = melange.gdata.createAuthorizedFunction(myfunc, [])
* When generated myfunc function is run, it triggers popup roundtrip if user is not logged in to GDocs.
* After authentication finishes, popup closes itself after telling parent window login is successful and parent window resumes execution of myfunc function that is intended to run.
----
=6. Meeting Notes & Agendas =
== Monday, May 16 18:30:00 in UTC (Skype Conference)==
=== TODOs ===
* Create the blogpost summarizing last week today.
* Have a call with your mentor this week, most of us are in PDT time zone.
* Put a link to your GAE instance on the wiki page (and blog if possible)
* Don't forget to make your next blogpost before the next meeting.
* Get ready to start coding!
== Tuesday, May 20 20:00:00 in UTC (GTalk with Mario) ==
Mario delivered me notes for my project from discussion with Melange team.
===TODOS:===
* Update project requirements
* Start working on exporting a html document from Google Documents and integrating with Melange.
* Come up with a timeline. Designate deliverables.
* Focus on the main problems instead of thinking whole project or other stuff that is already known how to handle.
== Monday, June 21 20:00:00 in UTC (GTalk with Mario) ==
===TODOS:===
* Store tokens in datastore.
* Provide a "remember me" checkbox with login button.
* Store "remember me" choice and access token in Profile model.
== Wednesday, June 29 (GTalk with Mario) ==
=== Notes ===
Bacause GAE filesystem is not writable it's not possible to export a document with current GData API, we talked how to overcome this. We decided, to modify gdata library as least as possible, we need to extend 'Export' funciton's defination to accept a memory file besides file path.
Not broking current API is important.
== Sunday, July 3 (GTalk with Mario) ==
=== Notes ===
I asked Mario about easiest integration of 'gdata.js' script for each page that uses it. I asked how to eliminate initializing it in every page (by moving initialization to base template). The reason for this was, in future ther would be probably lots of pages that uses 'gdata.js' script and i wanted to move intialization code to base.html where initializaiton is done automatically.
Mario conclusion: "sometimes it's a tradeoff between DRY and YAGNI :)"
We decided to keep the initalization in each page uses 'gdata.js' until we really need to move it to the base template.
== Sunday, July 6 (GTalk with Mario) ==
=== Notes ===
It's not possible to show OAuth roundtrip in an IFrame. Mario pointed a few ways of possible solutions. I tried on a https connection but that didn't work. So we had to decide to show OAuth roundtrip in a popup window. I created an [http://code.google.com/p/gdata-issues/issues/detail?id=2651 issue] for this.
== Tuesday, June 8 (GTalk with Mario) ==
=== Notes ===
for proposal sync page, we decided leaving search queries to GData API, instead of getting full documents after the page is loaded.
== Tuesday, June 23 (GTalk with Mario) ==
=== Notes ===
Mario suggested to use Restful API for GData on client-side as there isn't a ready JS API. This will also prevent wasting datastore cycles as we won't run two transaction for the same entities.
== Tuesday, June 28 (GTalk with Mario) ==
==Notes==
We talked about how to skip popup blockers for popup pages. We decided we should trigger popup mechanism exactly just after a click event occurs. We rediscussed our current popup mechanism and decided to make some changes on design through this.
== Agust 6 20:00:00 in UTC (GTalk with Mario) ==
=== Notes ===
* We talked about how to eliminate cross-domain requests by emulating them with a proxy URL.
* Mario stressed: "Those are nice-to-have, the issues are filed directly by Carol so obviously they have high priority"
* He also warned me about updating wiki more frequently.