Kick ass code editing and
 end to end JavaScript
       debugging
                 Fabian Jakobs
                     @fjakobs
Code Editor
    +
 Debugger
    =
    ?
Code Editor
    +
 Debugger
    =
   IDE
Overview

•Code Editor
• IDE Plugins
• Debugger
Demo
Editor
ACE
Ajax.org Code Editor


• nobody will use an IDE if the editor sucks
• should be able to replace TextMate
Requirements

• cross browser
• fully featured
• configurable
• scalable
• hackable
Sk y writer
   Why not Bespin?



•inefficient in full screen
• not cross browser      jQ uer y
• dependency on Sproutcore
Implementation
      Options

•Content Editable
• Canvas
• pure DOM
Content Editable

• not enough control
• cross browser issues
• not worth it (for code editing)
Canvas

• full rendering control
• no IE6, IE7, IE8
• implement key/mouse interaction manually

• O(number of pixels)
Pure DOM

• draw text, lines, rectangles
• implement key/mouse interaction manually

• naive O(number of lines)
• better O(number of visible lines)
DOM +
     virtual view port
                                 ..
                                 ..
                                 ....
                                 ..
                                 ...
                                 .... . . ...
                                 .


• rendering a full document in   ..
                                 .
                                 .
  the DOM doesn‘t scale          ..

                                 ..

• only render visible rows       .
                                 ..
                                 .. ..
                                 .
                                 .. . ..

                                 ..
                                 .... . . .
                                 .
Renderer

•DOM is used for drawing only
• no state in the DOM
• never read the DOM
Layers
Layers
Demo
IDE Plugins
Everything is a Plugin

                     search
     file system                   code editor
new file
                language modes          save

          debugger            console
What is a plugin

• JavaScript for client code
• JavaScript (node.js) for server code
• XML to describe the UI
Video
Debugger
Debugging
                                V8 debugger protocol
                                   over socket.io
                        IDE                               IDE
                       Server                            Client



V8 debugger protocol
     over TCP
                                                           ?


                  Application                          Application
                    (node)                             in Chrome
Demo
cloud9 - Eclipse
Google Docs - Word
Open Source
          Building Blocks
connect               node.js
          socket.io               requireJS

                      ACE
           jsDAV         node-github
 APF          node-o3-xml          async.js
Cloud9 IDE
open sourced
  TODAY
Join us
  in building an IDE
by JS devs for JS devs.
Thanks for watching!
           Fork it on GitHub
   http://github.com/ajaxorg/cloud9

Kick ass code editing and end to end JavaScript debugging