Categories
ruby on rails Social Media TechBiz WebApps

What the Next Rails Will Look Like

History repeats itself, yet it is obscure to the very people making it: innovators and inventors. Ruby on Rails was an invention that hit the scene in July of 2004 as a revelation. There was a video that promised that you could make a blog in less than 15 minutes that left many speechless.

When Rails hit the seen, my reaction was:

1. This is something that we should have been doing all along.

Books like The Pragmatic Programmer had been preaching what Rails was doing since the 1990s. Software engineers would half-heartedly code the “Rails ways” but never got around to building something like Rails.

2. I need less people on my web team.

It seemed that you could work with just a designer and get lots done. I didn’t have to go to IT as much as database issues. I could use generators and save hours of time.

3. That startup that seemed impossible now seems within reach.

I remember a young Chris Wanstrath at a Ruby meetup I hosted saying with a tired look in his face that he wished he was working in Ruby. He was at CNET / CBS Interactive at the time. He’s built the best tool for developers out there and I use github.com every day.

That’s the past, now what’s the future?

The tough question to ask is, “What should we, as an industry, be doing that we are not?” The Rails philosophy was loudly yelling, “We aren’t doing DRY.”

It seems that there are 4 things that need to be done in the “next” Rails:

1. Mobile ready out of the box.

We should all be using CSS media queries and have the ability to support the mobile web. There are so many missed opportunities to retain users simply because mobile is still shockingly ignored. Mobile databases can even be integrated for a better application experience; visit Couchbase for more information and options.

2. Social Sharing out of the box.

This basically means that there has to be a standard for creating an API for APIs.

3. The backend will just look like an API.

Say good bye to complex SQL joins.

4. Designing tools with deep integration into the cloud.

Languages have been designed for CPUs in non-networked environments. This means that at a core-level, the next Rails will be SSL capable, e-commerce capable and ready to scale out of the box.  Hints of this can be seen in Erlang.

Categories
How-To ruby on rails

Redboxing with Rails: Modal Windows FTW

There’s a great lightbox plugin for Ruby on Rails called Redbox. Unfortunately, it doesn’t work out of the box, but here’s the patch for redbox.js:

Replace:

Element.setTop(window_id, boxTop);
Element.setLeft(window_id, boxLeft);

With:

$(window_id).style.top = boxTop + “px”;
$(window_id).style.left = boxLeft + “px”;

Remove or comment out:

Element.hide(‘RB_loading’);

Remove:

<div id=”RB_loading”></div>
Categories
How-To ruby on rails WebApps

The Rails Console Makes Test Object Creation and Debugging Easy

I really like how the Rails console solves the problems of test object creation and debugging.

Usually, a web developer will push code to the webserver and hit shift-reload on the web browser. With the Rails console, you can avoid all that shift-reload madness.

If I wanted to create 10000 blog posts for testing, I could do something like this:

script/console
10000.times
{ |i| Post.create(:title => “post number: ” + i.to_s, :body => “autogen Booyah!”) }

Through the console I can also do debugging pretty easily:

>> p = Post.find 888

And get this as output:

=> #

A lot of problems in Rails are just solved by running script/console and checking the values of certain variables that are pretty hard to get at through a web browser.

There is pretty much no limit to what can be done through the Rails console. Konstantin Gredeskoul, web developer and songwriter, has found a way to load session data through the console.

Categories
ruby on rails TechBiz WebApps

Mephisto: Blogging Software on Rails

Blogging software should meet four important criteria:
1) Easy import from a pre-existing piece of blogging software we’re not happy with.
2) Spam filtering protection in comments
3) Make it easy to add web analytics javascript tracking without deleting it during each upgrade.
4) Should make it easy to not look like Mephisto blogging software or WordPress or like generic blogging software.

Mephisto screenshot

Mephisto meets all four criteria.

Plus it leverages the advantages of Rails in that out of the box you can deploy to development, test and production environments. Also it integrates with no mess into shopify or any other Rails project that you might be working.

Hats off to Rick Olson(Development) and Justin Palmer(UI/Design) for making Mephisto along with “a bunch of other cool people.”