Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of Corion (7288)

Thursday October 05, 2006
03:25 AM

Zaphod progress

[ #31220 ]

(This is the second incarnation because I only previewed, and didn't post ...)

The next incarnation of Zaphod is progressing nicely. The move away from complicated actions ("insert character", "insert line", "split line", ...) towards a simplified one-action style of triples (offset, old_text, new_text) has greatly improved the maintainability of the code, as the handling on the Javascript side of things has become much simpler. I also had to move away from the line based approach to a document to a buffer based approach where the whole document is stored as one string, but that made even more specialized functions like split_line and join_line obsolete.

I've added session management to the server, so there is now the possibility to edit more than one document. Adding sessions also meant adding more cruft, like a page to see all active sessions, adding an API call to set the session's name and adding Javascript to modify the session's name. Another step was to enforce utf8 everywhere on input and output - at least now, umlauts work. Input methods for Chinese or Cuneiform are to be determined. Pasting a document also works now, by displaying a textarea entry and polling it for changes while the user pastes the new document into it.

Publishing the second incarnation is currently blocked by one feature I want to add, "bookmarks", that is, marked positions within the document between which the user(s) can jump around. Bookmarks are the stepping stone for a lot of interesting features and bugfixes:

  1. Bookmarks will smoke out the bugs in the code which applies remote changes.
  2. They provide additional navigation.
  3. They provide an interesting way to automate document review, for example a Perl::Critic bot or a parser for /TODO (.*)/ or /XXX (.*)/ items can add these as bookmarks automatically to maintain in-document to-do lists. This will necessitate some additions like bookmark categories and/or more text for each bookmark, and a way to tick off items from the bookmark list, but these come later.

After the second public release, I have to look at existing and externally maintained Javascript libraries to manipulate the DOM UI to clean up some of the cruft that has accumulated on the Javascript side of things. Another, unrelated step is the support of Perlbal - currently, the server runs under HTTP::Server::Simple, in a non-forking fashion, but as each client hits the server at least once per second, this will not scale properly. The Perlbal infrastructure might come in handy here, as there are no CPU-intensive tasks that could block the server.

I hope I find the time during the weekend to publish the second incarnation. The source code release and/or svn repository are also on my list, but a bit lower on priority.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.