PageRenderTime 99ms CodeModel.GetById 90ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 1ms

/www/tags/NOV_07_2009/htdocs/ruby/slides/02005/euruko/index.html

#
HTML | 301 lines | 246 code | 39 blank | 16 comment | 0 complexity | 1510ff79e9b947d688d4afedcb897f5e MD5 | raw file
  1
  2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  3        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  4<html xmlns="http://www.w3.org/1999/xhtml">
  5
  6	<head>
  7		<title>jEdit Ruby Editor Plugin</title>
  8		<!-- metadata -->
  9		<meta name="author" content="Rob McKinnon" />
 10		<!-- configuration parameters -->
 11		<meta name="defaultView" content="slideshow" />
 12		<meta name="controlVis" content="hidden" />
 13		<!-- style sheet links -->
 14		<link rel="stylesheet" href="ui/slides.css" type="text/css" media="projection" id="slideProj" />
 15		<link rel="stylesheet" href="ui/outline.css" type="text/css" media="screen" id="outlineStyle" />
 16		<link rel="stylesheet" href="ui/print.css" type="text/css" media="print" id="slidePrint" />
 17		<link rel="stylesheet" href="ui/opera.css" type="text/css" media="projection" id="operaFix" />
 18		<!-- embedded styles -->
 19		<style type="text/css" media="all">
 20.imgcon {width: 525px; margin: 0 auto; padding: 0; text-align: center;}
 21#anim {width: 270px; height: 320px; position: relative; margin-top: 0.5em;}
 22#anim img {position: absolute; top: 42px; left: 24px;}
 23img#me01 {top: 0; left: 0;}
 24img#me02 {left: 23px;}
 25img#me04 {top: 44px;}
 26img#me05 {top: 43px;left: 36px;}
 27</style>
 28<!-- S5 JS -->
 29		<script src="ui/slides.js" type="text/javascript"></script>
 30		<script type="text/javascript">
 31/* This hack adds a styling hook - a span inside every h1 */
 32window.addEventListener('load', function() {
 33  var h1s = document.getElementsByTagName('h1');
 34  for (var i = 0, h1; h1 = h1s[i]; i++) {
 35    var span = document.createElement('span');
 36    span.appendChild(h1.firstChild);
 37    h1.appendChild(span);
 38  }
 39}, true);
 40</script>
 41	</head>
 42	<body>
 43
 44		<div class="layout">
 45			<div id="controls"><!-- DO NOT EDIT --></div>
 46			<div id="currentSlide"><!-- DO NOT EDIT --></div>
 47			<div id="header"></div>
 48			<div id="footer">
 49				<h1>jEdit Ruby Editor Plugin</h1>
 50				<h2>Euruko 2005 &#8226; 15-16th Oct 02005</h2>
 51			</div>
 52		</div>
 53
 54		<ol class="xoxo presentation">
 55
 56			<li class="slide">
 57				<h1>jEdit Ruby Editor Plugin</h1>
 58				<h3>Rob McKinnon</h3>
 59				<h4>
 60					<em></em>
 61				</h4>
 62				<h4>
 63					<a href="http://kiwimp.sf.net/" rel="external">http://jedit.org/ruby/</a>
 64				</h4>
 65				<div class="handout"></div>
 66			</li>
 67
 68			<li class="slide">
 69				<h1>The Web says ...</h1>
 70        <ul>
 71          <li>
 72            <blockquote cite="">"The Ruby Editor Plugin for jEdit is a joy to use. ... <strong>a great open source Ruby Editor</strong>, good for Rails work too ... I recommend it"</blockquote>
 73            <small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 74            - Review of JEdit as a Ruby on Rails IDE | Data Inadequate</small>
 75          </li>
 76          <li class="incremental">
 77            <blockquote cite="">"I eventually settled on Jedit for Ruby as recipient of the <strong>'best free Ruby IDE I found today'</strong> award."</blockquote>
 78            <small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 79            - Ruby IDE - a quick opinion | exactly one turtle</small>
 80          
 81<!--           <dl>
 82						<dt>Ruby IDE - a quick opinion | exactly one turtle</dt>
 83						<dd>"I eventually settled on Jedit for Ruby as recipient of the ?best free Ruby IDE I found today? award."</dd>
 84					</dl>
 85 -->          
 86          </li>
 87
 88<!--           <li class="incremental">
 89            <blockquote cite="">"JEdit plus dem Ruby-Plugin sein, was ich momentan benutze"</blockquote>
 90            <small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 91            - RadRails - Rails Usergroup Deutschland</small>
 92          </li>
 93 -->
 94        </ul>
 95			</li>
 96
 97			<li class="slide">
 98				<h1>Why a new editor?</h1>
 99				<ul>
100					<li>Started as a twinkle in my eye at RubyConf 2004 ...</li>
101					<li>... and as a few beanshell macros for jEdit</li>
102					<li>Wanted to:
103          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
104          have auto-insert 'end' - the killer feature</li>
105          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
106          prove naive type-based completion was possible</li>
107          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
108          have syntax aware navigation</li>
109          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
110          ... [insert your idea here]</li>
111          </li>
112				</ul>
113			</li>
114
115			<li class="slide">
116				<h1>What's jEdit?</h1>
117				<ul>
118          <li>jEdit - a programmer's text editor</li>
119          <li>Free Software released under GPL</li>
120          <li>Core written by Slava Pestov (started he was 15)</li>
121          <li>Plugins written by the masses (like me)</li>
122          <li>Implemented in Java ...</li>
123        </ul>
124      </li>
125
126      <li class="slide">
127				<h1>Why a jEdit Ruby Editor Plugin?</h1>
128				<ul>
129					<li>Yeah ... it's Java ... I know ... but:</li>
130          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
131          I'd worked on jEdit plugins before</li>
132          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
133          Works on GNU/Linux, Mac OSX and Windows</li>
134          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135          Allowed me to use JRuby parser</li>
136          <li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
137          A neat Free Software programmer's editor!</li>
138				</ul>
139			</li>
140
141			<li class="slide">
142				<h1>Why not the Eclipse Plugin?</h1>
143				<ul>
144					<li>Find the Eclipse user interface constraining</li>
145					<li>Don't like the Ruby Eclipse license, it's CPL</li>
146					<li>Faster for me to develop a jEdit plugin</li>
147				</ul>
148			</li>
149
150			<li class="slide">
151				<h1>Plugin Features</h1>
152				<ul>
153					<li>Auto-indent and insert 'end'</li>
154					<li>File structure popup</li>
155          <li>Syntax error highlighting</li>
156					<li>Type-based method completion
157          <br/><br/><em>if it quacks like a duck it'll probably waddle like a duck</em>
158          </li>
159					<li>Integrated RDoc viewer</li>
160				</ul>
161			</li>
162
163			<li class="slide">
164				<h1>Implementation</h1>
165        <ul>
166          <li>org.jedit.ruby</li>
167          <li>
168            <ul>
169              <li>ast</li>
170              <li>cache</li>
171              <li>completion</li>
172              <li>icons</li>
173              <li>parser</li>
174              <li>ri</li>
175              <li>structure</li>
176              <li>test</li>
177              <li>utils</li>
178            </ul>
179          </li>
180        </ul>
181			</li>
182
183			<li class="slide">
184				<h1>Parsing with JRuby</h1>
185        <pre>
186  DefaultRubyParser parser = new DefaultRubyParser();
187  parser.init(new RubyParserConfiguration());
188
189  LexerSource source = LexerSource.getSource(filePath, content);
190
191  RubyParserResult result = parser.parse(source);
192
193  Node node = result.getAST();
194        </pre>
195			</li>
196
197			<li class="slide">
198				<h1>Walking Abstract Syntax Tree</h1>
199        <pre>
200  Node node = result.getAST();
201
202  RubyNodeVisitor visitor = new RubyNodeVisitor(lineCounter, moduleMembers, classMembers, methodMembers, listeners);
203
204  if (node != null) {
205      node.accept(visitor);
206  }
207
208  List<Member> members = visitor.getMembers();
209        </pre>
210			</li>
211      
212      <li class="slide">
213        <h1>NodeVisitor Implementation</h1>
214        <pre>
215class RubyNodeVisitor extends AbstractVisitor { ...
216
217    protected void visitNode(Node node) { ...
218
219    public void visitBlockNode(BlockNode node) { ...
220
221    public void visitNewlineNode(NewlineNode node) { ...
222
223    public void visitModuleNode(ModuleNode node) { ...
224
225    public void visitClassNode(ClassNode node) { ...
226
227    public void visitDefnNode(DefnNode node) { ...
228
229    public void visitDefsNode(DefsNode node) { ...
230
231    public void visitScopeNode(ScopeNode node) { ...
232        </pre>
233      </li>
234      
235      <li class="slide">
236        <h1>Parsing problems</h1>
237        <ul>
238          <li>JRuby doesn't report node start offsets (only end offsets)</li>
239          <li>I use regular expressions to identify start offsets - brittle</li>
240          <li>Problems with single line modules, etc</li>
241          <li>Auto-indent and insert 'end' also uses regular expressions</li>
242        </ul>
243      </li>
244      
245      <li class="slide">
246        <h1>Getting RDocs into Java</h1>
247        <ul>
248          <li>Use RI YAML format</li>
249          <li>Didn't want to write a Java YAML parser</li>
250          <li>Instead use Ruby to create serialized Java object XML files</li>
251          <li>Wrote Java classes to represent RDoc</li>
252          <li>YAML+Ruby -> serialized Java XML -> deserialized at runtime</li>
253        </ul>
254      </li>
255      
256      <li class="slide">
257        <h1>Popularity</h1>
258        <ul>
259          <li>Home page: 40 visitors a day, 7800 in total</li>
260          <li>Download pg: 27 visitors a day, 5200 in total</li>
261          <li>Top of Google search for "Ruby editor"</li>
262        </ul>
263      </li>
264  
265      <li class="slide">
266        <h1>Download page by country</h1>
267        <img alt="" src="download.png"/>
268      </li>
269
270      <li class="slide">
271        <h1>Download page by continent</h1>
272        <img alt="" src="download2.png"/>
273      </li>
274
275      <li class="slide">
276        <h1>Future features</h1>
277        <ul>
278          <li>Import RDoc - gives you method completion for import</li>
279          <li>Find usages</li>
280          <li>Goto declaration</li>
281          <li>Incremental selection</li>
282          <li>Extract variable</li>
283          <li>Extract method</li>
284          <li>Code completion for user classes</li>
285        </ul>
286      </li>
287      
288      <li class="slide">
289        <h1>Final words</h1>
290        <ul>
291          <li>
292            <blockquote cite="">"I've now been using jEdit fairly intensively for the past few days and have to say I'm a convert. ... it's a highly capable editor and <strong>I highly recommend checking it out</strong>."</blockquote>
293            <small>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
294            - Editors and IDEs | Livsey.org</small>
295          </li>
296        </ul>
297      </li>
298    </ol>
299
300	</body>
301</html>