32
Kick ass code editing and end to end JavaScript debugging Fabian Jakobs @fjakobs

Kick ass code editing and end to end JavaScript debugging

Embed Size (px)

DESCRIPTION

Cloud9 IDE is aiming to be the IDE for Javascript developers. We have all experienced the Eclipse variants and other Java or C++ IDE's for which webdevelopment and javascript was an afterthought. Extending these applications or customizing them to our needs was done in either Java or C++ and generally very difficult. We are developing applications in javascript to run online for a purpose, why shouldn't you do your application development online too?This talk gives an overview over the Cloud9 IDE and delves into the technical details of the code editor and the buildin debugger.

Citation preview

Page 2: Kick ass code editing and end to end JavaScript debugging

Code Editor+

Debugger

=?

Page 3: Kick ass code editing and end to end JavaScript debugging

Code Editor+

Debugger

=IDE

Page 4: Kick ass code editing and end to end JavaScript debugging
Page 5: Kick ass code editing and end to end JavaScript debugging

Overview

•Code Editor

• IDE Plugins

•Debugger

Page 6: Kick ass code editing and end to end JavaScript debugging

Demo

Page 7: Kick ass code editing and end to end JavaScript debugging

Editor

Page 8: Kick ass code editing and end to end JavaScript debugging

• nobody will use an IDE if the editor sucks

• should be able to replace TextMate

ACEAjax.org Code Editor

Page 9: Kick ass code editing and end to end JavaScript debugging

Requirements

• cross browser

• fully featured

• configurable

• scalable

• hackable

Page 10: Kick ass code editing and end to end JavaScript debugging

Why not Bespin?

• inefficient in full screen

•not cross browser

•dependency on Sproutcore

Skywriter

jQuery

Page 11: Kick ass code editing and end to end JavaScript debugging

Implementation Options

•Content Editable

•Canvas

•pure DOM

Page 12: Kick ass code editing and end to end JavaScript debugging

Content Editable

• not enough control

• cross browser issues

• not worth it (for code editing)

Page 13: Kick ass code editing and end to end JavaScript debugging

Canvas

• full rendering control

• no IE6, IE7, IE8

• implement key/mouse interaction manually

• O(number of pixels)

Page 14: Kick ass code editing and end to end JavaScript debugging

Pure DOM

• draw text, lines, rectangles

• implement key/mouse interaction manually

• naive O(number of lines)

• better O(number of visible lines)

Page 15: Kick ass code editing and end to end JavaScript debugging

DOM + virtual view port

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

• only render visible rows

..

..

....

..

...

.... . . ...

.

..

.

.

..

..

.

..

.. ..

.

.. . ..

..

.... . . .

.

Page 16: Kick ass code editing and end to end JavaScript debugging

Renderer

•DOM is used for drawing only

•no state in the DOM

•never read the DOM

Page 17: Kick ass code editing and end to end JavaScript debugging

Layers

Page 18: Kick ass code editing and end to end JavaScript debugging

Layers

Page 19: Kick ass code editing and end to end JavaScript debugging

Demo

Page 20: Kick ass code editing and end to end JavaScript debugging

IDE Plugins

Page 21: Kick ass code editing and end to end JavaScript debugging

Everything is a Plugin

searchfile system code editor

language modes

debugger console

new filesave

Page 22: Kick ass code editing and end to end JavaScript debugging

What is a plugin

• JavaScript for client code

• JavaScript (node.js) for server code

• XML to describe the UI

Page 23: Kick ass code editing and end to end JavaScript debugging

Video

Page 24: Kick ass code editing and end to end JavaScript debugging
Page 25: Kick ass code editing and end to end JavaScript debugging

Debugger

Page 26: Kick ass code editing and end to end JavaScript debugging

Debugging

Application(node)

IDEServer

IDEClient

V8 debugger protocolover TCP

V8 debugger protocolover socket.io

Applicationin Chrome

?

Page 27: Kick ass code editing and end to end JavaScript debugging

Demo

Page 28: Kick ass code editing and end to end JavaScript debugging

cloud9 - Eclipse Google Docs - Word

Page 29: Kick ass code editing and end to end JavaScript debugging

Open SourceBuilding Blocks

node.js

requireJS

connect

socket.io

ACE

APF

jsDAV

async.js

node-github

node-o3-xml

Page 30: Kick ass code editing and end to end JavaScript debugging

Cloud9 IDE

open sourcedTODAY

Page 31: Kick ass code editing and end to end JavaScript debugging

Join usin building an IDE

by JS devs for JS devs.

Page 32: Kick ass code editing and end to end JavaScript debugging

Thanks for watching!Fork it on GitHub

http://github.com/ajaxorg/cloud9