Su Kataweb un interessante sondaggio sulle variazioni nella busta paga di Gennaio dovute alla finanziaria.
Confrontando la busta paga di gennaio 2007 con quella di gennaio 2006, calcolate voi stessi i primi effetti della riforma Irpef del governo con la Finanziaria 2007. Potrete inoltre vedere via via la media degli effetti mensili di quanti hanno risposto.
In this post I’ll introduce you to XMPP4MOZ, a Firefox add-on that adds XMPP protocol capabilities to the Firefox browser.
Since I’m new to this technology I’ll start from the very beginning of every good learning process: the “hello world” application, that in this case means a very simple 1 to 1 chat application.
Before you continue with this tutorial you need to install the XMPP4MOZ add-on, but I suggest that you install the complete SamplePlace suite that includes the XMPP4MOZ extension and some other nice add-ons (it has actually a very small footprint so don’t fear to install it).
Now we can create the HTML page that will be the main container of our Chat application.
Standard headers and title:
Then we need a place to put the username we’re talking to:
A place to visualize the messages:
And an input box that we use to write our own messages:
Then we need these special DIVs that will be used as a comunication gateway between XMPP4MOZ and the Javascript application, we’ll see later how:
And last, we’ll close the page:
Now we’re ready to write the Javascript code that will glue this page with the XMPP4MOZ extension, we can start by inserting a SCRIPT tag inside the page’s HEAD:
Our application will be defined as a single Javascript function that is called just after the BODY of the page is loaded, to do that we need to add this code between our SCRIPT tags:
And update the BODY tag to call the main function on the “load” event:
Now that we have our basic application we can add the real functionality.
As I anticipated above, we will use the xmpp-incoming and xmpp-outgoing DIVs to communicate with the XMPP4MOZ extension.
To let our application react on the incoming XMPP messages we need to attach to the DOMNodeInserted event of the xmpp-incoming DIV:
We also need a variable to store our current user data:
Our function will get an XML message passed trough the event object:
After we have parsed the XML we can react to the message:
First we want to grab the presence messages that will notify our application when a new peer connection is available.
The format of the message is
:
Then we need to grab the message messages that will notify our application when a new message is available.
The format of the message is
.
We will use the from attribute and the text inside the content tag to create the string that will be appended to the message log:
Then we can close the function that deals with incoming messages:
Now we can define the code that sends the messages. The logic is pretty much the same, when we want to send a message we will set the textContent property of the xmpp-outgoing DIV. XMPP4MOZ will send that text message to our peer application.
We will attach our message sending function to the click event of the Send button. This function will be much simpler since it just have to create the message XML and set the DIV content:
And finally we close the main chatInit() function:
And that’s all! If you want to see it work you need to login both you and your friend via Sameplace with your Jabber account, load the application and click on the Sameplace connect icon and you can chat!
If you need help on how to use the Samplace suite check on the Samplace suite page.
If you’re too lazy to cut&paste the code, you can look here.
Enjoy!
Qualcosa inizia a muoversi anche qui da noi, e se ne inizia a parlare, finalmente! Ricordo quando, ormai pi di un anno fa, con ChiaroScuro iniziammo a parlare di quello che avrebbe potuto essere la nuova onda web in Italia. E adesso eccoci qui, dopo The Ruby Mine e Nimboo e tante cose a bollire in pentola.

Qualche ora fa stato annunciato ufficialmente l’Apple iPhone: un iPod, un telefono cellulare, una fotocamera digitale ed un browser web, tutto in un unico device.
Gizmodo, il noto blog sui gadget tecnologici, sembra il primo ad aver pubblicato una coverage live della presentazione ufficiale dal MacWorld.
Ecco i primi video dell’interfaccia: video dell’album fotografico iPhone, video di una chiamata vocale dall’iPhone, video dell’interfaccia di gestione degli album musicali sull’iPhone.
Il telefono (o iPod o fotocamera) non ha tasti ne pulsanti, l’unica interfaccia uno schermo da 160dpi sensibile al multitouch e dotato di un sensore giroscopico (come il MacBook).
Saranno disponibili due versioni, un iPhone da 8GB a $599 e un’altra versione a 4GB che dovrebbe essere attorno ai $499.
Sfortunatamente pare che inizialmente il telefono sar bloccato per poter essere utilizzato solamente con l’operatore statunitense Cingular e verr lanciato ufficialmente a Giugno.
E intanto Apple fa +8.40% sul NASDAQ.
Update: Apple ha lanciato il sito ufficiale per iPhone.