blob: 0177f54218d02be40028f26065dbc4263a33fa41 [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
# Design revision control architecture
== Week 2 (31 May - 6 June) ==
# Implement revision control
* Implement revision control models
* Hack out views to support revisions
== Week 3 (7 June - 13 June) ==
# Finish revision control
* Implement support for public and private revisions
* Implement revision rollback
* Fix problems
== Week 4 (14 June - 20 June) ==
# Work on diff engine
* Review existing solutions
* Try [http://www.aaronsw.com/2002/diff/ HTML diff] on existing infrastructure
== Week 5 (21 June - 27 June) ==
# Hack HTML diff for intelligent diff computation
== Week 6 (28 June - 4 July) ==
# Refactor views to support HTML diffs
== Week 7 (5 July - 11 July) ==
# Test diffs with revision control
# Fix issues
# Release full-featured revision control before mid-term evaluations