Edited wiki page through web user interface.
diff --git a/NewDocumentEditor.wiki b/NewDocumentEditor.wiki index bad33a7..5ccff9c 100644 --- a/NewDocumentEditor.wiki +++ b/NewDocumentEditor.wiki
@@ -6,17 +6,26 @@ 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 = -I'm going to implement revision control as a separate model. Let's call it {{{Revision}}}. -Entities of this model will contain meta-information about revisions of the current document. The prototype may look as follows: +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. + +Here is the prototypes of models: {{{ +from google.appengine.ext import db +class DocRevision(db.Model): + user = db.UserProperty() # User, who has created the revision + created = db.DateTimeProperty() # Date and time of creation + doc = db.ReferenceProperty() # Document entity reference + class Revision(db.Model): - revs = db.LinkProperty(db.Key) - public = db.LinkProperty(db.Key) - private = db.LinkProperty(db.Key) + revs = db.LinkProperty(db.Key) # List of DocRevision keys + public = db.LinkProperty(db.Key) # List of keys to public revisions + private = db.LinkProperty(db.Key) # List of keys to private revisions }}} -{{{revs}}} is a linked list of entities' keys. {{{public}}} and {{{private}}} is a linked list of keys to public and private revisions. Creation date and user info are stored as properties of the documents. The approach with lists allows us to manage revision history at revision creation. And helps to avoid redundant datastore queries. - +This approach allows us to simplify revision management. {{{revs}}}, {{{public}}} and {{{private}}} are manged at entity creation. = 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)