On Thu, Apr 12, 2012 at 12:00 PM, Nelson Silva <nelson...@gmail.com> wrote:
> The Rizzoma guys have a rich text model as well as a wave model (blips,
> renderers, etc...) and I would really like to see it properly integrated in
> ShareJS's codebase.
<snip>
> but a rich editor built on a general model<>view mapping with
> renderers/doodads would really bring ShareJS to a whole new level.
I'm interested in doing this for Hallo
(http://bergie.github.com/hallo/) and Create (http://createjs.org/),
but haven't had time to properly dig into the Rizzoma code yet. And
obviously the Russian code comments don't help ;-)
--
Henri Bergius
Motorcycle Adventures and Free Software
http://bergie.iki.fi/
Jabber: henri....@gmail.com
Microblogs: @bergie
Thanks!
> I would like however to understand the project's roadmap. Both this group
> and the GitHub repo have shown little activity lately and I'd like to
> understand what it means...
It means... I've got a bad habit of feeling obligated / busy / guilty
about something and then disappearing from sharejs for a month or two
at a stretch. A few months ago I took on a teaching job, and I've been
busy.
The obvious next thing that I've been talking about for ages is
getting proper connection status stuff in sharejs (who else is
connected and cursor positions and stuff). That should be pretty easy,
but it just needs time. And most of my little coding time has been
going into making games lately. Which is a long, roundabout way of
saying that if someone wants to take a stab at it you're more than
welcome.
Maybe everyone else is happy on this front, but most of the work I've
done lately on sharejs has gone into reinventing the wheel (pick a
communication stream, authentication, DB, etc) which has nothing to do
with the problem I was trying to solve in the first place (OT). I
suspect there's a nicer architecture somewhere where sharejs provides
a few types that do OT (receiving ops, sending ops and updating a
document in the process). Then its up to the application to send the
ops between client & server.
-J
Can the JSON OT not model metadata? Seems like you can do many of these things already.
I'm happy to work on this with Hallo (http://hallojs.org/), but I will
need some help to understand how to apply OT to rich text (I can read
Cyrillic but my Russian is too rusty for the comments in the Rizzoma
codebase ;-))
On Tue, Apr 24, 2012 at 11:18 AM, Nelson Silva <nelson...@gmail.com> wrote:
> - Create sample rich text editor (using Rizzoma's editor, Halo or any other
> text-editor - it would be great to have an editor that doesn't depend on
> content editable - perhaps extracting Wave's editor and providing a pure JS
> API )I'm happy to work on this with Hallo (http://hallojs.org/), but I will
need some help to understand how to apply OT to rich text (I can read
Cyrillic but my Russian is too rusty for the comments in the Rizzoma
codebase ;-))
--
Henri Bergius
Motorcycle Adventures and Free Software
http://bergie.iki.fi/Jabber: henri....@gmail.com
Microblogs: @bergie
Also you need to setup rules for new inserts on the boundaries of an annotation. Imagine I have "this is bold text" and an annotation that says [8,12] = ["style/bold"] thus assigning style bold to the range 8-12, what should happen if a user adds "er" at pos 12 ? The expected behaviour would be for the annotation to be updated to 8-14 thus annotations should be inherited from the left.
No dia 5 de Mai de 2012 03:41, "Joseph Gentle" <jos...@gmail.com> escreveu:
>
> On Tue, Apr 24, 2012 at 7:18 PM, Nelson Silva <nelson...@gmail.com> wrote:
> > So, to sum up, my roadmap proposal would be something like:
> >
> > - Promote ShareJS to top level at GitHub
>
> Sure.
Great!
>
> > - Define a repo structure and guidelines for addons and samples
>
> Do you think that would help? I'm a little biased, but I think the
> repo structure is fairly self explanatory.
>
This should probably come after the next point... the idea is to define a structure for addons... the repo structure for ShareJS is fine.
> > - Extract samples, persistence, C/S protocol, etc as addons
>
> There's a fair bit of thinking we have to do here, about exactly how
> sharejs should be structured. I'm not too happy with how its
> structured at the moment - I feel like sharejs is trying to do too
> much. I'd be interested to see proposals for how it should be
> rewritten.
>
Etherpad Lite has plugins using npm so we could try something like that... break up ShareJS into modules and then work on each of those to provide proper abstractions and promote code reuse in new contributed modules.
Projects like brunch allow you to choose the plugins you want to use just by adding them to your package.json... these are just two examples but i'm sure there are several other approaches to choose from.
> > - Implement Document Metadata as proposed
> > in https://github.com/josephg/ShareJS/wiki/Document-Metadata This would give
> > us contributors, cursors, etc
>
> Yep. I've been promising this for months, and I keep getting
> distracted. We'll get there.
>
Not sure you have donations set up but you should... i understand that these days there's just so many neat stuff to do and all hobby projects get to a point they feel like an obligation... perhaps we could come up with a neat project based on ShareJS for motivating.. how about some sort of game? Or a ptp version using webrtc's peerconnection?
> > - Create sample with participants and cursors (something like MarkdownR but
> > with list of participants and cursor positions)
> > - Refactor rizzoma's contribution to support "attributes". (They call
> > "params" as of now but the ideia is the same)
> > - Create sample rich text editor (using Rizzoma's editor, Halo or any other
> > text-editor - it would be great to have an editor that doesn't depend on
> > content editable - perhaps extracting Wave's editor and providing a pure JS
> > API )
> > - Support Wave's model ? (conversation, blips, etc...)
>
> Wave's model is quite complicated. I'm not sure how much of it we
> really need. Eg, wave has full XML support (arbitrarily nested
> elements with attributes) as well as rich text annotations, which are
> orthogonal to the XML structure. I think thats too much. I'd be happy
> with just supporting one or the other.
>
The json stuff in ShareJS should be enough to mimic wave's conversation model and the blips could be text with attributes/annotations. So basically we're mostly missing a rich text model. Since rizzoma already has this we could just start by extracting it from their clone.
> > - Create Robot API ? (could just be a ShareJS client but with a nice
> > interface)
>
> Haha knock yourself out :D
>
:p just aiming high...
> -J
For reference... this is a discussion about brunch's approach to plugins:
https://github.com/brunch/brunch/commit/f903e7b723afd7f9900eb57f93d07bc612ec1818
Come on, CS takes like a couple of minutes to understand. Everyone who uses it is/should be at ease with JS, it is but a subset to make it more manageable. JS is very "forgiving" and i really believe you have to be a ninja to grasp all its quirks.. prototipal inheritance, vars that get promoted to outer scopes, dozens of different ways to get stuff done, inconsistent behaviour between browsers, weird type conversions, etc, etc... if we're stuck with it i really hope we get more of GWT, CS, Dart, whatever...
Also, there's no need to learn CS to use ShareJS! You can extend it with pure JS, you can wrap it in jsni and use it in gwt, you can wrap it in an isolate and use it with Dart, you can run it with v8 and use it with c, c++ whatever, you can run it with rhino and get it on the jvm...
Don't learn JS or Java... learn programming! OO, functional, logical, try a bit of Scala or haskell for true powerfull type systems, learn C to understand pointers, try some asm just for fun, learn lisp or smalltalk to understand where we come from and that the greatest languages have been here for decades, play with prolog for something different, learn python, ruby, see how rails and django brought some sense to jee just by keeping it simple! Try Go, try lua, try Dart... and perhaps in the end you'll feel like many... so many great languages and we got stuck with JS for the next couple of years ! Even actionscript its ecma cousin is better...
I guess what's missing in your analysis is the fun factor. When you invest your free time on an open source project you need it to be fun. Learning a new language increases the fun factor and the simplicity of CS and its overall look and feel really adds to that. I understand Joseph and i believe he won't be working much more on ShareJS. When you start growing your project and community you have to start worrying about stability, performance, etc... you have to please users and make a commitment and that's no longer fun! It's like Zed put it... there are innovators/entrepeneurs who love playing with new ideas but after a while they get bored and start looking for new toys... it is up to implementers to take care of the boring stuff and turn the prototype into a product.
If you feel that a JS port is the way to go do it! That's a very simple task and like you said there are lots of JS developers (although i'd rather have one Joseph than a dozen others :p).
I've been feeding this discussion cause i'm on holidays but i think that if all the time we've "lost" here was put to good use you'd already have you JS "port" up and running.
I'm working on a Dart port and will get back to it asap. It's a great learning experience which i recommend to anyone interested in ShareJS.