SpacePen - Markaby-inspired CoffeeScript view framework for jQuery

SpacePen from Nathan Sobo is a Markaby-inspired, CoffeeScript-powered DSL and view framework for jQuery. SpacePen combines view and controller into a single class:

class Spacecraft extends View
  @content: ->
    @div =>
      @h1 "Spacecraft"
      @ol =>
        @li "Apollo"
        @li "Soyuz"
        @li "Space Shuttle"


...

view = new Spacecraft
view.find('ol').append('<li>Star Destroyer</li>')

view.on 'click', 'li', ->
  alert "They clicked on #{$(this).text()}"

Check out the source on GitHub for more.

News Films

Our little film studio focuses on telling developer-centric stories that need to be seen.

Beyond Code: Season 3 / GopherCon 2015

 
0:00 / 0:00