Monthly archive for August 2005

RSS from anything

RSS widest use so far has been to deliver news to the readers, but the format (specially RSS 2.0 with its simple namespace extension) is enough flexible to allow a far wider range of applications. It’s easy to see uses anytime or anywhere there is a flow of information that is produced and is to be aggregated and consumed and such application are starting to spread.
For instance Spanning Salesforce (link via D.Winer) is a service that builds RSS feeds out of interesting data lists in a Salesforce application.

But there’s more: RSS has shown that there are ways to make systems work together in a simple but effective way. The whole point of RSS, said Jim Moore is to make connecting systems together so easy that users can do it themselves, without any help from system managers or vendors.

Rails console

I just found that in Ruby on Rails there is a “./script/console” script which lets you access all the application from a consol prompt, in this way you can manipulate all of your objects and do all sort of things and i find it really useful specially when you need to debug some nasty bugs in your model.

I had known this before I would have not spent most of the afternoon going after a bug in the Rails application I’m developing. After a long quest around my code, I extracted what seemed the offending piece of program from the model, built a test case and run it in the irb, and there it was a stupid initialization error.

Using console I would have just skipped all the plumbing and beoing able to interact with the single parts of the application I would have concentrated the attention on the model.

ActiveRecord: unobtrusive ORM

While studying Ruby on Rails and looking for documentation I found this post by David Heinemeier Hansson
Addressing concerns with Active Record (Loud Thinking).

It explains some of the rationale behind the Active Record machinery and why it has been made so that you can do the easy thigs VERY easily while it is trivial to revert to sql for the most complex things. Qouting from the post:

Active Record shouldn’t give the expectation that you’ll never have to touch SQL again. That’s an illusion and many ORMs have been build and crumbled on that illusion.

This is something that I’ve come to understand while working on large java based projects using Oracle’s bc4j as the object relational mapping layer, when there is the need to present complex data the best option is to use the database tools which are built expressely to manage the data, and are optimized for these tasks: SQL, views and stored procedures. In such cases we would often revert to write custom queries into ViewObjects or let all the processing be done by some stored procedure (which was easly done also with bc4j!).

When people ask for security holes as features

Thinking about security:

… I went to install the driver, the instructions actually said something to the tune of “Ignore this warning box, it doesn’t mean anything important. Continue clicking OK on every screen until the driver finishes installing.”

Read more about the ways companies try to walk around the Windows Certified Drivers warnings here