public inbox for gentoo-soc@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-soc] Progress Report - Setting Beacon Afloat
@ 2008-06-11 14:56 Nandeep Mali
  0 siblings, 0 replies; 11+ messages in thread
From: Nandeep Mali @ 2008-06-11 14:56 UTC (permalink / raw
  To: gentoo-soc

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

Most of my work was done over the last week. Here's what I have accomplished
so far with regards to the mid-term evaluation:
1. I began with a UI spruce up of the editor and removing Mochikit along the
way. Since Dojo has developed quite a bit over the last couple of years I
had to change the implementations wherever Dojo was involved. I also added a
bit of AJAX along the way. Mochikit has been completely removed now.

2. I moved on to implementing a Code View (using an existing web based
editor) which is now editable along with a Rich Text Editor (TinyMCE) for
the Design View. The Design View shows the Doc with CSS styles and am
currently in the process of writing GuideXML plugins for TinyMCE. If this
goes well then it might remove the need for a drag and drop interface.

3. I achieved an AJAXy sync between the Code View and the Design View but
was having problems with continuous parsing of the documents (xml to html
and vice versa). Will look into this again soon.

That's it for now. It's not much but am picking up the pace.

Kind Regards
Nandeep

[-- Attachment #2: Type: text/html, Size: 1222 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [gentoo-soc] Progress Report - Setting Beacon Afloat
@ 2008-06-26 12:24 Nandeep Mali
  2008-06-26 12:34 ` Luca Barbato
  0 siblings, 1 reply; 11+ messages in thread
From: Nandeep Mali @ 2008-06-26 12:24 UTC (permalink / raw
  To: gentoo-soc

Hi all,

This report is slightly overdue because I thought that I should
complete some small tid-bits and include them here as well. I have
been writing this report for two days now, adding stuff as I am done
with it.

1. Starting of the last week was very frustrating as I was compiling
an XSL for GuideXML to HTML transformation which took up a lot of
time. Gentoo repository does have an XSL (very detailed!) written by
nesyx but that wouldn't serve the editing purpose that we need. So I
crafted a new one which is more concise and includes 95% of the
GuideXML formatting (so far and evolving as I go along). An even
bigger nightmare was making the reverse XSL, i.e. HTML to GuideXML. I
have the structure completed and only need to fill in the blanks along
the way. Seeing the XSLT was quite rewarding considering the amount of
time it took. I even added support for anchors (chapter/section
numbering) for referencing other parts of the document using
hyperlinks.

2. Next was my tryst with a Rich Text Editor. I tried many available
out there but none gave the flexibility needed. For instance I have to
handle the validity of GuideXML, not allowing certain tags inside
another, blah blah. So I went ahead and re-invented the wheel creating
GuideXML's own Rich Text Editor. Again I have the framework ready and
am just filling in the buttons so to speak. The Rich Text Editor
handles the creation of new chapters/sections along with re factoring
of their ids, i.e their chapter/section numbers. Hence if I insert a
new chapter then all chapter numbers will update accordingly. This was
done keeping in mind the DOM tree that I'll be making next which, you
guessed it, helps in focusing to a chapter/section immediately.

Another thing I had to tackle was the user input. It is almost
impossible to completely prevent the user from inserting/creating
trash html in a rich text editor. So I am handling most of the user
inputs manually like overriding the default actions of the ENTER, DEL,
etc. keys. Also different browsers generate different HTML in an
editable area. So I have to make the reverse XSL very flexible.

3. This was small work but I managed to get a database wrapper running
and completed a feature of auto-saving of files (like Gmail,
WordPress). These are not plugged in yet as the most vital link
between everything is the XSL.

4. My domain name expired on 23rd and I was kinda lazy to renew it but
will be done by weekend hopefully. I shall put up a demo of almost
useable Beacon by then. You can even start editing your docs by then!

Kind Regards
Nandeep Mali
-- 
gentoo-soc@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [gentoo-soc] Progress Report - Setting Beacon Afloat
@ 2008-07-15 23:05 Nandeep Mali
  2008-07-16 19:44 ` Donnie Berkholz
  2008-07-19  8:27 ` Arun Raghavan
  0 siblings, 2 replies; 11+ messages in thread
From: Nandeep Mali @ 2008-07-15 23:05 UTC (permalink / raw
  To: gentoo-soc

Hi all,

This report is a matchup of the original timeline and deliverables
with the progress so far.

My original deliverables were:

- Remove Mochikit and replace it with Dojo.
- Provide a GuideXML customized Rich Text Editor in place of normal text-boxes.
- Improve Various User Interface Elements such as the DOM tree and
remove CSS bugs.
- Design a Data Backend as an alternate to temporary file storage.
- Rewrite the drag and drop feature and improve formatting of generated code.

Now to go through them (not in order):

1. Remove Mochikit and replace it with Dojo:
Done. The aim here was to reduce the number of JavaScript libraries
used. I have included the Prototype framework[1] for easy AJAX
handling.

2. Improve Various User Interface Elements such as the DOM tree and
remove CSS bugs:
Done. Created a fluid layout to remove the annoying scroll bars and
will handle different browser sizes and resizing. The original cute
icons are still there. ^_^
The DOM tree can be used to jump to various locations in the document.
Also the different chapters and sections can be referenced in the
document.

3. Design a Data Backend as an alternate to temporary file storage:
Done. Created a wrapper for generic functions like read and write.
Also included a Gmail like auto-save feature. The XML view and save
features are all implemented using AJAX.

4. Provide a GuideXML customized Rich Text Editor in place of normal text-boxes:
& 5. Rewrite the drag and drop feature and improve formatting of
generated code:
The 5th feature has been replaced with the RTE. Now there is no use of
a drag and drop interface. What we had thought of was that the
document would be editable by using the inline text-boxes that Dojo
has. Since the editor will have to be collaborative it'll not be easy
to implement document manipulations on the fly. Therefore I thought of
using the Writely (Google Docs) approach where the entire document is
editable. The RTE is now a big undertaking and will be a continuous
work. The formatting of generated XML has been improved but requires
some more tweaks. The editor does not support some GuideXML elements
but those can be edited directly in the XML and the changes will
reflect back in the WYSIWYG view.

The editor is available at Tux Family[2]. It should run out-of-the-box
if you have:
- A web server
- PHP support (With XSLProcessor)
- The editor uses the system tmp to temporary save files.

Please go ahead and try it out. ^_^

I have also asked mentor-kun to put it up on his server so those of
you don't have a server set up you can soon access it up there.

My post mid-term aim is to implement the collaborative editor and
continue work on the RTE, XML generation and adding/revamping
features.

Kind Regards
Nandeep Mali

[1] http://www.prototypejs.org/
[2] git clone git://git.tuxfamily.org/gitroot/beacon/trunk.git
-- 
gentoo-soc@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 11+ messages in thread
* [gentoo-soc] Progress Report - Setting Beacon Afloat
@ 2008-08-11 17:58 Nandeep Mali
  0 siblings, 0 replies; 11+ messages in thread
From: Nandeep Mali @ 2008-08-11 17:58 UTC (permalink / raw
  To: gentoo-soc

Hi folks,

It's 11th, the suggested "pencil down" date for Google Summer of Code
2008. It's been fun. And it'll continue to be. No pencil down
unofficially. :)

Here's a long due report on Beacon.

My post mid-term deliverable was the collaborative editor. The initial
week was spent learning, cleaning and sprucing certain sections of
code and realizing how much more I need to learn. I spent quite a time
looking around, reading other codes and going through articles on many
topics in Web Apps. I wanted a know how on how to make a great web
app, issues with scalability (after a twitter/blog update by Anant ;)
[1]), good asynchronous JavaScript programming patterns etc. [2].
There are not many open source collaborative RTEs out there [3]. I
started my coding on it and changed my practices. So the post mid-term
code turned out to be different and more manageable and re-factoring
other code will not be difficult. I had tried to avoid the use of
libraries so I could understand more [4].

The collaborative editor has pretty much the same layout as the 'solo'
editor. The document, but, is not fully editable at once. I am using
inline editors (like in the original beacon), which allow user to edit
a part of the document by clicking on it. The click makes the text
editable (much like the Dojo inline editor, which sadly did not have
the support for an RTE and since I have a framework for one, I forged
it myself). This helps me in applying section locking so as to prevent
changes by different editors from colliding.

There is a tiny chat widget on the page and a user list which can help
editors stay in sync with each other within the editor itself.

As the document is being edited the sections get locked/unlocked
giving the user a complete view of what's happening. Epic events like
adding a chapter/section are handled differently by locking the whole
document. This part is still being worked upon.

Another major learning step was good (shudder) Ajaxing. Reading a lot
many articles by JS gurus I tried to find the best way to handle the
large amount of asynchronous requests made in the collaborative
editor. There are some periodical poll functions like getting the
connected users list, chats, server syncs and data comms. I had to
find the some ways to remove the HTTP open/close overheads but sadly
browsers don't support some hacks so well so went ahead with simple
polling. An interesting read at [5].

So what's remaining now?

- The completion of server-client communication in the collaborative editor.
- Perform the much needed testing and bug fixing.
- Completing the stand-alone editor's missing features like support
for certain GuideXML elements and output of well formatted XML.

Staying in tune to the project 'title' I plan to set afloat a beta
after the first two tasks.

Thanks to bonsaikitten, there's a demo of the current code base at
[6]. The 'solo' editor is pretty useable and you can play with the
chat feature in the collab editor. To let another user join your
session just copy the URL in the browser and paste it to the other
person. Or you could just open two tabs in the browser and chat with
yourself. :P

My future plan is to basically just continue work with Beacon and make
it as extensible and feature rich as possible while keeping it very
easy to install and run anywhere. I also plan to port it to Python
later (for a possible integration with the Google App Engine, thanks
to quantumsummers for that idea :) ).

It has been a great learning experience! More updates later.

Kind Regards
Nandeep


[1] http://www.kix.in/blog/2008/07/weeks-8-9-load-balancing-oauth/
[2] One of the good articles on JS patterns:
http://www.klauskomenda.com/code/javascript-programming-patterns/
[3] Wikipedia: http://en.wikipedia.org/wiki/Collaborative_real-time_editor
[4] A nice article by JS guru Stuart Langridge on use of libraries:
http://www.kryogenix.org/days/2006/12/24/the-fog-of-libraries/
[5] A bit on HTTP connections: http://en.wikipedia.org/wiki/Comet_(programming)
[6] http://dev.gentooexperimental.org/~n9986/beacon/trunk/editor/
(currently supported only in Firefox)



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2008-08-11 17:58 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-11 14:56 [gentoo-soc] Progress Report - Setting Beacon Afloat Nandeep Mali
  -- strict thread matches above, loose matches on Subject: below --
2008-06-26 12:24 Nandeep Mali
2008-06-26 12:34 ` Luca Barbato
2008-06-27 12:18   ` Nandeep Mali
2008-07-15 23:05 Nandeep Mali
2008-07-16 19:44 ` Donnie Berkholz
2008-07-17 20:15   ` Anant Narayanan
2008-07-19  8:27 ` Arun Raghavan
2008-07-20  3:05   ` Alec Warner
2008-07-20 11:18     ` Nandeep Mali
2008-08-11 17:58 Nandeep Mali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox