Tag Archives: rails

Project/Technology Showcase, April 25th

Carbon Five and Good Eggs are joining up to show off some of the projects they’ve recently worked with an emphasis on the technology that made them possible. We want to share what we think is interesting and what we’ve … Continue reading

Posted in Process, Web | Tagged , , , , | Leave a comment

How to Test External APIs

Integrating with an external API is almost a guarantee in any modern web app. To effectively test such integration, you need to stub it out. A good stub should be easy to create and consistently up-to-date with actual, current API … Continue reading

Posted in Process, Web | Tagged , , , , , | 17 Comments

Supporting Cross-Domain AJAX in Rails using JSONP and CORS

The recent rise in popularity of client-side JavaScript MVC frameworks has led to a revival of web apps with thick clients. As more logic is moved to the client-side, the need to communicate with servers in different domains becomes more … Continue reading

Posted in Mobile, Web | Tagged , , , , | 9 Comments

Beginning Outside-In Rails Development with Cucumber and RSpec

The RSpec Book defines outside-in Rails development as starting with views and working your way in toward the models. By developing from the outside in, you are always taking a client perspective at each layer of the application. The end … Continue reading

Posted in Process, Web | Tagged , , , , | 19 Comments

Does My Rails App Need a Service Layer?

Sometimes during domain modeling you come across something that isn’t a thing. These operations that don’t quite belong to an object are called services. Services often live in a separate, service layer. The service layer lies between controllers and models, … Continue reading

Posted in Web | Tagged , , , | 18 Comments

Exploring Client-side MVC with Backbone.js

Backbone.js continues to gain popularity in the JavaScript MVC community. I decided to give it a try by creating a simple, single-page app to CRUD a single domain model. While it wasn’t as trivial as a traditional server-side implementation in … Continue reading

Posted in Web | Tagged , , , | 7 Comments

Modern Cucumber and Rails: No More Training Wheels

Last month, cucumber-rails 1.1 was released. This release removed web_steps.rb, a collection of step definitions for interacting with a web app. For months, web_steps.rb contained a warning of its negative effects on feature maintenance. Like most developers, I ignored the … Continue reading

Posted in Process, Web | Tagged , | 14 Comments

Valium extracts Model attributes without instantiating ActiveRecord objects

I was recently on a project that captures and logs data as ActiveRecord models.  Each datum had 10 or so numeric attributes.  One story required pulling out all the values for a particular attribute in a time range (i.e. all … Continue reading

Posted in Web | Tagged , , | 2 Comments

Designing mobile APIs – basic behaviors

As Rails developers we design APIs on a regular basis: routes for browsers to interact with a web app, JSON apis and routes for client side javascript to build dynamic pages, payloads queued for background processing on a server, and … Continue reading

Posted in Mobile | Tagged , , , | Leave a comment

Generating documentation from specs

On one of our rails projects I am creating an api to allow mobile clients to access a web service. I need to provide documentation of this API to the developers of several different clients during its development. Normally I … Continue reading

Posted in Web | Tagged , , , | 1 Comment