<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Aline's Tech Blog</title>
	<atom:link href="http://techaline.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://techaline.wordpress.com</link>
	<description>All my geekness is here :-)</description>
	<lastBuildDate>Thu, 04 Dec 2008 19:38:16 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='techaline.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/391ce96d015808cf1c4d8452659be8ba?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Aline's Tech Blog</title>
		<link>http://techaline.wordpress.com</link>
	</image>
			<item>
		<title>First steps with LINQ</title>
		<link>http://techaline.wordpress.com/2008/12/04/first-steps-with-linq/</link>
		<comments>http://techaline.wordpress.com/2008/12/04/first-steps-with-linq/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 19:36:34 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[Databases]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[Object-oriented]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=61</guid>
		<description><![CDATA[Last week, I had to think about LINQ for my project at work, and I discovered all the power of this framework. I didn&#8217;t go further than a very basic sample demo. Here are my first thoughts about this technology, after only a few hours surfing the net and trying a little things. (forgive me [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=61&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week, I had to think about LINQ for my project at work, and I discovered all the power of this framework. I didn&#8217;t go further than a very basic sample demo. Here are my first thoughts about this technology, after only a few hours surfing the net and trying a little things. (<strong>forgive me for my mistakes and lack of experience</strong>, though.)</p>
<h1>A powerful Database-to-classes mapper</h1>
<p>Several possibilities:</p>
<ol>
<li>You are using an existing database or you prefer designing your database before your object model: Create a new SQL connection in Visual Studio 2008 and drag-n-drop your database in a new DBML file&#8230; That&#8217;s all, everything is done and you can manipulate objects.</li>
<li>You are starting a new project&#8230; you will work with only 1 model / diagram: the DBML file.</li>
</ol>
<p>Something which could be useful if you want to create a database from the DBML : The <strong>db.CreateDatabase()</strong> feature. But <a href="http://csainty.blogspot.com/2008/02/linq-to-sql-be-careful-of.html">be careful, as he says</a>.</p>
<h1>An easy and secure way to query data</h1>
<p>Here you cannot forget a string query somewhere. You write your query using visual studio Intellisense, you cannot make mistakes&#8230;</p>
<h1>Easy to use, fast, smart&#8230; magic!</h1>
<p>In 5 minutes the mapping, the data abstraction is done. So easy. Nothing else to do. I think if I was designing a new project now, I would not hesitate.</p>
<p>LINQ allows anyone to have a good structure in his application by creating an adaptable data access layer.</p>
<h1>Limits</h1>
<h2>Full-Microsoft&#8230; Again</h2>
<p>What I only found about LINQ was LINQ to SQL (understand MS SQL SERVER) and LINQ to XML. Nothing for other database management systems for the moment.</p>
<h2>Not serializable</h2>
<p>This can look like a minor problem, but the LINQ tables and data is not serializable. And then, <strong>no .NET remoting </strong>with LINQ! But of course, the new .NET 3.5 WCF framework works with it.</p>
<p>I&#8217;d like to make further topics about LINQ. Probably 1 sample demo explained, and LINQ vs NHibernate.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=61&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/12/04/first-steps-with-linq/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>Micro$oft Technet Days à Lyon</title>
		<link>http://techaline.wordpress.com/2008/11/07/microoft-technet-days-a-lyon/</link>
		<comments>http://techaline.wordpress.com/2008/11/07/microoft-technet-days-a-lyon/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 22:05:54 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[team]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=55</guid>
		<description><![CDATA[Petit compte-rendu de ce que j&#8217;ai vu d&#8217;intéressant aux microsoft Technet Days, qui avaient lieu à Lyon les 29 et 30 octobre.
Pour connaître toutes les nouveautés qui ont été annoncées  (et donc qui nous ont été rapportées à Lyon) à la grande messe microsoftienne, la &#8220;PDC&#8221; de Los Angeles, c&#8217;est chez Jerem que ça [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=55&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Petit com<a href="http://techaline.files.wordpress.com/2008/11/microsoft-in-tela.jpg"><img class="alignright size-medium wp-image-56" title="Microsoft" src="http://techaline.files.wordpress.com/2008/11/microsoft-in-tela.jpg?w=300&#038;h=200" alt="Microsoft" width="300" height="200" /></a>pte-rendu de ce que j&#8217;ai vu d&#8217;intéressant aux microsoft Technet Days, qui avaient lieu à Lyon les 29 et 30 octobre.</p>
<p>Pour connaître toutes les nouveautés qui ont été annoncées  (et donc qui nous ont été rapportées à Lyon) à la grande messe microsoftienne, la &#8220;PDC&#8221; de Los Angeles, c&#8217;est <a href="http://www.japf.fr/?p=23">chez Jerem</a> que ça se passe !</p>
<p>Pour ma part je parlerai de ce qui paraît bien fait dans l&#8217;environnement de développement Microsoft, là où ils ont une longueur d&#8217;avance (à mon avis). Voici, dans l&#8217;ordre, un tour d&#8217;horizon des conférences auxquelles j&#8217;ai eu la chance d&#8217;assister.</p>
<h1>L&#8217;Accès aux données</h1>
<p>Cette partie montrait des manières d&#8217;accéder à des sources de données &#8220;proprement&#8221; (mapping, librairie d&#8217;objets, abstraction de la base de données, couche d&#8217;accès aux données, tout ça).</p>
<p>Pour l&#8217;instant, j&#8217;utilise <a href="http://www.hibernate.org">NHibernate</a>, parce qu&#8217;en 2006 quelqu&#8217;un avait trouvé ça sympa.</p>
<p>Aujourd&#8217;hui, j&#8217;ai découvert la facilité d&#8217;accès de LINQ, la technologie de mapping de chez Microsoft. LINQ est totalement intégré à visual studio, et permet d&#8217;&#8221;oublier&#8221; complètement la source de données.. Tout en faisant des &#8220;requêtes&#8221;, ce qui permet une grande maniabilité. On oublie les &#8220;.hbm.xml&#8221;, fichiers &#8220;de mapping&#8221; de NHibernate qui permettent la correspondance objet/classe.</p>
<p>J&#8217;ai hâte de trouver quelques minutes pour essayer ça.</p>
<p>On a aussi entendu parler de Entity, un truc tout nouveau (j&#8217;ai pas compris grand chose, sujet classé dans ma &#8220;A Creuser&#8221;-list) plus proche de la base, qui semble être une alternative à LINQ.</p>
<h1>Plénière Développeurs</h1>
<ul>
<li>&#8220;on a inventé un .NET Embarqué, si si ça va marcher on vous jure&#8221;</li>
<li>&#8220;Microsoft est un standard, on devient de + en + standards. Tenez, par exemple, la norme <a href="http://www.zdnet.fr/actualites/informatique/0,39040745,39380140,00.htm">OOXML</a>&#8220;</li>
</ul>
<p>No Comment&#8230;</p>
<h1>Visual Studio Team System &amp; Team Explorer</h1>
<p>De nombreux outils permettent de gérer le projet de développement logiciel de A à Z, en intégrant au code des tests manuels, des tests de couverture, unitaire, la documentation associée, l&#8217;analyse du code, la liste des fonctionnalités, des métriques, des pages web, et tout ce dont on peut avoir besoin. En plus de ça, Team Enterprise permet de mettre en place l&#8217;intégration continue, et la gestion de la solution de manière bien meilleure que SourceSafe (en même temps y&#8217;a pas de mal).</p>
<p>Ici on a parlé d&#8217;agilité. L&#8217;outil visual studio 2008 semble contenir des outils très adaptés pour la gestion de tels projets.</p>
<h1>Silverlight</h1>
<p>Visual Studio 2010 permettra beaucoup plus de facilité dans le développement d&#8217;applications Silverlight et wpf.</p>
<h1>Solutions Online/Offline avec SQL Server 2008</h1>
<p>Un Microsoft geek (comprendre: un geek mais bien sapé et qui a une copine) complètement à fond nous a démontré qu&#8217;en 1h30 (1h45&#8230;) il était possible de créer très facilement une solution online/offline avec synchronisation des données grâce à SQL Server 2008 et son intégration avec Visual Studio.</p>
<p>Démo très intéressante avec un PDA et un PC. Ca aussi il va falloir le regarder de plus près.</p>
<h1>Offre décisionnelle Microsoft</h1>
<p>Plein d&#8217;outils pour faire des rapports et de l&#8217;analyse de données existent&#8230;</p>
<p>j&#8217;ai noté &#8220;Report Builder&#8221;</p>
<p>Après, la &#8220;BI&#8221; (Business Intelligence), c&#8217;est pas encore mon domaine.</p>
<p>En conclusion, ces 2 demi-journées ont été pleines d&#8217;informations concrètes, de qualité. Je ne m&#8217;attendais pas à aussi bien. J&#8217;ai plein d&#8217;informations à chercher pour essayer de faciliter les développements.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=55&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/11/07/microoft-technet-days-a-lyon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>

		<media:content url="http://techaline.files.wordpress.com/2008/11/microsoft-in-tela.jpg?w=300" medium="image">
			<media:title type="html">Microsoft</media:title>
		</media:content>
	</item>
		<item>
		<title>Notes Agile Tour Valence</title>
		<link>http://techaline.wordpress.com/2008/11/05/notes-agile-tour-valence/</link>
		<comments>http://techaline.wordpress.com/2008/11/05/notes-agile-tour-valence/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 18:38:50 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agiletour]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=53</guid>
		<description><![CDATA[Cet article n&#8217;est pas comme l&#8217;autre&#8230; Pas le temps en ce moment d&#8217;écrire une grosse réflexion sur tout ce que j&#8217;ai pu entendre à Valence. En plus, ça commence à faire longtemps !
D&#8217;une manière générale, on a encore appris plein de choses en ce jour du 23 octobre. Et surtout j&#8217;ai adoré l&#8217;organisation au top [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=53&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Cet article n&#8217;est pas comme l&#8217;autre&#8230; Pas le temps en ce moment d&#8217;écrire une grosse réflexion sur tout ce que j&#8217;ai pu entendre à Valence. En plus, ça commence à faire longtemps !</p>
<p>D&#8217;une manière générale, on a encore appris plein de choses en ce jour du 23 octobre. Et surtout j&#8217;ai adoré l&#8217;organisation au top (avec un ManuChenu en pleine forme !) qui a rendu l&#8217;après midi très efficace, sans temps mort, et surtout sans un seul blabla inutile. (un prochain article parlera des Microsoft Days, c&#8217;était pas pareil)</p>
<p>Bon, voilà simplement ce qu&#8217;il y avait écrit sur mon petit bloc notes agiletour&#8230; A savoir : <span style="color:#ff6600;">les trucs qui m&#8217;ont interpellée</span>, <span style="color:#800080;">les sujets à creuser</span>, et <span style="color:#008000;">les trucs qu&#8217;il faudrait qu&#8217;on fasse</span>.</p>
<h1>Spécifieurs et artistes</h1>
<p>Je n&#8217;ai rien noté car c&#8217;était un atelier. Ce que j&#8217;en retiens c&#8217;est que la communication entre les spécifieurs et les développeurs (j&#8217;ai beaucoup aimé le parallèle avec &#8220;artistes&#8221; d&#8217;ailleurs) est très difficile dans la plupart des cas, et que la solution qui paraît la plus évidente c&#8217;est bien de la communication et de la collaboration fréquente et facile entre les 2 entités. (et donc on démontre que l&#8217;agilité c&#8217;est tout naturel. Ben oui&#8230;)</p>
<h1>Retour d&#8217;expérience Yahoo! international</h1>
<ul>
<li>Avant d&#8217;essayer quoi que ce soit, il faut <span style="color:#008000;">obtenir l&#8217;amont du management.</span></li>
<li><span style="color:#800080;">Aider l&#8217;équipe Produit à faire le backlog</span>. Dans le cas du retour d&#8217;expérience de Monsieur Boutin, 3 jours de dialogue ensemble.</li>
<li>Les métriques&#8230; Je voulais chercher à quoi ça correspondait, <a href="http://www.agilex.fr/2008/11/du-bon-usage-de-la-velocite/">il suffisait d&#8217;attendre un peu <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </a></li>
<li><span style="color:#ff6600;">Approche &#8220;framework&#8221; pour laisser la porte ouverte au choix de la &#8220;gestion de projet&#8221; / pratique. Standardiser les pratiques logicielles n&#8217;est pas incompatible avec les pratiques actuelles. <span style="color:#000000;">&#8211;&gt; c&#8217;est étonnant, mais quand je relis, j&#8217;ai du mal à comprendre =)</span><br />
</span></li>
<li>Petite pensée qui n&#8217;a rien à voir:<span style="color:#008000;"> penser à faire des &#8220;burndown charts&#8221;</span></li>
</ul>
<h1>Le Refactoring</h1>
<p>*waouh, complètement bluffée par les outils de refactoring utilisés dans cette démo !*</p>
<ul>
<li>C&#8217;est quoi ? du remaniement (ça fait plus classe que &#8220;nettoyage&#8221;, le terme qu&#8217;on utilise chez nous). Changer la structure du code pour en faire apparaître la conception, et donc pour qu&#8217;on soit capable de le partager ou de le faire lire à quelqu&#8217;un.</li>
<li>Un grand principe de XP qui rend le refactoring incontournable : <span style="color:#800080;">&#8220;Chaque chose ne doit être exprimée qu&#8217;une fois&#8221;</span>.</li>
<li>Refactoring vs documentation. Eh oui, je l&#8217;ai toujours soutenu et voici une preuve, Les commentaires qui redisent exactement ce que fait la fonction alors qu&#8217;elle est bien écrite et qu&#8217;elle utilise des identifiants explicites, <strong>ça sert à rien !!!</strong></li>
<li><a href="http://www.uispec4j.org">http://www.uispec4j.org</a> (pas encore eu le temps d&#8217;aller voir).</li>
</ul>
<h1>Crystal &#8211; méthodologie du jeu coopératif</h1>
<ul>
<li>Contexte de ce retour d&#8217;expérience:
<ul>
<li>Beaucoup de facteurs de découverte</li>
<li><span style="color:#800080;">Industrie</span></li>
</ul>
</li>
<li>Alistair Cockburn est à l&#8217;origine de Crystal</li>
<li>Idée générale: 1 projet = 1 méthode de dev différente. Même si toutes les méthodes ont le même &#8220;code génétique&#8221;:
<ul>
<li>théorie</li>
<li>propriétés</li>
<li>stratégies</li>
<li>techniques</li>
</ul>
</li>
<li>2 objectifs: 1) livrer, 2) être prêts pour après (doc&#8230;)</li>
<li><span style="color:#008000;">L&#8217;information est un parfum</span></li>
<li><span style="color:#ff6600;">Quitte à ne pas faire tout dans XP, autant savoir lesquels faire et pourquoi.</span></li>
<li><span style="color:#ff6600;">Miyamoto Musachi, Samurai</span></li>
</ul>
<p>Voilà, un compte-rendu peu exhaustif, mais qui reflète ce que j&#8217;ai retenu.</p>
<p><span style="color:#ff00ff;"><strong>Vivement l&#8217;édition 2009 !</strong></span></p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=53&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/11/05/notes-agile-tour-valence/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>Les sociétés de service et leurs techniques de séduction de recrutement</title>
		<link>http://techaline.wordpress.com/2008/10/18/les-societes-de-service-et-leurs-techniques-de-seduction-de-recrutement/</link>
		<comments>http://techaline.wordpress.com/2008/10/18/les-societes-de-service-et-leurs-techniques-de-seduction-de-recrutement/#comments</comments>
		<pubDate>Sat, 18 Oct 2008 15:16:12 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[job]]></category>
		<category><![CDATA[entretien]]></category>
		<category><![CDATA[recrutement]]></category>
		<category><![CDATA[SSII]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=47</guid>
		<description><![CDATA[Voici une petite anecdote que m&#8217;a envoyée un copain de promo. Ayant aussi eu pas mal d&#8217;appels au moment où je cherchais un boulot (même si pour moi, bizarrement, c&#8217;était plutôt des charmants jeunes hommes au téléphone&#8230;), je pense que c&#8217;est très significatif de ce à quoi on est exposés en tant que jeunes diplômés [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=47&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Voici une petite anecdote que m&#8217;a envoyée un copain de promo. Ayant aussi eu pas mal d&#8217;appels au moment où je cherchais un boulot (même si pour moi, bizarrement, c&#8217;était plutôt des charmants jeunes hommes au téléphone&#8230;), je pense que c&#8217;est très significatif de ce à quoi on est exposés en tant que jeunes diplômés !</p>
<p style="text-align:justify;">J&#8217;ai enlevé les noms de ville et d&#8217;entreprise.</p>
<p style="text-align:justify;">Merci beaucoup à lui pour ce témoignage !</p>
<p style="text-align:justify;">
<blockquote><p>Aujourd&#8217;hui et hier, j&#8217;ai rencontré 2 SSII, la SSII A et la SSII B, qui devaient me présenter toutes les deux à leur client. Le truc fort et que je ne savais pas, c&#8217;est qu&#8217;elles sont arrivées à me présenter toutes les deux au même mec. Je &#8220;double&#8221; mes chances pour le poste, mais eux et moi se retrouvent dans une situation assez bizarre.</p>
<h1>TECHNIQUE SSII A</h1>
<p>Le mec de la SSII A fait appel à mon éthique d&#8217;ingénieur comme quoi la SSII B avait pas été réglo, me dit que eux ils sont mieux positionnés dans le domaine système et m&#8217;annonce qu&#8217;il ne fera pas la course au salaire. Pour me convaincre, il me fait donc un petit tour avec sa grosse voiture 200ch : slaloms sur la rocade, accélération collage au fauteil.. Il me décroche un sourire puis m&#8217;annonce que ce sera 28k+4k de package qu&#8217;il n&#8217;a pas voulu me détailler.</p>
<h1>TECHNIQUE SSII B</h1>
<p>On me paie le train + un hôtel bien placé en centre ville pour m&#8217;incruster à l&#8217;entretien avec le client avant celui de la SSII A. On me coach assez rapidement pour faire un bon entretien avec le client, on me fait voir l&#8217;étage RH où je ne vois pas un mec à part celui qui me fait visiter et on finit par me présenter à la chargée de recrutement (qui a le physique 9/10 quoi). T&#8217;as envie de retourner dans la boîte juste pour revoir la chargée de recrutement qui se permet de me tutoyer sur la fin (genre on est amis :p).<br />
Le lendemain, je retourne chez eux et je leur parle des &#8220;points forts&#8221; de la SSII A. Ils ne sont pas déstabilisés et me proposent 29+2,8k (les 2,8 en gros ca m&#8217;a fait penser à de l&#8217;argent dans une enveloppe non déclarée mais bon :p). J&#8217;ai pas encore eu à négocier le salaire, je sais pas si on a eu grosse marge de manœuvre mais je crois qu&#8217;il ne faut pas trop y compter. Je ne sais pas trop encore quels sont les salaires moyens avec/sans &#8220;package&#8221;.
<p />
<p />
Voilà pour le moment je n&#8217;ai eu des propositions que de ces 2 SSII (qui n&#8217;ont pas encore l&#8217;affaire d&#8217;ailleurs). J&#8217;ai aussi rencontré une autre qui se vantait d&#8217;avoir également des projets dans ses locaux alors que plein de SSII se sont mis à faire ça. Ils avaient une chargée de recrutement peut être encore mieux que chez la SSII B.
<p />
<h1>SSII Method :</h1>
<p style="text-align:justify;"><strong>1- Tu fais croire qu&#8217;il n&#8217;y a que des femmes dans la boîte (tu sais très bien que dans le technique il y a 95% de meufs) et tu fais passer le candidat dans le couloirs des RH uniquement et aux forums tu ne mets que des meufs.<br />
2- Tu mets une mannequin en chargée de recrutement ou un autre truc si t&#8217;as pas (belle voiture par exemple).<br />
3- Tu précises que ta boîte a des opportunités dans tous les domaines, dans tous les endroits avec des perspectives d&#8217;évolution et des formations.<br />
4- Tu fais une offre.<br />
5- Tu fais signer.</strong></p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/47/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/47/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/47/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=47&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/10/18/les-societes-de-service-et-leurs-techniques-de-seduction-de-recrutement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>Pour être en forme, soyez agiles</title>
		<link>http://techaline.wordpress.com/2008/10/13/pour-etre-en-forme-soyez-agiles/</link>
		<comments>http://techaline.wordpress.com/2008/10/13/pour-etre-en-forme-soyez-agiles/#comments</comments>
		<pubDate>Mon, 13 Oct 2008 19:41:01 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[agile]]></category>
		<category><![CDATA[agiletour]]></category>
		<category><![CDATA[job]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=42</guid>
		<description><![CDATA[Voici un petit résumé de ce que j&#8217;ai retenu des 4 + 1 conférences auxquelles j&#8217;ai eu la chance d&#8217;assister Jeudi dernier : l&#8217;Agile Tour à Grenoble.
1. Le prof de management de l&#8217;école de Grenoble: Jérôme Barrand
Alors, en gros, l&#8217;entreprise et son système d&#8217;information, grâce aux informaticiens (je ne fais pas partie des coupables, je [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=42&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Voici un petit résumé de ce que j&#8217;ai retenu des 4 + 1 conférences auxquelles j&#8217;ai eu la chance d&#8217;assister Jeudi dernier : l&#8217;Agile Tour à Grenoble.</p>
<h1>1. Le prof de management de l&#8217;école de Grenoble: Jérôme Barrand</h1>
<p>Alors, en gros, l&#8217;entreprise et son système d&#8217;information, grâce aux informaticiens (je ne fais pas partie des coupables, je suis bien trop jeune <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ), c&#8217;est devenu<span style="color:#3366ff;"> </span><span style="color:#3366ff;">un gros truc innommable, </span>avec tout le monde qui est en relation avec tout le monde, où tout va à fond la caisse et bouge tout le temps.</p>
<p>Et puis malgré ça, on reste (trop) souvent dans une structure d&#8217;entreprise <span style="color:#ff6600;">hiérarchique</span>, avec tout en haut le grand chef qui réfléchit et qui détient l&#8217;information et le pouvoir, et qui donne des choses à faire à des exécutants en bas. Et ça c&#8217;est historique, c&#8217;était comme ça au vieux temps&#8230;</p>
<p>C&#8217;est pour ça qu&#8217;il faut trouver un nouveau truc. Un nouveau mode de pensée et de management des entreprises. Eh oui, <strong><span style="color:#ff00ff;">l&#8217;agilité ce n&#8217;est pas que des geeks dans un bureau qui ont une super machine de build qui s&#8217;allume en rose</span></strong>. C&#8217;est aussi tout un mode de &#8220;pensée au boulot&#8221;, admis et recommandé, et même par des gens qui en ont vu, des choses, dans leur vie.</p>
<p><em>Note pour plus tard :</em> Waouh&#8230; j&#8217;aimerais bien être capable de faire un show comme le sien !</p>
<h1>2. Introduction à Scrum</h1>
<p><em>Résumé :</em> Bon ben voilà, c&#8217;est bon, je n&#8217;ai plus peur. En fait, on peut se faire le truc à notre sauce ! Pas besoin d&#8217;en faire trop d&#8217;un coup.</p>
<p>J&#8217;ai surtout noté des infos concernant les pratiques d&#8217;<span style="color:#3366ff;"><em>équipe</em></span> plutôt que les techniques de gestion de projet avec sprints, backlogs et compagnie (parce qu&#8217;on avait vu ça en cours).</p>
<p>L&#8217;agilité pour une équipe c&#8217;est <span style="color:#ff6600;"><strong>Partage, Responsabilité, Confiance</strong></span> (etc). Effectivement, pour une équipe de basket ou d&#8217;impro, c&#8217;est une évidence. Mais pour du dev&#8230; On n&#8217;aurait pas imaginé&#8230; Ben si, en fait c&#8217;est pareil ! Et on verra aussi dans la conf suivante, que c&#8217;est aussi un peu le même fonctionnement qu&#8217;en famille&#8230;</p>
<ul>
<li>Ce qui passe en premier c&#8217;est pas les outils et les procédures compliquées, c&#8217;est les <span style="color:#ff00ff;">gens</span>. Le socle, c&#8217;est les individus et l&#8217;esprit d&#8217;équipe.</li>
<li>Avoir <span style="color:#3366ff;">quelque chose qui marche</span>, c&#8217;est mieux qu&#8217;une doc super compliquée avec des 1.1.2.a.iv.B) alinéa 3.</li>
<li>Le client c&#8217;est notre <span style="color:#3366ff;">partenaire</span> (parce qu&#8217;on est motivés en vrai pour lui, on cherche pas à l&#8217;avoir).</li>
<li>On est capable de s&#8217;adapter au changement.</li>
</ul>
<p>Et en fait tout ça, ça existe depuis longtemps, et les premiers à avoir imaginé quelque chose qui s&#8217;appelait &#8220;Lean Thinking&#8221;, c&#8217;est des américains. Lean Thinking a été mis en place par Toyota en 1950 pour la première fois. Et en 1987, il a été inventé un processus de développement &#8220;en spirale&#8221;.</p>
<p>Dernière chose que j&#8217;ai notée, c&#8217;est que la réunion quotidienne préconisée par Scrum, c&#8217;est (&lt; 15&#8242;) :</p>
<ul>
<li><span style="color:#ff00ff;">Qu&#8217;est ce qui s&#8217;est passé la veille ?</span></li>
<li><span style="color:#ff00ff;">Qu&#8217;est ce qui va se passer aujourd&#8217;hui ?</span></li>
<li><span style="color:#ff00ff;">Quelles sont mes difficultés ?</span></li>
</ul>
<h1>3. Aspects Psychologiques (Ψ) des méthodes Agiles</h1>
<p><span style="color:#3366ff;">(oh mon Dieu, là on a peur d&#8217;être tombé dans une secte bizarre !)</span></p>
<p><span style="color:#3366ff;">(et on n&#8217;en est pas loin&#8230;)</span></p>
<p>Il y a des aspects psychologiques bien sûr, car les méthodes agiles, comme on l&#8217;a vu, sont tournées vers l&#8217;être humain. Et l&#8217;objectif, c&#8217;est notre bien-être à tous !</p>
<h2><strong>Test-Driven Development = l&#8217;Apprentissage</strong></h2>
<blockquote><p><span style="color:#ff00ff;"><em>&#8220;Comme dans les réseaux Neuronaux&#8221;</em>, dit-il.</span></p></blockquote>
<p>(no comment)&#8230;</p>
<p>Effectivement, commencer par le test, et s&#8217;améliorer pour réussir le test, c&#8217;est un entraînement ou un apprentissage. Cela permet de reconnaître notre objectif et de ne pas le lâcher, ne pas partir dans une autre direction non plus. &#8220;Amélioration Continue&#8221;.</p>
<h2><strong>Binôme = Accepter de l&#8217;aide, échanger (commentaire personnel: = tous à poil !)</strong></h2>
<p>&#8220;Vérifier&#8221; devient &#8220;S&#8217;entraider&#8221;, &#8220;Concevoir&#8221; devient &#8220;Echanger avec l&#8217;autre&#8221;&#8230; Que de belles choses !</p>
<p>Une alternative (vient de la méthode &#8220;Crystal&#8221;): le &#8220;Side By Side&#8221;. On a chacun deux écrans, de manière à ce que le voisin puisse voir ce qui se passe chez l&#8217;autre et éventuellement intervenir.</p>
<p><em>Avantages du binôme :</em></p>
<ul>
<li><span style="color:#3366ff;">Concentration soutenue</span> (peut être aussi un inconvénient parce que ça fatigue)</li>
<li><span style="color:#3366ff;">Biorythmes psychologiques cumulés</span> (en gros, si y&#8217;en a un qui est fatigué c&#8217;est l&#8217;autre qui gère. ça fait les vases communiquants, comme dans un couple !)</li>
<li><span style="color:#999999;">Transparence</span></li>
<li>Assurance avec la <span style="color:#3366ff;">relecture</span></li>
<li><span style="color:#3366ff;">Consensus,</span> capacité à trouver un terrain d&#8217;entente</li>
<li><span style="color:#3366ff;">Apprentissage</span>, partage de connaissance, erreurs</li>
</ul>
<h2><strong>La rétrospective (le meeting quotidien de Scrum) = S&#8217;améliorer ensemble</strong></h2>
<p>A faciliter par un coach.</p>
<p>Equivalent à un conseil de famille où on propose des exercices à faire en famille pour s&#8217;améliorer (comprendre : le daily meeting de Scrum c&#8217;est comme <span style="color:#ff00ff;">Super Nanny</span> !!!)</p>
<p>Impose le <span style="color:#3366ff;">respect</span> entre les membres de l&#8217;équipe&#8230; Ce que chacun dit est personnel et à prendre en compte.</p>
<h2><strong>Les artefacts&#8230; La machine de build qui s&#8217;allume en rose et la peluche sur l&#8217;ordi de ManUChenu ont un rôle !</strong></h2>
<p>Moi qui croyais que c&#8217;était juste pour le <span style="color:#ff00ff;">fun</span>&#8230;</p>
<p>Nous les informaticiens on &#8220;fabrique&#8221; du vent (des opérations mathématiques basiques, finalement) Contrairement à un vendeur de <span style="color:#ff6600;">légumes</span>, un artisan ou un ouvrier. Les artefacts sont là pour matérialiser ce qu&#8217;on a fait (notamment les postit avec les fonctionnalités à réaliser). Ce sont des symboles qui améliorent notre perception&#8230; Et donc on se sent mieux.</p>
<h2><strong>Le reste que j&#8217;ai noté en vrac</strong></h2>
<ul>
<li><span style="color:#3366ff;">Communiquer face à face, </span>ça permet de se rendre compte que ce qu&#8217;on dit et qu&#8217;on fait, c&#8217;est pas rien, pas anodin, et ça a des conséquences et des répercussions. Bien plus difficile que de mettre quelqu&#8217;un en copie sur un email mal rédigé et le plus vague possible !</li>
</ul>
<ul>
<li>Agile ça rejoint la méthode de développement personnel &#8220;Getting Things Done&#8221;. J&#8217;ai noté ça mais j&#8217;ai rien compris, je trouve ça réducteur, parce que en gros Getting Things Done c&#8217;est un truc qui nous dicte comment réagir quand on a un truc à faire&#8230; On devrait être capable de s&#8217;en sortir seul à mon avis.</li>
</ul>
<ul>
<li>On stresse jamais parce qu&#8217;on a plein de trucs à faire, mais on stresse quand on ne sait pas ce qui va se passer (ah oui, et donc Getting Things Done ça permet d&#8217;éloigner le stress et de libérer *oh mon Dieu* la <span style="color:#ff6600;"><em>RAM Psychique</em> </span>[David Allen]). Je vais arrêter avec ce Getting Things Done c&#8217;est horrible.</li>
</ul>
<ul>
<li>Agile permet d&#8217;améliorer la confiance en soi. Jean Garneau dit que ce qui améliore la confiance en soi c&#8217;est:
<ul>
<li>Expérience</li>
<li>Risques</li>
<li>Résultats</li>
<li>Le fait de renouveler des expériences difficiles volontairement.</li>
</ul>
</li>
</ul>
<ul>
<li><span style="color:#ff0000;"><strong>Les 5 dysfonctionnements d&#8217;une équipe:</strong></span>
<ul>
<li><span style="color:#ff0000;">Absence de confiance</span></li>
<li><span style="color:#ff0000;">Crainte du conflit</span></li>
<li><span style="color:#ff0000;">Manque d&#8217;engagement</span></li>
<li><span style="color:#ff0000;">Manque de responsabilisation</span></li>
<li><span style="color:#ff0000;">Manque d&#8217;attention aux résultats</span></li>
</ul>
</li>
</ul>
<ul>
<li><span style="color:#3366ff;">Attention à la pensée dite &#8220;<strong>pensée de groupe</strong>&#8221; ou &#8220;pensée de masse&#8221; dans une équipe, qui a des effets néfastes tels que:</span>
<ul>
<li><span style="color:#3366ff;">Illusion d&#8217;invulnérabilité</span></li>
<li><span style="color:#3366ff;">Unanimité</span></li>
<li><span style="color:#3366ff;">Favoritisme</span></li>
<li><span style="color:#3366ff;">Partage incomplet d&#8217;informations</span></li>
<li><span style="color:#3366ff;">Pression</span></li>
</ul>
</li>
</ul>
<ul>
<li>Petit + perso : Les 10 principes du théâtre d&#8217;improvisation (par Christophe Tournier) :
<ul>
<li>Accepte !</li>
<li>Ecoute !</li>
<li>Percute !</li>
<li>Anime !</li>
<li>Construis !</li>
<li>Joue le jeu !</li>
<li>Prépare !</li>
<li>Innove !</li>
<li>Amuse-toi !</li>
<li>Ose !</li>
</ul>
</li>
</ul>
<h1>4. Mise en place d&#8217;outils pour industrialiser le développement</h1>
<p>Ah j&#8217;avais mal lu. Je croyais qu&#8217;on allait parler d&#8217;agile dans l&#8217;industrie&#8230; On arrive en retard&#8230; ça parle Java, Maven 2, ant, Eclipse et NetBeans. Sympa, mais on a pas vu l&#8217;objectif du début parce qu&#8217;on était à la bourre&#8230; En gros:</p>
<ul>
<li>Ils ont une chouette infrastructure, avec une appli web, de la doc en ligne, tout ça.</li>
<li><span style="color:#ff6600;"><strong>5% des bugs (ceux découverts post-release) représentent 95% des coûts de production.</strong></span> Ah ben oui, là, on a peur.</li>
<li>Les outils qu&#8217;ils ont mis en place permettent d&#8217;avoir des retours les plus rapides possibles, et c&#8217;est la fin du <span style="color:#ff00ff;">&#8220;ça marche chez moi ! Dommage pour toi !!&#8221;</span></li>
</ul>
<h1>5. Agilité et avionique</h1>
<p>Ben moi, XP ou pas XP, <span style="color:#3366ff;">j&#8217;ai peur dans l&#8217;avion</span>. Mais oui, malgré toute la complexité des normes imposées quand on fabrique un <strong>drône</strong>, un <strong>missile</strong>, un <strong>système de navigation GPS,</strong> ou <strong>toute machine de guerre destinée à être vendue pour ensuite aller tuer des millions d&#8217;innocents</strong> (ah oui pardon, on parlait *juste* des <span style="color:#ff00ff;">beaux systèmes pour les avions de ligne</span> <span style="color:#ff00ff;">1ère classe</span>), une équipe d&#8217;irréductibles a réussi à appliquer de l&#8217;agilité, et ça marche mieux.</p>
<p>Ce que j&#8217;en retiens en tout cas c&#8217;est encore une fois que ce qui est primordial c&#8217;est d&#8217;avoir une équipe ultra motivée, qui a envie de faire ça.</p>
<blockquote><p><em>&#8230; Et vous savez quoi ? ça a plu à mon chef, et il est super partant pour mettre ça en place, tous ensemble. C&#8217;est trop beau pour être vrai. Je suis super motivée et enthousiaste pour la suite ! Reste à voir ce qu&#8217;on arrivera à faire !</em></p></blockquote>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=42&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/10/13/pour-etre-en-forme-soyez-agiles/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>Wake Up !</title>
		<link>http://techaline.wordpress.com/2008/08/12/wake-up/</link>
		<comments>http://techaline.wordpress.com/2008/08/12/wake-up/#comments</comments>
		<pubDate>Tue, 12 Aug 2008 16:31:59 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[réveil]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=18</guid>
		<description><![CDATA[J&#8217;ai eu un petit problème hier soir&#8230; J&#8217;avais oublié mon téléphone portable chez des amis. Pas grave, sauf que c&#8217;était mon seul moyen pour me réveiller le matin !
Du coup, il a fallu penser à un autre stratagème&#8230; Ladies and gentlemen, voici le Réveil Script Shell ! C&#8217;est tout simple.
Tout d&#8217;abord, le .sh, qui permet [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=18&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>J&#8217;ai eu un petit problème hier soir&#8230; J&#8217;avais oublié mon téléphone portable chez des amis. Pas grave, sauf que c&#8217;était mon seul moyen pour me réveiller le matin !</p>
<p>Du coup, il a fallu penser à un autre stratagème&#8230; Ladies and gentlemen, voici le Réveil Script Shell ! C&#8217;est tout simple.</p>
<p>Tout d&#8217;abord, le .sh, qui permet d&#8217;ajouter d&#8217;autres lignes si nécessaire&#8230;</p>
<blockquote>
<pre>#! /bin/sh
/usr/bin/mpg123 /data/music/Ian_Carey_Best_Of_2007.mp3</pre>
</blockquote>
<p>Le tout appelé avec une commande &#8220;at&#8221; :</p>
<blockquote>
<pre>$ at -f ./reveil.sh 7:00 tomorrow</pre>
</blockquote>
<p>Et voilà&#8230; Il suffit de laisser l&#8217;ordi allumé, et le lendemain matin, que de douce musique dans tes oreilles&#8230;</p>
<p>Pour info, le mp3 utilisé est un podcast de Ian Carey (DJ), pioché sur son super siteweb : <a href="http://iancarey.podbean.com/">http://iancarey.podbean.com/</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techaline.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techaline.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=18&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/08/12/wake-up/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>WPF Data Templates: Several views for 1 class</title>
		<link>http://techaline.wordpress.com/2008/07/28/wpf-data-templates/</link>
		<comments>http://techaline.wordpress.com/2008/07/28/wpf-data-templates/#comments</comments>
		<pubDate>Mon, 28 Jul 2008 08:00:25 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[WPF]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[data templates]]></category>
		<category><![CDATA[vb.net]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=12</guid>
		<description><![CDATA[Today i&#8217;m going to introduce you a WPF concept called Data Templating.
When I started WPF, i felt lost, and i didn&#8217;t know how to do. I wanted to use my scholar knowledge about object-oriented programming, make inheritance relationships between usercontrols, like in windows forms or Java.
My problem was that I had 1 user control (basically, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=12&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p style="text-align:justify;">Today i&#8217;m going to introduce you a WPF concept called Data Templating.</p>
<p style="text-align:justify;">When I started WPF, i felt lost, and i didn&#8217;t know how to do. I wanted to use my scholar knowledge about object-oriented programming, make inheritance relationships between usercontrols, like in windows forms or Java.</p>
<p style="text-align:justify;">My problem was that I had 1 user control (basically, a grid with several labels), which displays the contents of a collection in the labels. My graphic control had to be used in different configurations. Depending on the configuration, the data was not displayed in the same way, but the business code (data collection, grid) was the same.</p>
<p style="text-align:justify;">The first idea i had, using my little UML model, was to make inheritance: a parent grid user control, with several children chosen depending on the configuration. In this way, with WPF, everything was coded into a .VB file. It was quite inappropriate. Moreover it was hard to realize this inheritance, because WPF didn&#8217;t allow me to display my parent Grid control into the designer&#8230;</p>
<p style="text-align:justify;">And then, I posted on <a href="http://forums.msdn.microsoft.com/en-US/wpf/thread/80eb3f57-9907-4bf7-9f48-b75043b8c97b/">MSDN forums</a>, <a href="http://groups.google.com/group/wpf-disciples/browse_thread/thread/ecf7738d16300335/557d64c4aabaae5d?lnk=gst&amp;q=bootis#557d64c4aabaae5d">WPF disciples</a>, I started reading <a href="http://www.amazon.com/Windows-Presentation-Foundation-Unleashed-WPF/dp/0672328917">this book</a>, and understood i wasn&#8217;t thinking the right way.</p>
<p style="text-align:justify;">The right way, for this particular case, is to use Data Templates.</p>
<p style="text-align:justify;">Data Templating allows you to have 1 class that contains all your business code (here, my data collection), and to consider your graphic interface as a template (here a grid template), that you define in a resource dictionary.<br />
This is very easy to do this with Expression Blend. You can define several templates to apply them to the class.</p>
<p style="text-align:justify;">After this you can define a Template Selector class to select your template programatically, or select it dynamically. The data template for a custom user control is defined by the ContentTemplate attribute. In my solution, i have bound this attribute to the selected item of a combobox.</p>
<p style="text-align:justify;">The template elements (labels,&#8230;) can be bound (in xaml ResourceDictionary) to the collection items. And the graphics can be completely different.</p>
<p style="text-align:justify;">To use data templates, here are some cool links which helped me a lot, including code samples and HowTos:</p>
<p style="text-align:justify;"><a href="http://msdn2.microsoft.com/en-us/library/ms752339.aspx">http://msdn2.microsoft.com/en-us/library/ms752339.aspx</a><br />
<a href="http://www.contentpresenter.com/index.php">http://www.contentpresenter.com/index.php</a><br />
<a href="http://msdn.microsoft.com/en-us/library/ms742521.aspx">http://msdn.microsoft.com/en-us/library/ms742521.aspx</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techaline.wordpress.com/12/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techaline.wordpress.com/12/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/12/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/12/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/12/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=12&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/07/28/wpf-data-templates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
		<item>
		<title>Custom persistence with custom tracking (vb.net source code)</title>
		<link>http://techaline.wordpress.com/2008/07/01/custom-persistence-with-custom-tracking-vbnet-source-code/</link>
		<comments>http://techaline.wordpress.com/2008/07/01/custom-persistence-with-custom-tracking-vbnet-source-code/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 20:37:06 +0000</pubDate>
		<dc:creator>Aline</dc:creator>
				<category><![CDATA[WF]]></category>
		<category><![CDATA[persistence]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[vb.net]]></category>
		<category><![CDATA[workflow foundation]]></category>

		<guid isPermaLink="false">http://techaline.wordpress.com/?p=7</guid>
		<description><![CDATA[This first article aims at presenting a very simple solution for custom persistence and tracking services for windows workflow foundation.
The solution presented here has been designed to run with a long-running state machine workflow but could be adapted to any use case. It contains:

 A persistence service that stores the serialized workflow into a binary [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=7&subd=techaline&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><span style="font-size:small;">This first article aims at presenting a very simple solution for custom persistence and tracking services for windows workflow foundation.</span></p>
<p><span style="font-size:small;">The solution presented here has been designed to run with a long-running state machine workflow but could be adapted to any use case. It contains:</span></p>
<ul>
<li> A persistence service that stores the serialized workflow into a binary file,</li>
<li> A tracking service that stores the state changes into a text file.</li>
</ul>
<p><span style="font-size:small;">This article will only explain how to create and use persistence and tracking services. A more detailed explanation about a simple state machine workflow running with a host demo application will be done in a further article. </span></p>
<p><span id="more-7"></span></p>
<ul>
<li>
<h1><span style="font-size:small;">Persistence service</span></h1>
</li>
</ul>
<p><span style="font-size:small;">The persistence service contains all what is necessary to store a workflow to a storage medium (here: a file).</span></p>
<p><span style="font-size:small;">Explanation of the source code:</span></p>
<blockquote>
<pre><span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.Workflow.Runtime.Hosting</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.IO</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports </span>System.Workflow.ComponentModel</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports </span>System.Workflow.Activities</span>

<span style="font-size:small;"><span style="color:#0000ff;">Public </span><span style="color:#0000ff;">Class</span> FilePersistenceService</span>
    <span style="font-size:small;"><span style="color:#0000ff;">Inherits </span>WorkflowPersistenceService</span>

    <span style="font-size:small;"><span style="color:#0000ff;">Private </span>filePath <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">"..\..\..\SerializedFiles\"</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">Private </span>fileExtension <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">".wf"</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> fileName <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">"PersistedWorkflow"</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Loads an activity that is the root of a dynamically created ActivityExecutionContext:</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Function</span> LoadCompletedContextActivity(<span style="color:#0000ff;">ByVal</span> scopeId <span style="color:#0000ff;">As</span> System.Guid,
         <span style="color:#0000ff;">ByVal</span> outerActivity <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity) <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> workflowBytes <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Byte</span>() = <span style="color:#0000ff;">Me</span>.LoadFromFile</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> wf <span style="color:#0000ff;">As</span> StateMachineWorkflowActivity =
         <span style="color:#0000ff;">CType</span>(WorkflowPersistenceService.RestoreFromDefaultSerializedForm(workflowBytes, <span style="color:#0000ff;">Nothing</span>), Workflow.Activities.StateMachineWorkflowActivity)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Return</span> wf</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Logic for loading a workflow instance. It uses the LoadFromFile function to do this.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Function</span> LoadWorkflowInstanceState(<span style="color:#0000ff;">ByVal</span> instanceId <span style="color:#0000ff;">As</span> System.Guid)
         <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> workflowBytes <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Byte</span>() = <span style="color:#0000ff;">Me</span>.LoadFromFile</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> wf <span style="color:#0000ff;">As</span> Workflow.Activities.StateMachineWorkflowActivity =
         <span style="color:#0000ff;">CType</span>(WorkflowPersistenceService.RestoreFromDefaultSerializedForm(workflowBytes, <span style="color:#0000ff;">Nothing</span>), Workflow.Activities.StateMachineWorkflowActivity)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Return</span> wf</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span></pre>
</blockquote>
<p><span style="font-size:small;">This function returns a state machine workflow activity and can be used by the host rather than LoadWorkflowInstanceState to specify the workflow type. The type here can be précised regarding what you need.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Public</span> <span style="color:#0000ff;">Function</span> Load(<span style="color:#0000ff;">ByVal</span> instanceId <span style="color:#0000ff;">As</span> Guid) <span style="color:#0000ff;">As</span> StateMachineWorkflowActivity</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Return</span> <span style="color:#0000ff;">CType</span>(<span style="color:#0000ff;">Me</span>.LoadWorkflowInstanceState(instanceId), StateMachineWorkflowActivity)</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Logic for saving a workflow instance. It uses the PersistToFile function to do this.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Sub</span> SaveWorkflowInstanceState(<span style="color:#0000ff;">ByVal</span> rootActivity <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity,
     <span style="color:#0000ff;">ByVal</span> unlock <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Boolean</span>)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> contextGuid <span style="color:#0000ff;">As</span> Guid = <span style="color:#0000ff;">CType</span>(rootActivity.GetValue(Activity.ActivityContextGuidProperty), Guid)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.PersistToFile(WorkflowPersistenceService.GetDefaultSerializedForm(rootActivity))</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Saves an activity that is the root of a dynamically created ActivityExecutionContext:</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Sub</span> SaveCompletedContextActivity(<span style="color:#0000ff;">ByVal</span> activity <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> contextGuid <span style="color:#0000ff;">As</span> Guid = <span style="color:#0000ff;">CType</span>(activity.GetValue(activity.ActivityContextGuidProperty), Guid)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.PersistToFile(WorkflowPersistenceService.GetDefaultSerializedForm(activity))</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Returns the boolean indicating whether the workflow is unloaded (=persisted) when it gets idle.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Function</span> UnloadOnIdle(<span style="color:#0000ff;">ByVal</span> activity <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity) <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Boolean</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Return</span> <span style="color:#0000ff;">True</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span></pre>
</blockquote>
<p><span style="font-size:small;">For locking mechanism when there are several instances which share 1 medium. Not implemented.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Sub</span> UnlockWorkflowInstanceState(<span style="color:#0000ff;">ByVal</span> rootActivity <span style="color:#0000ff;">As</span> System.Workflow.ComponentModel.Activity)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Throw</span> <span style="color:#0000ff;">New</span> NotImplementedException()</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Serialize activity instance state to file with option to lock state file.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Sub</span> PersistToFile(<span style="color:#0000ff;">ByVal</span> serializedWorkflow <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Byte</span>())</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> filename <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#0000ff;">Me</span>.filePath &amp; <span style="color:#0000ff;">Me</span>.fileName &amp; <span style="color:#0000ff;">Me</span>.fileExtension</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> fileStream <span style="color:#0000ff;">As</span> FileStream = <span style="color:#0000ff;">Nothing</span></span>

        <span style="font-size:small;"><span style="color:#0000ff;">Try</span></span>
            <span style="font-size:small;"><span style="color:#0000ff;">If</span> File.Exists(filename) <span style="color:#0000ff;">Then</span></span>
                <span style="font-size:small;">File.Delete(filename)</span>
            <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>

            <span style="font-size:small;">fileStream = <span style="color:#0000ff;">New</span> FileStream(filename, FileMode.CreateNew, FileAccess.Write, FileShare.None)</span>
            <span style="font-size:small;">fileStream.Write(serializedWorkflow, 0, serializedWorkflow.Length)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Finally</span></span>
            <span style="font-size:small;"><span style="color:#0000ff;">If</span> <span style="color:#0000ff;">Not</span> fileStream <span style="color:#0000ff;">Is</span> <span style="color:#0000ff;">Nothing</span> <span style="color:#0000ff;">Then</span></span>
                <span style="font-size:small;">fileStream.Close()</span>
            <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Try</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Deserialize instance state from file given instance id and outerActivity used in the case of compensation for a completed scope</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Function</span> LoadFromFile() <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Byte</span>()</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> filename <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#0000ff;">Me</span>.filePath &amp; <span style="color:#0000ff;">Me</span>.fileName &amp; <span style="color:#0000ff;">Me</span>.fileExtension</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> fileStream <span style="color:#0000ff;">As</span> FileStream = <span style="color:#0000ff;">Nothing</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Try</span></span>
            <span style="font-size:small;">fileStream = <span style="color:#0000ff;">New</span> FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)</span>
            <span style="font-size:small;">fileStream.Seek(0, SeekOrigin.Begin)</span>
            <span style="font-size:small;"><span style="color:#0000ff;">Dim</span> serializedWorkflow((<span style="color:#0000ff;">CType</span>(fileStream.Length, <span style="color:#0000ff;">Integer</span>))) <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">Byte</span></span>
            <span style="font-size:small;">fileStream.Read(serializedWorkflow, 0, serializedWorkflow.Length)</span>
            <span style="font-size:small;"><span style="color:#0000ff;">Return</span> serializedWorkflow</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Finally</span></span>
            <span style="font-size:small;">fileStream.Close()</span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Try</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Function</span></span>
<span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Class</span></span></pre>
</blockquote>
<ul>
<h1><span style="font-size:small;">Tracking service</span></h1>
</ul>
<ul>
<li>
<ul>
<li>
<h2><span style="font-size:small;">Tracking Channel</span></h2>
</li>
</ul>
</li>
</ul>
<p><span style="font-size:small;">The tracking channel contains all the data to transfer to the tracking service (i.e. the information we have to store for our workflow). Source code:</span></p>
<blockquote>
<pre><span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.IO</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.Threading</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.Workflow.ComponentModel</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.Workflow.Runtime</span>
<span style="font-size:small;"><span style="color:#0000ff;">Imports</span> System.Workflow.Runtime.Tracking</span>

<span style="font-size:small;"><span style="color:#0000ff;">Public</span> <span style="color:#0000ff;">Class</span> FileTrackingChannel</span>
    <span style="font-size:small;"><span style="color:#0000ff;">Inherits</span> TrackingChannel</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Implements</span> IDisposable</span>

        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> trackingParameters <span style="color:#0000ff;">As</span> TrackingParameters = <span style="color:#0000ff;">Nothing</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Shared</span> trackingDataFile <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">""</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> streamWriter <span style="color:#0000ff;">As</span> StreamWriter = <span style="color:#0000ff;">Nothing</span></span>

        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> filePath <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">"..\..\..\SerializedFiles\"</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> fileExtension <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">".txt"</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">Private</span> fileName <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span> = <span style="color:#a31515;">"Track"</span></span></pre>
</blockquote>
<p><span style="font-size:small;">The constructor creates a stream writer in order to access the tracking file.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Public</span> <span style="color:#0000ff;">Sub</span> <span style="color:#0000ff;">New</span>(<span style="color:#0000ff;">ByVal</span> parameters <span style="color:#0000ff;">As</span> System.Workflow.Runtime.Tracking.TrackingParameters)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.trackingParameters = parameters</span>
        <span style="font-size:small;">FileTrackingChannel.trackingDataFile = <span style="color:#0000ff;">Me</span>.filePath &amp; <span style="color:#0000ff;">Me</span>.fileName &amp; <span style="color:#0000ff;">Me</span>.fileExtension</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.streamWriter = File.CreateText(FileTrackingChannel.trackingDataFile)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.streamWriter.AutoFlush = <span style="color:#0000ff;">True</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Sub</span> InstanceCompletedOrTerminated()</span>
        <span style="font-size:small;">Debug.WriteLine(<span style="color:#a31515;">"Workflow Instance Completed or Terminated"</span>)</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Write a record when an event is raised.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Protected</span> <span style="color:#0000ff;">Overrides</span> <span style="color:#0000ff;">Sub</span> Send(<span style="color:#0000ff;">ByVal</span> record <span style="color:#0000ff;">As</span> System.Workflow.Runtime.Tracking.TrackingRecord)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">If</span> <span style="color:#0000ff;">TypeOf</span> record <span style="color:#0000ff;">Is</span> ActivityTrackingRecord <span style="color:#0000ff;">Then</span></span>
            <span style="font-size:small;"><span style="color:#0000ff;">Me</span>.WriteActivityTrackingRecord(<span style="color:#0000ff;">CType</span>(record, ActivityTrackingRecord))</span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">If</span> <span style="color:#0000ff;">TypeOf</span> record <span style="color:#0000ff;">Is</span> WorkflowTrackingRecord <span style="color:#0000ff;">Then</span></span>
            <span style="font-size:small;">WriteWorkflowTrackingRecord(<span style="color:#0000ff;">CType</span>(record, WorkflowTrackingRecord))</span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>
        <span style="font-size:small;"><span style="color:#0000ff;">If</span> <span style="color:#0000ff;">TypeOf</span> record <span style="color:#0000ff;">Is</span> UserTrackingRecord <span style="color:#0000ff;">Then</span></span>
            <span style="font-size:small;">WriteUserTrackingRecord(<span style="color:#0000ff;">CType</span>(record, UserTrackingRecord))</span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">These next 3 subs write the record regarding the type of the record (workflow, activity, user…)</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Sub</span> WriteWorkflowTrackingRecord(<span style="color:#0000ff;">ByVal</span> workflowTrackingRecord <span style="color:#0000ff;">As</span> WorkflowTrackingRecord)</span>
        <span style="font-size:small;">WriteToFile(<span style="color:#a31515;">"Workflow: "</span> + workflowTrackingRecord.TrackingWorkflowEvent.ToString() + <span style="color:#a31515;">" "</span>)</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Sub</span> WriteActivityTrackingRecord(<span style="color:#0000ff;">ByVal</span> activityTrackingRecord <span style="color:#0000ff;">As</span> ActivityTrackingRecord)</span>
        <span style="font-size:small;">WriteToFile(<span style="color:#0000ff;">CStr</span>(DateTime.Now) + <span style="color:#a31515;">" Activity: "</span> + activityTrackingRecord.QualifiedName.ToString()
         + <span style="color:#a31515;">" "</span> + activityTrackingRecord.ExecutionStatus.ToString() + <span style="color:#a31515;">" "</span>)</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Sub</span> WriteUserTrackingRecord(<span style="color:#0000ff;">ByVal</span> userTrackingRecord <span style="color:#0000ff;">As</span> UserTrackingRecord)</span>
        <span style="font-size:small;">WriteToFile(<span style="color:#a31515;">"User Data: "</span> + userTrackingRecord.UserData.ToString())</span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span></pre>
</blockquote>
<p><span style="font-size:small;">Function which writes a string to the streamwriter.</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;">Private</span> <span style="color:#0000ff;">Sub</span> WriteToFile(<span style="color:#0000ff;">ByVal</span> toWrite <span style="color:#0000ff;">As</span> <span style="color:#0000ff;">String</span>)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">If</span> streamWriter <span style="color:#0000ff;">IsNot</span> <span style="color:#0000ff;">Nothing</span> <span style="color:#0000ff;">Then</span></span>
            <span style="font-size:small;">streamWriter.WriteLine(toWrite)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">Else</span></span>
            <span style="font-size:small;"><span style="color:#0000ff;">Throw</span> <span style="color:#0000ff;">New</span> Exception(<span style="color:#a31515;">"trackingDataFile "</span> + trackingDataFile + <span style="color:#a31515;">" doesn't exist"</span>)</span>
        <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">If</span></span>
    <span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Sub</span></span>
<span style="font-size:small;"><span style="color:#0000ff;">End</span> <span style="color:#0000ff;">Class</span></span>
<span style="font-size:small;">
</span></pre>
</blockquote>
<ul>
<li>
<ul>
<li>
<h2><span style="font-size:small;">Tracking Service</span></h2>
</li>
</ul>
</li>
</ul>
<p><span style="font-size:small;">The tracking service manages tracking: configures it with a (not mandatory) custom tracking profile, and uses the tracking channel to save data to a medium.</span></p>
<p><span style="font-size:small;">Every method concerning tracking profile configuration below is not more explained because here we didn’t use any custom tracking profile. </span></p>
<blockquote>
<pre><span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.IO</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Collections.Generic</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Text</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Threading</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Workflow.ComponentModel</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Workflow.Runtime</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> System.Workflow.Runtime.Tracking</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Imports</span></span><span> ClassLibrary.pWorkCenter</span></span></span>

<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Public</span></span><span> </span><span style="color:#0000ff;"><span>Class</span></span><span> FileTrackingService</span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>Inherits</span></span><span> TrackingService</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Private</span></span><span> _trackingChannel </span><span style="color:#0000ff;"><span>As</span></span><span> FileTrackingChannel</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Public</span></span><span> </span><span style="color:#0000ff;"><span>ReadOnly</span></span><span> </span><span style="color:#0000ff;"><span>Property</span></span><span> TrackingChannel() </span><span style="color:#0000ff;"><span>As</span></span><span> FileTrackingChannel</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Get</span></span></span></span>
            <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> </span><span style="color:#0000ff;"><span>Me</span></span><span>._trackingChannel</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Get</span></span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Property</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Gets the tracking profile (a tracking profile can be defined too to determine the events to handle or not. This is not our subject today but you can create a custom profile too)</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Protected</span></span><span> </span><span style="color:#0000ff;"><span>Overloads</span></span><span> </span><span style="color:#0000ff;"><span>Overrides</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> GetProfile(</span><span style="color:#0000ff;"><span>ByVal</span></span><span> workflowInstanceId </span><span style="color:#0000ff;"><span>As</span></span><span> System.Guid)
     </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingProfile</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> FileTrackingService.GetProfile()</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Gets the tracking profile depending on the type of the workflow and the profile version ID.</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Protected</span></span><span> </span><span style="color:#0000ff;"><span>Overloads</span></span><span> </span><span style="color:#0000ff;"><span>Overrides</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> GetProfile(</span><span style="color:#0000ff;"><span>ByVal</span></span><span> workflowType </span><span style="color:#0000ff;"><span>As</span></span><span> System.Type,
     </span><span style="color:#0000ff;"><span>ByVal</span></span><span> profileVersionId </span><span style="color:#0000ff;"><span>As</span></span><span> System.Version) </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingProfile</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> FileTrackingService.GetProfile()</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Gets the tracking channel to use.</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Protected</span></span><span> </span><span style="color:#0000ff;"><span>Overrides</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> GetTrackingChannel(</span><span style="color:#0000ff;"><span>ByVal</span></span><span> parameters </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingParameters)
     </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingChannel</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>If</span></span><span> </span><span style="color:#0000ff;"><span>Me</span></span><span>._trackingChannel </span><span style="color:#0000ff;"><span>Is</span></span><span> </span><span style="color:#0000ff;"><span>Nothing</span></span><span> </span><span style="color:#0000ff;"><span>Then</span></span></span></span>
            <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._trackingChannel = </span><span style="color:#0000ff;"><span>New</span></span><span> FileTrackingChannel(parameters)</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>If</span></span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> </span><span style="color:#0000ff;"><span>Me</span></span><span>._trackingChannel</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Gets the profile passed by reference, and returns true when it succeeded.</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Protected</span></span><span> </span><span style="color:#0000ff;"><span>Overrides</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> TryGetProfile(</span><span style="color:#0000ff;"><span>ByVal</span></span><span> workflowType </span><span style="color:#0000ff;"><span>As</span></span><span> System.Type, </span><span style="color:#0000ff;"><span>ByRef</span></span><span> profile </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingProfile)
     </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>Boolean</span></span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Try</span></span></span></span>
            <span><span style="font-size:small;"><span>profile = FileTrackingService.GetProfile()</span></span></span>
            <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> </span><span style="color:#0000ff;"><span>True</span></span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Catch</span></span><span> ex </span><span style="color:#0000ff;"><span>As</span></span><span> Exception</span></span></span>
            <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> </span><span style="color:#0000ff;"><span>False</span></span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Try</span></span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Reloads the profile: Sets it to nothing</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Protected</span></span><span> </span><span style="color:#0000ff;"><span>Overrides</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> TryReloadProfile(</span><span style="color:#0000ff;"><span>ByVal</span></span><span> workflowType </span><span style="color:#0000ff;"><span>As</span></span><span> System.Type,
     </span><span style="color:#0000ff;"><span>ByVal</span></span><span> workflowInstanceId </span><span style="color:#0000ff;"><span>As</span></span><span> System.Guid, </span><span style="color:#0000ff;"><span>ByRef</span></span><span> profile </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingProfile) </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>Boolean</span></span></span></span>
        <span><span style="font-size:small;"><span>profile = </span><span style="color:#0000ff;"><span>Nothing</span></span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> </span><span style="color:#0000ff;"><span>False</span></span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Gets the default tracking profile to use.</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Private</span></span><span> </span><span style="color:#0000ff;"><span>Overloads</span></span><span> </span><span style="color:#0000ff;"><span>Shared</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span><span> GetProfile() </span><span style="color:#0000ff;"><span>As</span></span><span> System.Workflow.Runtime.Tracking.TrackingProfile</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Dim</span></span><span> profile </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>New</span></span><span> TrackingProfile</span></span></span>
        <span><span style="font-size:small;"><span>profile.Version = </span><span style="color:#0000ff;"><span>New</span></span><span> Version(1, 0)</span></span></span>

        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Dim</span></span><span> statePoint </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>New</span></span><span> ActivityTrackPoint</span></span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Dim</span></span><span> location </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>New</span></span><span> ActivityTrackingLocation(</span><span style="color:#0000ff;"><span>GetType</span></span><span>(Workflow.Activities.StateActivity),
         </span><span style="color:#0000ff;"><span>New</span></span><span> ActivityExecutionStatus() {ActivityExecutionStatus.Executing})</span></span></span>
        <span><span style="font-size:small;">statePoint.MatchingLocations.Add(location)</span></span>
        <span><span style="font-size:small;">profile.ActivityTrackPoints.Add(statePoint)</span></span>
        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Return</span></span><span> profile</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Function</span></span></span></span>
<span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Class</span></span></span></span></pre>
</blockquote>
<ul>
<li>
<h1><span style="font-size:small;">Use Persistence combined with Tracking in a host application</span></h1>
</li>
</ul>
<p><span style="font-size:small;">This initialization method is called from the constructor of the host application. Its role is to start the machine workflow. We consider that we have a state machine workflow whose type is “StateMachine.BasicStateMachine”.</span></p>
<blockquote>
<pre><span><span style="font-size:small;"><span style="color:#0000ff;"><span>Private</span></span><span> </span><span style="color:#0000ff;"><span>Sub</span></span><span> InitializeMachineWorkflow()</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime = </span><span style="color:#0000ff;"><span>New</span></span><span> WorkflowRuntime</span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Add the persistence and tracking services</span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Dim</span></span><span> pserv </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>New </span></span><span>FilePersistenceService()</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.AddService(pserv)</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Dim</span></span><span> tserv </span><span style="color:#0000ff;"><span>As</span></span><span> </span><span style="color:#0000ff;"><span>New </span></span><span>FileTrackingService()</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.AddService(tserv)</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Try</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Get the workflow that has been stored as a file, and has the following Guid. We consider we already have a stored workflow, whose Guid is as follows. If not, an exception will be raised and a new workflow (with new persistence and tracking files) will be created.</span></p>
<blockquote>
<pre>        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.StartRuntime()</span></span></span>

        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowInstance = </span><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.GetWorkflow(</span><span style="color:#0000ff;"><span>New</span></span><span> Guid(</span><span style="color:#a31515;"><span>"91dcf603-5f08-4499-aaf1-39e3be7baa96"</span></span><span>))</span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">When there is a tracking service, it is possible to handle a “StateChanged” event.</span></p>
<blockquote>
<pre>        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>AddHandler</span></span><span> tserv.TrackingChannel.StateChanged, </span><span style="color:#0000ff;"><span>AddressOf</span></span><span> </span><span style="color:#0000ff;"><span>Me</span></span><span>.StateChangedHandler</span></span></span>

        <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowInstance.Load()</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Catch</span></span><span> ex </span><span style="color:#0000ff;"><span>As</span></span><span> Exception</span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">If the persistence failed, then create and start a new workflow instance.<span><span> </span></span></span></p>
<blockquote>
<pre>    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.StopRuntime()</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowInstance = </span><span style="color:#0000ff;"><span>Me</span></span><span>._workflowRuntime.CreateWorkflow(</span><span style="color:#0000ff;"><span>GetType</span></span><span>(StateMachine.BasicStateMachine))</span></span></span>
    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>Me</span></span><span>._workflowInstance.Start()</span></span></span>

    <span><span style="font-size:small;"><span style="color:#0000ff;"><span>End</span></span><span> </span><span style="color:#0000ff;"><span>Try</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Instantiate the machine instance</span></p>
<blockquote>
<pre>    <span style="font-size:small;"><span style="color:#0000ff;"><span><span>Dim</span></span></span><span><span> stateMachineInstance </span></span><span style="color:#0000ff;"><span><span>As</span></span></span><span><span> </span></span><span style="color:#0000ff;"><span><span>New</span></span></span><span><span> StateMachineWorkflowInstance(</span></span><span style="color:#0000ff;"><span><span>Me</span></span></span><span><span>._workflowRuntime, </span></span><span style="color:#0000ff;"><span><span>Me</span></span></span><span><span>._workflowInstance.InstanceId)</span></span></span>
    <span style="font-size:small;"><span style="color:#0000ff;"><span><span>Me</span></span></span><span><span>._currentStateName = stateMachineInstance.CurrentStateName</span></span></span>
    <span style="font-size:small;"><span style="color:#0000ff;"><span><span>End</span></span></span><span><span> </span></span><span style="color:#0000ff;"><span><span>Sub</span></span></span></span></pre>
</blockquote>
<p><span style="font-size:small;">Be careful, in this code sample, to the “StartRuntime” and “StopRuntime” workflow runtime calls. This is very important to start runtime before getting the persisted workflow instance, and to have runtime stopped before creating a new instance.</span></p>
<p><span style="font-size:small;">In this article we’ve seen the implementation of custom persistence and tracking services. A next one will do this implementation into a full solution. Before this, feel free to make any comment!</span></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/techaline.wordpress.com/7/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/techaline.wordpress.com/7/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/techaline.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/techaline.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/techaline.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/techaline.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/techaline.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/techaline.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/techaline.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/techaline.wordpress.com/7/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/techaline.wordpress.com/7/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/techaline.wordpress.com/7/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=techaline.wordpress.com&blog=4107218&post=7&subd=techaline&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://techaline.wordpress.com/2008/07/01/custom-persistence-with-custom-tracking-vbnet-source-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/d5d0721435ade58bb9ae5dab6eb9b091?s=96&#38;d=identicon" medium="image">
			<media:title type="html">bootis</media:title>
		</media:content>
	</item>
	</channel>
</rss>