<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>OnRails.org: RailsConf 2007 - Day 1</title>
    <link>http://onrails.org/articles/2007/05/17/railsconf-2007-day-1</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Ruby On Rails and related matters.</description>
    <item>
      <title>RailsConf 2007 - Day 1</title>
      <description>&lt;p&gt;Here we go, RailsConf 2007, has started. It&amp;#8217;s bigger than ever, more tracks, more sessions. This is the first day where they provide full or half-day tutorials sessions. I will try to cover the different sessions I will attend so stay tuned.&lt;/p&gt;


	&lt;p&gt;Today I will attend: &amp;#8220;Scaling a Rails Application from the Bottom Up.&amp;#8221; and &amp;#8220;Harnessing Capistrano.&amp;#8221;&lt;/p&gt;


&lt;h2&gt;&lt;b&gt;Scaling a Rails Application from the Bottom Up. by Jason Hoffman&lt;/b&gt;&lt;/h2&gt;

	&lt;p&gt;Jason Hoffman, &lt;span class="caps"&gt;CTO&lt;/span&gt; of Joyent. Did also form Textdrive.&lt;/p&gt;


	&lt;p&gt;Six part presentation:&lt;/p&gt;


	&lt;p&gt;I. Introduction and foundation
II.  Where do I put stuff
&lt;span class="caps"&gt;III&lt;/span&gt;. What stuff?
IV. What do I run on this tuf?
V.  What are the patterns of deployment?
VI. Lessons learned&lt;/p&gt;


	&lt;p&gt;His presentation will answer the following questions:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;What is a &amp;#8220;scalalble&amp;#8221; application?&lt;/li&gt;
		&lt;li&gt;What are some hardware layout?&lt;/li&gt;
		&lt;li&gt;Where do you get the hardware?&lt;/li&gt;
		&lt;li&gt;How do you pay for it?&lt;/li&gt;
		&lt;li&gt;Where do you put?&lt;/li&gt;
		&lt;li&gt;Who runs it?&lt;/li&gt;
		&lt;li&gt;How do you watch it?&lt;/li&gt;
		&lt;li&gt;What do you need relative to an application?&lt;/li&gt;
		&lt;li&gt;What are the commonalities of scalable web architectures?&lt;/li&gt;
		&lt;li&gt;What are the unique bottlenecks for Ruby on Rails applications?&lt;/li&gt;
		&lt;li&gt;What&amp;#8217;s the best way to start so you make sure everything scales?&lt;/li&gt;
		&lt;li&gt;what are to common mistakes?&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Maybe it&amp;#8217;s a little early, or I am not awake, but the talk seems a little slow. But Jason seems to do a good job at describing how the different people (developer, sysadmin, ...) see scalability.&lt;/p&gt;


	&lt;p&gt;Ease of management is on log scale. It&amp;#8217;s not just a Rails issue. A $5000 Dell 1850 costs $1850 to power over 3 year.&lt;/p&gt;


	&lt;p&gt;This is a really good presentation from a point of view of what is involved to build data center. I should have read better the &lt;a href="http://conferences.oreillynet.com/cs/rails2007/view/e_sess/11694"&gt;description&lt;/a&gt; of the presentation.&lt;/p&gt;


	&lt;p&gt;So I am going to move over to Thomas Fuchs presentation:&lt;/p&gt;


&lt;h2&gt;&lt;b&gt;Is JavaScript Overrated? Or: How I Stopped Worrying and Put Prototype and script.aculo.us to Full Use by Thomas Fuchs&lt;/b&gt;&lt;/h2&gt;

	&lt;p&gt;I am just tuning in to his presentation and he is showing of how to use selectors with Prototype.&lt;/p&gt;


&lt;span class="caps"&gt;DOM&lt;/span&gt; traversal: 
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;$('blech').previous('ul').down('.somesuch',2)
$('homo-sapiens').descendantOf('australopothecus')&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
Element methods:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;$('a_div').update('blah').show().setStyle({opacity:0.5});
$('myform').focusFirstElement();
$('person-example').serialize();
Element.addMethods('form') {
  valid: function(element) {
       // code to valid form
  }
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

What&amp;#8217;s new in Prototype 1.5.1: 
	&lt;ul&gt;
	&lt;li&gt;speedier $$&lt;/li&gt;
		&lt;li&gt;&lt;span class="caps"&gt;CSS 3&lt;/span&gt; Selectors&lt;/li&gt;
		&lt;li&gt;$(&amp;#8216;form&amp;#8217;).request()&lt;/li&gt;
		&lt;li&gt;String .includes .times .toPaddedString(8,2)&lt;/li&gt;
		&lt;li&gt;&lt;span class="caps"&gt;JSON&lt;/span&gt; support i.e. new Date().toJSON();&lt;/li&gt;
		&lt;li&gt;$(&amp;#8216;blah&amp;#8217;).firstDescendent()&lt;/li&gt;
		&lt;li&gt;throw $continue deprecated use &amp;#8220;return&amp;#8221; instead&lt;/li&gt;
		&lt;li&gt;Safari issues fixed&lt;/li&gt;
		&lt;li&gt;&lt;span class="caps"&gt;YAML&lt;/span&gt; compatible&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;&lt;span class="caps"&gt;DOM&lt;/span&gt;, Events, Forms, Position:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;new Element(tagName, attributes);&lt;/li&gt;
		&lt;li&gt;$(&amp;#8216;blech&amp;#8217;).insert(html|object, position)&lt;/li&gt;
		&lt;li&gt;$(&amp;#8216;blech&amp;#8217;).wrap(&amp;#8216;span&amp;#8217;); &lt;/li&gt;
		&lt;li&gt;$(&amp;#8216;country&amp;#8217;).setValue(&amp;#8216;AT&amp;#8217;);&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Function.prototype: curry(), wrap(), defer(), delay()
Q: When is the next release of Prototype? 
A: When it&amp;#8217;s ready.&lt;/p&gt;


	&lt;p&gt;&lt;span class="caps"&gt;A 10&lt;/span&gt; minute break now, the Thomas is going to present Scriptaculous Effects.&lt;/p&gt;


	&lt;p&gt;&lt;b&gt;&lt;a href="http://script.aculo.us/"&gt;script.aculo.us&lt;/a&gt;&lt;/b&gt; adds advanced User Interface interaction to the &lt;span class="caps"&gt;DOM&lt;/span&gt;. Extracted from Real-World applications. Started with Fluxiom. The two main parts are Visual effects and Drag&amp;#38;Drop. Today we will only look at the Visual Effects. They are other parts such as Autocompleter, In-Place Editor, Slider control, &lt;span class="caps"&gt;DOM&lt;/span&gt; Builder, and Unit testing. They won&amp;#8217;t be more advanced components.&lt;/p&gt;


	&lt;p&gt;Effects engine: the ideas behind the engine is timeline based animations.&lt;/p&gt;


Core Effects:
	&lt;ul&gt;
	&lt;li&gt;Effect.Move&lt;/li&gt;
		&lt;li&gt;Effect.Opacity&lt;/li&gt;
		&lt;li&gt;Effect.Highlight&lt;/li&gt;
		&lt;li&gt;Effect.ScrollTo&lt;/li&gt;
		&lt;li&gt;Effect.Morph // 1.7+&lt;/li&gt;
		&lt;li&gt;Effect.Parallel&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Based on the Effect.Base.prototype class.
Effect life cycle: intialize(), setup(), update(), finish(). Each frame calls update().&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;Effect.DefaultOptions = {
    transition: Effect.Transitions.sinoidal,
    duration: 1.0,
    fps: 100,
    sync: false,
    from: 0.0,
    to: 1.0,
    delay: 0.0,
    queue: 'parallel'
}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Morphing: came out with Scriptaculous 1.7.&lt;/p&gt;


&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;$('mydiv').morph('font-size:20px; color:&amp;quot;#abcdef&amp;quot;);
$('mydiv').morph('warning'); //limited to top level classname&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

TimeLines: 
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;new Effect.Blah('element_2')
new Effect.Blah('element_2', {duration:0.6, delay:0.3});&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
You have to be careful with effects created that will run in parallel as the javascript engine are not multi-thread. Better solutions is to use queues:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;new Effect.Blah('element_1', {queue:'end'});
new Effect.Blah('element_2', {queue:'front'});&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
and use scope:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;new Effect.Blah('element_1', {queue:{scope:'blech'}});
new Effect.Blah('element_2', {queue:{scope:'blech', position:'end'}});
new Effect.Blah('element_3', {queue:'front'});&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

Utilities:
&lt;div class="typocode"&gt;&lt;pre&gt;&lt;code class="typocode_javascript "&gt;Element.toggle('element', 'blind');
Element.tagifyText(element);
Element.multiple('element', Effect.Fade, {speed:0.05});&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

	&lt;p&gt;Do it yourself: Thomas now shows how to create an Effect programatically.&lt;/p&gt;


Future features: 
	&lt;ul&gt;
	&lt;li&gt;Sound without Flash (it&amp;#8217;s already in the beta release). Sound.paly(&amp;#8216;sword.mp3&amp;#8217;). It uses native sound implementation with Quicktime as fallback.&lt;/li&gt;
		&lt;li&gt;Adjust to new Prototype features. $(&amp;#8216;blech&amp;#8217;).fade(); $(&amp;#8216;blech&amp;#8217;).slowlyReveal();&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;&lt;b&gt;Part IV: Testing&lt;/b&gt;&lt;/p&gt;


Thomas is flying through testing&amp;#8230;
	&lt;ul&gt;
	&lt;li&gt;assert(true)&lt;/li&gt;
		&lt;li&gt;assertEqual(expected, actual)&lt;/li&gt;
		&lt;li&gt;assertEnumEqual(expected, actual)&lt;/li&gt;
		&lt;li&gt;assertNotEqual(expected, actual) &lt;/li&gt;
		&lt;li&gt;assertMatch&lt;/li&gt;
		&lt;li&gt;assertIdentical&lt;/li&gt;
		&lt;li&gt;assertNotIdentical&lt;/li&gt;
		&lt;li&gt;assertType&lt;/li&gt;
		&lt;li&gt;assertRaise&lt;/li&gt;
		&lt;li&gt;assertRespondTo&lt;/li&gt;
		&lt;li&gt;assertVisible(element)&lt;/li&gt;
		&lt;li&gt;assertNotVisible(element)&lt;/li&gt;
		&lt;li&gt;info(message)&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Mostly unit testing, but some functional testing is available.
Most assert take a message. I.e. assertXYZ(params, message)&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;wait(milliseconds, method) // should be last statement in test, but can be nested.&lt;/li&gt;
		&lt;li&gt;rake test:javascripts (browser will popup). Done with the javascript_test plugin. Launches the web server (WEBrick), then controls the browsers (Safari, Firefox, IE), the browser then calls the web server, and list the results (SUCCESS, &lt;span class="caps"&gt;FAILURE&lt;/span&gt;, and &lt;span class="caps"&gt;ERROR&lt;/span&gt;)&lt;/li&gt;
	&lt;/ul&gt;


Resources:
	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.prototypejs.org/"&gt;www.prototypejs.org&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://wiki.script.aculo.us/scriptaculous/"&gt;wiki.script.aculo.us/scriptaculous/&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://pragmaticprogrammer.com/titles/cppsu/index.html"&gt;Book: Prototype and script.aculo.us by Pragmatic Programmer&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.manning.com/crane3/"&gt;Book: Prototype and Scriptaculous in Action by Manning&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://www.oreilly.com/catalog/9780596527440/"&gt;Book: Ajax on Rails by O&amp;#8217;Reilly&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


&lt;h2&gt;&lt;b&gt;JRuby talk by Charles Nutter and Thomas Enebo&lt;/b&gt;&lt;/h2&gt;

	&lt;p&gt;(note taken by Robert Hall, thanks man!)&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;1.8ish&amp;#8212;based on Ruby 1.8.5&lt;/li&gt;
		&lt;li&gt;Gems 0.9.1 is pre-installed &lt;/li&gt;
		&lt;li&gt;Partially compiled&amp;#8212;about 80% of Ruby code compiles&amp;#8230;rest is run in &lt;span class="caps"&gt;JIT&lt;/span&gt; mode&lt;/li&gt;
		&lt;li&gt;Ruby 1.8 strings supported.   Works with ActiveSupport::MultiByte&lt;/li&gt;
		&lt;li&gt;Ruby 2.0 String support coming&lt;/li&gt;
		&lt;li&gt;Most Ruby apps should work on JRuby 
&amp;#8212;most gems just work
&amp;#8212;Red Cloth, Blue Cloth
&amp;#8212;Hpricot&lt;/li&gt;
		&lt;li&gt;Typical Rails commands just work&lt;/li&gt;
		&lt;li&gt;ports: Mongrel ported, Hpricot ported, RMajick in progress&lt;/li&gt;
		&lt;li&gt; Ruby thread &lt;span class="caps"&gt;API&lt;/span&gt; supported
&amp;#8212;native-threaded 1 JRuby thread=1 system thread 
&amp;#8212;supports thread pooling&lt;/li&gt;
		&lt;li&gt;performance comparable to C Ruby impl
&amp;#8212;Rdoc has issues
&amp;#8212;CLI performance slow&lt;/li&gt;
		&lt;li&gt;&lt;span class="caps"&gt;JDBC&lt;/span&gt; support strong
&amp;#8212;mySQL support strong
&amp;#8212;some postgres issues
&amp;#8212;some Oracle users 
&amp;#8212;many others&lt;/li&gt;
		&lt;li&gt;ActiveRecord &lt;span class="caps"&gt;JDBC&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;No native extension support&lt;/li&gt;
		&lt;li&gt;Goldspike&amp;#8212;JRuby deployment tool
&amp;#8212;Rails plugin for building &lt;span class="caps"&gt;WAR&lt;/span&gt; files
&amp;#8212;app server agnostic 
&amp;#8212;Can be deployed to Java app server as &lt;span class="caps"&gt;WAR&lt;/span&gt; file &lt;/li&gt;
		&lt;li&gt;Deployment&amp;#8212;MOngrel supported..some issues (forking, process management doesn&amp;#8217;t work)&lt;/li&gt;
		&lt;li&gt;Access to Java EE features (JMS, &lt;span class="caps"&gt;JPA&lt;/span&gt;, JTA)&lt;/li&gt;
		&lt;li&gt;Java libraries can be wrapped&lt;/li&gt;
		&lt;li&gt;Coming soon
&amp;#8212;A Grizzly/GlassFish V3 option 
&amp;#8212;Lightweight, gem-installable like Mongrel
&amp;#8212;Concurrency, pooling mulit-app like &lt;span class="caps"&gt;WAR&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;Mephisto demo&lt;/li&gt;
		&lt;li&gt;Main idea&amp;#8212;- Ruby as the programming language, Java for the platform and libraries&lt;/li&gt;
		&lt;li&gt;Best of all worlds 
&amp;#8212;Ruby or Rails as the appl layer
&amp;#8212;Java libraries alone or as ported/wrapped gems
&lt;del&gt;-Java based services&lt;/del&gt;-legacy app integration
&amp;#8212;The &lt;span class="caps"&gt;JVM&lt;/span&gt;&lt;/li&gt;
		&lt;li&gt;Acceptable to today&amp;#8217;s enterprise
&amp;#8212;Java to &amp;#8216;them&amp;#8217;, Ruby to you &lt;/li&gt;
		&lt;li&gt;Calling Java from Rails demo
&amp;#8212;RSS reader demo..calling Java library from Rails code&lt;/li&gt;
		&lt;li&gt;Tools&amp;#8212;
  Textmate, Emacs, Vi(m), notepad
 &amp;#8212;missing some features
&amp;#8212;code competion?
&amp;#8212;jump to declaration? 
&amp;#8212;rename variables?
&amp;#8212;popup Rdoc?&lt;/li&gt;
		&lt;li&gt;Presenters claim Best Ruby &lt;span class="caps"&gt;IDE&lt;/span&gt; Available is NetBeans (milestone 9)
 &amp;#8212;code completion 
 &amp;#8212;smart syntax highlightings (for Ruby code, &lt;span class="caps"&gt;RHTML&lt;/span&gt; files, etc)
 &amp;#8212;Rdoc support &lt;/li&gt;
		&lt;li&gt;Demoed a cool Ruby shell like &lt;span class="caps"&gt;IRB&lt;/span&gt; implemented in Swing..built into NetBeans&lt;/li&gt;
		&lt;li&gt;Jruby 1.0 almost ready&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;&lt;span class="caps"&gt;LUNCH&lt;/span&gt;: will be back at 1:30pm&lt;/p&gt;


&lt;h2&gt;&lt;b&gt;Harnessing Capistrano by &lt;a href="http://weblog.jamisbuck.org/"&gt;Jamis Buck&lt;/a&gt;&lt;/b&gt;&lt;/h2&gt;

	&lt;p&gt;Jamis will focus Capistrano 2.0 today. Some things will not be backward compatible with Capistrano 1.0.&lt;/p&gt;


	&lt;p&gt;His slides are online at &lt;a href="http://presentations.jamisbuck.org/railsconf2007/"&gt;http://presentations.jamisbuck.org/railsconf2007/&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 17 May 2007 16:04:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:2022c731-afb7-4af3-815e-4f3a6186ad5c</guid>
      <author>Daniel Wanja</author>
      <link>http://onrails.org/articles/2007/05/17/railsconf-2007-day-1</link>
      <category>Ruby On Rails</category>
      <category>RailsConf07</category>
    </item>
    <item>
      <title>"RailsConf 2007 - Day 1" by Dan Kubb</title>
      <description>&lt;p&gt;It doesn&amp;#8217;t look like &lt;code&gt;$(element).setValue(value)&lt;/code&gt; was added in Prototype 1.5.1.  It&amp;#8217;s in the form branch, but its not in the trunk yet.&lt;/p&gt;


	&lt;p&gt;When its ready it&amp;#8217;ll allow you to set an form field&amp;#8217;s value without needing to care if its an input, select, or textarea element.&lt;/p&gt;</description>
      <pubDate>Mon, 25 Jun 2007 09:54:43 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:dba98e9f-c26a-4f0c-9aa6-794780566179</guid>
      <link>http://onrails.org/articles/2007/05/17/railsconf-2007-day-1#comment-2328</link>
    </item>
    <item>
      <title>"RailsConf 2007 - Day 1" by Vish</title>
      <description>&lt;p&gt;I missed Railsconf 2007 so I am living vicariously thru this blog. Tell us about the weather in Portland. I want to move there.  Can&amp;#8217;t you attend all sessions concurrently?&lt;/p&gt;


	&lt;p&gt;Thanks&lt;/p&gt;</description>
      <pubDate>Sat, 19 May 2007 15:04:46 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:4da0f462-a74c-4992-9642-061b8a961e9b</guid>
      <link>http://onrails.org/articles/2007/05/17/railsconf-2007-day-1#comment-1459</link>
    </item>
    <item>
      <title>"RailsConf 2007 - Day 1" by Fiber</title>
      <description>&lt;p&gt;At last! I hope you will track all events, because I couldn&amp;#8217;t visit conference this time :(&lt;/p&gt;</description>
      <pubDate>Thu, 17 May 2007 16:54:06 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:567b3fab-747f-4b75-bd71-e5b36fd27e54</guid>
      <link>http://onrails.org/articles/2007/05/17/railsconf-2007-day-1#comment-1247</link>
    </item>
  </channel>
</rss>
