blob: 7d28b9af093e88f8ae9b5defd8f47e317341b1f1 [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 =
There are several issues that should be taken into account:
# Loose coupling. Information about revisions must be represented as a separate model to minimize dependencies between document entities and revisions.
# Minimize the size of the data retrieved.
# Minimize datastore queries and simplify them.
== First approach: independent revisions ==
{{{
class Revision(db.Model):
revision_id = db.IntegerProperty()
timestamp = db.DateTimeProperty() # It's not required, cause Document entity has it
user = db.UserProperty() # It's not required, cause Document entity has it
comment = db.TextProperty() # Comment about the revision
current = db.BooleanProperty() # Current revision
deleted = db.BooleanProperty() # Revision is marked as deleted
public = db.BooleanProperty() # Public or private revision
document = db.ReferenceProperty() # Reference to content
}}}
It's obvious that revisions are not linked to each other. Each operation on revision is just a query to a datastore.
== Second approach: Linked revisions ==
{{{
class DocRevision(db.Model):
revision_id = db.IntegerProperty() # It's necessary for list rearrangement
timestamp = db.DateTimeProperty() # It's not required, cause Document entity has it
user = db.UserProperty() # It's not required, cause Document entity has it
comment = db.TextProperty() # Comment about the revision
document = db.ReferenceProperty() # Reference to content
class Revision(db.Model):
revisions = db.ListProperty(db.Key) # List of revisions
public = db.ListProperty(db.Key)
private = db.ListProperty(db.Key)
}}}
This approach helps to manage revisions easily, but list rearrangement operations consumes expensive CPU time.
= 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