Archive for the ‘Ruby’ Category

Google Trends: Web Dev II

June 27, 2006

Well, I just discovered a feature on Google Trends that sheds a different light on my previous post on web development techniques. Displaying several trends in one image reveals the relative size of search volumes of specific terms.

As can be seen when comparing ‘zope’, ‘plone’, ‘ruby rails’ and ‘turbogears’:

webdev comparisons zope ruby on rails turbogears plone

Somewhat related, ‘mambo’ and ‘joomla’:

joomla mambo

Try for yourself.


Google Trends: Web Dev

May 13, 2006

google trends ruby rails
google trends turbogears
google trends plone
google trends php
google trends zope
Source: Google Trends

It could mean people know Zope well enough, not to look it up every day. It could also mean Zope is losing ground.

Also interesting: Linux, Ubuntu (up) and RedHat (down)

Django, J2EE, Rails, TurboGears or Zope (Plone)?

March 13, 2006

Wow, this is a real must-see for web developers:

A 20 minutes screen-cast comparing 5 web frameworks. With a surprising ending.

What is wrong with the MVCs I see?

January 11, 2006

Some minutes hours ago, in a phone conversation with a dear friend, who also happens to be a decent programmer, I expressed my feeling about the Model View Controller pattern Rails is claiming to adhere to. Something feels wrong. And not only MVC in Rails.

Say I have a bunch of recipes, all nicely assigned to a smaller subset of categories. (Does that sound familiar?)
In Rails, if I would want to show all recipes on the recipe index page.

My controller class would look like this:
class RecipeController < ApplicationController

def index()
@recipes = Recipe.find_all()

With an accompanying model:
class Recipe < ActiveRecord::Base

What disturbs me is the find_all() method in Recipe.
Yes, I understand that Recipe subclasses ActiveRecord. But I would not expect the Recipe class to know about all its kin:

"Say Richard, pass me a reference to all people on earth, will you?"

Would it make sense to have some other class that would know about Products and supply the controller with data?

Another thing that bothers me is the php’ish way of having Ruby code in templates.

<% @recipes.each do |recipe| %>
<%= %>
<% end %>

Aren’t that model instances we’re massaging in our view? Doesn’t that make our view partly a controller too?

Looking for answers I found an in-depth article (MVC and web apps: oil and water) by Harry Fuecks on MVC and its applicability in web applications. Take your time to read the articles he links to too.

Please let me know what you think.

Pay attention. I’m not bashing Rails. Beautiful apps have been written in that framework. I’m a paying Basecamp user, for example.

I’m just searching for the truth.
the truth is out there
And the truth is out there.

Ruby on Rails starter II / II

January 8, 2006

Ok, after quite some hours of work I got a grasp of both Ruby and Rails’ basics. In addition to the links I already mentioned, I found the RubyOnRails API also very useful.

Some results:

reviewer ruby on rails app

reviewer ruby on rails comment

I took an extra 20 minutes to add the logo. Only because I was making screen shots for my blog 🙂

I’m really tired, so some quick notes.

  • Yes I like the quick way of working with Ruby on Rails
  • No I do not like the freedom Ruby gives. I’m coming from Python and really find the Python coding guidelines very valuable. But let’s not go into that.
  • I’m positive about the framework. It did what it promised. But the ‘perly’ way of indicating variables really held me back: ‘product’, ‘:product’, ‘@product’ and ‘#{product}’ can all reference some product, depending on the context.
  • Before deciding on wether I really want to dig deep into RoR, I want to evaluate Subway, a framework insprired by Rails. It’s written in Python, which gives it a large advantage over Ruby on Rails. Sorry about that 😉

    Update 2006-01-09 23:01h: Colleagues pointed me to TurboGears. Another python framework “much like Rails”. My todo list is growing…

    Ruby on Rails starter I / II

    January 7, 2006

    As a weekend excercise, I’ve started spending time on Ruby and Ruby on Rails. Three Six valuable links:

    • Ruby Tutorial by Daniel Carrera.
      Getting the basics.
    • Instant Rails by Curt Hibbs
      Ruby, Rails, MySQL, Apache. All in one app! It can even run from your USB memory stick. 2 thumbs up.
    • ONLamp Ruby on Rails example: part I and part II.

    My aim for this weekend is to build a personal wine review blog, for me and my woman. If I manage to create something, I’ll post screenshots. Or better, a working site! (Nah, don’t bet your money on it)

    As well the content, as the level of humour require two extra links, both from Amy Hoy’s (24) weblog:

    Update 23:54h: Screenshots of my premature ‘reviewer’ product. Time for bed.

  • List of all products
  • ruby on rails list items

  • Show a single product
  • ruby on rails show item

  • Edit a product
  • ruby on rails edit item