Saturday, 10 August 2013

ProofreadPage extension: Mid-term Reports

Hi!
 Sorry for not-so-frequent updates. Well, my project successfully passed the mid-term evaluation. I've already talked about the need for refactoring of the extension in the last post. A few things have already been moved from the client side to the server side. We are shifting to a new zoom library jQuery-Pan-Zoom. The editing system of "Page" pages is a change not only in the aspect of being shifted to PHP from JS but also reflects a change in the way a "Page" page is stored. Earlier, while displaying the text for editing we would just use a big blob of Wikitext. There would be no differentiation between the various parts of the body like header, body, footer. ProofreadPageContent class makes these differentiations. It is organised into the main attributes of a "Page" page i.e., header, body, footer, last proofreader, proofreading level.

    The things that have been moved to PHP from JavaScript are:
1. Setting up of the editing system for Page and Index pages.
2. Display of image on the 'read' section of a "Page" page.

The major problem with the JavaScript of ProofreadPage extension was that instead of just adding functionalities on the client side, it was being used to glue the various pieces of ProofreadPage extension together. I've tried to reduce the use of JS to a minimal level except in places where it obviously needs to be there. This was done by separating the rendering, parsing and editing system into different modules so that it becomes a bit more clear as to how the various parts of the extension work together.

The classical Wiki editor and VisualEditor are organised in very different ways. The interface is the obvious difference. I am not yet decided on where to put the quality buttons when it has been integrated with VisualEditor.

    Another project that is related to WikiSource is BookManager extension. After a chat regarding how ProofreadPage and BookManager extension should work together, I have two more things in front of me:
1. Providing a nice interface to add page ranges from DjVu.
2. Switching to JSON instead of Index template that is currently being used.

The only problem with JSON is that there will be too much data and processing time would be huge for large books. The integration with VisualEditor is about to begin. <can't wait>