the intentioncloud strike back
Sunday, April 5th, 2009I’ve decided to rewrite the intention cloud. Still with catalyst, but I’ve replaced prototype with jquery this time. I’ve end up with less code than the previous version. For the moment, only google is available, but I will add overture, and may be more engines.
There is still some bug to fix, some tests to add, and I will be able to restore the intentioncloud.net domain.
It’s really easy to plug a database to a catalyst application using Catalyst::Model::DBIC::Schema. Via the helper, you can tell the model to use DBIx::Class::Schema::Loader, so the table informations will be loaded from the database at runtime. You end up with a code that looks like
package intentioncloud::Model::DB; use strict; use base 'Catalyst::Model::DBIC::Schema'; __PACKAGE__->config(schema_class => 'intentioncloud::Schema',); 1;
and the schema:
package intentioncloud::Schema; use strict; use base qw/DBIx::Class::Schema::Loader/; __PACKAGE__->loader_options(relationships => 1); 1;
Now, to do a query:
my $rs = $c->model('DB::TableName')->find(1);
and your done !
The code for the intentioncloud is avaible on github

