Posts

on AIR Tour Europe 2008

[fa:p:id=2544034195,j=l,s=t,l=p] I was there! In Stockholm of course! In the last few months I've been working with Flex so now it was time to check what Air was about. I really like flex and I've already learned a lot of it. I just need a more concrete project to work on. Do you need any flex consultant? (Söker du en flex konsult?)

Easier Flexunit configuration

I wrote an utility class to simplify the configuration of a flexunit testsuite. All methods starting with "test" are added automatically as test cases when the suite is created in the following way: [source:js] private function createSuite():TestSuite { var ts:TestSuite = new TestSuite(); ts.addTest( ReflectiveTestCase.suite(SelectItemCommandTest)); return ts; } [/source] The ReflectiveTestCase uses reflection to read all "test" methods. In this way you will never forget to add your tests to the suite! [source:js] package mypackage { import flash.utils.describeType; import flexunit.framework.TestSuite; public class ReflectiveTestCase extends TestSuite{ public function ReflectiveTestCase() { } public static function suite(clazz:Class) : TestSuite { var ts:TestSuite = new TestSuite(); var methods:XMLList = describeType(clazz).factory.method.@name; for(var i:int =...

AFS Sweden, 60 years

[fa:p:id=2470832441,j=l,s=s,l=p]Come passa il tempo, 3 anni fa ho avuto la possibilità di fare il volontario il cinquantenario, quest'anno al sessantenario! Impazzito? No!Da qualche anno ormai mi sono trasferito in Svezia (tutta colpa di Intercultura che nel '95 mi spedì in Danimarca facendo nascere in me la passione per la Scandinavia).E fu proprio durante il viaggio da Stoccolma verso la festa di Torino in cui il passeggero seduto al mio fianco aprì la sua cartellina per dare un ultimo sguardo all'invito ricevuto per la festa del cinquantenario. Quell'uomo era Anders Fernlund, tuttora portavoce di AFS Sweden, il quale mi aprì la strada verso una "nuova" associazione ma con lo stesso nome e gli stessi principi. Da allora mi vanto di essere iscritto alle associazioni di entrambi i paesi e grazie a Quick vengo aggiornato sulle novità di Colle e non solo. Ieri, 26 aprile, AFS Sweden ha festeggiato 60 anni di attivitá e ho avuto l'onoro di lavorare all'or...

Deploying Flex application with no dependency on context root

It seemed very strange to me that in FlexBuilder you have to tell the context on which a flex application using LiveCycle Data Services will be deployed. FlexBuilder requires you to fill in the "Context Root" variable which will be then saved inside .flexProperties as serverContextRoot . You may want to deploy the same application to different contexts and you don't want to compile each of them separately. Fortunately, you can override the  endpoint value of the RemoteObjects with any value. In my case, I set endpoint="../messagebroker/amf" since my main sfw file resides in a directory called client

Varicella

Image
Last week I got 30, and I also got chicken pox. My mother was sure I had already got it when I was very young. She was definitely wrong. I actually thought about publishing a picture of me while infected but then I thought that my reputation could be seriously hurt by such a thing. Now I have definitely something in common with my little god daughter Stella, since it was her that gave me the infection on her 1st birthday party. I imagine myself in a few years telling her stories about my youth and about how we are linked together by stuff in our blood :-D I first saw some bubbles on my body last Sunday (day 1) and it was not hard to check on the internet that those bubbles really looked like chicken pox. But my mother had told med... I was immune! I slept very little that night and in the morning a doctor confirmed that I had been infected (it is called vattkoppor in Swedish) The first two days were not bad, no itchy at all and not so many bubbles, mainly in the neck and in the head....

Look...I'm on the news

Image
An article on Cap&Design, about our filecentral

Unit testing with Javascript

I’m a big fan of unit testing. Everybody who has been working with me knows it. Unit testing makes you sleep well at night. If you have not understood the advantage of unit testing your code you should really try to do it! Lately I’ve been working a lot with Javascript for obvious reasons. Ajax is very hype and if more and more websites require a deep knowledge of the Javascript secrets. Javascript is not hard but some common mistakes can make your development a pain. Projects get larger and larger and you really need to have good tools to help you not having to pray every time you make a small change. I will not try to convince you to test your code (maybe I will try in an other article) but I will show you a couple of tricks I use when testing my code. To run the unit tests I use jsUnit which is a port of the famous jUnit. It is pretty simple to install and if you have used jUnit you basically know how to use it. Javascript is a dynamic language. It means that you can change the pr...