Tag Archives: rails

Rails Wrap-up

So, I came to this Rails conference looking for a few things. It’s not over, but I think I’ve got a good sense what I’ll walk away with tomorrow.

I started to learn a bit about Rails while considering joining a software start-up (in the non-profit space). I spent a month hammering away with a few O’Reilly books and a sample project, then got pulled away by real world concerns like starting up my new career fast so my family won’t starve. I got far enough to get the concepts and philosophy, master the innovative database management (activerecord), and start an app that I plan to finish and publish as part of Techcafeteria someday. Along the way, I loved the rapid development features and recognized Rails as a bit of a conceptual leap in programming/scripting, that values efficiency of following conventions over coding. Being oriented toward finding the fastest paths to the best results, I was also intrigued by how Rails builds Ajax functionality into the code (I just never bothered to get beyond the basics of Javascript, preferring server-side programming, I bias I now regret…) But I also grew concerned about the platforms speed and scalability, concerns that my friends at Social Source Commons (SSC) would second, I suspect.

So, the four areas that the conference could have helped me with, and how it did:

  1. Learning more of the scripting language. Not so much — maybe a referral to the book I’m missing that will glide me right over that hump.
  2. Ajax intro – pretty good. I attended a few sessions on Prototype and Scriptaculous that gave me a far better handle on how they work .
  3. Ruby Scaling — an awesome session on the proxy cache and other options out there to speed up Rails, with pointers to what bottlenecks it. This was likely the most valuable thing, and I’ll be contacting Gunner to offer to take a look at the SSC platform and see if we can apply some of what I learned.
  4. Where it’s going, as I reported on yesterday. Among web scripting languages, PHP and ASP/.NET are the kings today. My prediction is that Ruby on Rails will eclipse them, and gain broad adoption among web 2.0 developers and corporations looking for in-house app development tools. The main limitation – performance – is being addressed and will be fixed, no question.

The benefit of having a functional application roughly 60 seconds after you think of a name for it is phenomenal, and the developers are completely geared toward continuing to make it the out of the box solution for speedy delivery of standards-based, current tech web applications.

Instant Open API with Rails 2.0

Day 2 at the Ruby on Rails conference – after the Keynote.

My main focus is on technology trends that allow us all to make better use of the vast amounts of information that we store in myriad locations and formats across diverse systems. The new standards for database manipulation (SQL); data interchange (XML) and data delivery (RSS) are huge developments in an industry that has traditionally offered hundreds different ways of managing, exporting and delivering data, none of which worked particularly well — if at all — with anybody else’s method. The technology industry has tried to address this with one size fits all options — Oracle, SAP, etc., offering Enterprise Resource Platforms that should be all things to all people. But these are expensive options that require a stable of high-paid programmers on hand to develop. I strongly advocate that we don’t need to have all of our software on one platform, but that all data management systems have to support standardized methods of exchanging information. I boil it all down to this:

It’s your data. Data systems should not restrict you from doing what you want to do with your data, and they should offer powerful and easy methods of accessing the data. You can google the world for free. You shouldn’t have to pay to access your own donor information in meaningful ways.

How can the software developers do this? By including open Application Programming Interfaces (APIs) that support web standards.

So what does this have to do with Ruby on Rails? At the Keynote this morning, David Heinemeier Hannson showed us the improvements coming up in Ruby for Rails 2.0. And he started with a real world example: an address book. Bear with me.

  1. He created the project (one line entered at a command prompt).
  2. He created the database (another line)
  3. He used Rails’ scaffolding feature to create some preliminary HTML and code for working with his address book (one more line).
  4. He added a couple of people to the address book.

At this point, with a line or so of code, he was able to produce HTML, XML, RSS and CSV outputs of his data. The new scaffolding in 2.0 automatically builds the API. I could get a lot more geeky about the myriad ways that Ruby on Rails basically insures that your application will be, out of the box, open, but I think that says it well.

Think of what this means to the average small business or non-profit:

  • You need a database to track, say, web site members, and you want to further integrate that with your CRM system. With rails, you can, very quickly, create a database; generate (via scaffolding) the input forms; easily export all data to CSV or XML, either of which can be imported into a decent CRM.
  • You want to offer newsfeeds on your web site. Create the simple database in Rails. Generate the basic input forms. Give access to the forms to the news editors. Export the news to RSS files on your web server.

This is powerful stuff, and, as I said, an instant API, meaning that it can meet all sorts of data management needs, and even act as an intermediary between incompatible systems. I still have some reservations about Rails as a full-fledged application-development environment, mostly because it’s performance is slow, and, while the keynote mentioned some things that will address speed in 2.0, notably a smart method of combing and compressing CSS and Javascript code, I didn’t hear anything that dramatically addresses that problem. But, as a platform, it’s great to see how it makes actively including data management standards a native output of any project, as opposed to something that the developer must decide whether or not to do. And, as a tool, it might have a real home as a mediator in our data integration disputes.

The Rails Thing

It’s Thursday morning, and I’m in Portland, Oregon at the 2007 O’Reilly Railsconf, all about the web programming language/environment/framework called Ruby on Rails. I was introduced to Ruby on Rails by a friend/associate who I hope to be doing some work with soon – we’re part of a group looking for funding to develop some applications. I program in a few languages, mostly PHP, but agreed to learn Ruby on Rails after being introduced to it.

Ruby on Rails, it turns out, is a controversial language, in a way that is very reminiscent of the Apple vs. everything else debate. Rails enthusiasts are very attached to the platform, and adherents of Java, C, and even PHP, tend to be very skeptical, with complaints that the structure is too rigid and that the language only goes so far. They might be right – I’m not fluent enough yet to know. But there are a few definite things that have me interested in Rails.

  1. Rails abstrats the database creation and management process in a really fascinating way. Using the MVC framework — model, views, controller — you basically develop your database using plain english to describe the relationships between tables. This really works for me. To create the database, you write some very simple code that adheres to certain naming conventions, and then you can manage the database almost exclusively from the code.
  2. Once the database is created, Rails uses a method called scaffolding to automatically create forms for database manipulation. With one line of code in your controller, you can very simply grab data from multiple tables using a simple syntax. Rails makes it all very, very easy.
  3. I’m looking for a holy grail, of sorts, something that falls halfway between a programming language and a content management system (CMS), and this comes close. What can we use to rapidly develop interactive, web-based applications that doesn’t lock us into the type of assumptions that Drupal and (the current version of) Joomla do, but don’t require building the whole thing from scratch? Ruby on Rails is still a pretty complex thing for most techs at non-profits to budget the time to learn, but it’s intriguing, as is the move in the next release of Joomla to have it sit atop a Ruby on Rails-like framework (that, unfortunately, lacks the database routines).

I’m also looking at Javascript/ajax libraries – I’m in one right now on Prototype and scriptaculous, but the presenter is the developer of scriptalicious and his presentation style is somewhat coma-inducing…

OpenID Enabled

Just to put this all together, I’ve written a F.A.Q. and a How-To on OpenID and added them to the OpenID offerings here at Techcafeteria which are, in a nutshell:

  1. The OpenID-enabled Blog;
  2. The OpenID server, which I’m committed to maintaining. Techcafeteria won’t be going away anytime soon!;
  3. A new OpenID F.A.Q., which links to other OpenID resources;
  4. and a new OpenID illustrated How-to, which uses the Techcafeteria server as an example but overviews how they all work.

Why am I harping on about this? I really do think that OpenID offers a solution to a very pesky problem. I have an encrypted file with all of the logins and passwords that I keep on a regular basis for web sites and services that I use. There are over 200 of them. I might be an extreme case, but I’m far from alone. And, from my years as a technology manager, I know that most people solve this problem by using the same password at multiple sites. So if those sites include your online banking, that’s a serious risk.

But, beyond the convenience and security, I look at it this way. My goal for Techcafeteria is to grow it into a real diverse offering of web-based services, in fitting with the name. Some of these, like the blog, will be based on third-party platforms, others will be things that I develop (I’m experienced with PHP/MySQL and I’m learning Ruby on Rails – I’m even attending O’Reilly’s big conference on it in Portland this week). My goal is single sign-on, via OpenId, for everything that Techcafeteria ever offers.

It’s not a big deal doing this on my web site. It would have been a huge deal if I could have accomplished it at the large non-profit or decent sized law fIrm that I served as an IT Director for. At both of those jobs, we had a variety of systems, all tied into Novell and/or MS networks, but we still had nothing but password soup to offer our users, because the apps weren’t standardized enough to allow for true single sign-on.

At Joomla Day on Saturday, I sat in on a session where one of the core developers (Sam) demonstrated a way to share authentication between Joomla and MediaWiki. Very cool, but somewhat easy because MediaWiki stores the password unencrypted. Assuming that most sites use standardized encryption protocols (MD5 being the big dog, that’s not an insurmountable challenge. But I couldn’t help thinking how much easier this will be via OpenID. It’s not just about this stuff being possible – it’s also about allowing Sysadmins who are not also programmers to implement it.

So, end of OpenID rants, for now. I’ll be doing some live blogging from the Rails conference, and I’ll try and include some context as to why I think Ruby on Rails is an important programming environment.