venerdì 13 giugno 2008

Fourth day of the Enterprise 2.0 conf

Day four is been full of stuff to do and no minutes to waiste. Starting with a ealy breakfast, with a round trip in the lounge and breakfast room to search for and talk with people.

After breakfast Hotel checkout items. Funny, it's first time I do an "express checkout". No human interface. Only check the bill and put the authorization for the expenses into a bowl.
Thinking about how no-social is, and on the other side time and resource save for the infrastructure; however standard checkout is available. I, as a digital social community oriented, choose for express checkout and invoice via e-mail.

The first speech I attend is about opensource and Enterprise 2.0. Three opensource party:
Bob bickel: for ringside. A new company thatis focus on creating a new community open source platform.
John Newton: Alfresco. CMS is transforming. Content as a service, in the enterprise but coming also from customer.
Jeff Whatcodd, acquia. Acquia is building opensource on Drupal. 2.0 success with 2.0 features.
Networking works fine in this session.

Session two is the "Lockeed Martin case study". The hall was over full. No seat available, and no air to breath. I attended, with others 10, all the speech standing up.
Interesting case, but at the end of the day is another "networking" oriented platform. We have wiki, we have blog, we have networking. On top of Sharepoint.

The third and last speech was a panel of bloggers that talk about "Microbologgin". Panel is @chrisbrogan @pistachio @dennishowlett @1938media @rhappe.

Some interensting stuff comes out from that discussion. At first point no one is able to convince on implementation/success case of microblog in enterprise.
Some random notes:
@crisbrogan says brevity scares the enterprise. This tools need serving suggestion. sharing, presence, journalism, styleish ...
@pistachio: sharing business card is superorganize. against community.
twitter allows natural ways to connect and exchange. Culturally shocking allow people communicate at different level. Twitter is not ready for the enterprise
@dennishowlett the most important thing out there for you, if you have one, regardless, is your blog, personal & enterprise. they follow me. I dont care to follow them.
@rhappe: information that go out of the enterprise, cannot be regulated.

I learned the concept of "Continous Partial Attention" that define in a amazing way the approach of microblogging. After the panel, a little break and then in the hall, for a wrap up.

An easy retrospective. Fun is apologize about the awkward wifi (that worked well only when we were leaving) and the request -I agree at all- of more warm environment; we where in a freezer. And it's time to leave, with purpose of join in Enterprise 2009 - will be 2.1 ?

Thankyou all for the great event.

mercoledì 11 giugno 2008

Third day of the Enterprise 2.0 conf

Morning started fine, finally I sleep for more than 4 hours. After a quick shower and a inroom wakecup of starbuck coffee, agent Michele is ready to go.

Breakfast in a meeting room, during while I meet some people from France, one Taiwan and one from Singapore. Everyone has been asked by me: why you are here ? what are you looking for ? But I have been answered always with "confused" response... that I can summarize with "looking for knowledge".
That's it.

everyone is looking for knowledge and other experience in this Enterprise 2.0 hype. The basic needs is to have more communications and socialization
Today, again, network doesn't work, despite to apologize from Westing and technical effort of the internet provider.

The first meet I attend is "Enterprise 2.0 Tools: A Critical Evaluation" by Tony Byrne, Founder CMS watch. It has been really interesting and pointed out, in a structured way which are some issue in evaluating vendor and tools and to match it in business area. Areas are defined in very high level, but really interesting. The most interesting outcome, for me, is that each of the software solution on the market is network oriented and not Social oriented; we are far away from social orientation.

Then I moved in the keynote hall for the big presentation. First to speech is Oracle, talks about "Power to the People: Driving Business Innovation through Communities" by Mark Woollen that point out the "obvius". People in organization are "hierarchy organized".
Then came wachovia, that talks about "context social awareness" and introduce me the concept of "Generation Y worker".
Pfizer talk about his impelemtation of a wikipedia like knowledge base and bring "meet charlie" as example. Interesting and fun a tag cloud showed about their work when the most relevant word is "scrappy".
After some blackout (slides/pc/break) is Sony's turn to speech. They talks about their 3 years plan, started and in progress, to communitize groups. A lot of tools, for a lot of activities.
Then a little break.

The Lunch Panel Finalist. A short advertise, 5 minutes each, to promote his product and ask for voting. In list are: newsgator, groupswim, spaceo.us, socialSite and veodia. Running and live demo from spaceo.us and veodia. The winner is veodia that showed us a realtime streaming from the Panel.

Finally the lunch in Pavillon. During lunch we meet and asked info for a lot of tools. In short we talked to: traction software, veodia and connectbeam.

It's time for a panel about mashup. Sadly this is the worst panel I attended, because no-one of the partecipants ( New Markets, Microsoft and IBM ) demostrated a solid knowledege in mashup and in their implementation. Only marketing knowleadge, good to pre-sale consultancy.

Panel: Title is "Soocial Computing Platforms: Three Alternatives for the Enterprise". Partecipants are nGenera Corporation, sabre Holdings, Microsoft and Jive Software. The discussion has been not so hot, with outstanding Jiva and bad Microsoft attitudes; the say "
people buy from Microsoft because they will be around, like IBM, for quite some time". This is frustrating. Is this Social Microsoft a new Ibm ?
Brian from nGenera indicate a "preference to take customers to an on demand model"; in my opinion we are far forward from this. Maybe Brian is Vintage and nostalgic guy. Outstanding is the moderator, the funniest ever seen in this Conference days. He is Jevon MacDonald and define himself as "Enterprise Irregular Contibutor", runs Firestoker the first low cost social community platform.

After this panel, back to the demo pavillion and contacted Jive and Newsgator. Some drink and then the day is over.

Dinner at Union Oyster House. It's my preferred place, so old and traditional, and so good seafood. Drink a Harpoon dark beer and boiled medium Lobster with potates. But before Lobster a crok of Oyster stew.
Wonderful.

Back to the hotel with a "cab adventure". The taxi driver was in trouble because unable to find his mobile phone. So we went around, in some streets in Boston, to ask friend and collegue if anyone has seen his mobile. After a no sucessfull search he remembered that his phone has been stoled from the back seat from a girl, he take for a drive before me. So went to his brother and get the brother's phone, start calling his mobile, and asking me to hear if it is around the cab. No way. The phone is not there.
After a while of in cab searching he said "I know, that girl has stolen my phone" and called his wife to give her the bad notice. But the phone was at home, in his wife's hands !!

After half an hour of trouble, he bring me to my hotel - and miss the hotel bringing me to another one. An excellent real life, Boston adventure.

And now it's time to rest.

martedì 10 giugno 2008

Second day of the Enterprise 2.0 conf

the morning begin with a powerful headache. Your special agent Michele is ready for action.
After some liters of Starbuck, auto brewed in room, bold coffee I went into the lobby for the breakfast. Light breakfast with a lot of fruit to avoid heavy digestion.

At 8.20 meet a collegue and take place in the big empty and freezed conference room for the keynotes. Network wifi support, here in Westin, become worst every minutes.

After a brief introduction, the first speach is by Fedex that illustrate us how the network evolves. And they are a phisical network, with a lot of IT network, to deliver on time services.
Next google talk us about their network application, and working in the cloud. Temperature goes down, and I must dress me more ! Outside is 35C and inside is 16!

After Google, there is a fun, interesting and more community oriented speech by AIIM that summons on "Age doesn't matter. Culture matters". This has been my preferred morning sketch because presented by two people that interact between them. Not the classical client-server presentation in enterprise 1.0 style.

Meanwhile the wifi network is a yo-yo. Available for seconds and off for minutes. That network instability demonstrated us that connectivity is most important.

The last speech of the morning is from SocialText. Gregory Webb talk about putting Social Software 2.0 to work for organization. I found some of ideas of the developer 2.0, in that speech, especially regarding the Social Spreadsheet. A spreadsheet that is able to host in each cell a wiki page. It's a good starting point to have one-place to create a software product, made up of lot of pieces with different menas ( code, alghoritms, documentation, explanation, test ).

Then the pavillions with demo and stands open, with 2 hours available to visit each stand and have lunch. Offer by Oracle. Today's lunch is cold buffet, with some pasta (ultra-cooked), some mexican like tortillas, chicken and chicken sandwich. No fruits at all, and iced green tea for drinks.

After this, I need and I deserve a Lobster at Oyster Union House. But this is another story.

In the afternoon
, at 13.30 a talk from Thomas Vander Wal. About tags, and usage of tagging in corporation. Some goods idea, some interesting topics that refine my idea of tagging. When tagging focus on "Human, object, related terms".

Next speech is a panel of bloggers that try to describe us the importance of logging, upon their experience. Blogs are very personal, but social creature; blogs are a sort of need to be connected to others. A lesson learned from them is blogging is about telling others how do you live/work/act. A good example is the blog "Running an hospital" that help CEO (the blogger) to communicate with others.

After speechs, back into pavillion to look at demoes (Social Spreadsheet) and tools available.

But the best has to come.

Dinner at Union Oyster House with
"Lazy Man Lobster".

Lazy Man because Lobster is ready to eat, without the difficult part of cut and crunch it (and seems like a tourist).

It has been an hard day, full of new things, thinks and learns. This conference is not so social oriented, it's in standard client-server mode. A really hard part is finding some commons stuff to create interest in peoples to start a discussion or creating a contacts; and not beeing english motherlanguage doesn't help at all.

Boston images available

lunedì 9 giugno 2008

First day in Enterprise 2.0 conf

Enterprise 2.0, Boston 9 June 2008
this message comes directly from Boston, from your special agent Michele.

This has been the first day in participating at the Enterprise 2.0 conference.
Overall satisfaction for the day is medium; I've got some difficult in finding people to talk with. Every one seems to me too young or too stranger to get a conversation. Maybe I'm not in the social community mood. :-) My few attempts all failed, with conversation fall down, after some minutes of me talking about my work and asking about others motivation in attending the conference.

Morning speech
The morning started at 8am, after a sleepless night. During the checking phase I met Emanuele Quintarelli the only one Italian meet today.

Today focus is on tutorials for introducing people into the 2.0 paradigm. My first speech I attend is titled: Threat and Vulnerability Management in the Enterprise 2.0 World

The topic is really interesting and I believe is an hot spot of Enterprise 2.0. The speech is interesting, but no 2.0 oriented. Each concepts, issue, threat, risk, mitigation John talked about are really present (and well known) into the "traditional" enterprise.

Relevance is done to the fact that "data is global" and emerged the interesting definition and concept of "security by compliance". After 3 hours (and one 15 minutes break) my conclusion is:
concerns, threat, risk and mitigation are same that in the past. Take care of the increased communication between parts and distribution of data.

The speech end at 12.15 and we have lunch, offered by Microsoft.

This is the first time in my life, that Microsoft offer me something. The lunch was in a "italian" mood:
  • some salads
  • gnocchi with pomodoro and pesto
  • broccoli spiced with aglio and peperoncino
  • salmon spiced with salsa verde,
  • bruschetta aglio e pecorino
  • cannoli, cantuccini.
A good idea, good tastes and parfumes, but too much garlic. Taste so good, but so heavy.

Afternoon speech


After lunch, at 13.30 start the Dion Hinchcliff event, titled Implementing Enterprise 2.0: Exploring the Tools and Techniques of Emergent Change.

The room was overcapacity, there was no fresh air and a heavy garlic ambient. Due to garlic, wifi network stop working, so no post available.

First part, before break at 15.00 was a theorical part with state of the art definition of Enterprise 2.0 and Web 2.0 paradigm. Nothing in deep detail, it's all about common sense :-).

I feel and I believe in all values in 2.0, from communities to change relationship/IOC; so no news during Dion speech, but a lot of well presented concept and information. Very useful for novice of 2.0 values.

15 minutes break.

Restart after break with tools presentation spaceo.us that seems to me too much structured to be a community tools; too many click and too information on a screen. First impression is an "old style" application with 2.0 concepts (tagging). Some interesting concept are implemented, like a
  • lean enterprise integration bus, that enable SOA into 2.0
  • lot of widget done for principals IT infrastructures.
After a brief talk and indication for tools to be used, the talk ends, full of garlic flavour.
To be honest I had a lot of expectation on this speech, but it has been only an introducton of Enterprise 2.0. I see, it's in the tutorial day and is used to introduce people.
The speech end at 17.05, as it ends, the wifi network started works.

Evening
At 17.00 starts a new topic, very interesting with title "An Evening in the Cloud". Amazon, Google and Salesforce responds to question by customer from California Public Utilities Commission, Sudler & Hennessey (Medical Corporation), Object Management Group and Northeastern University.

Discussion has been very fun and interesting with clarification and presentation of services by vendor, and question regarding: security, scalability, vendor lock-it, privacy, data migration, indipendence of energy generation and environment sustainability.
With wifi on, I made a good session and twitter reportage.

After the speech, at 19.30 a brief buffet offered by vendors, with purpose to meet people and eat something. At 20.30 almost all people is leaving the party, going to relaxing and rest for tomorrow.

Images available.


martedì 27 maggio 2008

a quick and dirty photobucket access.

Some days ago I want to connect to the new api provided by photobucket writting only javascript code.

I found that photobucket use OAuth but, from my POV, I need a quick and dirty -old style- function to get an unauthenticated call, to read all my public albums and tags.

After some digging into google, my outcome is "Nothing available" from the community (and no example in Javascript on photobucket samples).

I'm not a good javascript coder, butI'm proud of releasing this pieces of code, that could help others in accessing photobucket, and avoiding wasting time with encoding, timestamps and generating keys.

Assumption are:
usage of:
<script src="http://oauth.googlecode.com/svn/code/javascript/sha1.js">


declaration of:
var consumer_secret ="your_secret_by_Photobucket";
var consumer_key="your_consumer_key_by_Photobucket";


Here are the functions.
function getAlbums( user, album ) {
var url = "http://api.photobucket.com/album/";

url = url + encodeURIComponent( user + "/" + album )
var json = callPhotobucket( url, "format=json" );

}

function getTag( media ) {
var url = "http://api.photobucket.com/media/";

url = url + encodeURIComponent( media ) + "/tag" ;
var json = callPhotobucket( url, "format=json" );
}

function getTimestamp() {
var timestamp = new Date().valueOf();
timestamp = timestamp / 1000;
timestamp = Math.ceil( timestamp );
return timestamp;
}

function ping() {
auth_url = callPhotobucket( "http://api.photobucket.com/ping", "format=json" );
}

function callPhotobucket( url, format ) {
try {
if( url == undefined ) {
url = "http://api.photobucket.com/ping";
}

if( format == undefined ) {
format = "format=json";
}

var timestamp = getTimestamp();
auth_nonce="nonce" + timestamp;

auth_method = "HMAC-SHA1";
auth_timestamp = "" + timestamp;

auth_version="1.0";

auth_consumer = "&oauth_consumer_key="+ encodeURIComponent( consumer_key );
nonce = "&oauth_nonce="+ encodeURIComponent( auth_nonce );
auth_sig_method = "&oauth_signature_method="+ encodeURIComponent( auth_method );
auth_timestamp = "&oauth_timestamp="+ encodeURIComponent( auth_timestamp );
version = "&oauth_version=" + encodeURIComponent( auth_version );

paramstring = format + auth_consumer + nonce + auth_sig_method + auth_timestamp + version;

method = "GET";

base = encodeURIComponent( method ) + "&" +
encodeURIComponent( url ) + "&" +
encodeURIComponent( paramstring );

sig_hash = getSignature( consumer_secret+"&", base );
auth_sign = "&oauth_signature=" + sig_hash;

auth_url = url + "?" + paramstring + "&" + auth_sign;
myalert( ""+ auth_url+"");
return auth_url;
}
catch (err) {
alert( "Error " + err );
}
}

function getSignature(key, baseString) {
b64pad = '=';
var signature = b64_hmac_sha1(key, baseString);
return signature;
}



Simply access to getAlbum( user, album ) to get albums of the user, or getTags( url_the_media ) to get tags of the media.

Enjoy.

mercoledì 30 aprile 2008

SOA and AOP make Sense

The discussion about SOA, AOP and OOP in Carlo Pescio Blog, and the subsequent comment by Frank, pointed me out that a sample of Sense could be in help in understanding the way we are able to introduce AOP in SOA infrastructure and instrument an already existent infrastructure.


Actually we have a Sense presentation, called Mobile Workshop, that provides and demonstrate this features. The represented business case is very simple, and has the purpose only to demonstrate the power of Sense platform.

The Workshop: scenario
My editing team produces advertising messages, used to promote products. They create only the content, and the message is saved into a Repository, let's call it an XML database.

Inside my database data are represented in a way similar to:
<content id="1"><title>the title</title>
<description>
Christmas is coming, adopt a tree and leave it its natural environment.
</description>
</content>



Users can see and embed the xml simply via http get or through a webservice.

The xml database is a system already existent in my IT division, and is an external system that doesn’t contain specific logic. It’s a system we need to integrate to.

Business problem:
My business need is to enrich, without modification into the database, the content of that external system to provide a much better user experience. The client should receive the right user experience depending on the device used.

I know, there simply is much way to create HTML from and XML, this is only to introduce and demonstrate some concepts inside Sense platform.

Sense concepts:
Sense is a platform that is able to provide Service Level Agreement to software components (and not only).

Feeling:
Components installed in Sense can be defined to be:
  • internal - deployed and running in the Sense Platform
  • external - external systems, hardware or software, that provides data or logic in my business flow: for example a database server.

Sense is able to Feel external system through special type of connectors that provide Service Level Agreement and metrics, for the external device.

Example Feeling configuration:
<components>
<feeling name="feelCms" protocols="http" mapping="*/feelingExist/*">
...
<invoker class="com.moolidoo.sense.workshop.feeling.ExistFeeling" protocol="http">
...
<sla>
<transitions>
<transition from="HIGH" to="MEDIUM" when="">D{100}">
<transition from="MEDIUM" to="LOW" when="">D{200}">
<transition from="LOW" to="NO_SERVICE" when="">D{300}">
</transition>
<when threshold="NO_SERVICE">
<mock class="com.moolidoo.sense.workshop.feeling.mock.ExistMock">
</mock>


Emotions:
in Sense there is the concept of emotion. An emotion is a “piece of code” that the system call, when something happen and the purpose is to influence other components and the behavior of the system.

In our business case I’m going to use an emotion, bound to the Feeling, to instruments the output of the XML Database with the purpose to enrich the xml, and provide the HTML to customer.

Emotions can be conditioned, and in my sample, there is an emotion per device type, so the system can modify and produce the correct html per calling device.

Example Emotion configuration:
<emotionFilter name="BrowserHtmlLayout" >
<match value="eXistCms.biz" />
<condition expression="invocation:device=html" />
...
</emotionFilter>

<emotionFilter name="NokiaN95Layout" >
<match value="eXistCms.biz" />
<condition expression="invocation:device=NokiaN95" />
...
</emotionFilter>

In a such way, my Sense platform emits information and activates emotion, without change in the Process, based on the invocation device and on the innovated service.

The result is that an external device is Feel and governed in the system, on usage of that Feeling, sense emits Emotion that influence the system itself to provide a new behavior.



In Sense, thanks to concepts like Feelings and Emotions, we enable the developer to apply techniques AOP like to instruments SOA services. Services can be external and are not modified but can be Emotioned.

domenica 27 aprile 2008

Architetture 2.0

Architetture, pensieri.

Passato

In qualità di mentore/trainer/coach su vari progetti mi sono sempre rafforzato. Percepivo le architetture software come un "insieme di componenti, ognuno con un preciso scopo, al fine di risolvere un problema". La percezione era guidata principalmente dalle competenze tecniche, dalle scelte tecnologiche e poi dal problema da affrontare.
Tant'è che nella mia testa, quando si parlava di architetture, era naturale pensare alle infrastrutture JEE, che in qualche modo hanno tutti i componenti che servono per produrre il 90% dei software moderni. La presenza della tecnologia era così forte e preponderante, da poter (e riuscire a) giustificare l'adozione di componenti e tecniche anche se non indispensabili alla corretta soluzione del problema.

Dunque, le architetture le percepivo come la:
suddivisione logica, di componenti software,
hardware e di meccanismi di comunicazione,
al fine di ospitare la soluzione ad una richiesta.

Pensieri:
Ho sempre pensato che l'architetto software è diverso dall'ingegnere del software. La differenza ritengo stia nel fatto che:
  • l'ingegnere giunge alla soluzione, applicando spesso e voltentieri un metodo o una regola, conosciuta, definita e consolidata: si basa e resta nel campo del conosciuto.
  • l'architetto aggiunge alle regole, ai metodi, anche un po' di creatività.
    Ovvero cerca la soluzione utilizzando strumenti e tecniche anche che non gli appartengono, che non sono ancora imparati. La grossa differenza che percepisco è la "visione" per intraprendere una strada che è nuova, che porti alla soluzione e che porti innovazione.
Personalmente mi sono sempre sentito più architetto che ingegnere, sebbene non sia nessuno dei due. Ho sempre fatto fatica a spiegare le mie "soluzioni", perchè spesso derivavano da un modo non convenzionale e sopratutto hanno una parte "ignota" anche a me; cerco di trovare una via, nuova, stimolante e divertente.

Questa differenza mette in luce il fatto che l'architetto ha una visione più "aperta" della soluzione, con un margine ed un aggancio oltre il campo del conosciuto. Certo che la conoscenza cresce con l'esercizio e con il tempo, pertanto questo margine di ignoto, viene colmato dal tempo. E questo rafforza la mia visione di architetto, ovvero qualcuno in grado di dare "futuro" ad una soluzione. Una soluzione che avrà parti consolidate (e dunque vecchie dopodomani) e parti innovative (e dunque moderne dopodomani). Addirittura nelle proposte commerciali, definisco l'architetto un "Time Warp architect", in grado di estendere nel futuro e rendere moderna una soluzione di oggi, anche domani. Questo prevede sicuramente una grande flessibilità, visione, curiosità e sopratutto oggettività rispetto alla tecnologia.

Evoluzione, primo segnale:
Ora, con l'avvento del Social Web, il mio concetto di architettura, fortunatamente, sta di nuovo mutando.
Questa nuova percezione ed evoluzione non è ancora chiara e definita ed andrà a rafforzarsi e comporsi sempre di più con il passare del tempo.

Le architetture non sono solo un sistema di componenti con un ruolo ben preciso, ma sono anche un insieme di comunità, alle quali fornire, ed attingere idee e soluzioni.
La comunità diventa un componente, che estende il componente software, per promuoverlo ed estenderlo nel tempo.
Ora spesso penso, quando disegno una porzione di codice, di cercare supporto oltre che nello strumento anche in uno strumento con una comunità intorno, dalla quale attingere e fornire idee, soluzioni ed esperienze.
Probabilmente i prossimi diagrammi architetturali che produrrò, oltre che avere una suddivisione per componenti e ruoli, avranno anche un altro strato:
  • una suddivisione per comunità dove ogni comunità potrà essere legata ad un solo componente, oppure potrà spaziare in più componenti.

lunedì 21 aprile 2008

Daily Fight: railroad.

Today I need to get the whole picture of a rails application. I'm an old school man, I want papers with box, arrows and description to understand relationship between things.
Nowadays Rails guys, starts coding and usually doesn't produce any Diagram with all the stuff inside. I know, it's mine limit, I'm not able to read, remember, clarify and think on a rails statement like:

class User

  • has_many :friendship
  • has_many :mails
  • has_and_belongs_to_many : items

It is very readeable and of immediate lecture, but I need box and arrow on papers. The Rails community is very active, and a colleque of mine pointed me an old (two years old) gem that provide graphics. First impression was "bLeah, i like UML, this is not UML" ruby guys are so modern... After some reading I discovered diagrams are in Business Object Notation. Ok it is not so spread, but is a common way to describe concepts; an interesting point is that is embedded in Eiffel.

A quick search for BON with google produce "BonMagazine" or "Bonjovi" .
BON doesn't have the commercial success and consensum of UML.

To generate BON diagram i proceed in installing gem railroad. Installation works without any issue. Fast and easy.

Railroad generate files into the DOT format, so you need a particular graph visualization software to see diagrams "graphwiz".

This software provides a way to render railroad-dot files, into svg/ps/gif at your pleasure.
With this installation:
railroad, graphwiz package I'm able to generate graph for "models".


But I want also controllers.
Generating controllers need gem RMagick.
Gem RMagick need ImageMagic. Wow I need the entire WWW to generate a BON diagram!

I'm quite lucky, on my MacBook I have darwin port, ready to work for me, so:
sudo ./port install ImageMagick

It takes a lot, about 20 mins, to download and compile all the stuff to enable ImageMagic.

After successfully installing ImageMagic I can proceed with RMagic gem.
Before installing I need to set my $PATH with ImageConf.
export PATH=$PATH:/opt/local/bin/

ok, let's install rmagic:
gem install rmagick -- --with-opt-lib=/opt/local/lib/ --with-opt-include=/opt/local/include/ --with-opt-dir=/opt/local/bin/

After sucessfull installation, all went fine, no errors I use the irb to check the version of just installed gem and check if really works.
irb -rubygems -r RMagick
>> puts Magick::Long_version
This is RMagick 2.3.0 ($Date: 2008/03/29 15:23:12 $) Copyright (C) 2008 by Timothy P. Hunter
Built with ImageMagick 6.4.0 04/21/08 Q16 http://www.imagemagick.org
Built for ruby 1.8.6

Ok, all works fine, so test your railroad controllers generation:
railroad $* -l -i -a -C | dot -Tgif > controller.gif
railroad $* -l -i -a -M | dot -Tgif > model.gif

Task accomplished: Railroad generates my BON diagrams.
And now, let's start thinking...

venerdì 18 aprile 2008

The magic of Ruby and Rake.

Today is the first day, I ever used rake.

First of all, it's a bit different of other "make" system usally used, in which almost all task are defined within the file. Here I have *a huge* set of premade task, ready to work for me, without the hassole of writing a piece of rake file.

How do you get the list of available tasks ?
Easy. rake --task

Today my big concern was. How to populate an emtpy test/development database, with a lot of yml file and only one Rakefile, with no task inside.
After reading some infos i succeded in:

rake db:migrate
this will create and migrate you empty db, configured into database.yml, using your db/migrate ActiveRecord::Migration provided. Clearly the order is from the first, named 001_xxx.rb to the last.

After migrating all the db, you simply populate it with:
rake db:fixture:load
this works only if you have your "*.yml" files into test/fixtures, and I have been so lucky to have it. For each table you should have your .yml file that define and describe, in the Ruby way, each record.
Get more information about YAML fixture on http://ar.rubyonrails.org/classes/Fixtures.html

And today's task is accomplished. The homepage of my ruby application is ready.