So this is the third part to my mini series on Rails and Spine.JS. Part one covers an initial setup and how to include Spine.JS into
your Rails project while part two is actually the first of a tome on how to test your Spine.JS application. Assuming you have covered
the bases there, lets get right down to business and review some of the elegant hacks ™ yours truly came up with while testing my
own Spine.jS application using Guard...
In my previous article I talked a little bit about why I decided to use Spine.JS and how to include the CoffeeScript source into your
Rails project using git submodules. Now I would like to talk about testing your brand new Spine.JS application. Afterward, be sure to
read the second part to this article which covers more advanced aspects of your Spine.JS application specs. Testing JavaScript OK, so
like any good programmer, you want to test your JavaScript web application,...
Our options for JavaScript MVC frameworks are numerous these days. While working on the third major rewrite of my personal bookmarking
application, HomeMarks, I decided to learn Backbone.js. Thankfully a local friend of mine recommended that I try Spine.JS. I was
immediately hooked! Why Spine.JS? Spine.JS is is authored in CoffeeScript and that is a big deal for me. I will never write raw
JavaScript again, which I consider, the deprecated syntax. So a JavaScript MVC framework that is written...
This weekend I decided to experiment with LESS CSS by replacing the existing Sass and Compass code that had been built thus far a small
project. Why? Three basic reasons. First, I wanted to see how LESS stacked up. Second, I was intrigued by some of LESS' features, in
particular their namespace support. Lastly, I wanted to use Twitter's Bootstrap project as a baseline for my design. Since Rails 3.1
has been out for some time, I was expecting the...
One part of Objective-C that I like is being able to send messages to nil objects safely and more so their KVC and KVO patterns. In
Ruby I often use the #try method to safely send messages to objects that may be nil at runtime. But one thing I always wanted was a
nice way to send a key path, basically a string of methods signatures, to an object in the same way. I give you my simple #try_keypath
method...
Not many people know that I used to be a designer back in the mid 90's. Some of you all may have ventured deep into the colophon
section of my site and read my resume which has visual clues of that history. Either way, this page is dedicated to those that had no
idea a programmer like myself could come from a design background. Besides, I think it would be cool to share some of my old portfolio
pieces. Beer...
I ask this question a lot! To Job candidates, friends, and almost any developer that says they work with JavaScript. I believe how you
encapsulate your JavaScript is a good indicator on your level of expertise with the language. I find that most beginners have come to
JavaScript via jQuery and often define their functions at the top level namespace in some application.js file. These functions are
loosely organized and often have no way of sharing simple object state and...
I just finished my first dive into using jQuery Mobile with a Rails application and wanted to share some techniques that came out along
the way. Hopefully these will help you if your are using jQuery Mobile with Rails or want to test your mobile application's integration
layer. This post assumes you are somewhat familiar with jQuery Mobile and its basic concepts. So let's jump right in with a series of
helpful tips. A Mobile Layout In my application, I...
UPDATE: Now that Rails 3.1 is out, just use the latest compass or pre-release. No hacks needed! This is a simple update to my original
article for using compass's .scss files with the asset pipeline. This assumes you had this setup working in Rails 3.1.0.rc4, but should
be helpful to anybody. The good news is that most everything is wired up. First, you are going to need to update your Gemfile. Follow
the latest conventions and make sure you have...
For anyone that did not attend the first MADExpo (Mid-Atlantic Developer Expo) this week, here are my slides posted on slideshare. This
talk centers around 3 basic sections. The first is general Open Source and what it can do for you as a software developer to increase
your skills and general knowledge. Second, it covers some key open source projects I have been working on. Specifically for SQL Server
and and ActiveRecord which includes projects like TinyTDS and the latest...
Friends have told me that rich domain objects are seldom wielded when using jQuery to enhance behavior on web pages. I myself have
always loved JavaScript as a rich dynamic language first and something for the DOM second. Hence most of my client-side JavaScript
follows a robust object-oriented approach similar to Ruby. This is the main reason I have used Prototype.js for so long. Since Rails
announced both jQuery and CoffeeScript as the defaults in version 3.1, I decided it...
This twitter post by Dave Thomas sparked an interesting back and forth with DHH on how Rails 3.1 could be more opinionated towards web
development for the browser. A short time before – it was announced that Rails would include CoffeeScript and Sass as defaults
for JavaScript and CSS authoring. FWIW, both of these new defaults are in my opinion the best of the breed fore each task. If you have
not done so, I suggest taking a quick read...
UPDATE: Now that Rails 3.1 is out, just use the latest compass or pre-release. No hacks needed! The Sprockets 2 gem along with the Tilt
gem make it really easy to write JavaScript or CSS using any templating language you desire. The rails defaults are CoffeeScript and
Sass. About the best collection of Sass framework files for easy cross-browser CSS authoring are packaged in the compass framework.
Compass even has great documentation for using their Sass framework. But what if...
Over the past few months I have been actively working with both Luis Lavena and Wayne E Seguin to incorporate both TinyTDS and the SQL
Server Adapter into the latest release of the Rails Installer for Windows. Like them, I firmly believe that Ruby's success is tightly
bound to how well we can bring these tools to the Windows platform. So despite that I have no love for the Windows – I do want to see
Ruby succeed and help...
So after a few blog post on the subject of MiniTest::Spec, I finally have a simple testing stack for Rails 3 that leverages MiniTest's
spec DSL. I introduce to you the MiniSpecUnit gem. MiniSpecUnit defines a Test::Unit::TestCase class that subclasses MiniTest::Spec. It
implements only what is needed to make rails happy. It is not a drop in replacement for the real Test::Unit::TestCase that is included
with ruby 1.9. Once you bundle the gem in your Rails application, it will satisfy...