1 |
Hi folks, |
2 |
|
3 |
It's 11th, the suggested "pencil down" date for Google Summer of Code |
4 |
2008. It's been fun. And it'll continue to be. No pencil down |
5 |
unofficially. :) |
6 |
|
7 |
Here's a long due report on Beacon. |
8 |
|
9 |
My post mid-term deliverable was the collaborative editor. The initial |
10 |
week was spent learning, cleaning and sprucing certain sections of |
11 |
code and realizing how much more I need to learn. I spent quite a time |
12 |
looking around, reading other codes and going through articles on many |
13 |
topics in Web Apps. I wanted a know how on how to make a great web |
14 |
app, issues with scalability (after a twitter/blog update by Anant ;) |
15 |
[1]), good asynchronous JavaScript programming patterns etc. [2]. |
16 |
There are not many open source collaborative RTEs out there [3]. I |
17 |
started my coding on it and changed my practices. So the post mid-term |
18 |
code turned out to be different and more manageable and re-factoring |
19 |
other code will not be difficult. I had tried to avoid the use of |
20 |
libraries so I could understand more [4]. |
21 |
|
22 |
The collaborative editor has pretty much the same layout as the 'solo' |
23 |
editor. The document, but, is not fully editable at once. I am using |
24 |
inline editors (like in the original beacon), which allow user to edit |
25 |
a part of the document by clicking on it. The click makes the text |
26 |
editable (much like the Dojo inline editor, which sadly did not have |
27 |
the support for an RTE and since I have a framework for one, I forged |
28 |
it myself). This helps me in applying section locking so as to prevent |
29 |
changes by different editors from colliding. |
30 |
|
31 |
There is a tiny chat widget on the page and a user list which can help |
32 |
editors stay in sync with each other within the editor itself. |
33 |
|
34 |
As the document is being edited the sections get locked/unlocked |
35 |
giving the user a complete view of what's happening. Epic events like |
36 |
adding a chapter/section are handled differently by locking the whole |
37 |
document. This part is still being worked upon. |
38 |
|
39 |
Another major learning step was good (shudder) Ajaxing. Reading a lot |
40 |
many articles by JS gurus I tried to find the best way to handle the |
41 |
large amount of asynchronous requests made in the collaborative |
42 |
editor. There are some periodical poll functions like getting the |
43 |
connected users list, chats, server syncs and data comms. I had to |
44 |
find the some ways to remove the HTTP open/close overheads but sadly |
45 |
browsers don't support some hacks so well so went ahead with simple |
46 |
polling. An interesting read at [5]. |
47 |
|
48 |
So what's remaining now? |
49 |
|
50 |
- The completion of server-client communication in the collaborative editor. |
51 |
- Perform the much needed testing and bug fixing. |
52 |
- Completing the stand-alone editor's missing features like support |
53 |
for certain GuideXML elements and output of well formatted XML. |
54 |
|
55 |
Staying in tune to the project 'title' I plan to set afloat a beta |
56 |
after the first two tasks. |
57 |
|
58 |
Thanks to bonsaikitten, there's a demo of the current code base at |
59 |
[6]. The 'solo' editor is pretty useable and you can play with the |
60 |
chat feature in the collab editor. To let another user join your |
61 |
session just copy the URL in the browser and paste it to the other |
62 |
person. Or you could just open two tabs in the browser and chat with |
63 |
yourself. :P |
64 |
|
65 |
My future plan is to basically just continue work with Beacon and make |
66 |
it as extensible and feature rich as possible while keeping it very |
67 |
easy to install and run anywhere. I also plan to port it to Python |
68 |
later (for a possible integration with the Google App Engine, thanks |
69 |
to quantumsummers for that idea :) ). |
70 |
|
71 |
It has been a great learning experience! More updates later. |
72 |
|
73 |
Kind Regards |
74 |
Nandeep |
75 |
|
76 |
|
77 |
[1] http://www.kix.in/blog/2008/07/weeks-8-9-load-balancing-oauth/ |
78 |
[2] One of the good articles on JS patterns: |
79 |
http://www.klauskomenda.com/code/javascript-programming-patterns/ |
80 |
[3] Wikipedia: http://en.wikipedia.org/wiki/Collaborative_real-time_editor |
81 |
[4] A nice article by JS guru Stuart Langridge on use of libraries: |
82 |
http://www.kryogenix.org/days/2006/12/24/the-fog-of-libraries/ |
83 |
[5] A bit on HTTP connections: http://en.wikipedia.org/wiki/Comet_(programming) |
84 |
[6] http://dev.gentooexperimental.org/~n9986/beacon/trunk/editor/ |
85 |
(currently supported only in Firefox) |