Filter

Sign up for our newsletter

Recieve a selection of our favorite articles the first Friday of every month!

Development Entries

Link  |  Development

A Reflection on "The Rails Doctrine"

8 Feb 2016

Link  |  Development

Ember 2.x has been released

13 Aug 2015

Link  |  Development

A hands-on intro to building modern web applications with Elixir and Phoenix

8 Jun 2015

Article  |  Development

Haml - A Change of Heart

7 May 2015

It was a couple of years ago when I was introduced to Haml. I believe my first time working with it was on an inherited project. The markup was very unfamiliar and a bit of a pain. Why would anyone want to abstract out HTML when you could just write it normally? It initially seemed like a needless, intermediary step.

I did recognize some of it's benefits. For example, it is nice to not have to worry about closing tags and the amount of typing it could save was pretty obvious. However, the indentation and other quirks seemed like a little too much to put up with.

So I went about my day, turning my nose up at the mention of Haml. Too cool for school, right?

Continue Reading

Link  |  Development

Sending actions to your Ember Components.

8 Apr 2015

Article  |  Development

How to create an 'off' click event - the Ember way

6 Apr 2015

We’ve been working on a project recently in which our designs called for a hover dropdown menu that did not close until the user clicks outside of the drop-down. Creating something like this in jQuery and in a Ruby on Rails app would have been a no-brainer. But I quickly discovered it wasn’t going to be quite so straightforward in our new Ember app.

Continue Reading

Article  |  Development

The Results of the 2014 Rails Hosting Survey are in!

31 Jul 2014

We are proud to announce that we have released the results for the 2014 Ruby on Rails Hosting Survey! This year was an interesting challenge for us because we decided to display the results from previous years along with this year’s data.

How did we do that, you may ask? Charts! If a question was asked in a previous year, the viewer may switch the active color of the chart to highlight the data for that specific year. Neat-o!

We’ve made comments about what has changed throughout the years, but we want you to play around with the data and compare.

Thank you to everyone who participated this year!

Take a look at the Ruby on Rails Hosting Survey 2014.

Continue Reading

Link  |  Development

An Incremental Migration from Rails Monolithic to Microservices

23 Jun 2014

Link  |  Development

Using Named Scopes Across Models with ActiveRecord#Merge

23 May 2014

Article  |  Development

Fixing Wordpress URLs When Using Rack

27 Mar 2014

Tip to fix WordPress URLs

In my last article I detailed how to run PHP through a Rack server. This works fairly well until you try to sign into the Wordpress admin section.

The problem is that Wordpress stores site URLs in the database and it will use these for some redirections. Luckily, with a few Rake tasks you can painlessly override them.

Continue Reading

Article  |  Development

Wordpress and PHP on Rack

26 Mar 2014

We work primarily in Ruby on Rails, but every once and a while a client will need us to fix a critical bug in an existing PHP/Wordpress app that is slated to be deprecated.

We use Pow on our development machines. This is great for developing Rails applications but it does't play so well with other stacks that require port 80 to run.

There are some instructions out on the web that show you how to use Apache in conjunction with Pow so that both apps can be served simultaneously. This seemed like a little too much overhead, so I started poking around for a solution.

Did you know that PHP comes with an embedded web server? Yup, it's built in as of PHP 5.4 and OS X Mavericks comes with it pre-installed. If you're looking for a newer version, you can install 5.5 using homebrew-php.

Now that we don't need Apache to run PHP, we'll need something to proxy requests back to our embedded server. For this, I used Rack.

I setup a simple Gemfile with the following gems:

gem 'rack'
gem 'rack-legacy'

Then it's time to create our rackup file. Create a file titled config.ru and add the following:

require 'rubygems'
require 'bundler'

Bundler.setup

require 'rack'
require 'rack-legacy'

use Rack::ShowExceptions
use Rack::Legacy::Index
use Rack::Legacy::Php
run Rack::File.new Dir.getwd

That's it! Place this file into the root of your PHP project and you should be able to call rackup from the terminal to start the Rack server. By default this will be at http://0.0.0.0:9292.

There is one caveat though. At this time, Rack Legacy, will only respond to requests if it thinks that it's a valid PHP file.

From the Rack Legacy library this is called before a request is proxied:

def valid? path
    return false unless path =~ /\.php/

    path = path[1..-1] if path =~ /^\//
    path = path.split('.php', 2)[0] + '.php'
    path = ::File.expand_path path, @public_dir
    ::File.file? path
end

In our case this wasn't working for us because of the way that pretty URLs were being handled by Wordpress. In order to get around that, I monkey-patched Rack Legacy to simply pass all requests back to PHP.

Here is what I added to the config.ru file to make this happen:

class Rack::Legacy::Php
    def valid? path
        return true
    end
end

With that change, the Wordpress site was working as expected.

Continue Reading

Link  |  Development

Airbnb discusses their thoughts on the future of web apps.

20 Mar 2014

Article  |  Development

CKEditor and Word Counts

4 Mar 2014

Tip to add word counts to CKEditor

In a project we’re currently working on, we created a form builder that could publish complex forms that include features such as:

  • Logic that can be applied to different fields, sections and pages
  • Configurable validations
  • Word counts by field, section or complete form
  • Option to allow some textareas to have WYSIWYG content

Continue Reading

Link  |  Development

Fresh URL - Rid the internet the scourge of the tracking code

27 Feb 2014

Have a project that needs help?

New Call-to-action