Wednesday, April 07, 2004



What the heck is Channel 9? Channel 9 went online yesterday... Check it out.


main
4/7/2004 9:04:50 PM UTC  #  Comments [17] 
NDC next week

 

   The Microsoft North Africa Developer Conference is great stuff. I am not saying so because I am part of the organizing team, but hey, where can you get this great line up of speakers, and still get in for free (even if you are located somewhere else than north Africa, if you don"t speak french, 30 sessions in english), and if you speak French, 48 sessions (The English language session have simultaneous translation into French), covering pretty much the content of a PDC style conference, for just the cost of T&E...

   If you are in doubt (I wouldn't forgive you if you live in North Africa...), just look at the schedule at http://www.microsoft.com/northafrica/ndc//NDC_agenda.asp and at the speakers list at http://www.microsoft.com/northafrica/ndc//NDC_speakers.asp

   Off course I am doing 4 sessions (Secure Coding techniques, Cryptography in .Net, Compact Framework - I go deep into the telephony API, and an intro to Avalon), but don't come to the conf just for my sessions, there are speakers you wouldn't get a chance at seeing unless you go to some expensive seminar or conference like Clemens Vasters, Scott Hanselmann, Stephen Forte, Ingo Rammer, Sylvain Duford, Yann Faure, Andrew Brust, Eric Groise, Goksin Bakir, and others (sorry for the order and for anyone I have not mentioned) ...

   This confenerence is pretty much the only event still having so much content both on current technologies and future technologies (Whidbey, Yukon and Longhorn are all covered). If you really are not convinced by now, I will see you at some conference somewhere, whre you'll paying a lot to get just the info you could have gotten here for free... It is all up to you...


main | speaking
4/7/2004 5:44:00 AM UTC  #  Comments [8] 

  Tuesday, April 06, 2004

Séparation entre code et contenu : XAML ...

   Je me rappelle que, il y a quelques années, je me demandais pourquoi la plus grande partie des applications client riche avait un design très peu flatteur, alors qu'on retrouve du design bien plus poussé dans les applications Web. Cela ressemblait à une contradiction, puisque sur le client riche on dispose de beaucoup plus de moyen pour bien exploiter les capacités graphiques de la machine que dans un browser.

   J'avais à l'époque passé un peu de temps avant de me rendre compte (je suis peut être un peu stupide sur les bords?) que c'était parceque le modèle de développement n'était pas du tout le même. Sur les applications Web, les designers s'occupent de créer la charte graphique, et les développeurs s'attellent à ne créer que les fonctionnalités dynamiques (accès aux bases de données, traitement des interactions utilisateur, validation, ... etc). Ce qui m'avait pris un temps de réflexion était le pourquoi, avant de me rendre compte que c'était facile de créer des applications de design qui générent du code, mais qu'il faut encore que le code qui gère l'affichage soit séparé de celui qui gère les aspects dynamiques, et que HTML remplissait ce rôle. Je savait pertinament qu'il n'était pas facile de dépasser les fonctionnalités de HTML (temps pour normaliser, temps pour implémenter les nouvelles normes, puis temps pour que cette nouvelle norme soit supportée par la majorité des browser) et que cette opération prennait des années.

   Quand XML est arrivé, on pensait que c'était un bon moyen pour que, sur le Web au moins, on puisse créer du code qui exploiter facilement toutes fonctionnalités nouvelles des nouveaux browsers sans pour autant perdre la compatibilité avec les browsers ancien (différents XSLT en fonction du UserAgent). D'ailleur, on pouvait aussi imaginer que les applications client riche utilisent le même modèle en basant la génération dynamique de l'affichage sur du XML. Le problème restait que l'affichage était cintrolé par le XSLT, et donc que c'était aux développeurs de le traiter et non pas aux designers... et donc le modèle en entier cassait.

   Aujourd'hui, nous avons enfin un modèle qui permet de séparer réellement le code du contenu, que ce soit dans des applications client riche ou lèger, et ce modèle se base sur une forme de XML appellée XAML (Extended Application Markup Language). Ce modèle à été conçu par Microsoft dans le cadre de la refonte du sous système de présentation de Windows qui fera partie de Windows "Longhorn" (prévu pour 2006). Ce qui est intéressant dans ce modèle, c'est qu'il offre un modèle semblable à HTML, sauf qu'il est utilisable sur tout type de client, et que le code n'a pas a être mélangé dans le HTML (même plus que ce n'était le cas avec ASP.Net).

   Le principe est très simple :

  •  Le code déclaratif (XAML) permet  une utilisation très riche des possibilités graphgiques (contrôles, documents, médias, transparence, effets, animlations, transformations ..etc). il est donc possible de faire des designs impresionnant avec XAML (ce que Adobe a très vite compris et a commencé à préparer des applications de design basées sur XAML). Ce code sera utilisé par le compilateur comme une classe partielle complètée par le la classe qui est dans le code (sans avoir à ajouter des balises ou quoi que ce soit)
  • Le code fait en langage de développement qui constitue une classe partielle complétée par le XAML.

   Même si ce modèle fait partie de Windows Longhorn, on peut d'ors et déjà l'utiliser à travers les outils tels que Xamlon (interprétation du XAML en runtime, et code behind dans un code séparé) et les divers générateurs XAML qui permettent de transformer des documents Illustrator ou After Effect (ou autres) en XAML. Les résultats sont impéssioanants...


.Net | main
4/6/2004 11:57:08 AM UTC  #  Comments [15] 

  Thursday, April 01, 2004

Globalization and getting the Months right (Arabic Morocco)

The follwing code is in C# (easy to convert to VB.Net)... Have fun :

 

using System;

 

namespace Malek.Globalization

{

   /// <summary>

   /// Summary description for CultureInfo.

   /// </summary>

   public class CultureInfo : System.Globalization.CultureInfo

   {

      public CultureInfo(int culture) : base(culture)

      {

         setValidDateTimeFormat();

      }

      public CultureInfo(int culture, bool userOverride) :    base(culture, userOverride)

      {

         setValidDateTimeFormat();

      }

      public CultureInfo(string culture) :    base(culture)

      {

         setValidDateTimeFormat();

      }

      public CultureInfo(string culture, bool userOverride) :    base(culture, userOverride)

      {

         setValidDateTimeFormat();

      }

 

      public static new CultureInfo CreateSpecificCulture(string culture)

      {

         return new CultureInfo(culture);

      }

//      private System.Globalization.DateTimeFormatInfo base.DateTimeFormat;

 

      private string[] MoroccoMonthNames= new string[]{"يناير", "فبراير","مارس","أبريل","ماي","يونيو","يوليوز","غشت","شتنبر","أكتوبر","نونبر","دجنبر",""};

 

      private void setValidDateTimeFormat(){

         if (Name.ToLower()=="ar-ma")

         {

               System.Globalization.DateTimeFormatInfo dtfi = (System.Globalization.DateTimeFormatInfo)base.DateTimeFormat.Clone();

               dtfi.MonthNames=MoroccoMonthNames;

               dtfi.AbbreviatedMonthNames=MoroccoMonthNames;

               dtfi.AbbreviatedDayNames=dtfi.DayNames;

               dtfi.ShortDatePattern="dd/MM/yy";

               dtfi.LongDatePattern="dddd dd MMMM yyyy";

               DateTimeFormat= dtfi;

         }

      }

   }

}

 

 

 


.Net | Csharp | main
4/1/2004 9:58:37 PM UTC  #  Comments [0] 
Changes to C# announced

Dan Fernandez and Eric Gunnerson from the C# team have both disclosed today in their blogs some of the latest changes that will be made to the C# language in its next version (part of Visual Studio 2005). It seems those changes are made for legal reason, to comply with the FCLC commission rules.

While Dan speaks about some of the System.String changes, Eric writes about some of the keyword changes. While I love the new level of intimacy C# is getting into, I am afraid it will be quite difficult to migrate current code into the new version, and there will be no wizards nor clear migration path. Here are some examples of how current code translates to the new version :

  • string str = "my 69 year old grand father" --> [Decent, FCLCCompliant] string str = "my (d) 69 year old grand father"  //I used (d) instead the new decency symbol
  • the following code :

protected void Button1_Click(object sender, EventArgs e)

{

SqlCommand cmd = new SqlCommand("Select * from Users Where userName='"+textBox1.Text"' AND password='"+textBox2.Text+"'", myConnection);

if (cmd.ExecuteReader().HasRows) authenticated=true;

...

}

translates into something like :

stupid dangerous void Button1_Click(object sender, EventArgs e)

{

[PtentialObsenity()]SqlCommand cmd = new SqlCommand("Select * from Users Where userName='"+textBox1.Text"' AND password='"+textBox2.Text+"'", myConnection);

if (cmd.ExecuteReader().HasRows) authenticated=true;

...

MessageBox.Show("April Fools, thanks for reading this far");

}


.Net | C# | main
4/1/2004 9:15:45 PM UTC  #  Comments [14] 

  Tuesday, March 30, 2004

Speaking at TechEd San Diego

I have just received confirmation I will be doing two "Meet the Technologist" sessions at TechEd in San Diego (May 24-27) :

1.Designing and writing interoperable Services: the Contract First approach

2.Writing Compact Framework applications for SmartPhones that take advantage of telephony and messaging APIs

If you are at TechEd, check out my sessions. If you have not registered yet, click the techEd button below to register. If you can't be there, I will be blogging about the event here...

 


main | speaking
3/30/2004 10:57:16 AM UTC  #  Comments [8] 

  Monday, March 22, 2004

What the heck is channel 9

What the heck is Channel 9? What is this stuff ??? Stay tuned, this is something great... coming soone
main
3/22/2004 9:38:02 PM UTC  #  Comments [15] 

  Friday, March 12, 2004

Terror has no citizenship, no religion, no land ... and should be fought by all !

   What happened yesterday in Madrid was terrible, and I feel the same I felt when there were terrorist attacks in Casablanca, New York and Washington, Istambul, ...etc. While the sorrow is the same, I found it ridiculous when the media started discussing who did it, and commented on the possibility of it being an "Al Qaeda" attack as being a "retalliation" for the war in Iraq... Some even went to discuss whether Spain had ennemis in the Arabic or Islamic world...

   I don't care if it was ben laden and his psychopaths that did it, or if it is the criminals of ETA ... Those guys have killed innocent civilians, and that is not what an "ennemi" does. It is, however, exactely what criminals and psychopaths do... I don't care what nationality were the people that were killed or hurt, I only need to know they are innocent civilians taking the subway to work, walking in the streets. I feel the same when israelis are hurt while on a bus or in a coffe shop, when palestians die at home because someone who is targeted by the israeli army lives next door or was driving on the street near by, when Turkish people are hurt while walking by a bank, Australians while sunbathing in a beach resort, Americans while at work, Moroccans while they are entering a Hotel, ...etc.

    This doesn't mean I agree with what politicians and militaries around the world are doing. I believe that zionism is bad (the same way any movement that bases itself on ethnicity or religion is bad), that the actual American government is totally wrong in what it is doing around the world (it is not democratic by any criteria to decide what the whole world should do and be elected by a single part of the world. That divides the people of the world and highers hatred between nations). I believe that the British, the Spanish and Italian governments were wrong in their support of Bush for the war in Iraq, and that at the same time Saddam Hussein needed to be ousted, but the way it was done was wrong (Saddam should either have ousted by his people, or by the whole world). But I fail to see any realtion between whatever is done wrong by those politicians and the terrorists acts. I believe that humans are, in their majority, good people. I also believe that that is true of the majority of any single group of people, whether we look at geaographies, religions, ethinicity or whatever other criterium. The small groups of mentally insane people (whether they are politicians, activists or criminals) should very simply be fought by peaceful means, and the goodness of the majorities will always win in the end.

    Those who try to "put these acts into context" have better start thinking what all this means... Terror is terror, no matter what motivates it, and nice people don't kill innocent ones... No religion tolerates this, and no land wants it... We should all fight it, starting by not being silent, and by not tolerating anybody advocating any form of violence, be it for political, "patriotic", or religious excuses...

 


main | opinions
3/12/2004 6:36:44 PM UTC  #  Comments [17] 
NorthAfrica Developer Conference ... soon!!!

 

The greatest yet... The North Africa Developer conference this year features the future Microsoft technologies : Longhorn, Whidbey and Yukon, alongside the deep inside .Net development sessions covering most areas of interest for the developer, the software architect and the solutions decision maker... In this second edition of the NDC, we expect 1500 attendees at the 3 keynotes and 45 breakout sessions. Among the speakers, a strong Regional Directors presence including :

 

 


.Net | main | NDC
3/12/2004 9:35:13 AM UTC  #  Comments [1] 

  Tuesday, March 09, 2004

Going to Kansas City after 13 years ...

   

    When my friend and rock star speaker John Alexander told me that there was a conference on .Net in Kansas City in june, I didn't take a second before I wanted to be there ... So I return to the midwest as a conference speaker, after I left it when I was still a student 13 years ago.

   As some may know, I have spent a few years in Wichita, Kansas during my university years, and driving the 3 hours I needed to get to KC was a weekend habit (Actualy, I used to drive to Lawrence, KS to visit some friends at Kansas University on saturdays, and usually party out there, before heading to KC in the morning to spend my day over at Worlds of Fun and Oceans of Fun). But since I left Wichita in 1991, I have never been to any part of the Great Plains (except for about a week in Chicago in the 1996 - or was it 97 ?) ...

   Last week, one of my greatest friends (I call her my sister) that I have lost contact with for the last 12 years found me through google ... Off course lots of things happen in such a long time, and I am very happy to be able to see her.

    So, somehow, the midwest is calling ...


.Net | main | speaking
3/9/2004 8:54:50 PM UTC  #  Comments [13]