What’s coming for Leopard

leopard.jpg

All the fellowing informations are found in the WWDC 2006 state of she union conference that was firstmade available to ADC Online (registration is free) members the last week. Most of the items I’ll enumerate are not new for the ones that fellow the Apple actuality, but it’s good to see them all in one place and confirmed directly from Apple.

  • Not only the Unix layer but also the graphics, frameworks and Aqua are now 64 bits
  • New features to ease the use of multi-core machines (NSOperation & NSOperationQueue)
  • Objective-C will now have a garbage collection (the old reference counting can still be used)
  • Open-GL comes now in a multi-threaded fashion
  • Core Animation is improved with implicit animations and NSGridView (you have to see it to beleive it)
  • OS 10.5 will be resolution independant
  • Spotlight can now searche through the network
  • New system of preview that allows developers to chose what kind of preview a document should have (the same principle as for preview icons that are generated for pictures)
  • New system of help where not only the search explains you how to do things but also open the right menu for you
  • Time machine with its incremental backup

I must say that after looking at the video I wonder if I’m not goint to buy an ADC Select membership. I don’t know if Apple provide this video just to sell more ADC membership, if it was to make buzz around Leopard just when Vista is coming or for any other reasons that I can’t imagine, but I must admit that the quality of the stuff provided is amazing.

Appeler du code PHP via un JavaScript

Warning: WP_Syntax::substituteToken(): Argument #1 ($match) must be passed by reference, value given in /home/httpd/vhosts/spikesoft.ch/httpsdocs/wordpress/wp-content/plugins/wp-syntax/wp-syntax.php on line 380

A priori c’est une chose contre nature. En effet, le code php s’exécute sur le serveur alors que le javaScript s’exécute côté client. Si l’on considère un diagramme temporel on obtient le résultat suivant:
phpjs.jpg

La réponse à ce problème se nomme XMLHTTPRequest. Cette commande javascript permet d’appeler une page comme le ferait le navigateur et de retourner une valeur (numérique, html, xml, ou autre) à la fonction appelante.

function file(file) {
if(window.XMLHttpRequest) // FIREFOX
xhr_object = new XMLHttpRequest();
else if(window.ActiveXObject) // IE
xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
else {
alert("Your navigator does not support
XMLHTTPRequest. Please consider
using FirFox");
return(false);
}
 
xhr_object.open("GET", file, false);
xhr_object.send(null);
if(xhr_object.readyState == 4)
return(xhr_object.responseText);
else
return(false);
}

Le paramètre file est une URL qui contiendra par exemple un appel à une fonction PHP (http://www.monsite.com/date.php?param=valeur).

Pour de plus amples renseignements sur le sujet, je vous recommande d’aller lire Tout JavaScript.com

Météo

Depuis aujourd’hui, se trouve, dans partie droite du blog, un lien qui permet d’aller consulter la radar de pluie de MétéoSuisse. Normalement la seule image radar mise à disposition gratuitement par MétéoSuisse a toujours un décallage d’une demi-heure avec le temps actuel. Le site de LANDI, quand à lui, propose une image en temps réel et animée, ainsi que la possibilité de remonter dans le temps pour avoir la situation pluviométrique suisse de n’importe quelle période. Le principal défault de la page de LANDI est que elle est remplie de publicités pour cette société. J’ai donc repris l’essentiel du code de la page auquel j’ai retiré toute publicité pour obtenir la page du blog. Hormis ce nettoyage de la page j’ai ajouté le possibilité de choisir une plage de temps suppérieure à un jours dans les archives et j’ai forcé l’animation à boucler. Avec cette page ainsi que le décodeur de METAR, je pense proposer sur le blog un bon apperçu météorologique du temps en Suisse.