Archive for January 2007

Rails Edge Conference - Highlights

We just returned from our first Rails-related conference with a lot of useful information and tips on Rails testing, development, and deployment. Not only was it great to get some new ideas, but it was heartening to see that many of the practices we employ here at Viget are on track with what the Rails experts are preaching.

The conference packed in a lot of heavy topics in a short amount of time, but left plenty of time for both discussion and networking. There were a lot of great talks that spanned the entire 3 days – here’s what stood out for me:

  • Metaprogramming in Ruby - Dave set the tone for the conference with his excellent talk on how Metaprogramming with Ruby can help to make us better Rails developers. I had a bit of an epiphany about halfway into his presentation as I started to “get” objects in Ruby.
  • Ruby Idioms for Rails Programmers - Stuart treated us to a live refactoring of some Java controller code into a single line of Ruby by relying on the implicit design of the Rails framework stack.
  • Sharing RJS - Marcel showed off some great conventions for refactoring RJS code into helpers that also had the side benefit of making them available in your views (via a link_to_function call).
  • Creating Rails Plugins - Chad and Bruce gave a great demo on creating an ‘acts_as_rateable’ plugin from start to finish, complete with a bit of live coding.
  • The Deployment Golden Path - James covered one of the thorny issues of Rails development – deployment. After showing some setup with Capistrano, Mongrel Cluster, and Apache, we were able to see a real deployment from a Subversion repository to a server within Amazon’s EC2.
  • Red, Green, Refactor - It was great to see Jim’s live test-driven development excercise as he created and refactored a small piece of code. The real treat was the introduction that he gave to flexmock and flexstub – something that I had heard of before, but never knew how powerful it was when writing unit tests. His live demo of flexstub showed how you could reach into a Ruby class and manipulate its behavior from 2 degrees of separation.

A nice addition to the event that helped foster the informal, collaborative tone that Bruce describes on his blog was …

…Open VGA & Lightning Talks

This was a chance for the attendees to give quick talks about any topics that they were passionate about and show off applications that they had been working on.

  • The Revolution Health team was on hand to show off their recently-launched application and introduce their process for managing shared code assets – Plugems.
  • Jared gave us a quick demo of the Cha-Cha search engine and gave some tips on how the company got this Rails application to scale. The most interesting part was when he mentioned that Cha-Cha uses only custom SQL queries based on information gleaned from ActiveRecord log data.
  • Ryan at ELC Technologies showed off their AWS Console application by instantiating some virtual servers within Amazon’s EC2 cluster.
  • Local Rails developer Bala Paranj gave a quick demo on how ZenTest picks up file changes and automatically runs all necessary regression tests.
  • FiveRuns (an event sponsor) showed off their Web 2.0 systems management application. The interface looked promising, but I’m not certain how it hooks into the services that it’s monitoring. I plan on signing up for their 30-day demo in the near future – this could be a simple alternative to going the Nagios route.

In all, it was a great conference. Thanks to Mike and Nicole Clark at The Pragmatic Studio for organizing the event.

Add to Del.icio.us | Digg This | Leave a Comment

“Social Media” versus Web 2.0

Any readers of The Four Labs Blog knows that we’ve tossed the phrase “Web 2.0″ around quite a bit. From what I can see, we never tackled defining it. And that’s fine - way too many people have.

From a conceptual standpoint, in the past I’ve laid Web 2.0 out as follows:

When speaking with those who don’t “get it” [Web 2.0], it’s more important to articulate the ideas of what it is doing rather than to point to technology or even tools. Instead of stating Web 2.0 is AJAX, RSS, blogging, or even social networks, communicate that it makes the web faster (AJAX), more accessible (RSS), easier to publish to (blogging), and a better tool to connect with friends and colleagues (social networks).

But it seems another term has gained credence in the past six months ago. And in certain circles (in particular the PR world), it has in some ways usurped Web 2.0. The new phrase with the craze is “Social Media”.

What does really mean? If we take a quick gander at what many would describe a Social Media tool - Wikipedia - we can read the following definition:

Social media describes the online tools and platforms that people use to share opinions, insights, experiences, and perspectives with each other. Social media can take many different forms, including text, images, audio, and video. Popular social mediums include blogs, message boards, podcasts, wikis, and vlogs.

I find that definition fairly lame and ambiguous. Without throwing the buzz words in the last sentence, you basically can say that the Internet has been Social Media since its outset.

Here’s the takeaway: don’t get overwhelmed with Social Media, Web 2.0, vlogging, wikis, podcasts, RSS, or mash-ups. The terminology is not what is important. In some ways, the technology is not even what is important. It’s how you use the technology to help achieve your goals and better connect you with your web site visitors (read: customers, clients, constituents, etc.) that really matters.

So, let the insiders and professionals argue about Social Media and Web 2.0. You can just focus on making your part of the web better.

Add to Del.icio.us | Digg This | Leave a Comment

Rails Training with Chad Fowler

We covered a lot of ground in the 3-day training course that we planned with Chad Fowler. Much of the material is still sinking in for most of us, but we gleaned a lot of really good information and tips from the event. Some highlights from the three days based on my notes:

  • Blocks - Methods that accept blocks can use this construct to clean up after the fact. The File.open and open (as part of open-uri) both accept blocks to automatically close the stream when finished.
  • Mix-ins - Using modules provides a handy way to re-use functionality inside different classes.
  • RESTful development - This is a big area of interest for us especially since Rails 1.2 was just officially released last week. We’re already looking forward to using the ResourceFeeder plugin with ‘respond_to’ to handle the RSS feeds we previously created by hand.
  • Routing - Though the material we covered about named routes existed in Rails 1.1.6, many of us hadn’t made full use of it yet – something that we will be leaning on more as we push for more meaningful URLs
  • Testing - We’re already actively using unit and functional tests (and have been for quite a while), but the intro to Selenium that Chad did really blew us away! We’re planning to use the Selenium IDE plugin to Firefox to allow project managers to create their own regression test suites.
  • Advanced ActiveRecord - Association scoping is extremely useful to us and promises to clean up our controllers by refactoring logic back into the models. Because of the “leaky abstractions” in Rails, we’re now using Nathaniel Talbott’s Query Trace plugin to see where we should be auto-loading associations.
  • Debugging Tips - Since ‘puts’ doesn’t work as you might think in your controllers and views, Chad gave a couple really useful tips: add a single ‘raise’ call in your controller to inspect the state of your app or drop a call to ‘debug(var)’ into your view. For more advanced debugging, we saw the full power of using ’script/breakpointer’ to interact with controllers from an IRB console.
  • ActionMailer - We’ve been using ActionMailer for a while to send out emails from web apps, but the process for reading incoming mail is shockingly simple (much less involved than my previous PHP solution).
  • Performance - As we need to increase performance with Rails apps, we will now start looking at pushing session and fragment storage to memcached and pass off resource intensive processing to BackgrounDRb.
  • AJAX - Besides looking at RJS, we were introduced to the observe_form and observe_field magic to create auto-updating displays (useful for live searching).

Thanks to Chad for coming out and giving an excellent training session, and to both David Bock and FGM for their hospitality in opening up the space to us on such short notice.

Chad will be giving a couple of talks at The Rails Edge Conference this week that will make for a good continuation of some of the topics we covered in the class. Ben and I will be attending all three days, so if you’re a Rails developer looking for a full-time gig, let us know.

Add to Del.icio.us | Digg This | Leave a Comment

Widgetize Your Website

As Brian mentioned in his 2007 Resolution post, widgets are going to be one of the trends to watch in 2007. Arguably, they already made big news in 2006 - but only within certain demographics (including teens, young adults, and geeks).

So, what’s a widget anyway?

On a technical level, it’s just some code you insert into your website. But from a conceptual standpoint, a widget is a little tool that packs a great punch, providing fun and useful functionality to websites. Widgets are often placed in sidebars and are very popular amongst bloggers because they allow them to create more personality on their sites. They also can often help site visitors stay better engaged.

While widgets are “fun” for their users, they offer site owners the power to essentially export both the messaging (i.e., content), as well as the branding of their website across the Internet.

Although widgets are somewhat new, the technology behind them is maturing quickly. Services like Widgetbox and ClearSpring now allow widget creators to track the usage of their widgets. KickApps, which does much more than just widgets, also allows widget owners to switch out the content of their widgets. In the case where a significant number of people have placed your widget on their sites (websites, blogs, social networking profiles, etc.), that becomes a very powerful communication tool.

Widgets won’t make or break your web strategy. They are just another tool in the toolbox. But expect to see them start being used in some innovative ways as we continue through 2007.

Add to Del.icio.us | Digg This | Leave a Comment

Accurately Predicting Organic Traffic

Manoj Jasra is a Senior Web Analytics Analyst at Enquiro. He recently wrote a post entitled “Predicting Potential Website Traffic” where he is thinking through the variables needed to accurately predict organic web site traffic (just as a reminder — organic traffic is the non-paid part of the traffic that comes to your site).

He notes that there are a handful of different elements that can come into play, including Keyword Search Volume, Search Engine Market Share, and Competitors. It’s a good list and contains many of the elements we typically use to help clients with their keyword analysis and web reporting.

While useful, accurately predicting organic traffic would be quite difficult for a number of reasons, including the fact that some of the variables (e.g., incoming links) are very complex. An incoming link from a highly-trafficked site will yield significantly more visitors than a link from an obscure blogger. But Manoj’s point is well taken — a more formulaic approach to estimating organic traffic would be of great benefit, especially when launching a new web site.

The good news is that if you have already installed web analytics on your site and have reported on that data regularly, you’ll have more than a clear picture as to what your organic traffic should look like. And with that data, you can see what causes fluctuations in it, as well as compare it to your Pay-per-Click campaigns, affiliate advertising, and other web marketing channels to see how each of them are performing against each other.

Relevant Links: Predicting Potential Website Traffic , Enquiro

Add to Del.icio.us | Digg This | Leave a Comment

2007 Resolution: Make The Web Better (your part of it, anyway)

The New Year is here, so here are some thoughts on how you can improve your site in 2007. Some are quick things you can implement right away and some are things to keep in mind if you’re in the planning stages. Whether your web site is a marketing channel for your offline business or it is your business, these tips are relevant (in no particular order).

  • Study your web analytics reports regularly. Knowledge is power. Know what your users are doing (daily), and then do something about it (often). We recommend HBX for advanced needs; but, even if you don’t have in-depth analytics requirements, just plug in Google’s code. It’s free and easy to do.
  • Optimize your site / app for search engine indexing. Search Engine Optimization (SEO) has been around for a long time, so if you haven’t been focused on SEO you’re already behind. There’s a lot you should do; but, the basics are straightforward: (1) select the right target search terms; (2) optimize your code, design, and content; and (3) earn inbound links.
  • Keep accessibility in mind. There’s a balance here, as Kara describes, but awareness of the major issues is half the battle.
  • Blog at least twice per week — or not at all. Should you even have a blog? Keeping up one the right way is time-consuming; but, if you do it right, it can be a big boost to your organization. Blogs aren’t just under-featured content management systems anymore. It’s not the publishing technology that matters, it’s the tone, content, and discussion.
  • Focus on usability. Technologies like Flash and Ajax can help tremendously; but, they can hurt if used poorly. Whether you’re trying to attract new users, earn regular readers, or convert customers, it’s all about making a user experience that’s intuitive and enjoyable.
  • Think mobile, but only a little bit. The web is about information. People want to get that information whenever, wherever. That means mobile. Build for the desktop browser, but keep the mobile option in mind with just a subset of your content and functionality.
  • Go open-source, for the right reasons. “The technology is free” is nice; but, you can’t build a successful online business by making every decision based on cost. For most businesses, open-source tools like Ruby on Rails offer more flexibility, extensibility, and scalability than their closed counterparts.
  • Make your content available via RSS. Why not? It’s easy to do and while the masses still want content pushed at them via email, your RSS subscribers will grow over time. Don’t know what RSS is? Ask Stephanie. Then, use a tool like FeedBurner to manager your feeds and track your audience.
  • Widgetize. Whether you’re building the next great Web 2.0 app or just want to push your content onto other sites, you have to be thinking about widgets. A simple example: make that RSS feed available on other sites.
  • Understand social media. Sites like MySpace and YouTube are dominating the online audience, and sites that understand how to tap into these networks will have a big advantage. Don’t spam or trick people, just participate.
  • Really engage your visitors. We talk a lot about visitor conversion here — ways to persuade your visitors to take action. Be thorough in your thinking about what actions users should take because a single action isn’t good enough. It makes your users binary — they’re either in or out, a customer or not, and then they’re gone. Engage visitors with comments on blog posts, email subscriptions, or RSS feeds — anything that will entice them to come back. By building communities and allowing visitors to engage with each other, you’ll find maintaining an active audience to be much more sustainable.

There’s plenty more you can do and each bullet here could be a blog post (or a white paper … or a conference …) in itself. The point is progress. Perpetual improvement. Will the web boom continue in 2007? That depends on whether you do your part.

Add to Del.icio.us | Digg This | Leave a Comment

December NovaRUG Recap & Rails Training

A couple weeks ago, Kevin, Ben, and myself headed out to the December NovaRUG meeting to catch Rich Kilmer’s talk on Domain Specific Languages (DSLs) in Ruby. People who have read the testing chapter in the latest Agile Web Development with Rails book may be familiar with the DSL that Dave presents when demonstrating integration tests in Rails:

  def test_buying_a_product
    dave = regular_user
    dave.get '/store/index'
    dave.is_viewing 'index'
    dave.buys_a @ruby_book
  end

Rich provided many examples of DSLs that he’s used, including one that he created for the DoD to handle planning of in-flight airplane refueling. He also discussed his work with GUITopia to create an intuitive GUI DSL which was a bit more accessible to me as a newcomer to Ruby:

window.close(:button)
window.close(:button).click

Rich also discussed differences between both implicit and explicit DSLs and the scoping issues resulting from both. My limited understanding of blocks and closures put me at a bit of a disadvantage here – something that I hope to resolve when we have our training event in January.

Training?

Yes. We will be hosting a Rails training event here in the DC Metro area (Reston, to be exact) January 15th - 17th with Chad Fowler. The session is geared toward people who have web development experience and have played a bit with Rails but want to get more in-depth. The skill level required for this course falls between the Basic and Advanced Rails Studio classes offered by the Pragmatic Studio folks.

Cost is $750 per person for all 3 days, email training@viget.com if you’d like to attend – space is limited. Hope to see you there.

Add to Del.icio.us | Digg This | Leave a Comment