Вопрос

I'm looking in to making a real time collaborated Text editor and Instant messenger for a web site I am doing. what would be the best tools & language to do this in?

I see Java script could be a good choice for the editor. could the IM also be done in Java script?

Это было полезно?

Решение

It would be helpful to understand more of the specific requirements - a collaborative text editor could mean many things. IM is a little easier to understand.

For the text editor - depending on your requirements etc. - I would start by using an existing text editor - http://www.tinymce.com/ has decent features and is used widely. You can customize it to remove features you don't want/need (e.g. formatting), whilst retaining features many people would expect (like undo/redo and spell check). You would need to figure out how to make it collaborative though - not sure what user experience you're aiming for. It's relatively easy to allow users to "take turns" editing the current document - save it to a database (using PHP, Ruby or Rails, Java - whatever you're most comfortable with) when the user presses "save", and develop a locking mechanism to deal with concurrent access. It's a lot harder to have the document reflect real-time changes between multiple users and update the document for all those users. You'd benefit from a good "DIFF" program. In this case, I don't think you can avoid AJAX - you need many clients to communicate with each other, and there's no reliable client-side way of doing that afaik.

For IM, I'd look at using an off-the-shelf solution based on XMPP (http://xmpp.org/xmpp-software/) - it's pretty much the agreed standard for IM, and whilst it may take a while to get up to speed with the standard and tooling, if you want to deliver a fully featured app, it's likely to be far easier to build on top of all the plumbing others have done than build your own.

Другие советы

I'd say you need to look at something like AJAX.

a collaborative website-based text editor sounds like quite a challenge. assuming youre looking at built-in browser capabilities, javascript with xmlhttprequests is probably an (the only?) option. a messenger is easy enough if you hook up some xml or json to a database. php and mysql are always nice, given the scale of the user base and the amount of info lurking around the internet.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top