blob: 3a4e5aa8243acb1d988bb755240c949dfe94b6b5 [file] [log] [blame]
#summary Tracks progress of the new document editor project.
<wiki:toc max_depth="2"/>
= Introduction =
The goal of the project is to develop and/or deploy new infrastructure for document editing in Melange. This infrastructure should provide revision control of the documents, displaying diffs between revisions, storing documents in HTML and markdown. MarkItUp! can be deployed as an optional editor.
= Revision control architecture =
Revision control implementation involves creation of three separate models: Revision, !RevisionInfo and !RevisionContent.
The main purposes of Revision are:
# Denote that derived model implements revision control.
# Store list of keys for !RevisionInfo entities.
{{{
class Revision(soc.models.base.ModelWithFieldAttributes):
revisions = db.ListProperty(db.Key, verbose_name = ugettext("Revisions"))
}}}
Revision can be added to the list of base classes of the model, as GAE supports multiple inheritence for models since 1.2.4.
!RevisionInfo stores information about the revision. Revision number, author, date and time of creation, etc. All the meta goes here. !RevisionInfo also contains reference to !RevisionContent entity. Keys for the !RevisionInfo entities may be implemented as {{{"%s_%d" % (entity_key, revnumber)}}}. This helps to retrieve given revision without retrieving model entity. Division of info and content is crucial for revision control. Some operations on revisions manipulate only info, but not the content. One can consider view that shows all the revisions for the current entity.
{{{
class RevisionInfo(soc.models.base.ModelWithFieldAttributes):
revnumber = db.IntegerProperty(required = True)
author = db.ReferenceProperty(reference_class = soc.models.user.User, required = True)
created = db.DateTimeProperty(auto_now_add = True)
content = db.ReferenceProperty(reference_class = RevisionContent, required = True)
}}}
!RevisionContent stores the content. Content can be stored as plain text, JSON or something else. Revision model may implement methods to store the content in different formats. This methods can be redefined in derived models.
{{{
class RevisionContent(soc.models.base.ModelWithFieldAttributes):
content = db.TextProperty(verbose_name = ugettext("Content"))
}}}
= Project timeline =
== Week 1 (24 May - 30 May) ==
# Dig into GAE datastore (read [http://oreilly.com/catalog/9780596522735 "Programming Google App Engine"], review google.appengine.ext.db, play with the datastore)
# Deploy test Melange instance to appspot.com
# Familiarize myself with the code base
== Week 2 (31 May - 6 June) ==
# Design revision control architecture
# Digg deep into soc.models, soc.logic, soc.views packages
== Week 3 (7 June - 13 June) ==
# Implement Revision, !RevisionInfo and !RevisionContent
# Implement logic for Revision
# Refactor soc.views.models.base.View.create to support revision creation
== Week 4 (14 June - 20 June) ==
# Refactor soc.views.models.base.View.edit to support revision
# Implement view to list all revisions, roll back and show diff.
== Week 5 (21 June - 27 June) ==
# Refactor other models (Documentation, Proposal, Survey, etc) to support revisions.
# Fix bugs
== Week 6 (28 June - 4 July) ==
# Start working on HTML diffs
# Try stuff from [http://esw.w3.org/HtmlDiff HtmlDiff]
== Week 7 (5 July - 11 July) ==
# Implement HTML diffs for !RevisionContent
# Refactor views to show diffs between selected revisions
== Week 8 (12 July - 18 July) ==
# Intensive testing of revision control and diffs
# Fix issues
== Week 9 (19 July - 25 July) ==
# Start work on auto-saving
# Implement model to store temporary content as JSON
== Week 10 (26 July - 1 August) ==
# Implement AJAX hooks for TinyMCE to provide auto-saving
# Implement methods to store temporary content in datastore
== Week 11 (2 August - 8 August) ==
# Start deploying MarkItUp! as an optional editor for Melange
== Week 12 (9 August - 15 August) ==
# Finish deploying MarkItUp!
# Resolve issues, fix bugs