Adam Stacoviak changelog.com/posts

WatchWednesday for 20101006

Another WatchWednesday, is upon us. Here’s a quick list of projects you might have missed or you should watch.

Commander

TJ Holowaychuk’s latest projects seem to have a Node.js flavor, but TJ has released a ton of Ruby projects, too. Commander is a robust API for creating Ruby command line applications. Commander sits atop OptionParser, HighLine and other libraries you probably already use. It also supports formatters as well as text-to-speech and Growl support on MacOS. It even has support for nice looking terminal tables via TJ’s terminal-table gem:

+----------+-------+----+--------+-----------------------+
| Terminal | Table | Is | Wicked | Awesome               |
+----------+-------+----+--------+-----------------------+
|          |       |    |        | get it while its hot! |
+----------+-------+----+--------+-----------------------+

Eyeballs.js

Eyeballs from Paul Campbell is a lightweight JavaScript MVC framework that sits on top of jQuery or Prototype that provides features such as hash-based URL routing, data models, and local storage. A humorous feature of Eyeballs is the syntax and the ‘eep eep’ function:

// declare a model
o_O('Post', function(post){
  post.validates_presence_of('title')
})

You gotta love that. o_O

Screeninator

Inspired by Arthur Chiu’s wildly popular terminitor, Jon Druse’s Screeninator orchestrates your screen sessions.

# ~/.screeninator/project_name.yml
# you can make as many tabs as you wish...

escape: ``
project_name: Screeninator
project_root: ~/code/rails_project
tabs:
  - shell: git pull
  - database: rails db
  - console: rails c
  - logs: 
    - cd logs
    - tail -f development.log
  - ssh: ssh me@myhost

Scalatra

Scalatra is a Scala port of everyone’s favorite Ruby microframework.

package org.scalatra

class ScalatraExample extends ScalatraServlet {

  // send a text/html content type back each time
  before {
    contentType = "text/html"
  }

  // parse matching requests, saving things prefixed with ':' as params
  get("/date/:year/:month/:day") {
    <ul>
      <li>Year: {params("year")}</li>
      <li>Month: {params("month")}</li>
      <li>Day: {params("day")}</li>
    </ul>
  }

  // produce a simple HTML form
  get("/form") {
    <form action='/post' method='POST'>
      Post something: <input name='submission' type='text'/>
      <input type='submit'/>
    </form>
  }

  ...

Fabric.js

One of the cool things about SVG is the DOM API. Fabric.js from Juriy Zaytsev provides an interactive object model on top of the HTML5 <canvas> element.

<canvas id="canvas" width="300" height="300"></canvas>  
...

var canvas = new fabric.Element('canvas');

var rect = new fabric.Rect({
  top: 100,
  left: 100,
  width: 60,
  height: 70,
  fill: 'red'
});

canvas.add(rect);

Be sure and check out the extensive Fabric.js demo and sandbox.


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00