tag:blogger.com,1999:blog-79859134666659443862024-03-05T23:08:36.049-08:00Visual Studio ALM Tools - SCRUM - Intelligence ArtificiellePhilippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.comBlogger104125tag:blogger.com,1999:blog-7985913466665944386.post-54565050960184215202018-03-19T09:49:00.001-07:002018-03-19T09:49:07.836-07:00Création d'un Robot à partir d'une FAQ en quelques minutes avec Microsoft QnA Maker Partie 1Tout d'abord nous allons créer le service en se connectant à la page : https://qnamaker.ai/Create/Index<br />
Une fois la page affichée, simplement entrer le nom du Service, puis dans notre cas en 2, on référence le document en ligne du Scrum Guide, mais nous pourrions avec les options 3 et 4 utiliser soit un fichier structuré de notre choix ou bien encore construire manuellement une base de connaissance<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtY4r-1AsdGSYdM381UCpRALLfkedUx4I_D7RgvCjUTQJ6BOE84jBp-Y3DlpiuqdmllpP-2LJ3xImWtGL79oMGw5GQBFSUTKqKHK6IJHXcIGCPkaZJvBFRNHGlZcSHuO98TqwWdO3-fcp/s1600/qna1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1405" data-original-width="1600" height="562" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtY4r-1AsdGSYdM381UCpRALLfkedUx4I_D7RgvCjUTQJ6BOE84jBp-Y3DlpiuqdmllpP-2LJ3xImWtGL79oMGw5GQBFSUTKqKHK6IJHXcIGCPkaZJvBFRNHGlZcSHuO98TqwWdO3-fcp/s640/qna1.png" width="640" /></a></div>
<div style="text-align: justify;">
Une fois ce choix configuré, simplement cliquer sur <b>Create</b> en bas de page, puis l'extraction est disponible dans le module Knowledge base comme montré ci dessous. Après avoir revu et corrigé la structure de la base d'extraction, cliquer simplement sur le bouton Save & Retrain puis cliquer sur le bouton Test pour tester votre robot. Noter que vous pourrez améliorer les réponses en lui indiquant vous même le meilleur choix.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY0WrXty8IoLouAcH-HT5cstFGr9yYzkfDTkBQp6_CfmV-KttI6SPw3TA_IhSPwno4fOUdK7UyhX3XWk1Xcsxmn0MVm-crZJBahMaZw95a0ZiXTlEJnySrEEEZX2P7rusRVNzwKM7r8Zc2/s1600/qna2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1119" data-original-width="1600" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgY0WrXty8IoLouAcH-HT5cstFGr9yYzkfDTkBQp6_CfmV-KttI6SPw3TA_IhSPwno4fOUdK7UyhX3XWk1Xcsxmn0MVm-crZJBahMaZw95a0ZiXTlEJnySrEEEZX2P7rusRVNzwKM7r8Zc2/s640/qna2.png" width="640" /></a></div>
Une fois l'interface Test affichée, il nous suffit de tester notre robot comme montré ci dessous, par exemple demandons lui le role du product owner , on voit que la réponse est bonne et conforme au Scrum Guide, à noter la zone encadrée en rouge liste toutes les réponses possibles, on peut à ce niveau améliorer la réponse du robot en modifiant la bonne réponse. Sur la droite, on peut formuler plusieurs alternatives de questions pour améliorer le panel de questions possible.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJYhn44m-AzKrD5H03NrmS0SMQsTe32-I9DW9jiaqVslMmas1PRsmTWCsknWzFcUFN2yvIcKuLE36lYM0-kyXH1GTP-Qs_TWbOdpecG-DPNM__ZDf_HrOxedeVbCf-G0iLr2y_2flR2NP/s1600/qna3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="974" data-original-width="1600" height="388" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgsJYhn44m-AzKrD5H03NrmS0SMQsTe32-I9DW9jiaqVslMmas1PRsmTWCsknWzFcUFN2yvIcKuLE36lYM0-kyXH1GTP-Qs_TWbOdpecG-DPNM__ZDf_HrOxedeVbCf-G0iLr2y_2flR2NP/s640/qna3.png" width="640" /></a></div>
Finalement, l'entrainement se fait en multipliant les sesions de chat avec le robot, et en enrichissant la KB. Pour des utilisations simple, le retour sur investissement d'un tel robot est absolument incroyable.<br />
La dernière étape va consister à publier notre robot, pour cela cliquer simplement le bouton Publish<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivbjdL6USdQwRynkuhZ4E7tJX_VZGM1cU-JRbIetOfK0Pl354Ege1hTcyvMs62j9nNOkIYDP-guiqwnSakS4B2j680pK7Q37-zVR1Swaa-SGzVm2WfvpUGE2qFrb2wMoZ2rGSZ1L6EdwQW/s1600/qna4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><br /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivbjdL6USdQwRynkuhZ4E7tJX_VZGM1cU-JRbIetOfK0Pl354Ege1hTcyvMs62j9nNOkIYDP-guiqwnSakS4B2j680pK7Q37-zVR1Swaa-SGzVm2WfvpUGE2qFrb2wMoZ2rGSZ1L6EdwQW/s1600/qna4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="1600" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivbjdL6USdQwRynkuhZ4E7tJX_VZGM1cU-JRbIetOfK0Pl354Ege1hTcyvMs62j9nNOkIYDP-guiqwnSakS4B2j680pK7Q37-zVR1Swaa-SGzVm2WfvpUGE2qFrb2wMoZ2rGSZ1L6EdwQW/s640/qna4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
La page suivante s'affiche avec un exemple d'http request pour utiliser notre service robot</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhusYiPUsVjmTuV4jUbjkLvdjYA-u3X_Hgl-FtHtnBd2dh384BSGZ2bWoOjr7wIwY9VKpY4nfe90Xgpny4_0F66ugE22gKvkvYyjXbQ-qMjs-_occ6_JZaNvAd0BmnVueBc-OHnzd8M3uux/s1600/qna5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="784" data-original-width="1600" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhusYiPUsVjmTuV4jUbjkLvdjYA-u3X_Hgl-FtHtnBd2dh384BSGZ2bWoOjr7wIwY9VKpY4nfe90Xgpny4_0F66ugE22gKvkvYyjXbQ-qMjs-_occ6_JZaNvAd0BmnVueBc-OHnzd8M3uux/s640/qna5.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nous verrons dans le prochain article comment créer un Bot consommant ce service</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com1tag:blogger.com,1999:blog-7985913466665944386.post-79501092613973175182018-03-19T08:41:00.000-07:002018-03-20T07:04:05.430-07:00Intelligence Artificielle et Ethique : Les enjeux de demain<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDBnIVg9eu6I_n4fIaXERm0r-MBsJKjnzQ3aBKhwqirbkCoza1cedvOeKESfIG5YfgVI62BgRQXzWQY_0KhdZQnFS69lDn2k3-uImL4AKYLwQoGZYbrTd6mXr71WmXQL3Tm27yr9xyUkyi/s1600/IAEthics.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="480" data-original-width="853" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDBnIVg9eu6I_n4fIaXERm0r-MBsJKjnzQ3aBKhwqirbkCoza1cedvOeKESfIG5YfgVI62BgRQXzWQY_0KhdZQnFS69lDn2k3-uImL4AKYLwQoGZYbrTd6mXr71WmXQL3Tm27yr9xyUkyi/s400/IAEthics.jpg" width="400" /></a></div>
<div style="line-height: 19.8pt; margin-top: 0cm; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Il m'a semblé important d'écrire cet article dans un moment ou l'intelligence artificielle n'est plus que de la science fiction mais commence véritablement à exister dans notre société et apparaitre au coeur de toute transformation digitale digne de ce nom. Les reflexions éthiques autour de l'intelligence artificielle vont faire partie des sujets majeurs à aborder dans les années à venir, aussi dans ce premier article, nous mettrons le focus sur les conséquences inquiétantes de l'intelligence artificielle sur notre monde afin de pouvoir mieux anticiper le futur pour un monde meilleur.</span></div>
<div style="line-height: 19.8pt; margin-top: 0cm; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Optimisation
Logistique, Détection de fraude, création d’œuvres artistiques, travaux de
traduction : les systèmes machines dits intelligents sont en train de
transformer nos vies pour le meilleur et peut être le pire. Au fur et mesure
que ces systèmes accroissent leurs capacités, notre monde devient plus efficace
toujours plus abondant.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; margin-top: 0cm; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Les géants
de la technologie typiquement représentés par le GAFAM (Google, Amazon,
Facebook, Apple et Microsoft) et bien d'autres mais aussi quelques personnes dont Stephen Hawking
et Elon Musk pensent que l’heure est venue de parler du domaine quasiment sans
limite de l’intelligence artificielle et de ses impacts sur notre monde. Nous
allons voir dans cet article quelles sont les difficultés et conversations qui
retiennent toute l’attention des Experts IA.<o:p></o:p></span></div>
<div class="separator" style="clear: both;">
</div>
<div style="line-height: 19.8pt; margin-top: 0cm;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Elon
Musk et Stephen Hawking ont signé une lettre ouverte sur l’intelligence
artificielle consultable à l’adresse suivante : <a href="https://fr.wikipedia.org/wiki/Lettre_ouverte_sur_l%27intelligence_artificielle">https://fr.wikipedia.org/wiki/Lettre_ouverte_sur_l%27intelligence_artificielle</a><o:p></o:p></span></div>
<br />
<div style="line-height: 19.8pt;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">1-Que se passera t’il après la fin des emplois ?<o:p></o:p></span></b></div>
<br />
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Le monde des travailleurs est concerné au premier rang par l’automatisation.
Alors que nous avons inventé des techniques d’automatisation de multiple types
de travaux, nous sommes censés créer de nouvelles perspectives pour que les travailleurs
concernés puissent occuper des rôles plus complexes, passant de travaux plutôt physiques qui ont
dominé largement le monde de l’industrie jusqu’à nos jours vers du travail plus
orienté intellect et création qui caractérise l’essentiel du travail stratégique dans
notre société globalisé à l’échelle mondiale. </span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Si l’on considère le
transport routier, il emploie actuellement des millions d’individus. Que se
passera t’il quand les camions autonomes promis par Tesla seront disponibles
dans un peu plus d’une décennie ? Maintenant, d’un autre coté si l’on
regarde la diminution du risque d’accidents, ces véhicules autonomes semblent
former un choix éthique sur plan de la vie. Le même scenario pourrait arriver aux
travailleurs</span><span style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"> de bureau, médecins, avocats, développeurs etc.<o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">C’est à ce stade précisément que la question du “Comment va on passer son
temps ? » se pose. La plupart des gens reposent toujours sur un
système vendant leur temps afin d’avoir un salaire suffisant pour subvenir à ses besoins et ceux de sa famille. On pourrait juste imaginer que cette
transition soit une opportunité permettant à ces gens de trouver du sens à des
activités non reliées au travail, comme prendre soin de leur famille, s’engager
dans des communautés et apprendre/découvrir de nouvelle manières de contribuer
à la société humaine <o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Si nous réussissons dans cette voie, un jour, en se retournant et en pensant
qu’il était dur et injuste que les êtres humains soient obligés de vendre la plus
grande partie de leur temps juste pour être capable de "survivre" et assumer leurs besoins.<o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">
</span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">On sait qu’aujourd’hui la
faisabilité de l’automatisation de taches techniques est plus importante sur des
taches prédictibles qu’imprédictibles dans des proportions d’environs 78% pour
les premières contre 25% pour les deuxièmes.<o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Sur le moyen terme, les personnes travaillant sur des travaux plus imprédictibles seront moins impactés par l'automatisation.<o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-4uBckKz0G73ygR90OgNKt4AuZbDH40PIbRa9RRqDicsZxLYWEvOV12-QqTLgJXF44uLt2VuckHCtPEJCfcLzXvCT70730qawvoK7NYKuCCUoGgZFF_06u5CXP2PN6UjHRBX0I3t5Zicz/s1600/predictibe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="626" data-original-width="1122" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-4uBckKz0G73ygR90OgNKt4AuZbDH40PIbRa9RRqDicsZxLYWEvOV12-QqTLgJXF44uLt2VuckHCtPEJCfcLzXvCT70730qawvoK7NYKuCCUoGgZFF_06u5CXP2PN6UjHRBX0I3t5Zicz/s320/predictibe.png" width="320" /></a></div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">2-Inégalité. Comment redistribue t’on la richesse créée par
les machines ?<o:p></o:p></span></b></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Notre
système économique est basé sur la compensation pour contribuer à l’économie,
le plus souvent indexé sur le taux horaire de travail. La majorité des
entreprises dépendent du travail horaire quand il s’agit de produits et de
services. Mais en utilisant l’intelligence artificielle, une entreprise va
drastiquement se dissocier de sa dépendance vis à vis de la force de travail humaine, ce
qui signifie que les revenus seront redirigés vers une population réduite. En corollaire,
les personnes impliqués dans des sociétés pilotées par l’intelligence
artificielle, seront celles qui gagneront le plus d’argent.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">On peut déjà voir des
différences de santé d’entreprises, avec par exemple, les fondateurs de Start
Ups qui récupèrent une large partie des revenus au travers des surplus créés. En 2014,
à titre d’exemple, les mêmes revenus ont été générés par les 3 plus grandes
compagnies de Detroit et les trois plus grandes compagnies de la Silicon Valley…. simplement, dans la Silicon Valley, il y avait 10 fois moins d’employés !<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">La question est donc :
comment structurer une économie juste et équitable dans le futur : Le GMI
(Garanteed Mininum Income) sera-t-il applicable ?<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">3-Humanité. Comment
les machines vont affecter notre comportement et interactions?<o:p></o:p></span></b></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Les agent
conversationnels ou Chatbot s’améliore sans cesse à mieux modéliser une
conversation humaine. En 2015, un robot nommé </span><span style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><a href="http://time.com/2847900/eugene-goostman-turing-test/" style="background-attachment: scroll; background-clip: border-box; background-origin: padding-box; background-position-x: 0%; background-position-y: 0%; background-size: auto; box-sizing: border-box; transition-delay: 0s; transition-duration: 0.15s; transition-property: all; transition-timing-function: cubic-bezier(0, 0, 0.58, 1);"><span lang="FR" style="color: #005c9c; text-decoration-line: none;">Eugene Goostman won the Turing
Challenge</span></a></span><span style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"> <span lang="FR"> a gagné au test de Turing pour la première
fois. Dans ce challenge, les examinateurs humains ont utilisé un système de messagerie textuel pour
converser avec une entité inconnue, puis essayer de deviner si la conversation
avait eu lieu avec un humain ou une machine. Eugene Goostman a trompé plus de
la moitié des examinateurs leur faisant croire qu’ils étaient en train de parler à un
être humain.<o:p></o:p></span></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Ce jalon est simplement le
début d’une ère ou nous allons fréquemment interagir avec des machines comme s’il
s’agissait d’humains, que ce soit dans les domaines du service ou de la vente.
Tandis que les humains sont limités pour ce qui concerne l’attention et la
gentillesse qu’ils peuvent apporter à une autre personne, les chatbot peuvent canaliser
virtuellement des ressources illimitées dans la construction de relations.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Les robots d’intelligence
artificielle sont tellement puissant qu’ils peuvent déclencher des phénomènes d’addiction,
notamment dans le domaine du jeu, laissant présager de nombreuses opportunités
de travail dans le domaine de l’addictologie. </span><span style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Un article intéressant
démontre ce point : <a href="http://kernelmag.dailydot.com/issue-sections/features-issue-sections/15708/addicting-apps-mobile-technology-health/"><span style="color: #005c9c; text-decoration-line: none;">Tech addiction
is the new frontier of human dependency</span></a>.<o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">4-La Bétise artificielle. Comment se protéger des erreurs? </span></b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">L’intelligence vient par l’apprentissage, que vous soyez humain ou machine.
Les systèmes passent tous au travers d’une phase de training au cours de
laquelle, ils apprennent et améliorent leur capacité à détecter les bons
patterns et agir de manière appropriée. Lorsqu’un système est complétement entrainé,
il va partir en test ou l’on va éprouver sa performance afin de valider ou non
sa mise en production.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">De manière évidente, les
phases de training ne peuvent pas couvrir tous les cas possibles auxquels le
système sera confronté dans le monde réel. Ces systèmes peuvent être trompés dans
des cas ou les humains ne le seraient pas. Par exemple, dans le cas des
voitures autonomes, la programmation d’une éthique déontique ou conséquentialiste
défaillante, pourrait avoir des conséquences mortelles dans certains cas. Si l’on
prend l’exemple déontique, la voiture obéit strictement au code la route, dans ce cas pour éviter un piéton traversant un passage piéton, la voiture pourrait prendre la
décision de se crasher pour respecter le code de la route. Nous devrons donc
être vigilant si l’on souhaite pouvoir disposer d’un IA surpuissante au service
de l’humain. L'accident mortel provoqué par une voiture autonome Uber met au fait de l'actualité la relative fiabilité des véhicules autonomes tel que commenté dans cet article : <o:p></o:p></span><a href="https://www.msn.com/fr-fr/actualite/monde/un-v%C3%A9hicule-autonome-duber-impliqu%C3%A9-dans-un-accident-mortel/ar-BBKrj5K?ocid=spartandhp" style="font-family: "&quot", serif; font-size: 13.5pt;"><span lang="FR">https://www.msn.com/fr-fr/actualite/monde/un-véhicule-autonome-duber-impliqué-dans-un-accident-mortel/ar-BBKrj5K?ocid=spartandhp</span></a><br />
<div style="line-height: 19.8pt;">
<span lang="FR" style="color: #141414; font-family: "&quot",serif; font-size: 13.5pt; mso-ansi-language: FR;"><o:p></o:p></span></div>
</div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">5-Des robots racistes.
Comment éliminer les biais de l’IA?</span></b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Bien que l’intelligence artificielle est capable d’effectuer des taches à
une vitesse et niveau de complexité bien au-delà des capacités humaines, on ne
peut toujours pas lui adjuger toute notre confiance. Google et Alphabet sont
parmi les leaders dans l’IA aujourd’hui, on peut le voir au travers de Google
Photo Service, ou l’IA est utilisée pour identifier des personnes, objets ou
scènes (a tester absolument sur votre album photo!). Mais le système peut échouer, quand un système de reconnaissance visuel
pour la prédiction de futurs criminels montre un biais cognitif à l’encontre de
personnes noires par exemple. De la même manière, on se rappellera du robot Microsoft
rapidement retiré pour avoir tenu des propos racistes.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">On ne doit pas oublier
que les systèmes IA à la base sont créés par des humains, qui eux-mêmes peuvent
être biaisés et juge et parti. Une fois de plus, bien utilisé, l’intelligence
artificielle peut devenir un catalyseur pour un changement positif.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">6-Sécurité. Comment
proteger l’IA contre des utilisations dommageables?</span></b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Plus une technologie est puissante et évoluée, plus elle peut être candidate
à des utilisations néfastes. La bombe atomique au siècle dernier nous en a
donné de tristes exemples. Ceci s’applique non seulement aux robots fabriqués
pour remplacer les soldats humains, ou les armes autonomes, mais aussi au
système IA qui peuvent causer des dommages en cas d’utilisation « illicite ». Pour cette raison, la cybersécurité va
devenir de plus en plus importante, étant donné que ces combats n’auront pas forcément
lieu que sur le terrain. Après tout, on a à faire à un système qui est plus
rapide et capable que l’être humain dans des proportions hors norme.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">7-Génie destructeur. Comment se protéger contre les conséquences
inattendues ?<o:p></o:p></span></b></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Ce n’est pas seulement des utilisations dommageables dont nous devons avoir peur. Que se
passera t’il si l’intelligence artificielle se retournait contre nous ? Un
responsable de la section IA au MIT, donnait récemment un exemple d’IA se
retournant contre les humains avec l’exemple suivant : Les systèmes IA vont
se développer de plus en plus vite notamment au travers du Deep Learning, par
conséquent les IA vont se développer toutes seules, et à moment donné vont s’intéresser
à des problèmes clés du monde. Très vite l’environnement sera un sujet
identifié, l’IA déterminera alors que l’humain est l’entité la plus néfaste
pour l’environnement et pour résoudre ce problème pourrait prendre la décision
de détruire les humains pour régler le problème. Du point de vue machine, ce n’est
pas forcément de la malveillance, mais plutôt un manque de compréhension
du contexte global. Mais en détruisant l’humanité, l’IA aurait atteint son objectif
de protection de l’environnement, mais pas de la manière par laquelle les humains
l’aurait fait.<o:p></o:p></span></div>
<div style="line-height: 19.8pt; text-align: justify;">
<b><span style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">8-Singularité. </span></b><b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">Comment garde t’on le contrôle d’un système intelligent complexe?</span></b><span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><o:p></o:p></span></div>
<div style="box-sizing: border-box; line-height: 19.8pt; text-align: justify;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;">La domination de l’être humaine sur la planète, n’est pas le fait de sa
force physique, mais plutôt de son intelligence et sa créativité. Ceci pose une
question sérieuse au sujet de l’intelligence artificielle : Va-t-elle un
jour nous dépasser ? On ne peut pas juste les débrancher, parce qu’une
machine suffisamment avancée pourrait anticiper ce mouvement et se défendre. C’est
ce que certain appelle la singularité : Le point dans le temp ou les être
humains ne seront plus les être les plus intelligents sur la planète.<o:p></o:p></span></div>
<div class="separator" style="clear: both;">
</div>
<div style="line-height: 19.8pt;">
<span lang="FR" style="color: #141414; font-family: "&quot" , serif; font-size: 13.5pt;"><a href="https://fr.wikipedia.org/wiki/Singularit%C3%A9_technologique">https://fr.wikipedia.org/wiki/Singularit%C3%A9_technologique</a><o:p></o:p></span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-76385321521624155292018-03-14T09:32:00.001-07:002018-03-14T09:32:17.235-07:00Computer Vision Science avec les technologies Microsoft - Contexte et mise en oeuvre Partie 2<br />
<div style="text-align: justify;">
Le service Custom vision fair partie du module Vision de l'offre Cognitive Services de Microsoft<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYKqlu372jHdprQ-pAD0i6cVQnsdBI4Y8VW2NGyN_7ZF2HLTQ9hO3K9sePbex6OgUqkhYRR_mE0JoM4QcLWkVDXEFl06eYbcVoxzk0OZNPfUg2-7UqJxl_vuIaoR7iZxyY-Cf78CrrkYxr/s1600/im10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="530" data-original-width="1600" height="210" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYKqlu372jHdprQ-pAD0i6cVQnsdBI4Y8VW2NGyN_7ZF2HLTQ9hO3K9sePbex6OgUqkhYRR_mE0JoM4QcLWkVDXEFl06eYbcVoxzk0OZNPfUg2-7UqJxl_vuIaoR7iZxyY-Cf78CrrkYxr/s640/im10.png" width="640" /></a></div>
Le module Vision contient les éléments suivants :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW4FFfpDnK3pEEtO1_QhQC1PcplvpRVMi66702SBaxWRzUiTSzrkIE4I3ZW41ulYfv1-yX60WMeS91mQvjE_h63J-thHtcxV7oIqAawHODNP3LZIMAW_93gNkS8mN9ppLOEW_gU-pJxu3J/s1600/im11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="713" data-original-width="1600" height="284" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgW4FFfpDnK3pEEtO1_QhQC1PcplvpRVMi66702SBaxWRzUiTSzrkIE4I3ZW41ulYfv1-yX60WMeS91mQvjE_h63J-thHtcxV7oIqAawHODNP3LZIMAW_93gNkS8mN9ppLOEW_gU-pJxu3J/s640/im11.png" width="640" /></a></div>
<br />
Le Service Custom Vision ou Service Vision personnalisée en français permet de télécharger des images de référence, de les classifier, puis d'entrainer un modèle pour l'utiliser afin d'évaluer et classifier automatiquement nos images.</div>
<div style="text-align: justify;">
On peut alors ajouter des images, corriger et réentrainer le modèle. Tous les fonctionnalités peuvent être lancées et invoquées à partie de l'API REST ce qui fait qu'il est facille d'incorporer toutes ces fonctionnalités à partir d'applications que l'on écrit en C#, Angular, Python etc.</div>
<div style="text-align: justify;">
Dans cet article nous allons voir comment créer un projet Custom Vision pour classifier des images, nous téléchargerons des images et entraineront et testeront le modèle. Pour cet exemple nous utiliserons des photos de plantes.</div>
<div style="text-align: justify;">
dans le prochain article nous verrons comment consommer le modèle à partir d'une application custom.</div>
<div>
La première étape consiste à se connecter au service customvision à l'adresse : https://customvision.ai</div>
<div>
Une fois connecté la page projets apparait : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFyfuE_osd5hg8FPgPti5H6LxiNrgb9SKPkEDq7kS80XefWMdBIRA-5T366ZzYb0RfAeXZeNJj0REtMwvA-D_B1XHWQ5dA6GP1XY12jHRK5i1LTYjNNvCUHHNLwSTRl7_ui4_8eeN2Pipt/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1194" data-original-width="1600" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFyfuE_osd5hg8FPgPti5H6LxiNrgb9SKPkEDq7kS80XefWMdBIRA-5T366ZzYb0RfAeXZeNJj0REtMwvA-D_B1XHWQ5dA6GP1XY12jHRK5i1LTYjNNvCUHHNLwSTRl7_ui4_8eeN2Pipt/s400/im1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="text-align: start;">Cliquer sur New Project puis renseigner le nom et la description, nous choisissons ici les options compact pour pouvoir exporter les classifiers vers des telephones mobiles IOS ou Android</span></div>
<div class="separator" style="clear: both; text-align: left;">
<span style="text-align: start;"><br /></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX5mLKGa37OcR7LjGIwomdoxrPhcNPnNJZ2sTgSbbbyiccxB9UQP96hhEnU99OtK0wG3DF7aXHhJzpu4ljEvOBl3L9mMrohKoCiBRz4a_vPclBz-UItwyuE4dFN40-4uV4ot1D5qluwEve/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1600" data-original-width="1232" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjX5mLKGa37OcR7LjGIwomdoxrPhcNPnNJZ2sTgSbbbyiccxB9UQP96hhEnU99OtK0wG3DF7aXHhJzpu4ljEvOBl3L9mMrohKoCiBRz4a_vPclBz-UItwyuE4dFN40-4uV4ot1D5qluwEve/s640/im2.png" width="491" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nous allons ajouter des images, pour démarrer 5 images de fraises que nous taggeront fraise et fruit. Il nous faut au minimum 5 images d'une catégories et 2 tags pour pouvoir entrainer le modèle</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD8YWJBeH_Dif0fzMeRrQu8SfNP8_awGsQwXAVBWtg3FzlqE5bBxLyKRM4lgcmR301xqYoynfRttTNCQzAr-80_5oepNATplZoMPTQwUs6XongB43bBU0_BWvCBwY35Wbp7zQyz_O2k6bW/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1185" data-original-width="1600" height="472" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgD8YWJBeH_Dif0fzMeRrQu8SfNP8_awGsQwXAVBWtg3FzlqE5bBxLyKRM4lgcmR301xqYoynfRttTNCQzAr-80_5oepNATplZoMPTQwUs6XongB43bBU0_BWvCBwY35Wbp7zQyz_O2k6bW/s640/im3.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Une foirs les images téléchargés nous allons ajouter les tags puis valider</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3QldRFUl69-X00zU71uzRJ5YU19jhjMI4hy7bQCHsVr63kZKTCm6qXR-1v_-3m-sGvR4JkQwa91fztLcnN5s6Or4yOtOOE_OOeLFkHnskEkdUWB5NcnOlJkEyopkNtHwtehQNN3OJIbba/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1022" data-original-width="1325" height="307" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3QldRFUl69-X00zU71uzRJ5YU19jhjMI4hy7bQCHsVr63kZKTCm6qXR-1v_-3m-sGvR4JkQwa91fztLcnN5s6Or4yOtOOE_OOeLFkHnskEkdUWB5NcnOlJkEyopkNtHwtehQNN3OJIbba/s400/im4.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Puis nous allons entrainer le modèle en cliquant simplement sur le bouton Train</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRbGN8cEfeAL25ETcW7ycG4yfMTyhWVmZm1M9K_8QIAQOsJADq5pcbjG5-LIiFc31Yz791PV06DzOGs0f75leOA-uA2VH9n8BrU3iIPiZ7ArlXkE9LAPi1DP37YCfXj4N7LTGFX4CKwpCR/s1600/im5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="1600" height="170" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRbGN8cEfeAL25ETcW7ycG4yfMTyhWVmZm1M9K_8QIAQOsJADq5pcbjG5-LIiFc31Yz791PV06DzOGs0f75leOA-uA2VH9n8BrU3iIPiZ7ArlXkE9LAPi1DP37YCfXj4N7LTGFX4CKwpCR/s400/im5.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Une foir l'itération d'entrainement terminé on voit apparaitre le résultat de la reconnaissance, bien évidemment, plus on ajoutera d'images, plus le modèle sera efficace</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr2C6dUN2Z7xfHdDUFlfUZpXwkkC0MON-T1ZcyNeSeD7DeZvA3exHTwo-hrcHVg-RinL0-Tw6G3i_mRnOm38DKQIh9ETQ5RimbR1qqPoUt2g9bTjjnc8IBRj7BkGTvM3BleGB3p3gXgCae/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1040" data-original-width="1600" height="412" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhr2C6dUN2Z7xfHdDUFlfUZpXwkkC0MON-T1ZcyNeSeD7DeZvA3exHTwo-hrcHVg-RinL0-Tw6G3i_mRnOm38DKQIh9ETQ5RimbR1qqPoUt2g9bTjjnc8IBRj7BkGTvM3BleGB3p3gXgCae/s640/im6.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
On peut alors tester le modèle directement à partir du site, pour cela on peut récupérer l'URL du fruit à reconnaitre puis la soumettre à l'outil de test</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXaykKY6O1nv6qJzikSZvo5DrOKUpoduCo0rv0SEtV3Zs2pCM7m4edbeXskL0bbX_JS0yu5jIuF23AnMOnP62q445Ts_ODSpKBuc1skKxs3bEfzyflVnmyzWgmnVnO2jsfRX_4XF0CpqYa/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="994" data-original-width="1600" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiXaykKY6O1nv6qJzikSZvo5DrOKUpoduCo0rv0SEtV3Zs2pCM7m4edbeXskL0bbX_JS0yu5jIuF23AnMOnP62q445Ts_ODSpKBuc1skKxs3bEfzyflVnmyzWgmnVnO2jsfRX_4XF0CpqYa/s320/im7.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
On voir ici une reconnaissance à 100% dans ce cas</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTj33ZcR3BjXSScVcvD1PQyef6zAAPOjbDAqfBrfUANDeYo2EiGEGRVJG_l9fz0s9u9nW69Vd2AnuYORMrUS12CxoPgPmJk4jUdWak0e6bjkvfIMzCnY1tt_L6bjvkrnSf79MakNBu0tOy/s1600/im8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1010" data-original-width="1600" height="402" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTj33ZcR3BjXSScVcvD1PQyef6zAAPOjbDAqfBrfUANDeYo2EiGEGRVJG_l9fz0s9u9nW69Vd2AnuYORMrUS12CxoPgPmJk4jUdWak0e6bjkvfIMzCnY1tt_L6bjvkrnSf79MakNBu0tOy/s640/im8.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Enfin si l'on veut le tester à partir d'un téléphone par exemple, nous pourrons exporter le modèle qui pourra être utilisé offline à partir d'un Iphone par exemple, pour cela, cliquer sur le bouton export puis choisir le type de device cible</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVqES9xY6cxqCTDv6_Ya9SCxdUbzTW_dL7VOaZEaqRcJNBmTCxYX1QV-Z3XKlObd2mq-gQDyQ50P7G13UT0aa4i9ELWZa4OQI3nFSho7ZW2laBys3fogfwogeG8HeBQeDfDRuwHYtOHbN/s1600/im9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1107" data-original-width="1584" height="446" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYVqES9xY6cxqCTDv6_Ya9SCxdUbzTW_dL7VOaZEaqRcJNBmTCxYX1QV-Z3XKlObd2mq-gQDyQ50P7G13UT0aa4i9ELWZa4OQI3nFSho7ZW2laBys3fogfwogeG8HeBQeDfDRuwHYtOHbN/s640/im9.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
L'assistant fournit des exemples de code pour pouvoir utiliser le modèle à partir des caméras des téléphones.</div>
<div class="separator" style="clear: both; text-align: left;">
Nous avons vu qu'il est très simple de créer et entrainer un modèle sur un thème particulier et de le déployer sur le système de son choix. Dans le prochain article, nous verrons comment utiliser ce modèle et l'API REST à partir d'un application Custom</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
<div>
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-88940668216695221842018-03-14T04:57:00.001-07:002018-03-14T04:57:32.112-07:00Computer Vision Science avec les technologies Microsoft - Contexte et mise en oeuvre Partie 1<div style="text-align: justify;">
<div style="text-align: justify;">
Dans ce premier article, nous allons aborder le domaine et les applications du Computer Vision avec l'intelligence artificielle, dans le deuxième article nous nous interesserons plus particulièrement à la mise en oeuvre du Computer Vision au travers de la brique Microsoft Custom Vision qui constitue l'un des produits de la suite Microsoft Cognitive Services.<br />
Le monde de l'intelligence artificielle connait aujourd'hui un essor spectaculaire tant sur le plan de l'évolution des technologies que des applications métiers. Le gros avantage de ce domaine est que le traitement d'images ne dépend pas des pays, langues etc. Ainsi, on ne retrouve pas les problèmes rencontrés dans le NLP (Natural Language Processing) par exemple pour ce qui concerne le traitement du language, ou force est de constater que dès que l'on sort de la langue de Shakespeare, les systèmes ont des niveaux de performances problématiques.</div>
</div>
<div style="text-align: justify;">
En revanche dans le domaine de l'image, ce problème n'existe pas et les applications mises en oeuvre rivalisent d'ingéniosité et de valeur ajoutée. nous allons donc commencer par faire un tour d'horizon rapide du potentiel de ce domaine fonctionnel et technologique de l'IA. Les secteurs ou l'on va retrouver des application interessantes sont </div>
<div style="text-align: justify;">
</div>
<ul>
<li>Le domaine médical</li>
<li>L'industrie</li>
<li>Le secteur de la distribution</li>
<li>Le secteur de l'agriculture</li>
<li>Les réseaux sociaux</li>
</ul>
<div>
<div style="text-align: justify;">
Pour citer quelques exemple, dans le domaine médical, Microsoft, l'initiative InnerEye (démarrée en 2010) permet de travailler sur des outils de diagnostic par imagerie, l'équipe a d'ailleurs posté un grand nombre de vidéos expliquant leur développements, incluant cette vidéo sur le Machnine Learning à partir d'analyse d'image : </div>
</div>
<div>
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="315" src="https://www.youtube.com/embed/YlVoTix1wok" width="560"></iframe>
</div>
<div>
<br />
<div style="text-align: justify;">
Le domaine du Deep Learning va très probablement jouer un role de plus en plus important dans les applications de diagnostic étant donné que le Deep Learning devient plus accessible et que l'on a des sources de données de plus en plus importantes en termes d'images médicales qui font désormais partie intégrante du Process de Diagnostic par IA.</div>
<div style="text-align: justify;">
Dans le domaine de la distribution, les nouvelles expériences d'achat proposée par Amazon Go entièrement basée sur du Computer Vision et du Machine Learning, permettent aux client une expérience nouvelle évitant le pénible passage à la caisse comme montré dans la vidéo ci dessous :</div>
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="368" src="https://www.youtube.com/embed/NrmMk1Myrxc" width="656"></iframe>
<br />
<div style="text-align: justify;">
Dans le domaine de l'agriculture tout comme dans l'industrie des applications sont faites pour accèlérer le tri ou le controle optique permettant de détecter par exemple des défauts sur des légumes ou bien manufacturés à des cadences largement supérieures à celle d'un humain.<br />
Dans le domaine de la sécurité, les système de controle au frontières sont en train également de migrer vers la reconnaissance faciale comme preuve d'identité ( évolution des systèmes Parafe existants).<br />
Enfin dans le domaine des résaux sociaux, on pourra citer le projet Lens de Pinterest qui fonctionne comme Shazam mais avec des images, permetttant de reconnaitre à peu près tout ce qui existe et connecter à du contenu marketing ou de type blog, comme montré ci dessous.<br />
<iframe allow="autoplay; encrypted-media" allowfullscreen="" frameborder="0" height="480" src="https://www.youtube.com/embed/PYo4d3hfVZg" width="854"></iframe>
</div>
</div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-87931473068296067772017-10-03T03:28:00.002-07:002017-10-03T03:28:36.094-07:00Retour sur l'AI Summit de San Francisco - Voyage dans le futur proche<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
A l'issue de
la première journée de la conférence, on a une sensation de disruption émergente, à tel point que l'on se
demande si l'on est pas en train de vivre une sorte d'avènement des robots
"The Raise of the Robots".</div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDnNr-wJljgzn8kX7H5xH8_5kpohsddyyz-EHEAUHm4TNIpeuZbu-Fdepp_cpZR8aScPT_h6SSBol2tDZM0nIJga9NpnAymVF-bziNBxw8ljly3wRBLHx8-dXkR09zFC7oS2tVzypKSv-S/s1600/RaiseOfRobot.png" imageanchor="1"><img border="0" height="214" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDnNr-wJljgzn8kX7H5xH8_5kpohsddyyz-EHEAUHm4TNIpeuZbu-Fdepp_cpZR8aScPT_h6SSBol2tDZM0nIJga9NpnAymVF-bziNBxw8ljly3wRBLHx8-dXkR09zFC7oS2tVzypKSv-S/s640/RaiseOfRobot.png" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
Mais
tout d'abord quelques chiffres sur cette conférence qui se tient au cœur de la
région la plus innovante au monde, la Silicon Valley dans la région de San
Francisco</div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8yGuhpMITHIwIGpYitPwKG2h0ify03ZtMFx1r9-zYc8L0sSinN1loZPD43GcQrLjHiSuXMyvjT9UB7pHO9tDe4Ees_f5C2WTEUcGKz5By3vIkB3D23E1v0IstJtu_1Xc0bbRDe-UxEtPW/s1600/Figures.png" imageanchor="1"><img border="0" height="104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8yGuhpMITHIwIGpYitPwKG2h0ify03ZtMFx1r9-zYc8L0sSinN1loZPD43GcQrLjHiSuXMyvjT9UB7pHO9tDe4Ees_f5C2WTEUcGKz5By3vIkB3D23E1v0IstJtu_1Xc0bbRDe-UxEtPW/s640/Figures.png" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
c'est aussi
une opportunité de rencontrer les acteurs majeurs du secteur dont beaucoup ont
des bureaux en Californie</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5elHtVYFvGNdo_Lpyp90q86NOOczDH7TlaOEaJUlq2p-BdwUGUq523ZjJj4cnExy6gGbZA96AT4wCKJ0WpiXUw8TvtCCv5OEQ05_TRNV2HJtAK4L3HF8F6zk9KGgwFiTxdKANtU4-NDJt/s1600/sponsor1.png" imageanchor="1"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5elHtVYFvGNdo_Lpyp90q86NOOczDH7TlaOEaJUlq2p-BdwUGUq523ZjJj4cnExy6gGbZA96AT4wCKJ0WpiXUw8TvtCCv5OEQ05_TRNV2HJtAK4L3HF8F6zk9KGgwFiTxdKANtU4-NDJt/s400/sponsor1.png" width="400" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
La
conférence aborde également le sujet de la collaboration Humain - Robot et donc
comment tirer partie de l'ensemble de l'écosystème à la fois software, hardware
et plate forme pour faire de l'IA un atout majeur dans la production de valeur
au travers notamment de gain de productivité encore jamais atteint.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOo7iFd33q-jGUQaLCk_Go-fmzcrx9pV8TMPpRP6IGkXVcP3Y41u_2MALOK4yO3v11hfd0r7wvtGhDJJmq34h4N93grxBmqGA5uL_MuSVT10iYGExFOTX8WQaypynWVHwZ4vYKreVC0LNt/s1600/Centaure.png" imageanchor="1"><img border="0" height="245" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOo7iFd33q-jGUQaLCk_Go-fmzcrx9pV8TMPpRP6IGkXVcP3Y41u_2MALOK4yO3v11hfd0r7wvtGhDJJmq34h4N93grxBmqGA5uL_MuSVT10iYGExFOTX8WQaypynWVHwZ4vYKreVC0LNt/s400/Centaure.png" width="400" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
On apprend
d'entrée que l'IA nous emène dans un changement de paradigme total, qui va
considérablement impacter notre métier et également le business sous jacent. Il
faut donc tout d'abord explorer ce nouveau domaine et voir comment les
entreprises peuvent en recueillir les bénéfices. Pour cela, une bonne approche
va consister à se former sur le sujet au travers de lecture telles que</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHRvmeg1QfHa2Zp9Kz74hBgEkDGVgvsKEQ2L9VA3Xpondta8rGL4STN5DnhS-BM3Y9dgCqKqBCELoebJQxHUMHJNnVRvNiK7PdNG1To99GBttliGlXoHV_y4AevI2iPCRWfofTBmnSF5Dh/s1600/WP_20170927_004.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHRvmeg1QfHa2Zp9Kz74hBgEkDGVgvsKEQ2L9VA3Xpondta8rGL4STN5DnhS-BM3Y9dgCqKqBCELoebJQxHUMHJNnVRvNiK7PdNG1To99GBttliGlXoHV_y4AevI2iPCRWfofTBmnSF5Dh/s640/WP_20170927_004.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Au passage, on ne bypasser la réference de Francois Chollet sur le Deep Learning, dont la première partie est gratuite chez Manning en ligne</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCo8KXKSaADRLERAxlTtLxucTbubHDm86k_Kjn36Av7idLLsyBm3Z-qwQyXSgyddcxnkkof1DJRTSRliXlTpK24m7-SQ9qOA4v2Z-M8XGlZdinRyfvJieLBR-ZDPXy8bbE0SWV-7Xi_Uru/s1600/DeepLearningBook.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCo8KXKSaADRLERAxlTtLxucTbubHDm86k_Kjn36Av7idLLsyBm3Z-qwQyXSgyddcxnkkof1DJRTSRliXlTpK24m7-SQ9qOA4v2Z-M8XGlZdinRyfvJieLBR-ZDPXy8bbE0SWV-7Xi_Uru/s320/DeepLearningBook.png" width="260" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Et
également par le biais de formation, de nombreuses possibilités existent avec
Plurasight, mais aussi Microsoft qui produit gratuitement des formations et
livres blancs sur la création d'agent conversationnels , le Machine/Deep
Learning, l'utilisation du NLP etc. On notera également un ecosystème de
ressources de training plus ou moins techno agnostique :</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_ERy-t_oraGyFUx_yACrm6HI5YsWGoSEvPSumZNkLJjDqQDWPVljDI6L_I4MyXO-Pd-GiNZCOqcJrZyMG-EyysFxuRqOmfexGYZmYxH0nJA3h49mCUFv2F9BYjiOknNI2NbuDqe-NBuV/s1600/WP_20170927_006.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ_ERy-t_oraGyFUx_yACrm6HI5YsWGoSEvPSumZNkLJjDqQDWPVljDI6L_I4MyXO-Pd-GiNZCOqcJrZyMG-EyysFxuRqOmfexGYZmYxH0nJA3h49mCUFv2F9BYjiOknNI2NbuDqe-NBuV/s640/WP_20170927_006.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
Plusieurs
facteurs seront donc à prendre en considération pour démarrer avec de l'IA en
entreprise</div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
1 Le
Leadership : La première question est qui porte l'IA dans l'entreprise, Le role
de CDO (Chief Digital Officer) est il présent, qui gère les projets et la stratégie autour de l'intelligence artificielle?</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
2 La
sélection des projets, avec par exemple pour une compagnie financière,
l'utilisation du Machine Learning avec de l'analyse predictive et des
simulations vont être un véritable challenge de scoping pour passer d'un Lab à
la production</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
3 Pour finir, les compétences et les équipes qui seront en charge de ces
implémentations, à savoir ai-je les compétences necessaires en interne?</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Les
entreprises devront se réorganiser quelque peu si elle veulent réaliser avec
succès et efficacité leur transformation digitale basée sur de l'intelligence
artificielle.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Pour ce qui
concerne le driver, 70% des personnes interrogées considèrent que l'IA a le
potentiel de faire que les humains pourront ce concentrer d'avantage sur du
travail à forte valeur ajoutée. C'est l'essence de la promesse du RPA et
également de tous les assistants conversationnels sensés nous faire gagner
beaucoup de temps sur des taches
répétitives pour lesquelles nous sommes peu efficaces.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Coté
Microsoft, David Smith (VP Microsoft AI & Research) argumente sur le fait
que l'IA va permettre d'amplifier l'ingeniosité de l'être humain, voire de l'augmenter ce qui est
tout à fait aligné avec la vision globale de Microsoft : "Permettre à
toute personne et toute organisation sur la planète d'accomplir
d'avantage"</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
David
présentera l'ensemble de la plate forme Cognitive Microsoft ainsi que des
démonstrations époustouflantes rendues possibles grace au capacité de Machine
Learning et Deep Learning de Microsoft, comme la démo ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/R2mC-NUAmMk/0.jpg" src="https://www.youtube.com/embed/R2mC-NUAmMk?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
Chez Daisy,
on est persuadé que l'IA va disrupter le monde de la grande distribution, avec
l'arrivée d'Amazon et Ali Baba, les grands acteurs français vont devoir réagir
rapidement au prix de se faire uberiser par ces nouveaux mutants. Daisy est un
produit permettant d'utiliser l'IA pour d'optimiser la prise de décision
concernant les promotions des magasins par exemple, basé sur du Machine/Deep Learning, est déjà utilisé chez Lidl,
Amazon, Wallmart etc.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji9-_4mnGhbGi2c2oMNjNnIaNgmzTA8M8hyTpONYTfWov70Dck3dHh5wR8FdToKF7OdTi4VzWhVM4puhKkMTCFCeJdqtd1l13CbulElpGJzWSUibRB3-atl0AqUMfV7oULcjMmvL4c37m6/s1600/WP_20170927_008.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji9-_4mnGhbGi2c2oMNjNnIaNgmzTA8M8hyTpONYTfWov70Dck3dHh5wR8FdToKF7OdTi4VzWhVM4puhKkMTCFCeJdqtd1l13CbulElpGJzWSUibRB3-atl0AqUMfV7oULcjMmvL4c37m6/s640/WP_20170927_008.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAKKtemslaA20jhfuFHgkRkevdtN17S8ATdcKHQIyyb4F-sVnPodE02KXAc1wJFLwjuRxwTCNQAkfs23KM6AQH51e4iP50KiATmAj97UzD9zgWs7eNVFNsokhfvUO1m0zFWPlvtMPYJhJb/s1600/WP_20170927_009.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAKKtemslaA20jhfuFHgkRkevdtN17S8ATdcKHQIyyb4F-sVnPodE02KXAc1wJFLwjuRxwTCNQAkfs23KM6AQH51e4iP50KiATmAj97UzD9zgWs7eNVFNsokhfvUO1m0zFWPlvtMPYJhJb/s640/WP_20170927_009.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAKKtemslaA20jhfuFHgkRkevdtN17S8ATdcKHQIyyb4F-sVnPodE02KXAc1wJFLwjuRxwTCNQAkfs23KM6AQH51e4iP50KiATmAj97UzD9zgWs7eNVFNsokhfvUO1m0zFWPlvtMPYJhJb/s1600/WP_20170927_009.jpg" imageanchor="1"></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHsxL356ljkLx58nBeykiA2Yc-KDP5yP-C2HTLjQMhAcIaTjE1ZN0WG3Lg3ZDwAs9zYFyFDyOdtKrU6QMlidcBlPkLCkTvBUEj5QFtCfA6qzq3fOifAkcz3wCE7c4nIzNUcDRT7h6rS9FN/s1600/WP_20170927_010.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHsxL356ljkLx58nBeykiA2Yc-KDP5yP-C2HTLjQMhAcIaTjE1ZN0WG3Lg3ZDwAs9zYFyFDyOdtKrU6QMlidcBlPkLCkTvBUEj5QFtCfA6qzq3fOifAkcz3wCE7c4nIzNUcDRT7h6rS9FN/s640/WP_20170927_010.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
</div>
<div lang="fr" style="font-family: Calibri; font-size: 11.0pt; margin: 0in;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Parmi
les exposants du salon, on va retrouver des solutions entreprises complètes
baties sur de l'IA avec DryIce par exemple de pnl. De telle solution nous font
réaliser que la majeure partie des entreprises n'en sont encore qu'à l'age de Pierre,
et on pourrait reprendre une illustration bien connue dans le monde de l'Agile,
le manque de réactivité pour pivoter rapidement vers plus de productivité et de
modernisation. Il faudra veiller à ne pas reproduire les erreurs du passé<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl7ry2L5eD2VG_8rwILf8BGQfOTMBHp2tA-sucpxsxcekfLb81iJYvCPI7I_uPmTOfT06-THttHPW3Jq0lVrzLg-XuWwlSB31wvR4gFhagEuQ2LqY7ontW5xwQC30HT46RrOdtY3qkmICh/s1600/TOO-BUSY.png" imageanchor="1"><img border="0" height="438" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjl7ry2L5eD2VG_8rwILf8BGQfOTMBHp2tA-sucpxsxcekfLb81iJYvCPI7I_uPmTOfT06-THttHPW3Jq0lVrzLg-XuWwlSB31wvR4gFhagEuQ2LqY7ontW5xwQC30HT46RrOdtY3qkmICh/s640/TOO-BUSY.png" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
En revanche<span style="font-weight: bold;"> </span>pour le Machine / Deep
learning le problème critique est le challenge créé par la qualité
relative et la structure des données, La
réconciliation et l'harmonisation de données disparates à travers de multiples
LOB en silo pose de réels problèmes de consistence et pertinence.Nous avons
besoin de techniques de gestion effective de la données permettant de s'assurer
que la donnée utilisée est à la fois comprise par l'humain et par la machine
aux travers des algorithmes de MLpar exemple</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
La donnée
est clé. La solution à ce problème dans le domaine de la finance par exemple
résiderait dans l'utilisation d'ontologies au travers de la mise en place d'un
standard commun de données gratuit et open source. Les ontologies
permettent une harmonisation des données et l'alignememnt nécessaire pour une
consolidation de données disparates basées sur un sens commun.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Les
ontologies peuvent être utilisées pour transformer un contenu non structuré en
une forme structurée pour du Machine Learning par exemple.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Les recherches de l'université de Mannheim en
Allemagne démontrent de plus que les ontologies peuvent aider le Machine
learning à effectuer de la validation de données à minima 50 fois plus vite
qu'en mode standard.<span style="font-size: 11pt;"> </span></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
En
conclusion, pas de Machine Learning / Deep Learning performant/relevant sans
ontologie</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Le Machine /Deep Learning c'est également le retour des mathématiques et statistiques avancées, ce qui va profondément changer notre métier dans les années à venir, qui vont voir considérablement augmenter les profils type Data Scientistes qui seuls aujourd'hui savent comprendre les notions d'algorithme du gradient stochastique ou la rétropropagation du gradient</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJa2cyDJU3-RHwbMr7me64p6q6WvoVa9AqqdmG-xUNzmU_wYWPX5-83z7Y7GkFJmHDGkN0-uUM82fmuXdIrGYV1pe4jtHeZxFMp_NIc9UKcvME32_b-SHsdhiSXytyXGr1uI98eN9S5zsW/s1600/WP_20170927_050.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJa2cyDJU3-RHwbMr7me64p6q6WvoVa9AqqdmG-xUNzmU_wYWPX5-83z7Y7GkFJmHDGkN0-uUM82fmuXdIrGYV1pe4jtHeZxFMp_NIc9UKcvME32_b-SHsdhiSXytyXGr1uI98eN9S5zsW/s640/WP_20170927_050.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Aujourd'hui,
Les utilisateurs s'attendent à pouvoir communiquer avec leurs appareils, sites
web en langage naturel. Les systèmes modernes doivent être conversationnels,
humain et intelligent. Les récentes implémentations par google avec Google Home
et Amazon Echo… en sont les meilleurs exemples</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Face à cet
enjeu, nous devons être capable de batir des agents conversationnels performant
et conforme aux attentes des utilisateurs dans des temps de mise sur le marché
courts à l'aide d'outils proposant des interfaces graphiques de conception,
avec par exemple le Conversation Designer de Microsoft avec également des capacités de déploiment
multi canaux.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<b>L'éthique </b>en matière d'IA constitue un sujet clé, on entend parler par exemple pour les voitures autonomes d'éthique déontique ou éthique conséquensialiste qui sont par exmple deux modèles de prise de décision relarivement opposé en termes de résultats, le premier basé sur le droit commun soit le code de la route pour une voiture, le deuxième sur l'évaluation des conséquenses d'une décision sur par exemple l'espérance de vie humaine. Face à une situation critique, le véhicule ne prendra pas la même décision en fonction de son code éthique. Ce sujet a été abordé dans de multiples sessions de la conférence, ci dessous un exemple.</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiuNEDdMfy2fRKJbK7HGCxNEympPnCHducFTixiiHnGmBvKdJWZiMjdjoZiGIZT8to3fMZBYr7E76glrQccyV0l80-hB-u4OHSAaLBXAsKRB8ZRZe66_4AcjXqxCKd9BHdT0xwSV0nlxBA/s1600/WP_20170927_054.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjiuNEDdMfy2fRKJbK7HGCxNEympPnCHducFTixiiHnGmBvKdJWZiMjdjoZiGIZT8to3fMZBYr7E76glrQccyV0l80-hB-u4OHSAaLBXAsKRB8ZRZe66_4AcjXqxCKd9BHdT0xwSV0nlxBA/s640/WP_20170927_054.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA1PTQmhXSix-_7tiEUmvHT35aX8SdA2Ja0bKBHV5NPtqU-8ZYSVGnQbK1udkkiFaMkpmgjLpE7hNJsKmlhdU-NCkW84p3WlbSPVUFMa6XyBtmOZ3BwyC0VRDWJ6bhrJAsNHgSpSjiD2b3/s1600/WP_20170927_055.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA1PTQmhXSix-_7tiEUmvHT35aX8SdA2Ja0bKBHV5NPtqU-8ZYSVGnQbK1udkkiFaMkpmgjLpE7hNJsKmlhdU-NCkW84p3WlbSPVUFMa6XyBtmOZ3BwyC0VRDWJ6bhrJAsNHgSpSjiD2b3/s640/WP_20170927_055.jpg" width="640" /></a></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<br /></div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
En
conclusion de cet article : L'IA est là, les ressouces pour la développer
également au travers de plate formes SAAS, Hardware avec notamment les GPUs (NVidia en tête),
l'arrivée prochaine des calculateurs quantiques, des Frameworks de
développements pour l'essentiel proposés par Microsoft, Amazon et Google. Il
n'y a plus de raison de ne pas avancer sur ce sujet, que ce soit au travers de
projets de productivité internes (RH, Finance, Recrutement etc…) ou bien encore
d'applications métiers innovantes</div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
Pour conclure ce premier article sur cette conférence voici le message délivré par Amazon: </div>
<div lang="fr" style="font-family: Calibri; font-size: 11pt; margin: 0in; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG-z1jcCg8AamiBVWz3dS0877hAmMXfEgF6tH028-OrxtY5i7EKaxtdJVhVwSX7NjLXaQl0iykn2gBbDkd_AMu5F1q5ICQdgvqbm54guNn2Mw5LS3MJWpcpb-SM2u_DLc6AK5b8HYvKXnC/s1600/WP_20170927_031.jpg" imageanchor="1"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgG-z1jcCg8AamiBVWz3dS0877hAmMXfEgF6tH028-OrxtY5i7EKaxtdJVhVwSX7NjLXaQl0iykn2gBbDkd_AMu5F1q5ICQdgvqbm54guNn2Mw5LS3MJWpcpb-SM2u_DLc6AK5b8HYvKXnC/s640/WP_20170927_031.jpg" width="640" /></a></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-35239130620712305532017-07-27T08:00:00.002-07:002017-07-27T08:00:11.638-07:00Bot Framework Part 5 - Déployer un ChatbotDans cet article, nous allons aborder toutes les étapes nécessaires à la mise en production d'un Chatbot<br />
<br />
<ul>
<li>Enregistrer notre bot sur le portail Bot Framework</li>
<li>Déployer notre Chatbot sur une instance de site web dans Azure</li>
<li>Tester notre Chatbot</li>
<li>Emuler différents channels : Slack, Teams, Skype, Facebook Messenger etc.</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkWk0LUwUaKiNN3aOX8yY91Qk-M2XTDmY1rM5PSVuf8bVuTgV_wHbWXdhZ17VllDpO3qeDhewbcVgX9PdLB00IckPU_P5VYC2djMBVdlipDKR81xYfj4rtWnZCcpcdqACqlUBv-sWE06Wt/s1600/bot13.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="359" data-original-width="638" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkWk0LUwUaKiNN3aOX8yY91Qk-M2XTDmY1rM5PSVuf8bVuTgV_wHbWXdhZ17VllDpO3qeDhewbcVgX9PdLB00IckPU_P5VYC2djMBVdlipDKR81xYfj4rtWnZCcpcdqACqlUBv-sWE06Wt/s400/bot13.jpg" width="400" /></a></div>
<div>
Notre Chatbot est simplement une application web et de ce fait il est possible de l'héberger sur tout host permettant d'héberger une site web ASP.net (Azure, AWS etc.)</div>
<div>
Pour enregistrer notre Bot, il suffit de se connecter au portail dev.botframework.com en s'authentifiant, puis cliquer sur l'onglet My Bots</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiasicccTZNZyLLo0zw9EMbg0ELn6Mml7rrIYYwhZBSFgB2PdJiafDGmUGmKVbFE_II5yGKC_EFuiw477Xko-fAIa2uEzkehcqnnsxu4joZQE6VCqijVnwl2Ft5Yz9mWc0VuH6pj0xwl96g/s1600/bot14.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="711" data-original-width="1600" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiasicccTZNZyLLo0zw9EMbg0ELn6Mml7rrIYYwhZBSFgB2PdJiafDGmUGmKVbFE_II5yGKC_EFuiw477Xko-fAIa2uEzkehcqnnsxu4joZQE6VCqijVnwl2Ft5Yz9mWc0VuH6pj0xwl96g/s400/bot14.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Puis cliquer sur Register pour enregistrer notre Chatbot, nous complétons alors le nom du Chatbot, le Handle qui est à usage interne uniquement et ne doit pas contenir d'espaces et enfin une description du Chatbot</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrtn1tAeaRxrRXVTPmju4GjbWV0P5fpG9kF1oYy5ubOVnrruQ2P-7ob0s3LeF8kKNMJdlgWf2bCYY1slbD6Q9vTdBpCQRsuFQn7y7bpIF2pfx8aMFo_HJ0Aejd2yeTSOdqI406e1YHQ-k7/s1600/bot51.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1172" data-original-width="1497" height="312" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrtn1tAeaRxrRXVTPmju4GjbWV0P5fpG9kF1oYy5ubOVnrruQ2P-7ob0s3LeF8kKNMJdlgWf2bCYY1slbD6Q9vTdBpCQRsuFQn7y7bpIF2pfx8aMFo_HJ0Aejd2yeTSOdqI406e1YHQ-k7/s400/bot51.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Pour la configuration, elle sera fournie par le portail, mais il faut tout de même en entrer une, nous pouvons mettre temporairement : https://blank-url.com puis cliquer sur le bouton Create Microsoft App ID</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8a3lPIIAilP3SpQiZ7LkPXHicXVJ8BbwraLSH5pGAMdgBj_AOWKZnAV-MA1qHq0cqxcYWbyqy0OoT92NBBJBtyIuOD5ZC1FS2T11xI_bQ-paocFSrKD3ME8ZglzvqcXWQF8J9CxhLZ6px/s1600/bot61.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="790" data-original-width="1478" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8a3lPIIAilP3SpQiZ7LkPXHicXVJ8BbwraLSH5pGAMdgBj_AOWKZnAV-MA1qHq0cqxcYWbyqy0OoT92NBBJBtyIuOD5ZC1FS2T11xI_bQ-paocFSrKD3ME8ZglzvqcXWQF8J9CxhLZ6px/s400/bot61.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nous sommes alors rediriger vers le portail de développement Microsoft avec la génération de l'ID</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOn37LOqpD4KG8lMd_2J_e5orKl4gNxissv6s4H9APnQ3yDDtaFXi9ACXNa8sx-XydLKTHMppqaz9WNQsH8fU1-25lE50ERbbLrRNVK_jysiSfDuyG-6YV9prRLNhQLz1IixJ9F8TvhxaL/s1600/bot17.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="503" data-original-width="1600" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOn37LOqpD4KG8lMd_2J_e5orKl4gNxissv6s4H9APnQ3yDDtaFXi9ACXNa8sx-XydLKTHMppqaz9WNQsH8fU1-25lE50ERbbLrRNVK_jysiSfDuyG-6YV9prRLNhQLz1IixJ9F8TvhxaL/s640/bot17.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Cliquer sur le bouton générer Mot de passe, la fenêtre suivante s'affiche alors</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJShTAXxVXwMejfRkulQbTQs5WsbejlBok9uzZjluIVhshaNEG5yeNbd3hhSLRNta1JSU57_fs806kMBqkw55c_AwdIKdu5K4_n6qCYQ5wS9HW7NEZ2OdVGWq3IcKc06oMXexOV5ak9bVq/s1600/bot18.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="835" data-original-width="1600" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJShTAXxVXwMejfRkulQbTQs5WsbejlBok9uzZjluIVhshaNEG5yeNbd3hhSLRNta1JSU57_fs806kMBqkw55c_AwdIKdu5K4_n6qCYQ5wS9HW7NEZ2OdVGWq3IcKc06oMXexOV5ak9bVq/s400/bot18.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Attention à bien copier l'App ID et le Password dans un endroit ou vous saurez le retrouver, nous en aurons besoin pour modifier la configuration du Chatbot ultérieurement. Il ne sera affiché qu'une seule fois tel qu'indiqué dans la fenêtre popup</div>
<div class="separator" style="clear: both; text-align: left;">
Enfin, on renseigne l'adresse email Admin (notre compte LiveID) puis simplement cliquer le bouton Register</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Hdx5lo9tIrgmu5QNEjT_Ft0hXFMDlqaa_1oYxrI4E5keyUN0IM9tdO_Bg7hR8kF7eZfUbJWCkz4IBbuFpc8dl0OgBbIHGBPGT-fhp_kXltCuv7amvWkDCEn2nhAW0pGyGbkApjj6uzv-/s1600/bot20.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1297" data-original-width="1600" height="323" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Hdx5lo9tIrgmu5QNEjT_Ft0hXFMDlqaa_1oYxrI4E5keyUN0IM9tdO_Bg7hR8kF7eZfUbJWCkz4IBbuFpc8dl0OgBbIHGBPGT-fhp_kXltCuv7amvWkDCEn2nhAW0pGyGbkApjj6uzv-/s400/bot20.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nous devons maintenant configurer et déployer notre Chatbot, pour cela revenons dans Visual Studio, ouvrir le fichier Web config et complèter les variables App ID et Password avec les valeurs générées lors de l'enregistrement du Chatbot</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb2yl5yYd5IG5f-zN-cG5C0Tt9aBzUizkpoJGHJwyR_QqX_-NTJD328C3LL9tzFXkvbqPxG1itV9QawO9Id_hS0oWOAfad7ljo6qJQhnfX5AErSkYmTJko9doSAnXLycDkk9fuEuN3d-h9/s1600/bot21.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="524" data-original-width="1325" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb2yl5yYd5IG5f-zN-cG5C0Tt9aBzUizkpoJGHJwyR_QqX_-NTJD328C3LL9tzFXkvbqPxG1itV9QawO9Id_hS0oWOAfad7ljo6qJQhnfX5AErSkYmTJko9doSAnXLycDkk9fuEuN3d-h9/s400/bot21.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Puis nous allons déployer le Chatbot sur une instance Web Azure, pour cela simplement lancer la commande Publish à partir du projet Chatbot et choisir la création d'une nouvelle Microsoft Azure App Service</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVNZFGWn2Zydk5PxajLiEAze1vZ3hqs2FFMdrYE2FrBftSG1wPl4M4zR1eSk-RaswMEKFmW5ncdnzdH2lOcIDXKEIGSCDeft0xHm8clkUK7t5gVD7PM-xbTzOcbl_t_RPgLLcqbZ7fSEt/s1600/bot22.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="610" data-original-width="1600" height="151" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVNZFGWn2Zydk5PxajLiEAze1vZ3hqs2FFMdrYE2FrBftSG1wPl4M4zR1eSk-RaswMEKFmW5ncdnzdH2lOcIDXKEIGSCDeft0xHm8clkUK7t5gVD7PM-xbTzOcbl_t_RPgLLcqbZ7fSEt/s400/bot22.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Visual Studio, nous propose la fenêtre de création en renseignant à partir de nos données de profil, simplement cliquer sur le bouton Create</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Pk3DoubDASZ1dkaKhgk-eDZH2VtMY3OF0XzEC75dQennPsOcNjfKLvqDg497jnN4AaH82OqT5UsPSYXNqxmhU6cOMr48Gw6KWAcqNqxnUiTPDWgxmT7dqMyBrlHDlVWeyUHoepzJxZMG/s1600/bot23.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1177" data-original-width="1581" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Pk3DoubDASZ1dkaKhgk-eDZH2VtMY3OF0XzEC75dQennPsOcNjfKLvqDg497jnN4AaH82OqT5UsPSYXNqxmhU6cOMr48Gw6KWAcqNqxnUiTPDWgxmT7dqMyBrlHDlVWeyUHoepzJxZMG/s400/bot23.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Une fois généré, nous récupérons l'URL du Chatbot afin de la remplacer dans la page de définition de notre bot et donc remplacer l'URL https://blank-url.com par celle générée.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPzLLZgDoEYPRuRjZ76A2c4cRO9716xTvrmmL1OVzOoS1Sl4N9djfQiwiP97E5np2rrIwxxk22tyYUMGrg0sbf38xntZQn_BpVHVzY2myRFT9ZZ8pBcvacGqUf6rixBF5NuIeXVgAPAXaJ/s1600/bot24.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="599" data-original-width="1553" height="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPzLLZgDoEYPRuRjZ76A2c4cRO9716xTvrmmL1OVzOoS1Sl4N9djfQiwiP97E5np2rrIwxxk22tyYUMGrg0sbf38xntZQn_BpVHVzY2myRFT9ZZ8pBcvacGqUf6rixBF5NuIeXVgAPAXaJ/s400/bot24.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nous revenons dans le portail bot Framework et remplacons l'adresse sans oublier de la suffixer par : /api/messages et préfixer par https, puis cliquer sur Save Changes en bas de page</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6MCczWwvSMAQnVVmLYkWm0HwmARlZVSbTsCIpw8QtW8hQxIWqjn-Za7VhiHhe3n86goddqTNw2Ae6_Q3nK3i7rc_eceq9oo_e1OOee8b8DcehZJKulCHYCYO0Vl5LahW9dmkWoqQ75TtZ/s1600/bot26.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="742" data-original-width="1600" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6MCczWwvSMAQnVVmLYkWm0HwmARlZVSbTsCIpw8QtW8hQxIWqjn-Za7VhiHhe3n86goddqTNw2Ae6_Q3nK3i7rc_eceq9oo_e1OOee8b8DcehZJKulCHYCYO0Vl5LahW9dmkWoqQ75TtZ/s640/bot26.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Dernière étape, tester le Chatbot, pour cela, simplement cliquer sur le bouton Test, une fenêtre de dialogue s'ouvre, le Chatbot devrait répondre tel qu'attendu : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgIFSWsFZgZl1Ob2Voi_ONEHRQ2lc_HK_L-wLkT1ZpEDhItmcK8_3dHznU84cNXIzGij9Q4qfE-eFgkx6Y4SiR_jTeA7_MUgioQZsAHK7hgEAijUcOU6nO6mXXWy4bQcEivHCDAo_guc0U/s1600/bot27.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1513" data-original-width="1148" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjgIFSWsFZgZl1Ob2Voi_ONEHRQ2lc_HK_L-wLkT1ZpEDhItmcK8_3dHznU84cNXIzGij9Q4qfE-eFgkx6Y4SiR_jTeA7_MUgioQZsAHK7hgEAijUcOU6nO6mXXWy4bQcEivHCDAo_guc0U/s320/bot27.jpg" width="242" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Pour terminer, nous savons qu'il n'est absolument pas une bonne idée de laisser des mots de passe ou identifiants dans le controle de code source, pour cela nous allons retirer l'App ID et le password du web.config pour le reporter dans la section App Settings de notre App service, en créeant simplement les 2 Clé valeurs comme montré ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44IgUlZha42ykSmcoW4ChyphenhyphenJPZnYmJMHVyAXNL8N5iAFLv3glvhyKb5ETk1CvM2nZR8i28gvLJNFKA41WfUfxzqf7hUs337iUGc340Ml8kUV7bix37xCaEKuqBchHRVCiw8ibz5LU9PoH_/s1600/bot28.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="604" data-original-width="1600" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44IgUlZha42ykSmcoW4ChyphenhyphenJPZnYmJMHVyAXNL8N5iAFLv3glvhyKb5ETk1CvM2nZR8i28gvLJNFKA41WfUfxzqf7hUs337iUGc340Ml8kUV7bix37xCaEKuqBchHRVCiw8ibz5LU9PoH_/s640/bot28.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Ne pas oublier de sauvegarder</div>
<div class="separator" style="clear: both; text-align: left;">
Nous allons par exemple pouvoir l'intégrer dans Skype par exemple, à partir de la page de votre Bot, cliquer sur Skype</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtdXyLkA4yOifOFyb1h0b9JDAzF0CsaudPmD7fVeHzKfFNOI6RN_vIjsiHdtz_iYmZ_R3QlF_dArzqQ3OPwyQUQzRBfKzuWXZCPEEHKA7bYSsdhxF1FhYgENJPW3OIKdi5NBz_wxqyApE/s1600/bot31.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1187" data-original-width="1600" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVtdXyLkA4yOifOFyb1h0b9JDAzF0CsaudPmD7fVeHzKfFNOI6RN_vIjsiHdtz_iYmZ_R3QlF_dArzqQ3OPwyQUQzRBfKzuWXZCPEEHKA7bYSsdhxF1FhYgENJPW3OIKdi5NBz_wxqyApE/s320/bot31.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Puis cliquer sur Add to Contacts et lancer Skype</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHspUDORft0G8HEmrmeZgo_mwqZfUcoilwV9NHS6a_sQmpUDEf2HTlQjtqX9lZXoT17pZOBbqtG9X7BDpqkFwHkjF5k-jWkekpR74qWZTLwnDVciKHEw_sYaUCfvCowvp08LREyC10i8n-/s1600/bot29.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1016" data-original-width="1600" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhHspUDORft0G8HEmrmeZgo_mwqZfUcoilwV9NHS6a_sQmpUDEf2HTlQjtqX9lZXoT17pZOBbqtG9X7BDpqkFwHkjF5k-jWkekpR74qWZTLwnDVciKHEw_sYaUCfvCowvp08LREyC10i8n-/s320/bot29.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Ci dessous, la conversation avec le Bot intégrée dans Skype</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Rid7kPM4_TbK3mSptFYPCocykJSfwvUP87EUraD5udRAst7pOcRVzqCLjHhGCvbvqeKdUi3pGYNmzf1rVvhFahYZdeUEV0N_EiKjpTKpUh1yIY9K20sxgJSdc60YF_dkUYutTyFNzM5u/s1600/bot30.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="807" data-original-width="1600" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7Rid7kPM4_TbK3mSptFYPCocykJSfwvUP87EUraD5udRAst7pOcRVzqCLjHhGCvbvqeKdUi3pGYNmzf1rVvhFahYZdeUEV0N_EiKjpTKpUh1yIY9K20sxgJSdc60YF_dkUYutTyFNzM5u/s400/bot30.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Pour tous les autres logiciels conversationnels, il suffit de cliquer sur celui que l'on veut intégrer et simplement suivre la procédure</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div>
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-63567879319816671772017-07-26T01:06:00.002-07:002017-07-26T01:08:34.063-07:00Bot Framework Part 4 - Optimisez l'Interaction avec l'utilisateur avec les Prompts<div style="text-align: justify;">
Un des objectifs clés d'un Chat Bot est la contribution de valeur vis à vis de l'utilisateur, et ceci va passer notamment par des interfaces de dialogue performantes dont l'effet sera le gain de temps. Le premier vecteur va bien évidemment consister à limiter les échanges par texte obligeant l'utilisateur à utiliser son clavier tactile sur un téléphone par exemple ce qui est clairement peu productif et fastidieux pour l'utilisateur. Pour pallier à cela on trouvera des solutions très interessantes dans le Bot Framework tel que les Prompts qui vont permettre d'accèlérer la collecte d'informations sous la forme d'options à cliquer sous différentes forme, l'idée étant de minimiser au maximum la frappe au clavier au profit de boutons ou d'options à cliquer, l'idée est également de cadrer l'utilisateur afin qu'il ne se perde pas dans des conversations infructueuses avec le Chat Bot, on aura également le fait d'apporter de l'aide à l'utilisaeur pour connaitre les possibilités du Chat Bot et donc optimiser le service rendu à l'utilisateur.</div>
<div style="text-align: justify;">
Parmi les différents types de Prompts on aura : </div>
<div style="text-align: justify;">
</div>
<ul>
<li>Des formulaires pour la collecte de texte</li>
<li>La détection de type de données : Nombres, Date - Heure</li>
<li>Des listes d'options pour des choix guidés</li>
<li>Des Media : images, vidéos par exemple pour des propositions d'hotels ou restaurants</li>
</ul>
<div>
Un des scenarios les plus courant est l'implémentation de la recherche, avec de manière générique les étapes suivantes : </div>
<div>
<ol>
<li>Détecter que l'utilisateur est à la recherche de quelque chose : en lui posant la question :)</li>
<li>Recueillir de la part de l'utilisateur une requéte en text Prompt</li>
<li>Proposer des options de réponses cliquables</li>
<li>Afficher le résultat, potentiellement un carousel d'images avec du texte</li>
</ol>
<div>
Nous allons donc mettre en oeuvre ce scénario avec un exemple dans lequel nous recherchons des Profils dans GitHub et affichons la liste de résultats sous la forme d'un carrousel d'options cliquables pour accèder au profil </div>
<div>
<br /></div>
<div>
Le code du Message Controller qui collecte les messages et répond à l'utilisateur est toujours le même :</div>
</div>
<div>
<br /></div>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div>
<div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Net;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Net.Http;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Web.Http;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Connector;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">BotAuthentication</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">MessagesController</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ApiController</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;"></span><br />
<br />
<br />
<br />
<br />
<summary></summary><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> POST: api/Messages</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> Receive a message from a user and reply to it</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;"></span></div>
</div>
</div>
<span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">HttpResponseMessage</span><span style="font-family: "consolas"; font-size: 9.5pt;">> Post([</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">FromBody</span><span style="font-family: "consolas"; font-size: 9.5pt;">]</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Activity</span><span style="font-family: "consolas"; font-size: 9.5pt;"> activity)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (activity.Type == </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ActivityTypes</span><span style="font-family: "consolas"; font-size: 9.5pt;">.Message)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Conversation</span><span style="font-family: "consolas"; font-size: 9.5pt;">.SendAsync(activity, () => </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Dialogs.</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">RootDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">());<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> response = Request.CreateResponse(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">HttpStatusCode</span><span style="font-family: "consolas"; font-size: 9.5pt;">.OK);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> response;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Le code de RootDialog.cs ci dessous gère le déclenchement de la recherche dès que l'utilsateur aura entré le mot recherche au début de la conversation, si l'utilisateur tape une chaine commencant par le mot recherche suivi d'un espace ou de texte, on va gèrer le cas également comme montré ci dessous. Une fois la requète entrée, la recherche est lancée: </span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Connector;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application.Dialogs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Serializable</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">RootDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">object</span><span style="font-family: "consolas"; font-size: 9.5pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">
StartAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Wait(MessageReceivedAsync);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">.CompletedTask;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> MessageReceivedAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">object</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> msg = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">as</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IMessageActivity</span><span style="font-family: "consolas"; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (msg.Text.Equals(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Recherche"</span><span style="font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">StringComparison</span><span style="font-family: "consolas"; font-size: 9.5pt;">.OrdinalIgnoreCase))<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">PromptDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">.Text(context, QueryEntered, </span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Que recherchez vous?"</span><span style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;">
(msg.Text.StartsWith(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Recherche "</span><span style="font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">StringComparison</span><span style="font-family: "consolas"; font-size: 9.5pt;">.OrdinalIgnoreCase))<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> query = msg.Text.Substring(7);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context.Forward<</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string></span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SearchDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">(), SearchComplete, query, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">default</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">CancellationToken</span><span style="font-family: "consolas"; font-size: 9.5pt;">));<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> QueryEntered(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context.Forward<</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string></span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SearchDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">(), SearchComplete, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">default</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">CancellationToken</span><span style="font-family: "consolas"; font-size: 9.5pt;">));<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> SearchComplete(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> returnMessage = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (!</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">.IsNullOrWhiteSpace(returnMessage))
</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context.PostAsync(returnMessage);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Wait(MessageReceivedAsync);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p><br />
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span>
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Nous avons également un client de recherche sommaire pour GitHub qui va nous retourner les informations de base d'un profil recherché sur GitHub, GitHubClient.cs: </span><br />
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span>
<br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Octokit;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> gh = Octokit;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GitHubClient</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">readonly</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Lazy</span><span style="font-family: "consolas"; font-size: 9.5pt;"><gh .="" span=""><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GitHubClient</span><span style="font-family: "consolas"; font-size: 9.5pt;">> _client = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Lazy</span><span style="font-family: "consolas"; font-size: 9.5pt;"><gh .="" span=""><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GitHubClient</span><span style="font-family: "consolas"; font-size: 9.5pt;">>(() => </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> gh.</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GitHubClient</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ProductHeaderValue</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"MyBotApp"</span><span style="font-family: "consolas"; font-size: 9.5pt;">)));<o:p></o:p></span></gh></span></gh></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"><gh .="" span=""><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">User</span><span style="font-family: "consolas"; font-size: 9.5pt;">> LoadProfile(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;"> username) =>
_client.Value.User.Get(username);<o:p></o:p></span></gh></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"><gh .="" span=""><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SearchUsersResult</span><span style="font-family: "consolas"; font-size: 9.5pt;">> ExecuteSearch(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;"> query) => _client.Value.Search.SearchUsers(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SearchUsersRequest</span><span style="font-family: "consolas"; font-size: 9.5pt;">(query));<o:p></o:p></span></gh></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span><br />
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Enfin, la classe SearchDialog.cs a pour responsabilité d'exécuter la recherche et de retourner une liste de cards sour la forme d'un carrousel de profils GitHub. On remarquera la facilité avec laquelle on crée la carte de profile avec la méthode CreateCard : </span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Connector;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Linq;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application.Dialogs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Serializable</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">internal</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SearchDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">
StartAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Wait<</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">>(MessageReceivedAsync);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">.CompletedTask;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> MessageReceivedAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> query = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> profiles = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GitHubClient</span><span style="font-family: "consolas"; font-size: 9.5pt;">.ExecuteSearch(query);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> totalCount = profiles.TotalCount;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (totalCount == 0)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Done(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Désolé, Pas de résultat trouvé."</span><span style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (totalCount
> 10)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Done(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Plus de 10 résultats trouvés. Pouvez vous filtrer plus précisément?"</span><span style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;">//
convert the results in to an array of cards for each user</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> userCards = profiles.Items.Select(item => CreateCard(item));<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> msg = context.MakeMessage();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> msg.AttachmentLayout = </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">AttachmentLayoutTypes</span><span style="font-family: "consolas"; font-size: 9.5pt;">.Carousel;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> msg.Attachments =
userCards.ToList();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context.PostAsync(msg);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Done(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">default</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">));<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Attachment</span><span style="font-family: "consolas"; font-size: 9.5pt;"> CreateCard(Octokit.</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">User</span><span style="font-family: "consolas"; font-size: 9.5pt;"> profile) =><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ThumbnailCard</span><span style="font-family: "consolas"; font-size: 9.5pt;">()<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> Title = profile.Login,<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> Images = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;">[] { </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">CardImage</span><span style="font-family: "consolas"; font-size: 9.5pt;">(url: profile.AvatarUrl) },<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> Buttons = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;">[] { </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">CardAction</span><span style="font-family: "consolas"; font-size: 9.5pt;">(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ActionTypes</span><span style="font-family: "consolas"; font-size: 9.5pt;">.OpenUrl, </span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Cliquer pour consulter"</span><span style="font-family: "consolas"; font-size: 9.5pt;">, value: profile.HtmlUrl) }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }.ToAttachment();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Voyons le résultat obtenu, on lance le Service Bot</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCKFHphFPi43vdrhScPKH_vL9ZRL0VgN687ZUQVFogzFvSh0n1LVSi06ooh7ikLW4dkzO8zjNeUqv6PqldYqbiSRrCMfSf_pK9FOIApBzV12qTy5V1dsokTBCy4g74lsQ87UpRckBwblV/s1600/bot9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="1600" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlCKFHphFPi43vdrhScPKH_vL9ZRL0VgN687ZUQVFogzFvSh0n1LVSi06ooh7ikLW4dkzO8zjNeUqv6PqldYqbiSRrCMfSf_pK9FOIApBzV12qTy5V1dsokTBCy4g74lsQ87UpRckBwblV/s320/bot9.jpg" width="320" /></a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Puis on lance l'émulateur Bot et on se connecte à l'URL : http://localhost:3979/api/messages</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">puis on entre le mot recherche pour déclencher la conversation avec le chat bot</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1mEo5HDZhnFXvjal3DYyFpnUE1RIhH_fQjqC6g4vjvv5Hk9NVEm7pyeWIkF6fE2Qg37D0Nrxl8DABYWj9b6yWvfOkQcJI1ctFlGK_8DsnqI9CY9yHqvMdI8PLOd2TXWKfIrFHOExQacNG/s1600/bot11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="995" data-original-width="1600" height="396" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg1mEo5HDZhnFXvjal3DYyFpnUE1RIhH_fQjqC6g4vjvv5Hk9NVEm7pyeWIkF6fE2Qg37D0Nrxl8DABYWj9b6yWvfOkQcJI1ctFlGK_8DsnqI9CY9yHqvMdI8PLOd2TXWKfIrFHOExQacNG/s640/bot11.jpg" width="640" /></a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">On voit ici le résultat affiché sous la forme d'un carrousel de cartes, et si l'on clique sur consulter, on a accès à la fiche GitHub : </span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ZaSrS0t0qJKeIr7U6hZmV3c-u_iE4Y1Qkil-VaEN_mKt-P13vxZjZvvWB7IyhRBHQU8MVIXXx6uWXDGWzXAQbN7MKfIeayac-zKpbl2U2P8G5DicSv1lxfCJmZtk6ROOvQoSQN9M4jQ-/s1600/bot12.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="672" data-original-width="1600" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-ZaSrS0t0qJKeIr7U6hZmV3c-u_iE4Y1Qkil-VaEN_mKt-P13vxZjZvvWB7IyhRBHQU8MVIXXx6uWXDGWzXAQbN7MKfIeayac-zKpbl2U2P8G5DicSv1lxfCJmZtk6ROOvQoSQN9M4jQ-/s400/bot12.jpg" width="400" /></a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
</div>
<div>
Cet article nous a permis de montré que nous pouvons au travers d'un Chat Bot implémenter des scénarios ergonomiquement interessant et plus interactif en tirant parti des différents Prompts proposés par le Bot Framework.<br />
Dans l'article suivant nous verrons comment déployer notre Bot afin de pouvoir le distribuer pour un usage en ligne<br />
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cette gestion d'état et de persistence va permettre des interactions beaucoup plus riche avec le Chat Bot.</div>
<div class="separator" style="clear: both; text-align: left;">
Vous retrouverez le code de cet exemple à l'adresse : <a href="https://github.com/MicrosoftLearning/csharp-bots-mva" target="_blank">Code Chatbot</a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-8408982984813057562017-07-24T08:20:00.001-07:002017-07-26T01:06:10.214-07:00Bot Framework Part 3 - Utilisation du Bot Workflow pour gérer la persistence du contexte d'un dialogue<div style="text-align: justify;">
lors des précédents articles, nous avons vu la mise en oeuvre simple d'un Chat Bot avec des fonctionnalités extrêmement limitées, par exemple notre Bot ne gérait aucune persistence de la conversation, donc incapacité à maintenir une conversation sur un sujet ou bien encore de se souvenir de vous dès le début d'une nouvelle conversation. Nous allons voir dans cet article que tout ceci est possible au travers de différents niveaux de persistence des données avec dans l'idée, la capactité à maintenir l'état d'une conversation. Par exemple si vous démarrez une conversation avec un Chat Bot en lui demandant quel est le monument le plus haut de Paris, et que le Bot vous répond La Tour Eiffel, si vous lui demandez qui l'a construite, sans persistence, il ne saura répondre car il aura perdu l'information précédente, donc avec ce système, nous allons pouvoir développer des expériences bien plus proches du réel.</div>
<div style="text-align: justify;">
Donc le besoin de maintenir des états est quelque chose de très important, cette fonctionnalité sera fournie par le Bot Connector dont le contrat est de router les messages et gérer la persistence et l'état d'un dialogue. Le Bot fonctionne en tant que Web Service et a donc une communication sans état (stateless) et c'est donc bien la responsabilité du Bot Connector d'assurer cette persistence d'état, notamment par Bot et par utilisateur. Le stockage de l'état se fait en base de données, et on aura un UserID, un ConversationID etc.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJTtXCzDdq8uP8A-ZhsV_TrlmfK4mGi6_KgLQAOPsYGLa24UGNPzcbg0ewOw_mF-ka-kp_sHAClmbJgMA-sx4gQLaWvbMiJrhrDXYsgPn_nCZZhyjlznwKna1gtOAjCKJFW9hH55nq4SBZ/s1600/bot8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="532" data-original-width="945" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJTtXCzDdq8uP8A-ZhsV_TrlmfK4mGi6_KgLQAOPsYGLa24UGNPzcbg0ewOw_mF-ka-kp_sHAClmbJgMA-sx4gQLaWvbMiJrhrDXYsgPn_nCZZhyjlznwKna1gtOAjCKJFW9hH55nq4SBZ/s640/bot8.jpg" width="640" /></a></div>
<div style="text-align: justify;">
Dans l'exemple ci dessous, nous allons donner à notre robot notre prénom et notre ville, grace à la gestion de persistence, il sera capable de restituer toutes ces informations stockées sur notre profil</div>
<div style="text-align: justify;">
La première chose à faire est de créer une classe sérialisable décrivant nos informations de profil : UserProfile : </div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application.Dialogs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Serializable</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Name { </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">get</span><span style="font-family: "consolas"; font-size: 9.5pt;">; </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">set</span><span style="font-family: "consolas"; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Country
{ </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">get</span><span style="font-family: "consolas"; font-size: 9.5pt;">; </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">set</span><span style="font-family: "consolas"; font-size: 9.5pt;">; }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div style="text-align: justify;">
</div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div style="text-align: justify;">
Puis nous allons créer la classe EnsureProfileDialog.cs dont la responsabilité va être de s'assurer de la capture des informations de profil de l'utilisateur, dans notre cas, le prénom et la ville</div>
<div style="text-align: justify;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application.Dialogs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Serializable</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">EnsureProfileDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span style="font-family: "consolas"; font-size: 9.5pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">
StartAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> EnsureProfileName(context);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">.CompletedTask;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
</span><span lang="FR" style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;"> _profile;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
</span><span lang="FR" style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="color: blue; font-family: "consolas"; font-size: 9.5pt;">void</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
EnsureProfileName(</span><span lang="FR" style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
</span><span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (!context.UserData.TryGetValue(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"profile"</span><span style="font-family: "consolas"; font-size: 9.5pt;">, </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">out</span><span style="font-family: "consolas"; font-size: 9.5pt;">
_profile))<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> _profile = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span style="font-family: "consolas"; font-size: 9.5pt;">();<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">.IsNullOrWhiteSpace(_profile.Name))<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">PromptDialog</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">.Text(context, NameEntered, </span><span lang="FR" style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Bonjour, quel est votre nom?"</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
</span><span style="font-family: "consolas"; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> EnsureCountryName(context);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">void</span><span style="font-family: "consolas"; font-size: 9.5pt;">
EnsureCountryName(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">.IsNullOrWhiteSpace(_profile.Country))<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="FR" style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">PromptDialog</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">.Text(context, CountryEntered, </span><span lang="FR" style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"Ou habitez vous?"</span><span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="FR" style="font-family: "consolas"; font-size: 9.5pt;">
</span><span style="font-family: "consolas"; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">else</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Done(_profile);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> CountryEntered(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> _profile.Country = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Done(_profile);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> NameEntered(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> _profile.Name = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> EnsureCountryName(context);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">La classe RootDialog va permettre le stockage des données de profil dans le User Data Bag, cette tache est effectuée par la tache ProfileEnsured</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Connector;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application.Dialogs<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Serializable</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">RootDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">object</span><span style="font-family: "consolas"; font-size: 9.5pt;">><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">
StartAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Wait(MessageReceivedAsync);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">.CompletedTask;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">
MessageReceivedAsync(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">object</span><span style="font-family: "consolas"; font-size: 9.5pt;">>
result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Call<</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span style="font-family: "consolas"; font-size: 9.5pt;">>(</span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">EnsureProfileDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">(), ProfileEnsured);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;">.CompletedTask;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">private</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"> ProfileEnsured(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IDialogContext</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context, </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">IAwaitable</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">UserProfile</span><span style="font-family: "consolas"; font-size: 9.5pt;">> result)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> profile = </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> result;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.UserData.SetValue(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">@"profile"</span><span style="font-family: "consolas"; font-size: 9.5pt;">, profile);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> context.PostAsync(</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">$@"Bonjour </span><span style="font-family: "consolas"; font-size: 9.5pt;">{profile.Name}</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">, j'adore </span><span style="font-family: "consolas"; font-size: 9.5pt;">{profile.Country}</span><span style="color: maroon; font-family: "consolas"; font-size: 9.5pt;">!"</span><span style="font-family: "consolas"; font-size: 9.5pt;">);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> context.Wait(MessageReceivedAsync);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Enfin la classe MessageController.cs</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Net;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Net.Http;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Threading.Tasks;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> System.Web.Http;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Builder.Dialogs;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">using</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Microsoft.Bot.Connector;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">namespace</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Bot_Application<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> [</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">BotAuthentication</span><span style="font-family: "consolas"; font-size: 9.5pt;">]<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">MessagesController</span><span style="font-family: "consolas"; font-size: 9.5pt;"> : </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ApiController</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;"></span><br />
<br />
<br />
<summary></summary><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> POST: api/Messages</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> Receive a message from a user and reply to it</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;">///</span><span style="color: green; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="font-family: "consolas"; font-size: 9.5pt;"></span></div>
<span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span><br />
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">async</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Task</span><span style="font-family: "consolas"; font-size: 9.5pt;"><</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">HttpResponseMessage</span><span style="font-family: "consolas"; font-size: 9.5pt;">> Post([</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">FromBody</span><span style="font-family: "consolas"; font-size: 9.5pt;">]</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Activity</span><span style="font-family: "consolas"; font-size: 9.5pt;"> activity)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">if</span><span style="font-family: "consolas"; font-size: 9.5pt;"> (activity.Type == </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ActivityTypes</span><span style="font-family: "consolas"; font-size: 9.5pt;">.Message)<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">await</span><span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Conversation</span><span style="font-family: "consolas"; font-size: 9.5pt;">.SendAsync(activity, () => </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">new</span><span style="font-family: "consolas"; font-size: 9.5pt;"> Dialogs.</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">RootDialog</span><span style="font-family: "consolas"; font-size: 9.5pt;">());<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="font-family: "consolas"; font-size: 9.5pt;"> response = Request.CreateResponse(</span><span style="color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">HttpStatusCode</span><span style="font-family: "consolas"; font-size: 9.5pt;">.OK);<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> </span><span style="color: blue; font-family: "consolas"; font-size: 9.5pt;">return</span><span style="font-family: "consolas"; font-size: 9.5pt;"> response;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span style="font-family: "consolas"; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">
</span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">}</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;">Regardons maintenant le résultat obtenu en lançant le Bot avec F5 : </span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx5MgeBQ42mps6CvBeGqraYUo7owhXdWrEaDj-B2QftdPuG5qFT2iyAtV-b0HKx9CsB4NeAY94Sk1F53RobyNbTf-w2BgXgTsdytmM0XgeAV7v0ctnQ9ANs3lVSdrNzICb7FWu6UBY2FZX/s1600/bot9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="681" data-original-width="1600" height="136" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhx5MgeBQ42mps6CvBeGqraYUo7owhXdWrEaDj-B2QftdPuG5qFT2iyAtV-b0HKx9CsB4NeAY94Sk1F53RobyNbTf-w2BgXgTsdytmM0XgeAV7v0ctnQ9ANs3lVSdrNzICb7FWu6UBY2FZX/s320/bot9.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
On lance alors l'émulateur et on se connecte sur le port 3979/api/messages, on voit bien les 2 questions posées par le robot, qui termine par la restitution de l'ensemble de l'information en requêtant le User Data Bag</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhjsBaIQURXVu5OQf5-b9QgWr3iC2suFS4dZ7SNeTE1BEE2hqvZoxhymvKAjVtdqsJhAx3BqS_AmZ68j5sXQ2-v2AVoFU6dOzgmub_YJVGkXNxsW890zFXv9HUohwUhPS8E300QWMkL3OT/s1600/bot10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1079" data-original-width="1600" height="430" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhjsBaIQURXVu5OQf5-b9QgWr3iC2suFS4dZ7SNeTE1BEE2hqvZoxhymvKAjVtdqsJhAx3BqS_AmZ68j5sXQ2-v2AVoFU6dOzgmub_YJVGkXNxsW890zFXv9HUohwUhPS8E300QWMkL3OT/s640/bot10.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Cette gestion d'état et de persistence va permettre des interactions beaucoup plus riche avec le Chat Bot.</div>
<div class="separator" style="clear: both; text-align: left;">
Vous retrouverez le code de cet exemple à l'adresse : <a href="https://github.com/MicrosoftLearning/csharp-bots-mva" target="_blank">Code Chatbot</a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-13650278351546479482017-07-20T07:02:00.002-07:002017-07-26T01:07:29.227-07:00Bot Framework Part 2 - Création d'un Chatbot avec interactivitéDans cet article nous allons commencer à ajouter un peu d'interactivité à notre dialogue avec le Bot. Comme nous le verrons plus tard, il est possible d'interagir avec LUIS (Language Understanding Intelligent Service) en Natural Language Processing ou l'on va véritablement enclencher des processus d'intelligence artificielle.<br />
Le scénario que nous allons développer va simplement consister à recueillir de l'utilisateur une information par exemple son nom pour le saluer cordialement. Pour rappel, tout dans le Bot SDK est réalisé en utilisant le pattern Await / Async (programmation asynchrone)<br />
En repartant du code précédent, nous allons réécrire la méthode <i>Task MessageReceivedAsync</i><br />
de la manière suivante :<br />
private Task MessageReceivedAsync(IDialogContext context, IAwaitable<br />
{<br />
PromptDialog.Text(context, NameEntered, @"Hello! Comment t'appelles tu?");<br />
return Task.CompletedTask;<br />
}<br />
Nous invoquons ici une tache NameEntered qui constitue le CallBack qui sera complétée lorsque l'utilisateur aura répondu en entrant son prénom<br />
Pour répondre à l'utilisateur, nous écrivons la Tache asynchrone : Task NameEntered<br />
private async Task NameEntered(IDialogContext context, IAwaitable<string> result)</string><br />
{<br />
await context.PostAsync($@"Bonjour {await result}!");<br />
context.Wait(MessageReceivedAsync);<br />
}<br />
Le robot répond alors en reformulant le prénom entré par l'utilisateur comme montré ci dessous dans l'émulateur<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCXfYlGfBlGF99dgfjnvo5OvBsWLGius67aJTizq8TnKe0WFO0JflpBmkAduGXqbIOy6hZDMqIlJ_33HXhab95Gvowy5ddvwR-F5kxUuOWNknNVRoiZ9vd7q1t2gVE0D_H6GvFcpWKsYc/s1600/bot7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1286" data-original-width="1557" height="528" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGCXfYlGfBlGF99dgfjnvo5OvBsWLGius67aJTizq8TnKe0WFO0JflpBmkAduGXqbIOy6hZDMqIlJ_33HXhab95Gvowy5ddvwR-F5kxUuOWNknNVRoiZ9vd7q1t2gVE0D_H6GvFcpWKsYc/s640/bot7.jpg" width="640" /></a></div>
Cet article nous a permis de poser les prémices de l'interactivité du Bot, nous verrons dans la partie 3 comment mettre en oeuvre des Workflow de communication avec une persistence de contexte d'un dialogue<br />
<br />
<div class="separator" style="clear: both; text-align: left;">
Cette gestion d'état et de persistence va permettre des interactions beaucoup plus riche avec le Chat Bot.</div>
<div class="separator" style="clear: both; text-align: left;">
Vous retrouverez le code de cet exemple à l'adresse : <a href="https://github.com/MicrosoftLearning/csharp-bots-mva" target="_blank">Code Chatbot</a></div>
<div class="MsoNormal">
<span style="font-family: "consolas"; font-size: 9.5pt; line-height: 107%;"><br /></span></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-25459907769536539662017-07-20T06:08:00.001-07:002017-07-26T01:01:01.438-07:00Bot Framework Part 1 - Création d'un Chatbot avec Visual studio 2017 et Microsoft Bot BuilderDans cet article nous allons démontrer l'efficacité des technologies Microsoft dans la mise en oeuvre d'un Bot<br />
En prérequis, il va falloir initialiser son environnement de développement, pour cela, nous allons tout simplement installer les 3 templates necessaires à Visual Studio qui sont :<br />
<span style="background-color: white; color: #222222; font-family: , "segoe ui" , "segoe" , "segoe wp" , "helvetica neue" , "helvetica" , sans-serif; font-size: 16px;"> </span><a data-linktype="external" href="http://aka.ms/bf-bc-vstemplate" style="backface-visibility: hidden; background-color: white; box-shadow: transparent 0px 0px 1px; color: #0050c5; cursor: pointer; font-family: segoe-ui_normal, "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; text-decoration-line: none; transition: transform 0.1s ease-out, color, background-color, -webkit-transform; word-wrap: break-word;">Bot Application</a><span style="background-color: white; color: #222222; font-family: , "segoe ui" , "segoe" , "segoe wp" , "helvetica neue" , "helvetica" , sans-serif; font-size: 16px;">, </span><a data-linktype="external" href="http://aka.ms/bf-bc-vscontrollertemplate" style="backface-visibility: hidden; background-color: white; box-shadow: transparent 0px 0px 1px; color: #0050c5; cursor: pointer; font-family: segoe-ui_normal, "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; text-decoration-line: none; transition: transform 0.1s ease-out, color, background-color, -webkit-transform; word-wrap: break-word;">Bot Controller</a><span style="background-color: white; color: #222222; font-family: , "segoe ui" , "segoe" , "segoe wp" , "helvetica neue" , "helvetica" , sans-serif; font-size: 16px;">, and </span><a data-linktype="external" href="http://aka.ms/bf-bc-vsdialogtemplate" style="backface-visibility: hidden; background-color: white; box-shadow: transparent 0px 0px 1px; color: #0050c5; cursor: pointer; font-family: segoe-ui_normal, "Segoe UI", Segoe, "Segoe WP", "Helvetica Neue", Helvetica, sans-serif; font-size: 16px; text-decoration-line: none; transition: transform 0.1s ease-out, color, background-color, -webkit-transform; word-wrap: break-word;">Bot Dialog</a><br />
Après avoir télécharger ces 3 archives, il vous suffit simplement de les placer dans le dossier templates de Visual Studio 2017 qui est situé normalement à l'adresse : <span style="background-color: #f9f9f9; color: #3c763d; font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif; font-size: 12.8px;">%USERPROFILE%\Documents\Visual Studio 2017\Templates\ProjectTemplates\Visual C#\</span><br />
<span style="font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;"><span style="background-color: #f9f9f9; font-size: 12.8px;">Pour créer votre projet Bot, démarrer Visual studio 2017 et choisissez le template Bot Application dans la catégorie Visual C# comme montré ci dessous : </span></span><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4bU5iN4-OCRRdooXDC_kFleB1UZakjo7vlUAmu0-GqwtPnSqhDOC_WkZnYsV59wokCLUqPu_Sv8rYp-iiboD0rGUBi6xkb60SE-4SezTgsP4mMowJoBwv_RY5mfD7AFa2jv9XJk-7MHba/s1600/bot1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1110" data-original-width="1600" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4bU5iN4-OCRRdooXDC_kFleB1UZakjo7vlUAmu0-GqwtPnSqhDOC_WkZnYsV59wokCLUqPu_Sv8rYp-iiboD0rGUBi6xkb60SE-4SezTgsP4mMowJoBwv_RY5mfD7AFa2jv9XJk-7MHba/s400/bot1.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Nommer votre projet puis valider, un projet de type Web est créé</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoi3zEmWcZpLZ6A6-a0i7vI0YjLWyMDvpctfFF-FAiaatblOfriGL6mE9l2IY3oRi6iQBtGiP84oaPGouikrQeus51XQlnGKekB3q1cqfDS5qdFub3LfCXujhKwE2-SiJH4ixPOFTScDwz/s1600/bot2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="649" data-original-width="721" height="288" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoi3zEmWcZpLZ6A6-a0i7vI0YjLWyMDvpctfFF-FAiaatblOfriGL6mE9l2IY3oRi6iQBtGiP84oaPGouikrQeus51XQlnGKekB3q1cqfDS5qdFub3LfCXujhKwE2-SiJH4ixPOFTScDwz/s320/bot2.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Le code qui envoie les messages de l'utilisateur se trouve dans la classe MessageController</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PKKm-d7hHXTVEdFS5Qx1HrXJxaoI8v0Z_DKYeahVsxAtQ96J-smUTpA8_j_0esvdX_HobE1FlGV-pfgGVkTZe6kscHmiGhmSHmvcVZhfepEhvtuUXo3hPTqOWnV_z8fD3cugDvMJku2l/s1600/bot3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="892" data-original-width="1600" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4PKKm-d7hHXTVEdFS5Qx1HrXJxaoI8v0Z_DKYeahVsxAtQ96J-smUTpA8_j_0esvdX_HobE1FlGV-pfgGVkTZe6kscHmiGhmSHmvcVZhfepEhvtuUXo3hPTqOWnV_z8fD3cugDvMJku2l/s640/bot3.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
On trouve le code de réponse du Bot dans la classe RootDialog.cs</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxsi0k3I4ssaXS3VgsUUrZO7xUilbURkRxpH5B-oKZFHDNkcawtYyPQ5HjXKIPb9_03n-jmYrJPrc0n_u4dVCJUvCM1iKdHHPBl4suP3xVoLJywAs3_1fJYiTdWDKr3gI7U6NNjc1hzl0g/s1600/bot4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="544" data-original-width="1600" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxsi0k3I4ssaXS3VgsUUrZO7xUilbURkRxpH5B-oKZFHDNkcawtYyPQ5HjXKIPb9_03n-jmYrJPrc0n_u4dVCJUvCM1iKdHHPBl4suP3xVoLJywAs3_1fJYiTdWDKr3gI7U6NNjc1hzl0g/s640/bot4.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Le message de réponse ici est fixe, nous verrons comment adapter le dialogue dans le prochain article</div>
<div class="separator" style="clear: both; text-align: left;">
Il est temps de tester notre robot avec la console d'émulation</div>
<div class="separator" style="clear: both; text-align: left;">
Pour tester notre Bot, nous aurons besoin de l'émulateur de Bot Framework qui se présente sous la forme d'une application Desktop permettant de tester et déboguer un Bot en local ou à distance.</div>
<span style="font-family: "consolas" , "menlo" , "monaco" , "lucida console" , "liberation mono" , "dejavu sans mono" , "bitstream vera sans mono" , "courier new" , monospace , sans-serif;"><span style="background-color: #f9f9f9; font-size: 12.8px;">Vous pouvez télécharger un installer à l'adresse suivante : </span></span>
<a data-linktype="external" href="https://emulator.botframework.com/">emulator download page</a><br />
Lancer l'installation de l'émulateur :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnQ4LBNjFRIXCxDb31e5FTDuJTusPMrt8Ow-oO8b0ib0CHcQEMnc4durwQH9jX0J_81i0E-ETVDnFxOyBNftNzh-qhHcv5DrFEEgVh77txD44_C83HMB4eU_K07v8A2Q7joCntsLAuLHjX/s1600/bot5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="953" data-original-width="1283" height="237" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnQ4LBNjFRIXCxDb31e5FTDuJTusPMrt8Ow-oO8b0ib0CHcQEMnc4durwQH9jX0J_81i0E-ETVDnFxOyBNftNzh-qhHcv5DrFEEgVh77txD44_C83HMB4eU_K07v8A2Q7joCntsLAuLHjX/s320/bot5.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
A la fin de l'installation, l'émulateur démarre</div>
<div class="separator" style="clear: both; text-align: left;">
Entrer dans l'émulateur l'adresse de votre endpoint : http://localhost:3979/api/messages</div>
<div class="separator" style="clear: both; text-align: left;">
Puis enter un message, le robot vous répond instantanément en reformulant votre message avec la longueur de caractères, soit la réponse codée dans le rootDialog comme montré ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxMglh6ge7SRKv-f3NVL_qRt7gSwaFOx5NDCg9KYLlbx8CPKrJ7DOIJtn4_8E-yj8WpLqqpGlFJDusTwujWB2G4KHAdfvh3WNhLUP_xU3_P8PZqgE2H3WFXC7_9ivhtqQscdJpg9NDr9nR/s1600/bot6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1183" data-original-width="1566" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxMglh6ge7SRKv-f3NVL_qRt7gSwaFOx5NDCg9KYLlbx8CPKrJ7DOIJtn4_8E-yj8WpLqqpGlFJDusTwujWB2G4KHAdfvh3WNhLUP_xU3_P8PZqgE2H3WFXC7_9ivhtqQscdJpg9NDr9nR/s400/bot6.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Dans le prochain article, nous verrons comment ajouter de l'interactivité dans les réponses du BotPhilippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-86928599359338654702017-07-18T07:12:00.001-07:002017-07-18T07:12:11.641-07:00Intelligence Artificielle - Comment démarrer Partie 2 - Les étapes d'apprentissage<div style="text-align: justify;">
Apprendre et comprendre l'intelligence artificielle est quelque chose que tout développeur aujourd'hui aspire à achever. Tout le monde comprend l'immense potentiel de cette industrie, ce qui est faisable aujourd'hui et ce qui le sera dans les 10 à 20 prochaines années. En revanche il y a beaucoup d'idées fausses autour de l'intelligence artificielle : Est ce que les robots vont envahir le marché du travail? est ce que les ordinateurs seront plus intelligents que les humains? Est ce que des machines intelligentes vont se substituer aux humains ou bien se fusionner avec eux? Toutes ces questions trouveront réponses très vite, mais ce qui est sur est que de telles avancées technologiques vont engendrer de grandes responsabilités et cela tous les savants en intelligence artificielle le savent déjà. Ci dessous les premières étapes pour mieux appréhender ce domaine par l'apprentissage<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiTGo8uX_649-uwJ_7bmSRlF6lJd61pSjyVnjmCN-wLDtd6SQPXc3ykVZjZcGrYkpVSLEqAQkIVvLfJNCYkTs_ZU_R3PSN3Yk__nAe9P1lMhCNlECioKZOeycdhLmZmQyFsuI9ug3jr2_X/s1600/steps.jpeg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="384" data-original-width="609" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiiTGo8uX_649-uwJ_7bmSRlF6lJd61pSjyVnjmCN-wLDtd6SQPXc3ykVZjZcGrYkpVSLEqAQkIVvLfJNCYkTs_ZU_R3PSN3Yk__nAe9P1lMhCNlECioKZOeycdhLmZmQyFsuI9ug3jr2_X/s320/steps.jpeg" width="320" /></a></div>
<br /></div>
<h3 style="text-align: justify;">
ETAPE 1: Suivre un cours sur l'intelligence artificielle</h3>
<div>
<div style="text-align: justify;">
De nombreux cours en ligne sont d'ores et déjà disponible avec notamment</div>
</div>
<div style="text-align: justify;">
<a href="https://www.udacity.com/course/intro-to-artificial-intelligence--cs271" rel="noopener noreferrer" target="_blank">Udacity.com</a> , <a href="https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-034-artificial-intelligence-spring-2005/" rel="noopener noreferrer" target="_blank">mit.edu</a>, <a href="https://edge.edx.org/courses/course-v1:BerkeleyX+CS188-SU16+SU16/about">edX.org</a>,
<a href="https://learn.saylor.org/course/cs408" rel="noopener noreferrer" target="_blank">saylor.org</a></div>
<div style="text-align: justify;">
Chez Udacity, on retrouve un cours d'introduction à l'intelligence artificielle :</div>
<div style="text-align: justify;">
<a href="https://www.udacity.com/course/intro-to-artificial-intelligence--cs271" rel="noopener noreferrer" target="_blank">Intro to Artificial Intelligence</a> : Ce cours introduit le monde de l'intelligence artificielle au travers de 10 cours. les sujets vont traiter du NLP (Natural Language Processing), le Machine Learning et la reconnaissance visuelle assistée par ordinateur.</div>
<div style="text-align: justify;">
Chez edX.org, nous avons:</div>
<div style="text-align: justify;">
<a href="https://www.edx.org/course/artificial-intelligence-ai-columbiax-csmm-101x" rel="noopener noreferrer" target="_blank">Artificial Intelligence</a> : Ce cours va vous aider à comprendre les basiques de l'intelligence artificielle, avec le paradigme statistique et théorie sur la prise de décision. Un bonne maitrise de Python et en mathématiques est un plus pour bien suivre ce cours. Le cours permet de créer des agents intelligents autonomes capable de prendre des décisions aléatoires, le sujet du machine learning est également bien abordé.</div>
<div style="text-align: justify;">
<a href="https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-034-artificial-intelligence-fall-2010/" rel="noopener noreferrer" target="_blank">MIT OpenCourseWare – Artificial Intelligence</a> : Le cours du MIT, au travers de ce site vous est ouvert est consitue une des meilleures ressources actuelles, les cours sont agrémentés de démonstrations.</div>
<div style="text-align: justify;">
<a href="https://learn.saylor.org/course/cs405" rel="noopener noreferrer" target="_blank">Artificial Intelligence Course</a> : Ce cours de Saylor.org, traite des domaines avancés de l'intelligence artificielle, à visiter absolument pour appronfondir des domaines clés de la programmation et le design de l'intelligence artificielle.</div>
<div style="text-align: justify;">
<a href="http://web.stanford.edu/class/cs221/" rel="noopener noreferrer" target="_blank">Artificial Intelligence: Principles and Techniques</a> : Ce cours de l'université de Standford propose un cursus excellent pour quiconque souhaite approfondir leur connaissances dans le domaine de l'intelligence artificielle. Le cours met le focus sur les fondements de l'intelligence artificielle puis aborde les domaines du Machine Learning, le Processus de decision de Markov etc. L'objectif de ce cours est d'éqiuper les étudiants pour être capable d'implémenter de l'IA.</div>
<h3 style="text-align: justify;">
ETAPE 2: Lire des livres et des articles sur l'intelligence artificielle</h3>
<div>
<div style="text-align: justify;">
Ci dessous quelques bons livres à consulter pour élargir ses connaissances</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://stpk.cs.rtu.lv/sites/all/files/stpk/materiali/MI/Artificial%20Intelligence%20A%20Modern%20Approach.pdf" rel="noopener noreferrer" target="_blank">Artificial Intelligence: A Modern Approach</a> : de Stuart J. Russell et Peter Norvig - dans la première partie, le livre traite des agents intelligents. sont également abordés,la notion de résolution de problèmes, d'acquisition de connaissances et de raisonnement. En conclusion, un résumé sur le potentiel de l'intelligence artificielle et sa capacité à changer le monde.</div>
<div style="text-align: justify;">
<br /></div>
</div>
<div style="text-align: justify;">
<a href="http://waitbutwhy.com/2015/01/artificial-intelligence-revolution-1.html" rel="noopener noreferrer" target="_blank">The AI Revolution: Road to Superintelligence</a> : Un article très détaillé sur l'intelligence artificielle qui tente de démystifier et traiter les idées reçues les plus communes sur le domaine de l'intelligence artificielle.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="https://www.cs.bris.ac.uk/~flach/SL/SL.pdf" rel="noopener noreferrer" target="_blank">[PDF] Simply Logical: Intelligent Reasoning by Example</a> : Par Peter Flach - On y apprend les bases de la programmation en intelligence artificielle.Toute technique présentée s'accompagne d'un programme de mise en œuvre, et il existe de nombreux exemples pour rendre les concepts plus faciles à comprendre.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<a href="http://ai.stanford.edu/~nilsson/QAI/qai.pdf" rel="noopener noreferrer" target="_blank">[PDF] The Quest for Artificial Intelligence</a> : Par Nils J. Nilsson - tout ce que vous devez savoir sur l'intelligence artificielle est dans ce livre; Depuis le début (alors que l'IA n'était qu'un simple concept) jusqu'à nos jours (pionniers de l'industrie et ingénieurs actuels en intelligence artificielle).</div>
<h3 style="text-align: justify;">
ETAPE 3: Participer à des conférences et présentations sur l'intelligence artificielle</h3>
<div>
<div style="text-align: justify;">
Nous avons mentionné les cours que vous pouvez suivre pour apprendre l'intelligence artificielle, ainsi que les livres que vous pouvez lire pour aider à élargir vos connaissances et à élargir votre compréhension du domaine. Maintenant, pour raisonner plus profondément sur l'intelligence artificielle, l'une des meilleures façons d'approfondir consiste à assister à des réunions et à des conférences ou encore, écouter des discussions en direct. Quelques débats et présentations intéressants sont:</div>
</div>
<div>
<div style="text-align: justify;">
<br /></div>
</div>
<div>
<div style="text-align: justify;">
<a href="https://theaisummit.com/" target="_blank">AI Summit</a> : Cette conférence rassemble les leaders mondiaux du domaine et est une opportunité d'être connecté aux dernières tendances de cette industrie.</div>
</div>
<div>
<div style="text-align: justify;">
<a href="https://www.youtube.com/watch?v=VBceREwF7SA" rel="noopener noreferrer" target="_blank">Davos 2016, The State of Artificial Intelligence</a>
: Un débat détaillé dans le but de répondre à une question très importante. "dans combien de temps les technologies avancées prendront le pas sur l'intelligence humaine et quelles impacts a l'intelligence artificielle dans les industries modernes d'aujourd'hui?"</div>
</div>
<div style="text-align: justify;">
<a href="https://www.youtube.com/watch?v=1wxwSdQpjHk" rel="noopener noreferrer" target="_blank">[Documentary] Artificial Intelligence and Robotics</a> : "Les apparences peuvent être trompeuses ", et ce documentaire vous le démontrera. Pendant de nombreuses décennies, nous avons vu des films de Science fiction dépeindre des robots en tant que fidèles serviteurs de l'homme. Cependant, l'IA et les robots ne concernent plus que la Science fiction. aujourd'hui, les robots sont difficiles à concevoir car le monde réel est riche et impitoyable. Les technologies avancées telles que le Machine Learning, la programmation, ou encore le Deep Learning nous donnent un certain espoir sur l'industrie de la robotique et de ce que cela pourrait apporter dans le monde réel pour l'humanité.</div>
<div>
<div style="text-align: justify;">
<a href="https://www.youtube.com/results?search_query=bill+gates+and+elon+musk" target="_blank">Elon Musk and Bill Gates Debated on the Future of A.I.</a></div>
</div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com7tag:blogger.com,1999:blog-7985913466665944386.post-75115318725128763762017-07-18T05:44:00.000-07:002017-07-18T07:11:55.043-07:00Intelligence Artificielle - Comment démarrer Partie 1 - Les langages<div style="text-align: justify;">
L'intelligence artificielle est devenue aujourd'hui une composante majeure des sciences de l'informatique qui va sans aucun doute dans les 10 prochaines années "disrupter" bon nombre de métiers, non seulement dans le domaine de l'informatique pure mais également de métiers connexes pensés intouchables dans notre société tel que médecin, radiologue, assureur, avocat etc.</div>
Des études estiment que l'humanité croisera l'ère des robots aux alentours de 2045<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKP4JOxUyJii7T77NhD6DMwWBt6C7N1mqdZ-mu2n8_K_XVsn0YIcZXFwoG0Nmqmf2-oILUkudLKBoXgUStxZS7UANucSLL05o3hooLdJU6GUxpf37RETp9mmN-11mLYgDLJ-5YLt3imguG/s1600/artificial_intelligence.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="454" data-original-width="680" height="425" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKP4JOxUyJii7T77NhD6DMwWBt6C7N1mqdZ-mu2n8_K_XVsn0YIcZXFwoG0Nmqmf2-oILUkudLKBoXgUStxZS7UANucSLL05o3hooLdJU6GUxpf37RETp9mmN-11mLYgDLJ-5YLt3imguG/s640/artificial_intelligence.jpg" width="640" /></a></div>
L'intelligence Artificielle, fait partie intégrante de notre société depuis les années 50 au travers de films de science fiction ou encore d'études de mathématiciens brillants tel qu' Allan Turing avec la publication <a href="http://www.nytimes.com/library/cyber/surf/1106surf-turing.html" target="_blank">Computing Machinery and Intelligence</a> .<br />
<div style="text-align: justify;">
L'objectif de cet article est de vous donner une approche pragmatique et compréhensible pour appréhender le domaine de l'intelligence artificielle à la fois dans le domaine du quoi et du comment avec également quelques points d'entrée pour apprendre l'intelligence artificielle.</div>
<div style="text-align: justify;">
Aujourd'hui, des intelligences artificielles peuvent déjà battre des joueurs d'échecs et de Go et il n'est pas faux de dire que le monde a déjà pris un tournant à l'heure ou arrivent les voitures autonomes. Certains disent que l'intelligence artificielle va oeuvrer pour le bien de l'humanité, d'autres disent qu'elle va la détruire, la vérité c'est que l'on ne sait pas exactement de quoi est capable l'intelligence artificielle raison pour laquelle de nombreux comités d'éthique ont été mis en place un peu partout dans le monde pour réfléchir à cette question. Le domaine de l'intelligence artificielle étudie comment le cerveau humain pense, apprend, travaille et prend des décisions.</div>
<h2 style="text-align: justify;">
Pourquoi doit on commencer à apprendre à développer et utiliser l'intelligence artificielle</h2>
<div>
Tout d'abord, l'intelligence artificielle est un domaine qui ouvrent de réelles opportunités. Le point de départ va bien évidemment passer par le maitrise d'un langage de programmation, C# ou Java mais également Python, Javascript ou encore Ruby on rails.</div>
<div>
Ci dessous, quelques ressources pour bien démarrer sur le plan du language : </div>
<div>
<a href="https://www.codecademy.com/" target="_blank">Code Academy</a> : Ce site totalement gratuit propose des cours interactifs sur différent langages de programmation avec déjà plus de 25 millions d'abonnés.</div>
<div>
<a href="https://www.codeavengers.com/" target="_blank">Code Avengers</a> : Apprenez à coder des applications, des jeux et des sites web avec Code Avengers. ce site propose des cours en ligne et des tutoriels pour de nombreux langages avec également une introduction à la programmation pour les débutants.</div>
<div>
<a href="https://www.udacity.com/" target="_blank">Udacity </a> : Un Must Have, ce site propose des cours innovants de programmation. certains tutoriaux sont gratuits et donc une opportunité pour se faire une idée. Udacity est à essayer absolument pour une entrée sérieuse dans le domaine de la programmation orientée Intelligence artificielle.<br />
<a href="https://app.pluralsight.com/library/" target="_blank">Pluralsight </a>: Un des plus grand site de formation en ligne à l'informatique américain avec plus de 3000 formations sur pratiquement toutes les technologies, un incontournable pour se former au pied levé sur n'importe quelle technologie. Le site fonctionne sur abonnement.<br />
<br /></div>
<div>
<br /></div>
<div>
Ensuite, il faut se familiariser avec les Robots ou Bots. Les crawlers web utilisés par Google par exemple sont les meilleurs exemples de robots avancés et sophisitiqués. Les ressources ci dessous vont vous permettre de démarrer et comprendre l'envers du décor de ces robots : </div>
<div>
<br /></div>
<div>
<a href="https://www.w3schools.com/xml/xpath_intro.asp" target="_blank">XPath </a> : Une excellent ressource permettant d'aider à l'élaboration de robots et inspecter du code HTML</div>
<div>
<a href="http://regexr.com/" target="_blank">Regex </a>: Un outil en ligne qui vous enseignera tout ce qu'il faut savoir le processing de données par les robots</div>
<div>
<a href="https://chatbotsmagazine.com/the-complete-beginner-s-guide-to-chatbots-8280b7b906ca?gi=d7cd912beab3#.a8c7mgsvf" target="_blank">Le Guide complet pour débuter avec les ChatBots</a> : Tout savoir sur ce qu'il sont et comment les construire.<br />
<a href="http://microsoft%20virtual%20academy%20bot%20course/" target="_blank"><br /></a>
<br />
<div style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13.2px;">
<span style="color: #838383;"><a href="http://microsoft%20virtual%20academy%20bot%20course/" target="_blank">Microsoft Virtual Academy Bot Course</a> : Un cours en ligne gratuit proposé par Microsoft pour créer un Bot avec le Bot Framework de Microsoft</span></div>
</div>
<div>
<br /></div>
<div>
Une fois que vous avez selectionner le langage qui correspond le mieux à vos compétences et que vous en savez plus sur les Bots, il est temps d'en apprendre plus sur le Machine Learning. Avant de commencer avec ML, assurez vous d'avoir une bonne connaissance en mathématiques avancées et en Statistiques, ce qui vous permettra de comprendre les algorythmes de Machine Learning.</div>
<div>
<br /></div>
<div>
<a href="https://www.amazon.com/dp/0596529325?tag=inspiredalgor-20" target="_blank">Programmer de l'intelligence collective</a> : par Toby Segaran, ce livre écrit bien avant que le Machine Learning ne connaisse la popularité d'aujourd'hui, décrit de manière très compréhensible et digeste les concepts du Machine Learning</div>
<div>
<br /></div>
<div>
<a href="http://personal.disco.unimib.it/Vanneschi/McGrawHill_-_Machine_Learning_-Tom_Mitchell.pdf" target="_blank">Machine Learning by Tom Mitchell</a> : Un excellent ouvrage d'introduction qui propose sur revue détaillée des théorèmes de Machine Learning. Le livre expose des cas d'études et des exemples simples permettant un compréhension claires les algorithmes utilisés.</div>
<div>
<br /></div>
<div>
<a href="https://www.amazon.com/Machine-Learning-Press-Essential-Knowledge/dp/B01M1I55GE/ref=zg_bs_3887_13?_encoding=UTF8&psc=1&refRID=KZVJG40XGKS24RM0VHFX" target="_blank">Machine Learning - La nouvelle IA</a> : par Ethem Alpaydi, ce livre place au top le Machine Learning dans le domaine des sciences de l'informatique en exposant les basiques du ML et son application technologique.</div>
<div>
<br /></div>
<div>
En résumé, voici ce que vous devez maitriser avant d'être capable d'apprendre et de comprendre l'intelligence artificielle</div>
<div>
<ul>
<li>Mathématiques appliquées et Statistiques </li>
<li>Maitrise d'un langage de programmation</li>
<li>Machine Learning</li>
<li>.....et de la patience</li>
</ul>
</div>
<div>
<br /></div>
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-25428808276104512032017-05-12T18:49:00.003-07:002017-05-12T18:49:33.346-07:00Keynote 2 Conférence Build 2017 - Réalité Virtuelle et Nouveautés Windows 10Le premier thème abordé lors de cette keynote est la nouvelle vague de créativité avec la nouvelle version de Windows 10 appelée : Windows 10 Fall Creators Update, censée apporté de nouvelles expériences à plus de 500 millions d'utilisateurs.<br />
Les point clés sont :<br />
<div style="text-align: justify;">
Une expérience cross device et cross platform (Windows, IOS et Android) grace à Microsoft Graph, </div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7kwzfXF2wzB-l0Jnet5WTwuJORs-F-lrIivUBXFUimOWLBab3hyphenhyphenrQRrTNYLKvPDs-F_KeaN4Aw_mD_3aQpNAdl690xXkDzFYNHWDzlMvOhrMQ0zsHa-YOMjZdv0Y1tTU5vkIWv34XaMGx/s1600/2017-05-12_18-36-44.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7kwzfXF2wzB-l0Jnet5WTwuJORs-F-lrIivUBXFUimOWLBab3hyphenhyphenrQRrTNYLKvPDs-F_KeaN4Aw_mD_3aQpNAdl690xXkDzFYNHWDzlMvOhrMQ0zsHa-YOMjZdv0Y1tTU5vkIWv34XaMGx/s640/2017-05-12_18-36-44.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
qui est un fabrique intelligente permettant de connecter les points entre les personnes, les conversations, les projets, fichier et tout contenu au travers du Cloud, assurant ainsi un flux entre les différents appareils que vous utilisez quelque soit son OS ou type. Les fonctions clés adressées sont les suivantes : </div>
<ul>
<li><b>Timeline</b> qui affiche visuellement votre activité au cours du temps, permettant de revenir dans des espaces de travail (fichiers, applications, sites web) tels qu'ils étaient à l'instant t et ce sur n'importe quel appareil. On peut par exemple commencer à travailler sur une présentation Powerpoint, s'arrêter à la slide 45, puis plus tard reprendre dans le train sur son IPhone avec le ficher qui s'ouvrira à la slide 45 (Persistence d'état)</li>
<li><b>Cloud ClipBoard</b> permettant de copier coller du contenu cross device, par exemple copier sur son PC et coller sur son IPhone</li>
<li><b>OnDrive Files on Demand</b> permet d'accéder à tous ses fichiers stockés dans le cloud sans avoir à les télécharger et donc économiser du stockage. Les fichiers cloud ont une icône nuage et n'occupe pas d'espace disque, les icones téléchargés ont une icône coché montrant qu'il ont été téléchargés</li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAIW7bi3s95-uSdK6ME2OHzhQWs2Dv2AvOYZqujShcorLKXNdsJzbDujX3cAHfk_PSyyPRAZ4BfUJvDWhVy-fCvsQMJASmO7I0HGH2-ejwXQuR-1mJw5cglJ_8NqtoEMSdgu-U3eiC4NT6/s1600/2017-05-12_17-57-47.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="520" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiAIW7bi3s95-uSdK6ME2OHzhQWs2Dv2AvOYZqujShcorLKXNdsJzbDujX3cAHfk_PSyyPRAZ4BfUJvDWhVy-fCvsQMJASmO7I0HGH2-ejwXQuR-1mJw5cglJ_8NqtoEMSdgu-U3eiC4NT6/s640/2017-05-12_17-57-47.jpg" width="640" /></a></div>
<br />
<br />
<div class="pw-hidden-cp">
.<br />
<div class="pw-hidden-cp" style="text-align: justify;">
<b>Windows Story Remix </b>apporte de nouvelles possibilités de transformer photos et vidéos. Cette application sera disponible à partir de Windows Store, utilise l'intelligence artificielle et le deep learning pour organiser et transformer photos et videos en Stories. Elle va utiliser Microsoft Graph pour connecter les utilisateurs au travers de leurs devices. Les montages des Stories permettent de manipuler des bandes sons, des thèmes et des transitions, les utilisateurs peuvent aussi créer de la réalité mixée en ajoutant des objets 3D aux photos et vidéos. On se rapproche des capacités de montage d'un logiciel tel que Adobe Première, l'exemple montré en live lors de la keynote, est le remplacement d'un ballon de football par une boule de feu, le résultat est bluffant</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-oeXPdOQAZtYaAexwsCGkwEw84QkUI0o7l112BzgWHGLjqakRMwQicXvC-IMvfGkZqJIxJNMT2RmXfIZ50_F256nsOF8vWdwViV2zhe3Mu-AEFhJwV3Wom1351KLZVxCzPhdfSlp-qi4L/s1600/2017-05-12_18-11-15.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-oeXPdOQAZtYaAexwsCGkwEw84QkUI0o7l112BzgWHGLjqakRMwQicXvC-IMvfGkZqJIxJNMT2RmXfIZ50_F256nsOF8vWdwViV2zhe3Mu-AEFhJwV3Wom1351KLZVxCzPhdfSlp-qi4L/s640/2017-05-12_18-11-15.jpg" width="640" /></a></div>
<div class="pw-hidden-cp" style="text-align: justify;">
<br /></div>
<div class="pw-hidden-cp" style="text-align: justify;">
Coté développement, Microsoft annonce<b> .Net Standard et XAML Standard</b> qui permettront de créer des applications pour Windows, Android et IOS, donc Cross Platform et Cross Devices</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GGokgLtdPmm2NUwxcKXdMGPWh6J034j4eWusmrxlJGtlGdkY2weDTLaQwJ18yKUCG_Xdmywxs1eMFhIO6SIBfhu1whQIsjeyY6RRCT2Ig6d0sR6fPYxSnGT8t1TS5TuP7dewfDK2Doah/s1600/2017-05-12_18-14-49.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="378" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7GGokgLtdPmm2NUwxcKXdMGPWh6J034j4eWusmrxlJGtlGdkY2weDTLaQwJ18yKUCG_Xdmywxs1eMFhIO6SIBfhu1whQIsjeyY6RRCT2Ig6d0sR6fPYxSnGT8t1TS5TuP7dewfDK2Doah/s640/2017-05-12_18-14-49.jpg" width="640" /></a></div>
<div class="pw-hidden-cp" style="text-align: justify;">
On notera au passage la disponibilité d' ITunes à partir du Windows Store ainsi que d'Autodesk SketchBook</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqXcsL9FJJQgpnNMADANXgMeFzumyj3nblyqt3Xp_mGnj8WTWTXNs0o62prtmvubcoQZ5BG7nyOSSRrRHOCmtaV9hGv3HtSryqt548MSfXQa_WD5zB1OPa65Uy7E_4NedWOf7XoqduAA8/s1600/2017-05-12_18-45-09.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqXcsL9FJJQgpnNMADANXgMeFzumyj3nblyqt3Xp_mGnj8WTWTXNs0o62prtmvubcoQZ5BG7nyOSSRrRHOCmtaV9hGv3HtSryqt548MSfXQa_WD5zB1OPa65Uy7E_4NedWOf7XoqduAA8/s1600/2017-05-12_18-45-09.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGqXcsL9FJJQgpnNMADANXgMeFzumyj3nblyqt3Xp_mGnj8WTWTXNs0o62prtmvubcoQZ5BG7nyOSSRrRHOCmtaV9hGv3HtSryqt548MSfXQa_WD5zB1OPa65Uy7E_4NedWOf7XoqduAA8/s320/2017-05-12_18-45-09.jpg" width="320" /></a></div>
<div class="pw-hidden-cp" style="text-align: justify;">
<br /></div>
<div class="pw-hidden-cp" style="text-align: justify;">
La Keynote s'est terminée en apogée avec le domaine de la réalité mixte, virtuelle et augmentée grace à une démonstration époustouflante faite par le Cirque du Soleil qui ont démontré comment ils ont utiliser Hololens pour optimiser et réduire les temps et les couts inhérents aux phases de Design des spectacles.</div>
<div class="pw-hidden-cp" style="text-align: justify;">
Ci dessous, les photos du décor virtuelle mis en place, rien n'est visible sur le scène de la Build à l'œil nu, ci dessous, on a la vue Hololens :</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvJTW1nZlBFzTgTPAkJ5bb3v69lhTtvRm6Fyb1LfrEtNv7XdQTd4uPXQD7j88TzYr-caOOqutsG0eWQrVRmjqymFtCKBAyUY9wHtkxqf_Rb2tayG6FhvGnCzKjqUIj5WlEgvfGi7AgQofb/s1600/2017-05-12_18-22-29.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvJTW1nZlBFzTgTPAkJ5bb3v69lhTtvRm6Fyb1LfrEtNv7XdQTd4uPXQD7j88TzYr-caOOqutsG0eWQrVRmjqymFtCKBAyUY9wHtkxqf_Rb2tayG6FhvGnCzKjqUIj5WlEgvfGi7AgQofb/s640/2017-05-12_18-22-29.jpg" width="640" /></a></div>
<div class="pw-hidden-cp" style="text-align: justify;">
Puis un contorsionniste est rajouté et effectue des mouvements</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7P9BM9MylyXwi6GW93O1eBaeK64nJTTwHHKOBbTEjB2SGal4QOaaMWb3qKuKeCSYtknbj9BDirXkaP9MtgGAIh4GeRqk-gIROAJ11slCwi7NW3N7JE7rsjzDa8TljIjosjuX8jL5sQEV4/s1600/2017-05-12_18-24-04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="494" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7P9BM9MylyXwi6GW93O1eBaeK64nJTTwHHKOBbTEjB2SGal4QOaaMWb3qKuKeCSYtknbj9BDirXkaP9MtgGAIh4GeRqk-gIROAJ11slCwi7NW3N7JE7rsjzDa8TljIjosjuX8jL5sQEV4/s640/2017-05-12_18-24-04.jpg" width="640" /></a></div>
<div class="pw-hidden-cp" style="text-align: justify;">
Voici donc une entreprise innovante dans le domaine du cirque qui a su tirer profit d'une technologie innovante Microsoft au service de sa propre innovation.</div>
<div class="pw-hidden-cp" style="text-align: justify;">
<br /></div>
</div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-81687836992411386282017-05-12T17:35:00.002-07:002017-05-12T17:35:39.019-07:00Keynote 1 Conférence Build 2017 - La vision innovante de Microsoft présentée par Satya Nadella<div style="text-align: justify;">
Cette année la conférence Microsoft Build a rassemblé quelques 5000 personnes venues du monde entier et se tenait pour la première fois à Seattle, les moyens mis en oeuvre et la logistique ont été à la mesure de l'évènement.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHYFml-doNGba97aG74Vu955q11WDuIzhbaDi_tmy6xVZ4o9Eg0x_QdMmqDQwGmtn4XnvidvURPTw-nq-EXJwkotR6d__GT5dFk6am6H2iY9jXh2FF3PXLi7Bg21TKLib0wX0tKZm5PKrL/s1600/WP_20170510_001.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHYFml-doNGba97aG74Vu955q11WDuIzhbaDi_tmy6xVZ4o9Eg0x_QdMmqDQwGmtn4XnvidvURPTw-nq-EXJwkotR6d__GT5dFk6am6H2iY9jXh2FF3PXLi7Bg21TKLib0wX0tKZm5PKrL/s640/WP_20170510_001.jpg" width="640" /></a></div>
<br />
<div style="text-align: justify;">
Les sujets majeurs abordés sont les nouvelles technologies Cloud, Data et Intelligence Artificielle, conçues pour aider les développeurs à moderniser les applications existantes, infuser de l'intelligence dans les nouvelles applications ainsi que distribuer plus rapidement ces applications sur tout type de plate formes. </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4AEhySTpvW5uN4dggWkg9pMoOtq_bbavC3tOiaEHa86AtL-O6QaDSiUVJu_7qoaGogGcKD9-BcwWCh3JOlKJEXSceBIfsm7XcvIgZf12jquAdP1SLFxs80n3ZCvlY3fxLzY5HrNYflLwi/s1600/WP_20170510_006.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4AEhySTpvW5uN4dggWkg9pMoOtq_bbavC3tOiaEHa86AtL-O6QaDSiUVJu_7qoaGogGcKD9-BcwWCh3JOlKJEXSceBIfsm7XcvIgZf12jquAdP1SLFxs80n3ZCvlY3fxLzY5HrNYflLwi/s640/WP_20170510_006.jpg" width="640" /></a></div>
<br />
<div style="text-align: justify;">
Pour Satya, cette année, clairement, l'accent est mis sur l'intelligence artificielle et les robots afin de mettre l'intelligence au centre du développement avec les nouvelles versions du Bot Framework, et de Cognitive Services permettant à tout développeur de créer plus facilement et rapidement des applications intelligentes avec des capacités NUI. Tout cela s'appuie bien évidemment sur un Cloud et des périphériques intelligents.</div>
Le Panel des Technologies mises en avant est impressionnant comme montré ci dessous :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvux6cZsE6TprtjedQ-Os9MSglNFyH4mYr2zP5T51KE8CrCKQMtecMogzqZasN-pi_Csp1TebRGpOJFNXCvHYi7lXAu4FU_bjT_ImkDg6Yfjx0-_Du8MIOUP79frorvE5Ic_OhI-gaaVpD/s1600/WP_20170510_008.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvux6cZsE6TprtjedQ-Os9MSglNFyH4mYr2zP5T51KE8CrCKQMtecMogzqZasN-pi_Csp1TebRGpOJFNXCvHYi7lXAu4FU_bjT_ImkDg6Yfjx0-_Du8MIOUP79frorvE5Ic_OhI-gaaVpD/s640/WP_20170510_008.jpg" width="640" /></a></div>
<br />
<div style="text-align: justify;">
Des démonstrations impressionnantes ont jalonné cette keynote avec notamment des applications d'intelligence artificielle dans le domaine de la sécurité des personnes sur un environnement de travail ou bien encore un hôpital. Cognitive Services, au travers de Caméras est capable de reconnaître des personnes et des objets tels que des outils dangereux par exemple et déclencher des alertes en cas de danger ou bien violation de règles de sécurité via l'envoi d'email, SMS ou autre. Nous voyons dans la démo ci dessous la reconnaissance des objets et des personnes dans un atelier par des cadres visuels.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQIgGrh_GdqXa8zUGmaxst2ntOB51oEsWHXSXx_pE7vkXOLR28V5HoLsJ8-_PldHOto2B77dGsIGaZDtb3GTnxc3s_obd0SxnZAYkhuAMZiie1jhPIlve0_7IDq44oN0yH_KBe099sKEu/s1600/WP_20170510_004.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQIgGrh_GdqXa8zUGmaxst2ntOB51oEsWHXSXx_pE7vkXOLR28V5HoLsJ8-_PldHOto2B77dGsIGaZDtb3GTnxc3s_obd0SxnZAYkhuAMZiie1jhPIlve0_7IDq44oN0yH_KBe099sKEu/s640/WP_20170510_004.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvWN2EJeyMCZqCXrqLIwFy2apG-jYnqAZwk9mYnLTKAA8Xb4eSel_hO7sIhsYZkjZK-Pf4Hi1BloWQsUtn3fK8nvylzrAKNwKx-w5qI5LdVdG5pKxfbvsnTZr4negQndsjWboAIOuIw7NW/s1600/WP_20170510_003.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvWN2EJeyMCZqCXrqLIwFy2apG-jYnqAZwk9mYnLTKAA8Xb4eSel_hO7sIhsYZkjZK-Pf4Hi1BloWQsUtn3fK8nvylzrAKNwKx-w5qI5LdVdG5pKxfbvsnTZr4negQndsjWboAIOuIw7NW/s640/WP_20170510_003.jpg" width="640" /></a></div>
Pour la première fois, un espace complet du Hub était consacré à l'intelligence artificielle montrant toute la place stratégique accordée au Bots et à l'IA<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRPT0l89-ITOsgMt0Xxjtt25jvHFSypDNQWB8c3dD2wuRbk9O5ZisDeIyauFEOO3pPAkttH_KuUD0ASBkjETp4lt_3lLUaJz9T0y_0hiMeP83vEK1UTDb3jqQWcR_9WFwEFSpLRnxegD2_/s1600/WP_20170510_021.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRPT0l89-ITOsgMt0Xxjtt25jvHFSypDNQWB8c3dD2wuRbk9O5ZisDeIyauFEOO3pPAkttH_KuUD0ASBkjETp4lt_3lLUaJz9T0y_0hiMeP83vEK1UTDb3jqQWcR_9WFwEFSpLRnxegD2_/s640/WP_20170510_021.jpg" width="640" /></a></div>
Bien évidemment le Big Data et autres Azure Data Lake ont une place stratégique dans le monde de l'IA et Microsoft a annoncé au cours de cette keynote Cosmos DB construit de 0 pour servir des services cloud à l'échelle planétaire et des applications utilisant de manière intensives des données à partir d'objets connectés pour l'IA avec des performance annoncées exceptionnelles. Cette annonce tombe plutôt à pic alors que nous entrons dans l'ère des Micro services qui recommandent la mise en place de bases de données distribuées.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjagWv1Sl-CzUNO-d5jI36i8RrYQ8WmqMy9xFm4zZT4dnZUhic0IYse3TVkcHiNUL_p7afNKDFLgmrI9SHHbGNvmgYf_U3_vrRw7D4D7q15Pq3zK1i29qOyxb0Sb8OZgdQpHs8NY6eRr2-u/s1600/WP_20170510_010.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjagWv1Sl-CzUNO-d5jI36i8RrYQ8WmqMy9xFm4zZT4dnZUhic0IYse3TVkcHiNUL_p7afNKDFLgmrI9SHHbGNvmgYf_U3_vrRw7D4D7q15Pq3zK1i29qOyxb0Sb8OZgdQpHs8NY6eRr2-u/s640/WP_20170510_010.jpg" width="640" /></a></div>
<br />
<div style="text-align: justify;">
Coté Base de Données, on a SQL Server 2017 qui apporte lui aussi son lot de nouveautés avec une exécution sur Windows Server, Linux et Docker, et également un moteur avancé de Machine Learning hosté avec R et Python permettant d'éviter les mouvements couteux de gros volumes de données</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZM7zZCrEvblnYJ55gkY1SsMf1gg2bACwaj68vyTTEVbBU6d4q5EKS7Q9WBsI46QNvjmC_df-DsoBzgh3LbeQKKeKlNacXA417U0PGy1B21H8S2woh8lFDI8YpD0lo2LJEIlL1T1AQKID/s1600/WP_20170510_009.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKZM7zZCrEvblnYJ55gkY1SsMf1gg2bACwaj68vyTTEVbBU6d4q5EKS7Q9WBsI46QNvjmC_df-DsoBzgh3LbeQKKeKlNacXA417U0PGy1B21H8S2woh8lFDI8YpD0lo2LJEIlL1T1AQKID/s640/WP_20170510_009.jpg" width="640" /></a></div>
<br />
<b>En conclusion de cette Keynote, nous retiendrons que l'Intelligence Artificielle est là pour augmenter les capacités de chaque développeur, organisation, plate-forme et personne</b><br />
<br />
<div class="pw-hidden-cp">
Pour démarrer rapidement, ci dessous les adresses intéressantes : </div>
<div class="pw-hidden-cp">
<a href="https://dev.botframework.com/" target="_blank">Bot Framework</a></div>
<div class="pw-hidden-cp">
<a href="https://azure.microsoft.com/fr-fr/services/cognitive-services/" target="_blank">Cognitive Services</a></div>
<div class="pw-hidden-cp">
<a href="https://mva.microsoft.com/en-US/training-courses/creating-bots-in-the-microsoft-bot-framework-using-c-17590?l=ALwJe9kqD_4000115881" target="_blank">Microsoft Virtual Academy Bot Course</a></div>
<div class="pw-hidden-cp">
<br /></div>
<div class="pw-hidden-cp">
<br /></div>
<div class="pw-hidden-cp">
<br /></div>
<b><br /></b>
<div class="pw-hidden-cp">
<br /></div>
<b></b><b><br /></b>
<br />
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-50732071027512104582017-03-28T05:48:00.002-07:002017-03-28T05:54:38.434-07:00Pull Requests avec Visual Studio 2017, VSTS & GIT<div style="text-align: justify;">
Lors du précédent article, nous avons démontrer une approche de développement Agile avec Git et Visual Studio 2017. Pour compléter cette expérience, nous allons regarder dans le présent article comment avec VSTS et Visual Sudio le développeur va pouvoir valider la qualité de ses développement au travers du processus de Pull Request.</div>
<div style="text-align: justify;">
Suite au dernier article, nous avons développé une fonctionalité de calcul de Discount, le code a été commité localement puis poussé sur le serveur via un Push.</div>
<div style="text-align: justify;">
C'est à ce moment précis qu'intervient tout le processus qualité au travers de l'intégration continue et des Pull Requests. Pour rappel, l'objectif d'un Pull Request est de proposer du code poussé au travers d'une feature branche pour promotion au merge dans la branche master.<br />
<u><i>Définition </i></u>: Une Pull Request est un process collaboratif qui permet au reste de l'équipe de discuter des changements dans une feature branch et valider le merge vers master une fois que tout le monde à approuvé.</div>
<div style="text-align: justify;">
<b><span style="font-size: large;">ETAPE 1 - Configuration préliminaire pour les Pull Requests</span></b></div>
<div style="text-align: justify;">
La première chose à faire est de préparer son Repo pour la gestion des Pull Requests</div>
<div style="text-align: justify;">
Afin de procéder à la revue de la Pull Requests, il faut d'abord que le code présenté passe au travers d'un "Quality Gate", nous allons utiliser pour cela une Build. Nous créeons à cet effet une build suffixée PR (pour Pull Request) qui sera utilisée pour la validation des Pull Requests, pour cela nous clonons simplement la Build Master CI qui est notre build d'intégration continue standard pour notre branche master.</div>
<div style="text-align: justify;">
Le point suivant va consister à configurer les <b>Branch Policies</b> de notre <b>Repository</b>, à partir de l'onglet <b>Code / Version Control</b>, choisir la branche master du Repo et cliquer sur l'onglet <b>Branch Policies</b> comme montré ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIq6ryj2UfQJ-tADBnzwCcPFnmdV27WvHXcyUqf0Kq9Ohj4ia-SgfqR5WQ187s72uWTIEmsJZttqloxIGizgI-oF9ZAewP7qPhDMp2UIVb6jRXZvPfHLZvBwRz6qiqRPRzQoUBICUe4VtL/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIq6ryj2UfQJ-tADBnzwCcPFnmdV27WvHXcyUqf0Kq9Ohj4ia-SgfqR5WQ187s72uWTIEmsJZttqloxIGizgI-oF9ZAewP7qPhDMp2UIVb6jRXZvPfHLZvBwRz6qiqRPRzQoUBICUe4VtL/s640/im1.png" width="640" /></a></div>
<div style="text-align: justify;">
La première configuration consiste à demander l'exécution de la build dédiée pull Request afin de s'assurer que le Reviewer va inspecter du code qui passe le minimum qualité imposé à savoir que le code compile, les tests passent et l'analyse automatique de code est OK. Tous ces points sont portés par le workflow de la build.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VRZ3bMpJ2UlBLuTGKyM7j2A5t4wzK2ABPJfNlnSEzriKx_QYN-2GVgTF_fsPIVNPnEG-5UGxJXreq_2SrptpOHvrIRiI2SfJu76YA0iglnr03SKHuAt3us_WXWVhOLUxMvSBFMcecBVG/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh6VRZ3bMpJ2UlBLuTGKyM7j2A5t4wzK2ABPJfNlnSEzriKx_QYN-2GVgTF_fsPIVNPnEG-5UGxJXreq_2SrptpOHvrIRiI2SfJu76YA0iglnr03SKHuAt3us_WXWVhOLUxMvSBFMcecBVG/s640/im2.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Il faut s'assurer également que la Pull Request est bien reliée à un PBI et dans notre exemple, que la Pull Request ne peut pas être validée par la personne qui a poussé le changement, également que la Pull request ne pas être complétée si le reviewer l'a rejetée </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg60Y1FF5Kx-PrIVDgo-NzrsMCFmjV-cguYIlft1ydbqYlbyDkWs-wQqbzS8X3pPQ9onFROEV4mxHcmsyKYXxMLf6qsjfIiNXQ3QN7eCqAXZiXZIuoIx_qai5vWoyUnKpn96TVLZX2JM1QH/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="230" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg60Y1FF5Kx-PrIVDgo-NzrsMCFmjV-cguYIlft1ydbqYlbyDkWs-wQqbzS8X3pPQ9onFROEV4mxHcmsyKYXxMLf6qsjfIiNXQ3QN7eCqAXZiXZIuoIx_qai5vWoyUnKpn96TVLZX2JM1QH/s400/im3.png" width="400" /></a></div>
<div style="text-align: justify;">
Il suffit simplement de sauvegarder cette configuration</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b><span style="font-size: large;">ETAPE 2 - Création et Validation d'une Pull Request</span></b></div>
<div style="text-align: justify;">
Une Pull Request peut être crée par le développeur à partir de Visual Studio. Après avoir poussé ses changements sur le serveur, il suffit de naviguer dans l'onglet Branches du Team Explorer, se positionner sur la feature branch, dans notre exemple <b>Discount </b>et lancer la commande Create Pull Request</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga86Fh_cY5Q5_5wMMXeoG24SXTs_J4sVL0FhOulSvaXcWHKxYooYf_420kGub0ZYihHBsTNY2CFTsO-dUuLT_XgE_4lGlgZIa7vFXdP5zbIp30pd2f5ISSvkVS0Q1mIM7P3EjlIRiluUvo/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEga86Fh_cY5Q5_5wMMXeoG24SXTs_J4sVL0FhOulSvaXcWHKxYooYf_420kGub0ZYihHBsTNY2CFTsO-dUuLT_XgE_4lGlgZIa7vFXdP5zbIp30pd2f5ISSvkVS0Q1mIM7P3EjlIRiluUvo/s320/im4.png" width="218" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On est alors redirigé sur l'instance web de VSTS, il suffit alors de compléter la description de la Pull Request, selectionner le ou les reviewers et valider la création</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVU6pVbsgjzfjcf8t1bFEAQfPt63xo6Wn6fcUnekO3TJ0Jl8oTgvfzpENg2oA-UhYP-nvpaM7iwGjMSZZsXYwMtVpVJGL6lbxxbeb-YwZhV0e-yiftYkxdNUVgpvCO7M8BKLLNpyZ8ob2X/s1600/im5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="448" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVU6pVbsgjzfjcf8t1bFEAQfPt63xo6Wn6fcUnekO3TJ0Jl8oTgvfzpENg2oA-UhYP-nvpaM7iwGjMSZZsXYwMtVpVJGL6lbxxbeb-YwZhV0e-yiftYkxdNUVgpvCO7M8BKLLNpyZ8ob2X/s640/im5.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On peut voir en bas de page le code modifié / ajouté / supprimé</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-BA6axtBkMbZs7HOJlQVf3kKYxvWBwrgbKCybCds1mJV-5LxilPN2zAM-wTiipFybd_-FR57oBQzoE9LjWh67tWW2EUcf_IbhoU7RbFoSys91z3m9zZC-L2WnJ_sNAtufRTvz8d45Z1zj/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-BA6axtBkMbZs7HOJlQVf3kKYxvWBwrgbKCybCds1mJV-5LxilPN2zAM-wTiipFybd_-FR57oBQzoE9LjWh67tWW2EUcf_IbhoU7RbFoSys91z3m9zZC-L2WnJ_sNAtufRTvz8d45Z1zj/s320/im6.png" width="320" /></a></div>
<div style="text-align: justify;">
Suite à la création, on est redirigé vers la page de statut de la Pull Request, et en parallèle la build a été lancée</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzQD-AmofiR17XJvnEqEHf6PH6vodAgX8l8L9Yr2cH4GgZY8lUlorUGBSALqvjUwOklf_Mv-C07MeBbM1-ltsH991yZWEnFq7UbXEECtGzbOwWBKEd1dnKsUlYmtV68kKhGpO9JpNa3asz/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzQD-AmofiR17XJvnEqEHf6PH6vodAgX8l8L9Yr2cH4GgZY8lUlorUGBSALqvjUwOklf_Mv-C07MeBbM1-ltsH991yZWEnFq7UbXEECtGzbOwWBKEd1dnKsUlYmtV68kKhGpO9JpNa3asz/s640/im7.png" width="640" /></a></div>
<div style="text-align: justify;">
Le point très interessant au niveau des Pull requests est notamment la discussion qui peut être initée directement dans le code inspecté, ci dessous après avoir activé l'onglet Files, on peut voir le thread de discussion inité</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEA5nS3hlm-n3nI7-H9THMZwzl6dT444o5Lbwko4UwQEVDYNh9MPvKgxx1AlOSoPU7uNfu6MqLKqIjm3tBucXZdkeSX3bfVYOtF-BZrQXsLLpokLibMHfz5UptMvQuTA04VtZH3tkmSD-n/s1600/im8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="342" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEA5nS3hlm-n3nI7-H9THMZwzl6dT444o5Lbwko4UwQEVDYNh9MPvKgxx1AlOSoPU7uNfu6MqLKqIjm3tBucXZdkeSX3bfVYOtF-BZrQXsLLpokLibMHfz5UptMvQuTA04VtZH3tkmSD-n/s640/im8.png" width="640" /></a></div>
<div style="text-align: justify;">
Il est interessant également de regarder le contenu des onglets Updates et Commits pour le détail</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2KPC0c0EGnBhqVZRB-pKlUm_9kjlJdGAoo3lJ3hLY50aAF1YxKn4imCXQANV-I8YWtHAd1wrOptZTlbMnyW1eT3qCA9ONsDyEoLBTmnfKhK4_72hzeSyci9pAMJpBrjziyao-rG9T00vE/s1600/im9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2KPC0c0EGnBhqVZRB-pKlUm_9kjlJdGAoo3lJ3hLY50aAF1YxKn4imCXQANV-I8YWtHAd1wrOptZTlbMnyW1eT3qCA9ONsDyEoLBTmnfKhK4_72hzeSyci9pAMJpBrjziyao-rG9T00vE/s320/im9.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9xIBizvOnmhDMgZ9pQolAIghBidJv6C01MwedIEcoj1eKu0-Vubf9YuLpJXEC30vZzAgp-ysY90CpnB4aUrHd5B1dbsjc7eiEF75Pq7RHN1el40y-wAaLUZFqgKgvIVJo_0ajfGhFoonB/s1600/im10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9xIBizvOnmhDMgZ9pQolAIghBidJv6C01MwedIEcoj1eKu0-Vubf9YuLpJXEC30vZzAgp-ysY90CpnB4aUrHd5B1dbsjc7eiEF75Pq7RHN1el40y-wAaLUZFqgKgvIVJo_0ajfGhFoonB/s320/im10.png" width="320" /></a></div>
<div style="text-align: justify;">
Enfin si tout est OK du point de vue du Reviewer, il reste à approuver la Pull Request : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrdNLZmyUcnvoyJl11aXvUsjfXdSn9MyyH9bm8NcqABpMvUg63ASxseYkNtke8KhDkUQUd9YQxsNedVoXGuqzCvw4n470kaug7QhyoQ11-kY1r-fQbMrsJfkV7ry3S2b0-h2Ix6wPD2VSq/s1600/im13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrdNLZmyUcnvoyJl11aXvUsjfXdSn9MyyH9bm8NcqABpMvUg63ASxseYkNtke8KhDkUQUd9YQxsNedVoXGuqzCvw4n470kaug7QhyoQ11-kY1r-fQbMrsJfkV7ry3S2b0-h2Ix6wPD2VSq/s320/im13.png" width="320" /></a></div>
<div style="text-align: justify;">
Ce qui va déclencher une build de validation du merge, et dernière étape, il va falloir Compléter la Pull request, si la build n'est pas terminée, c'est indiqué dans le haut de la boite de dialogue.</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8E59rU6gsJdR26cb4YoC0816AV7hSvV4twuFQtOd-Mf3bZsnWLz3SV93Bp4QBIUgq8pBsvP9UHdhHaAiM4XtPeUMN9_f8TuNPR6yR6sIOVNGMHaHGSlQ5lbh3jVrkXZVSV9rF5mQgCjLa/s1600/im14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="283" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj8E59rU6gsJdR26cb4YoC0816AV7hSvV4twuFQtOd-Mf3bZsnWLz3SV93Bp4QBIUgq8pBsvP9UHdhHaAiM4XtPeUMN9_f8TuNPR6yR6sIOVNGMHaHGSlQ5lbh3jVrkXZVSV9rF5mQgCjLa/s320/im14.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Dès que la build est terminée, on peut complèter le merge</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmDCi0pC_NJudm9Z49jUV2dFUTipfZ0FrXNNvkJzynVuCkOGGlYo2ZU92EzbKC8AyVKWhjEDsqLFu2d49ddqPuKFKNscISS-JGFj-rPY3Vv9EQ1MdBzDkCLW6KbBGHVbaJpK53-vix4yh/s1600/im15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="242" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNmDCi0pC_NJudm9Z49jUV2dFUTipfZ0FrXNNvkJzynVuCkOGGlYo2ZU92EzbKC8AyVKWhjEDsqLFu2d49ddqPuKFKNscISS-JGFj-rPY3Vv9EQ1MdBzDkCLW6KbBGHVbaJpK53-vix4yh/s320/im15.png" width="320" /></a></div>
<div style="text-align: justify;">
Au final, on a l'affichage du détail montrant l'achèvement avec succès de la Pull Request</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBlCvpaPxTApuz4yzrFsLqS07b7OyqAR2sWMJbmu-xYh-HVc9GjiPLCJF-MiUo2xEWOrhWWe78SjecD0SAcNn8gQR6unupCnGm4Un2yhYf580ucc9mG9vZGKEYI0AUb3ac9MGDp7JssOTj/s1600/im16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="114" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBlCvpaPxTApuz4yzrFsLqS07b7OyqAR2sWMJbmu-xYh-HVc9GjiPLCJF-MiUo2xEWOrhWWe78SjecD0SAcNn8gQR6unupCnGm4Un2yhYf580ucc9mG9vZGKEYI0AUb3ac9MGDp7JssOTj/s640/im16.png" width="640" /></a></div>
<div style="text-align: justify;">
On notera que nous avons demandé la suppression de la feature branch suite au merge et également un Squash des changements qui consiste à condenser l'historique des changements réalisés dans la feature branche (nous n'avons plus tout le détail), comme montré ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJV25bqqVHbIHXNWnjy4JUMMxDUITqK8NcStNQr5ESQn44J0KnAYeUVDl3Lq3MaC_TFfkvcP0e49-LLkt3tSQB20IUc-4Fz0xwfK4KgUnteTjGjMhLiFqfDY8ulTXlcyuByftgwT04sDeh/s1600/im17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJV25bqqVHbIHXNWnjy4JUMMxDUITqK8NcStNQr5ESQn44J0KnAYeUVDl3Lq3MaC_TFfkvcP0e49-LLkt3tSQB20IUc-4Fz0xwfK4KgUnteTjGjMhLiFqfDY8ulTXlcyuByftgwT04sDeh/s320/im17.png" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-41398236656059130982017-03-24T10:07:00.001-07:002017-03-24T10:07:24.561-07:00Développement Agile avec Visual Studio 2017, VSTS & GIT<div style="text-align: justify;">
Avec la montée en puissance des méthodes Agiles et de Git, la manière d'approcher les développements pour les développeurs "modernes" change radicalement, par exemple alors qu'en mode conventionnel on va recommander de limiter le nombre de branches, avec Git, chaque nouveau développement va entrainer la création d'une Feature Branch à partir d'une story, et également le démarrage ne va plus se faire à partir du code mais à partir du Backlog, ce qui veut dire que le développeur va tirer une nouvelle branche directement à partir du PBI ou User Story à développer. Cette nouvelle approche a été totalement intégrée en terme d'ergonomie à VSTS, et c'est ce que l'on va démontrer dans cet article. Nous allons partir sur le développment d'un PBI</div>
<div style="text-align: justify;">
Ci dessous le PBI exemple </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKELYR5vHyPmdS_NnLZluIZfsYlpn8r0yRHvk5OylTIDn64R8w37YHQpi9TIdqlM5G2LDXdkvASrAd2RbRFQp7rBj1oLsAdnJJBjD1OyAfcr9W378MaPJ6heYCoaDCyaFwhN1FeN8QFGA/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCKELYR5vHyPmdS_NnLZluIZfsYlpn8r0yRHvk5OylTIDn64R8w37YHQpi9TIdqlM5G2LDXdkvASrAd2RbRFQp7rBj1oLsAdnJJBjD1OyAfcr9W378MaPJ6heYCoaDCyaFwhN1FeN8QFGA/s640/im1.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Cliquer le menu contextuel et selectionner la commande New Branch</div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLGSp4HFf_TwRX-WwSN1iEgRF0kWUjGwLURz-m8ukbqVBdXqcMI9uRVvN5vg3B6b-Xh-kMZoZH1nYDWlSClSYKfZcYYSCR07iXuPVeamSedNeN049exqhaN_SNz61MPCGZh0iLWmZlI8u/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFLGSp4HFf_TwRX-WwSN1iEgRF0kWUjGwLURz-m8ukbqVBdXqcMI9uRVvN5vg3B6b-Xh-kMZoZH1nYDWlSClSYKfZcYYSCR07iXuPVeamSedNeN049exqhaN_SNz61MPCGZh0iLWmZlI8u/s400/im2.png" width="400" /></a></div>
<div style="text-align: left;">
Pour la branche, une bonne convention est d'entrer feature/Nom_de_la_fonction, ce qui permettra de générer une structure avec sous dossier dans Git comme on le verra un peu plus tard</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5Rbc55511A2nXb_rWUUemeulVP3KTzceKGeeY603ZwfzCL3oOeXBZA9mDdh_hjCMa1PXWcHVBnRzVytliXk3-OrtiPkSpqBLhyphenhyphenr3P_Cjh-I2vIvtyrVNgINAkeoX46tLqWXM9yur52oF/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-5Rbc55511A2nXb_rWUUemeulVP3KTzceKGeeY603ZwfzCL3oOeXBZA9mDdh_hjCMa1PXWcHVBnRzVytliXk3-OrtiPkSpqBLhyphenhyphenr3P_Cjh-I2vIvtyrVNgINAkeoX46tLqWXM9yur52oF/s400/im3.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Après avoir cliqué sur Create Branch, la fenêtre Code s'affiche et l'on voit apparaitre la nouvelle branche Discount dans le dossier Feature</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9K-a3t2lC4Dczd1YfUfm0mrrlLrSrrK26o3QCcUL36OApZJvk0ZQm0HmCHKXb5teMR-m5TsQA90SjHRGwTQuP1Digg4aTrxJuNQ9kqCGeyA24-TUdi-IC2KXYGe51Hx37rt8qmC2Cr_Jz/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="246" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9K-a3t2lC4Dczd1YfUfm0mrrlLrSrrK26o3QCcUL36OApZJvk0ZQm0HmCHKXb5teMR-m5TsQA90SjHRGwTQuP1Digg4aTrxJuNQ9kqCGeyA24-TUdi-IC2KXYGe51Hx37rt8qmC2Cr_Jz/s640/im4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Pour démarrer les développements, démarrer Visual Studio, procéder à une Synchronisation à partir de Team Explorer, </div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghFukrFjYNmH-iC9hW0QIWSFpvCNM5avomjdzrNI_i-oK3ElQBMkJNOwMEpRl1RFXnf8OELjMWAbNhirTA_0JaB8G5_7LG4fe9slkMP3Y91k2N8SQ-aFt1u7AvSHhng61jtPnXbZIIOzEu/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghFukrFjYNmH-iC9hW0QIWSFpvCNM5avomjdzrNI_i-oK3ElQBMkJNOwMEpRl1RFXnf8OELjMWAbNhirTA_0JaB8G5_7LG4fe9slkMP3Y91k2N8SQ-aFt1u7AvSHhng61jtPnXbZIIOzEu/s400/im6.png" width="370" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Puis cliquer sur l'onglet Branches pour accèder à l'arbre des branches locales et remote</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglv7jQRdBOaF-CvtzCZpV6OeaQJeYd2NVGuMwOvwhsUIoAPAgbzsbDl99acO9l2atlXZP5PAo-wuTwBF_86x-AjdZkRaT7GBP0S0HaB2n_-EsaCz085nebqtK0osibS79dyHJ1f5SWxrgA/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglv7jQRdBOaF-CvtzCZpV6OeaQJeYd2NVGuMwOvwhsUIoAPAgbzsbDl99acO9l2atlXZP5PAo-wuTwBF_86x-AjdZkRaT7GBP0S0HaB2n_-EsaCz085nebqtK0osibS79dyHJ1f5SWxrgA/s320/im7.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
On voit bien la branche Discount du dossier feature parmi les autres branches. En revanche la branche n'est pas présente en local, pour cela il faut simplement faire un Check out</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5WEbj8uSbk_Tj9ZkcxgGKJhPIuMGQ4vsaVd_a-mPibBgqR9PzAPp-7k61RalEh3i3cGxEtODqyr04U3SqO5E_-YhHa9kTiXYYUsilHGy1XpLPXa7w8iv7yy6mKrUYFm7kGAJSs2imjI-G/s1600/im8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh5WEbj8uSbk_Tj9ZkcxgGKJhPIuMGQ4vsaVd_a-mPibBgqR9PzAPp-7k61RalEh3i3cGxEtODqyr04U3SqO5E_-YhHa9kTiXYYUsilHGy1XpLPXa7w8iv7yy6mKrUYFm7kGAJSs2imjI-G/s400/im8.png" width="316" /></a></div>
Le Checkout peut se faire par le menu contextuel comme montré ci dessous<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUI1yQIlP-9gozeZKE69468beUZqnzcHRP-VB8zmFTUJ5ipkbkaF95GYBqQ6dfgHhwtsFmpB0SPEEwYwAVECunbQpbG53sVBTRHs6FU7CvCL8AkUul41K9tHYgAZeuHhV6eYztUd2JPzlA/s1600/im9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="104" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUI1yQIlP-9gozeZKE69468beUZqnzcHRP-VB8zmFTUJ5ipkbkaF95GYBqQ6dfgHhwtsFmpB0SPEEwYwAVECunbQpbG53sVBTRHs6FU7CvCL8AkUul41K9tHYgAZeuHhV6eYztUd2JPzlA/s320/im9.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
La branche locale apparait instananément dans le dossier feature local</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1jKzyABQ92QpBqLdwUMI5RBZi3PtGcbrzi2UONhvECfYoSgKDz9ck_qgC3j9kbEFx_Uf_ga_5kXa4KR2gZIad0uN7f3wBPtpQDq1v1J1OMMDYYZQBPqeDsDi0gStiU_0MaY92h2X2cF3t/s1600/im10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi1jKzyABQ92QpBqLdwUMI5RBZi3PtGcbrzi2UONhvECfYoSgKDz9ck_qgC3j9kbEFx_Uf_ga_5kXa4KR2gZIad0uN7f3wBPtpQDq1v1J1OMMDYYZQBPqeDsDi0gStiU_0MaY92h2X2cF3t/s320/im10.png" width="256" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
A noter dans la barre d'état, on peut naviguer dans les différentes branches du repo git local et également voir le nombre de commits non poussés sur le serveur</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjewe3detcm0L8rnXUraWQs4GU36KwP34bg3RDKbjs356Iybr40T9HSKCvdVNexFVF91NXCFTWWdBUwn4lH_XGjEnrUh24eo_pp0FxzWc98eI0oVIEkVnU2_t3U4-pYtC3B2FUPiRB-ct4Q/s1600/im12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="40" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjewe3detcm0L8rnXUraWQs4GU36KwP34bg3RDKbjs356Iybr40T9HSKCvdVNexFVF91NXCFTWWdBUwn4lH_XGjEnrUh24eo_pp0FxzWc98eI0oVIEkVnU2_t3U4-pYtC3B2FUPiRB-ct4Q/s320/im12.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9We8yuTS2tS3OSSROlQ_Aj2jYAZmeAL3diQDbVo4fk14qbVRL9gvFBKcrUYMlrKxQlkdVFQ3yzjzBvrdsPcWfxHwAXfl6UwhWMWKH0AXvS0BGaxrTijrmFelNFftyEqvV1Gm6CL8AhtsJ/s1600/im13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9We8yuTS2tS3OSSROlQ_Aj2jYAZmeAL3diQDbVo4fk14qbVRL9gvFBKcrUYMlrKxQlkdVFQ3yzjzBvrdsPcWfxHwAXfl6UwhWMWKH0AXvS0BGaxrTijrmFelNFftyEqvV1Gm6CL8AhtsJ/s320/im13.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Puis le développeur procéde au développemnent puis Commit ses changements, qui sont à ce stade local</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji9I3wygvP0nDQQ7_6ls2k6TBr4OsbZmDrXaKAfcxP6XZHMnYvRnG9AnwNxoSxAdkTFKBz2gFp1Z_b8d-0mAPoWBt2qK0VfQoT4Fbsc5hGxjx_B26NUnJfzPVyVLvrPZSSBeOSi42eutCG/s1600/im14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="340" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEji9I3wygvP0nDQQ7_6ls2k6TBr4OsbZmDrXaKAfcxP6XZHMnYvRnG9AnwNxoSxAdkTFKBz2gFp1Z_b8d-0mAPoWBt2qK0VfQoT4Fbsc5hGxjx_B26NUnJfzPVyVLvrPZSSBeOSi42eutCG/s640/im14.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
On voir ci dessous le nombre de commits en attente, en cliquant simplement sur l'icone, on est redirigé vers la fenêtre de synchronisation </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqEZ-vMd-qDwL80z4IW59k05pb6fzxIr-wpHWUgN9m_SA6DQGrFHyLRtqSYKlQ4Vk0Gx7LQXaLzcGS1jxjTk4itWXr-w7xzdMew9k57pHBV5qgz2t6x4MC8q8_hNBGyr3p5jPEIe8yy9Gy/s1600/im15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="53" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqEZ-vMd-qDwL80z4IW59k05pb6fzxIr-wpHWUgN9m_SA6DQGrFHyLRtqSYKlQ4Vk0Gx7LQXaLzcGS1jxjTk4itWXr-w7xzdMew9k57pHBV5qgz2t6x4MC8q8_hNBGyr3p5jPEIe8yy9Gy/s400/im15.png" width="400" /></a></div>
<br />
il suffit de cliquer sur Push afin de pousser les changement coté serveur.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirpjfudHw4haWZJKbkZmVs8EAQVRp4KuWWnghluMS9vxsKO6FXUX8lF0ViaDaEya93_Fl2bWhvcYXr4wTyEKKjga8gqWpp5fF2-vuiBUk0pd3ggBOTI7DQXCrMPVIKaGEFJa9bsKt-hHB7/s1600/im16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirpjfudHw4haWZJKbkZmVs8EAQVRp4KuWWnghluMS9vxsKO6FXUX8lF0ViaDaEya93_Fl2bWhvcYXr4wTyEKKjga8gqWpp5fF2-vuiBUk0pd3ggBOTI7DQXCrMPVIKaGEFJa9bsKt-hHB7/s320/im16.png" width="307" /></a></div>
Une confirmation est renvoyée pour l'opération<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSsD313QEiaBnJ7xB6UjmCCH7eHP9z60Y6CgohwIvqr2ROoEdwPKSsvhOGcdiJsX7tmtuLGRtGFSvwGIFChZiUWKa68N-1oqPnWGA6mEEqXSJs6TRgu6WkOnUNbyDkauuHDEqX8X-UBc62/s1600/im17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSsD313QEiaBnJ7xB6UjmCCH7eHP9z60Y6CgohwIvqr2ROoEdwPKSsvhOGcdiJsX7tmtuLGRtGFSvwGIFChZiUWKa68N-1oqPnWGA6mEEqXSJs6TRgu6WkOnUNbyDkauuHDEqX8X-UBc62/s320/im17.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
L'étape suivante consiste normalement à créer une Pull Request, ce qui sera l'objet du prochain Post</div>
<div style="text-align: justify;">
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-66115988990279120862017-03-20T07:45:00.002-07:002017-03-20T07:45:34.626-07:00VSTS et Déploiement automatisé de bases de données avec DACPAC<div style="text-align: justify;">
Dans le précédent article nous avons vu l'avantage et la simplicité de mise en oeuvre de projets de bases de données DACPAC. Nous allons voir comment intégrer simplement dans nos processus d'intégration continue et déploiement continu nos développements de bases de données.</div>
<div style="text-align: justify;">
Notre projet DACPAC est donc sous controle de code source Git sous VSTS dans notre exemple.</div>
<div style="text-align: justify;">
La première étape va consister à créer une Build permettant de compiler et générer en sortie le fichier DacPac et le profile de publication de manière à ce qu'il puisse être consommé par une Release du module Release Management dont la responsabilité sera de déployer le package fabriqué par la build sur un instance SQL Azure dans notre exemple</div>
<div style="text-align: justify;">
Pour la création de la build, il s'agit d'une Build Standard à laquelle nous allons rajouter deux taches de copies, une pour le fichier Dacpac et une pour le fichier de publication</div>
Ci dessous la structure de la build avec l'ajout de deux taches "Copy Files"de la librairie standard<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieX1QTMyks69E7b9bgHu4BvSwFB6TjI5YC9TmlyozRXzAt9kt9_QYdsbsn18e9L9TNoBWjb5GvR-thOYPYMBN3YCT4kiqTbirJMjtmWJkaKbcJ0IEIME7ZO4bHrmHIMTw_YhBTxT5oRefF/s1600/build1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieX1QTMyks69E7b9bgHu4BvSwFB6TjI5YC9TmlyozRXzAt9kt9_QYdsbsn18e9L9TNoBWjb5GvR-thOYPYMBN3YCT4kiqTbirJMjtmWJkaKbcJ0IEIME7ZO4bHrmHIMTw_YhBTxT5oRefF/s320/build1.png" width="309" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
La configuration des taches de copies est pour Dacpac: cette tache va copier dans la Drop location dans un sous dossier database le fichier Dacpac du projet de base de données</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dWmGMilqCevVsqCt9SPAkvUPiAORrhqsXtnNydTUdUJ-w7p8tE4B4TpNoaXKogAMXdvkt3LwBFYgXzFz_PkZxLFaOhzLbhIlU_LMI693jps9SL31RzwGj3FJ5AlsQeiNnstUUw52p2WS/s1600/build2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7dWmGMilqCevVsqCt9SPAkvUPiAORrhqsXtnNydTUdUJ-w7p8tE4B4TpNoaXKogAMXdvkt3LwBFYgXzFz_PkZxLFaOhzLbhIlU_LMI693jps9SL31RzwGj3FJ5AlsQeiNnstUUw52p2WS/s640/build2.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Pour le fichier de publication nous avons : ce fichier se trouve généralement à la racine du projet et va contenir les informations pour la mise à jour de la base de données.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-HPMjcIXMbeMzTeDnofKmWIX0bmNc1cPhAVGr2Q8mMjeLAnejo-7KU_svmTe2vE0eDIcrVNtMkrlq3SxdVDIgTsDPHHAN0ulriq5MfauAZnPqMq3BQAfoZ_DniBblBa3aDrnnmMtiu_h4/s1600/build3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="323" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-HPMjcIXMbeMzTeDnofKmWIX0bmNc1cPhAVGr2Q8mMjeLAnejo-7KU_svmTe2vE0eDIcrVNtMkrlq3SxdVDIgTsDPHHAN0ulriq5MfauAZnPqMq3BQAfoZ_DniBblBa3aDrnnmMtiu_h4/s640/build3.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Pour vérifier que la build fonctionne correctement, il suffit simplement de la lancer, une fois terminée afficher les détails de la build et cliquer sur l'onglet Artifacts : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNTGLB8MEl1VyiVeAD8MB1nhVmBT6T0edr2r5a1eC9UASWoRImbDjnUxbxtD7Xcq4C4dIH2QGhHTmsALHGacFnVyxHcoumqQgLVp6ijd66hpEbDvwNevMaGEd-SnoE_ytStN6x0jdNOPTc/s1600/build4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="297" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjNTGLB8MEl1VyiVeAD8MB1nhVmBT6T0edr2r5a1eC9UASWoRImbDjnUxbxtD7Xcq4C4dIH2QGhHTmsALHGacFnVyxHcoumqQgLVp6ijd66hpEbDvwNevMaGEd-SnoE_ytStN6x0jdNOPTc/s640/build4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Cliquer sur le bouton Explore à droite de Drop, les deux fichiers doivent être présents dans le dossier Database</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3n4S8uVlfTSLuDLwmUdaVw7JXNlh2mUrbcrlYjblgiBPH128d3lNB2A463wiwA1VpAqSPM8dVV76v92NZMIiGyMncluqX4hfF4C32G2ar2YRWlRTAGCAaMN7Vr4m_CEi3QLsDHmw06S3/s1600/build5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ3n4S8uVlfTSLuDLwmUdaVw7JXNlh2mUrbcrlYjblgiBPH128d3lNB2A463wiwA1VpAqSPM8dVV76v92NZMIiGyMncluqX4hfF4C32G2ar2YRWlRTAGCAaMN7Vr4m_CEi3QLsDHmw06S3/s320/build5.png" width="306" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
La build fabrique bien le package nécessaire à Release Management pour déployer les modifications effectuées sur la base de données.</div>
<div class="separator" style="clear: both; text-align: justify;">
L'étape suivante va consiter à créer une Release Definition permettant de déployer ce package sur une instance SQL Azure dans notre exemple, pour cela accèder à l'onglet Release et cliquer sur le bouton New Definition</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqCMhh5mXSJgjDY_ze9jRMFdcYeJkoMxPM0ZR_-rNr33eBGs0L7J6eMg3d2qT1vhOvELMrzIrTifJWSr6_D9dllQioMN_zeiO876cpF7tHOXYjYTPIbCKneYd37s44cuAd2Bwvke5Ixvwb/s1600/rel1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="183" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqCMhh5mXSJgjDY_ze9jRMFdcYeJkoMxPM0ZR_-rNr33eBGs0L7J6eMg3d2qT1vhOvELMrzIrTifJWSr6_D9dllQioMN_zeiO876cpF7tHOXYjYTPIbCKneYd37s44cuAd2Bwvke5Ixvwb/s400/rel1.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Configurer le projet et la build à utiliser pour le déploiement puis cliquer sur Create</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8CywzdSUkAc9VGEs_DMwa6dN1lPPNVEWokB_M0Qoo1ZdFFhbZOD56Qsqgg_srGd046LVdj3vLULlD4eL3plrnfavgjhnM2eidRYrgN5UbbfOPnplbSu6Zq99WxsDhN70-U3BnEvDRdtW/s1600/rel2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjj8CywzdSUkAc9VGEs_DMwa6dN1lPPNVEWokB_M0Qoo1ZdFFhbZOD56Qsqgg_srGd046LVdj3vLULlD4eL3plrnfavgjhnM2eidRYrgN5UbbfOPnplbSu6Zq99WxsDhN70-U3BnEvDRdtW/s320/rel2.png" width="288" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Etant donné que nous avons un compte SQL admin pour le déploiement, nous pouvons définir des variables pour le compte et le mot de passe pour le déploiement comme montré ci dessous (penser à utiliser le cadenas pour passer ces données en secret!)</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24B7Hh92PT8bNM_3XvZi8_zwj5FEf8G7E3JGkorwmkk3MnJe5ZBs31s76IIt6xFEQS2xhLhPq2OlgXQP97JFrDOKaZVM-42OPvfyi-qn_oF-aq1mU9DB5STUVcOJ11M-38Emsij9en5W-/s1600/rel3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="329" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24B7Hh92PT8bNM_3XvZi8_zwj5FEf8G7E3JGkorwmkk3MnJe5ZBs31s76IIt6xFEQS2xhLhPq2OlgXQP97JFrDOKaZVM-42OPvfyi-qn_oF-aq1mU9DB5STUVcOJ11M-38Emsij9en5W-/s640/rel3.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Pour la partie environnment, renommer en Dev par exemple puis rajouter une tache de déploiement : <b>Azure SQL Database Deployment</b> , cliquer sur <b>Add </b>puis <b>Close</b></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4e2n1ASP3Ybu0Wwy-jdkpUfiV6-YV2s0tS_IihFcNj99zVzThEJi-MZC-IUylE7uIQIlYPdhu-YtyytKuHEy-Mii_7B0Tddfh5hjLVk2BgKlUsrLuIRBB91Hj8XylGPZtDsT3CpKvRKHB/s1600/rel4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="476" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj4e2n1ASP3Ybu0Wwy-jdkpUfiV6-YV2s0tS_IihFcNj99zVzThEJi-MZC-IUylE7uIQIlYPdhu-YtyytKuHEy-Mii_7B0Tddfh5hjLVk2BgKlUsrLuIRBB91Hj8XylGPZtDsT3CpKvRKHB/s640/rel4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
La dernière étape va simplement consister à configurer le déploiement : </div>
<div class="separator" style="clear: both; text-align: justify;">
Le prérequis est d'avoir provisionné un Service Endpoint de type Azure Resource Manager pour votre projet VSTS afin de permettre à la release definition de communiquer avec la ressource Azure cible, comme montré ci dessous : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmjT_-Fwu1NYGaFxlr3qyi19dfvCURL_sn96cLkF7a3djTAjhyphenhyphenTmXvS4aaYRjf_GL-1oBFXT8RtFUli2-lanJGNtDtpSzSColg2hRggcF-GrhD3QTSh7MoTR-9-8I5qsMMxfpLOoDWIDm/s1600/rel8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSmjT_-Fwu1NYGaFxlr3qyi19dfvCURL_sn96cLkF7a3djTAjhyphenhyphenTmXvS4aaYRjf_GL-1oBFXT8RtFUli2-lanJGNtDtpSzSColg2hRggcF-GrhD3QTSh7MoTR-9-8I5qsMMxfpLOoDWIDm/s400/rel8.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Puis procéder à la configuration comme montré ci dessous : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51VxjefFNSv0wcW4T0kxCdpGiY2qKqhrmliT0YrnYs5LF9lRpt-fU3B8aRoqPdb1Bp4fBbTHvQHbFCqkTU_lnA8kKTXWSEqfaL6_8wcb3elhLYRhNeawWGW_i3EsTRZP1pOmRBTImF8-W/s1600/rel9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="424" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj51VxjefFNSv0wcW4T0kxCdpGiY2qKqhrmliT0YrnYs5LF9lRpt-fU3B8aRoqPdb1Bp4fBbTHvQHbFCqkTU_lnA8kKTXWSEqfaL6_8wcb3elhLYRhNeawWGW_i3EsTRZP1pOmRBTImF8-W/s640/rel9.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Une fois la configuration terminée, il ne reste plus qu'à tester, pour cela, nous allons rajouter un champ Description dans la table Countries, archiver le code, ce qui va lancer la Build automatiquement et provisionner le package, ci dessous la table modifiée:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyZLwnJhRiqN_jaOSttbioDIndqMusJKWZFY4-CNOadaSudL1CVt9rVwGa-1r_g1vnyZkrzdRDMFSb7sr-WiH76Bckkq94QRFqcUcOfyLh0AFR-P3hwFpoiGL8DJ4hXkW4owOdzQ9rtu9b/s1600/rel10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhyZLwnJhRiqN_jaOSttbioDIndqMusJKWZFY4-CNOadaSudL1CVt9rVwGa-1r_g1vnyZkrzdRDMFSb7sr-WiH76Bckkq94QRFqcUcOfyLh0AFR-P3hwFpoiGL8DJ4hXkW4owOdzQ9rtu9b/s640/rel10.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
La build est alors déclenchée, lorsque terminée, nous lançons une release : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3-7FH0gZyM_D0i_iOiKkQ3N-rQW6MP8owSdPORxnW9cy1qCxbNJaTaGoxB7uUrYn6tlWXCF1f7NHY6f6RCt2nhsHFOq0WgQHg2bXXNsAmwBzoLw8j02y8b616Szvkr95fVGoiQjYnNToG/s1600/rel14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="157" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3-7FH0gZyM_D0i_iOiKkQ3N-rQW6MP8owSdPORxnW9cy1qCxbNJaTaGoxB7uUrYn6tlWXCF1f7NHY6f6RCt2nhsHFOq0WgQHg2bXXNsAmwBzoLw8j02y8b616Szvkr95fVGoiQjYnNToG/s320/rel14.png" width="320" /></a></div>
<div style="text-align: justify;">
Puis simplement configurer la build à utiliser (noter qu'en cas de déploiement auto, on peut configurer l'utilisation de la dernière build) puis cliquer sur Create</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOf7ORbLMzK6XnrvxGqKPZddsNJl-gEWwtjX-mPRpL6toRBhZ4JXUYiMpvBoPmig2hDuVjMJEGrA55wlZp3OaIVyDT1r0ulyHuIEzhsMRtS-I2EKVawpjy4xIyl81kpBiIXc0aXc5_HpN/s1600/rel15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjxOf7ORbLMzK6XnrvxGqKPZddsNJl-gEWwtjX-mPRpL6toRBhZ4JXUYiMpvBoPmig2hDuVjMJEGrA55wlZp3OaIVyDT1r0ulyHuIEzhsMRtS-I2EKVawpjy4xIyl81kpBiIXc0aXc5_HpN/s400/rel15.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Le déploiement est alors en progression</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjETTYw2r0XKjHDYbaerBV1M0qRbaJDcdMPk9DoHX0sh1Ul-NxiwLEgcVRbh2BK5K5Tybcs8paeXjQrRABnnSEa6GjzyyFWmvMTlHpj1N5cjNkB-6vQ838s0uiFvhkTMtf-M3Ra3qe85t4/s1600/rel16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjETTYw2r0XKjHDYbaerBV1M0qRbaJDcdMPk9DoHX0sh1Ul-NxiwLEgcVRbh2BK5K5Tybcs8paeXjQrRABnnSEa6GjzyyFWmvMTlHpj1N5cjNkB-6vQ838s0uiFvhkTMtf-M3Ra3qe85t4/s320/rel16.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Au bout de quelques minutes, la release est déployée</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaYdDFkMGF31JHJF6iyHjRAZsk3exhKnp2r-Wi8ZCrUFAzElY-rRkNPyy4cbVy8coW3jd3GS2FELCudGl23g6YnsjMQTVAZthq4kdrY4ETOxOdLY9D2d8HhJYmORR_IFsUxbEAUUXHFmYT/s1600/rel21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="303" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaYdDFkMGF31JHJF6iyHjRAZsk3exhKnp2r-Wi8ZCrUFAzElY-rRkNPyy4cbVy8coW3jd3GS2FELCudGl23g6YnsjMQTVAZthq4kdrY4ETOxOdLY9D2d8HhJYmORR_IFsUxbEAUUXHFmYT/s320/rel21.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Si l'on se connecte à l'instance cible avec le server Explorer de Visual Studio par exemple, on verra que la colonne Description a bien été créée dans la table Countries de la base de données cible</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEt0EIG5ZMwVh2XVFO7_-kLApO_DsTzco_lAWR7wUr-cfl2zVh_hfL0EpBtpLo1EsWkqIiRw9UqC6YvAMj18CupmcGmxggB78RwspsIuQkOcdHanvYFC4VMHDejcx9BR25CacDcIqn5zFh/s1600/rel20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEt0EIG5ZMwVh2XVFO7_-kLApO_DsTzco_lAWR7wUr-cfl2zVh_hfL0EpBtpLo1EsWkqIiRw9UqC6YvAMj18CupmcGmxggB78RwspsIuQkOcdHanvYFC4VMHDejcx9BR25CacDcIqn5zFh/s320/rel20.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Nous avons donc vu que l'intégration des développements de base de données s'intégraient de manière simple sur l'ensemble du cycle de vie de développement tel qu'exposé par VSTS et nous permet d'inscrire nos développements de base de données dans une démarche Devops.</div>
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-49474859578412162182017-03-20T05:24:00.002-07:002017-03-20T05:24:44.998-07:00Quick Start avec les projets de bases de données - Visual studio 2017 et DACPAC<div style="text-align: justify;">
Le code SQL permettant de développer des bases de données, au travers de schémas, function SQL et Procédures stockées doivent à l'instar du code applicatif être intégré dans le cycle de vie du développement notamment au travers de la création de solutions et projets de bases de données, mise sous controle de code source de l'ensemble des artefacts de code, intégration au processus d'intégration continue et également déploiement continu. Au travers de ce premier article, nous allons démontrer comment utiliser Visual studio 2017 avec les projets DACPAC et également VSTS et Git pour développer une base de données. Dans l'article suivant nous verrons comment Déployer notre base de données au travers du pipeline de release.</div>
<div style="text-align: justify;">
La première consiste à créer un projet DacPac, pour cela démarrer Visual Studio 2017 taper Ctrl Shift N pour créer un nouveau projet, sélectionner le Type SQL Server puis le template SQL Server Database Project, nommer le projet et valider</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrH-tCwdEdlxDLowv5Z0NeNEOASNDPHkkENsctcBeikDPjSDN5lmVdcGLTWv1ffi9Q4rEtMFbwW8mRh2TkQ-eNLy8NVNrbq_Ss_2Qjv6psgUdAb9ZlsCqRmEYQlEhGiU79gT8atcVGWAqk/s1600/Im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="442" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrH-tCwdEdlxDLowv5Z0NeNEOASNDPHkkENsctcBeikDPjSDN5lmVdcGLTWv1ffi9Q4rEtMFbwW8mRh2TkQ-eNLy8NVNrbq_Ss_2Qjv6psgUdAb9ZlsCqRmEYQlEhGiU79gT8atcVGWAqk/s640/Im1.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Puis nous allons tout simplement dans notre cas importer le schéma d'une base de données existante afin de la modifier, pour cela à partir du menu contextuel, lancer la commande Import / Database...</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-uvv15Uwi2M8YDRF_p-7Q0LxiHHL_D4caUnQ694cNPP6I_G6C20IPo6Y0HtiarhCEWCNwrJtAfi5BdDty7SeOAPKM10F-YLd6yXu8LQ0ytUAHSHdjcbrUDpyF5jOmuNVDN9-KimQhLngl/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-uvv15Uwi2M8YDRF_p-7Q0LxiHHL_D4caUnQ694cNPP6I_G6C20IPo6Y0HtiarhCEWCNwrJtAfi5BdDty7SeOAPKM10F-YLd6yXu8LQ0ytUAHSHdjcbrUDpyF5jOmuNVDN9-KimQhLngl/s400/im2.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Cliquer sur Select Connection, dans notre exemple, il s'agit d'un base SQL Azure; simplement complèter les informations de connection puis cliquer sur Connect</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy6Dt2kFLw8VjK16n6OG49QkD0pngmuTkOHVIK17gra6RxIgkiwOFKYThfUdWA2TSdoi_rrB5JSdto6eJxT911c_qUO_4ZQJ87YCfpcZEEzmmgzKKZ6ejUel9uJufXA7c2qlOmFsKwLpG/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiPy6Dt2kFLw8VjK16n6OG49QkD0pngmuTkOHVIK17gra6RxIgkiwOFKYThfUdWA2TSdoi_rrB5JSdto6eJxT911c_qUO_4ZQJ87YCfpcZEEzmmgzKKZ6ejUel9uJufXA7c2qlOmFsKwLpG/s320/im3.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Configurer les options d'import puis cliquer sur Start</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLPeLG5jlS6hyphenhyphenOMM8qyDbBepf0c1PQUIXF3lJqKpujJvd_hkCY-LNjkMne7RawhICAZffFcGKAJZG3WFqs6vzOjZmgvL5ssTweBOq9G7i20xRcXNG3iIrhKbCF9eQt4Ny2S7aOOJbpHNS/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpLPeLG5jlS6hyphenhyphenOMM8qyDbBepf0c1PQUIXF3lJqKpujJvd_hkCY-LNjkMne7RawhICAZffFcGKAJZG3WFqs6vzOjZmgvL5ssTweBOq9G7i20xRcXNG3iIrhKbCF9eQt4Ny2S7aOOJbpHNS/s320/im4.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
L'import est visualisé dans la fenêtre Summary, cliquer sur Finish lorsque terminé</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu-SVIDUu3F0u7lJ0OC-IFepekJpZI5fd1GabTIWvRFKZ9Tt2F5JgUXLgzmIS2F49YtNC-dwq-DqisZ_uqr3tzjAJMwf9C_B6K5e6tAgkakdHIkwQvXO4SV6JsV61VYzxIBdmrXd4LXsM/s1600/im5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="279" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVu-SVIDUu3F0u7lJ0OC-IFepekJpZI5fd1GabTIWvRFKZ9Tt2F5JgUXLgzmIS2F49YtNC-dwq-DqisZ_uqr3tzjAJMwf9C_B6K5e6tAgkakdHIkwQvXO4SV6JsV61VYzxIBdmrXd4LXsM/s320/im5.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
Le projet de base de données apparait dans l'explorateur de solution, pour modifier / consulter un objet, il suffit simplement de l'ouvrir<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5hVK2Hrbeh8AzODiy9ZEFqCogavm20Awd8myqlxnaXRCq9V_3hkKqxHDcSDlR0dxha0tNslIZDLX9MVPxdsOAJIKLOWaAPESNy6Gt5yhfxDconyvyP4Bg7j3HVALPwA1RWezkQ5F6ONhk/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="289" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5hVK2Hrbeh8AzODiy9ZEFqCogavm20Awd8myqlxnaXRCq9V_3hkKqxHDcSDlR0dxha0tNslIZDLX9MVPxdsOAJIKLOWaAPESNy6Gt5yhfxDconyvyP4Bg7j3HVALPwA1RWezkQ5F6ONhk/s320/im6.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On peut travailler soit en mode Designer ou via le code SQL directement</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXadxte3B_Qxgk0NqjjcO9W6e2Y4Am_zN3L6ItKWjMyQ-6vM87igx19_m9I5ZiBGWOawDSXI5vofNp2PLTbe2l6lcyiHN0eHqCr7PScyCIEPCttTgUeYJIcGvo4aLlvvoMPTH9paoJNb9/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="406" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKXadxte3B_Qxgk0NqjjcO9W6e2Y4Am_zN3L6ItKWjMyQ-6vM87igx19_m9I5ZiBGWOawDSXI5vofNp2PLTbe2l6lcyiHN0eHqCr7PScyCIEPCttTgUeYJIcGvo4aLlvvoMPTH9paoJNb9/s640/im7.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Nous allons à titre d'exemple rajouter un champ nommé description dans la table Categories</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFt293-doLUZLs8WDPWVOcr8nua73mQ-xV680MHW6gVRhNBDSxuRGV2OsPZDbhHdOp251b59hvz5TncO3o69Y_mEFj8hhf0tGTjpy11mL-7DBZTvXepxWzwIg-ysMzKrc7w3IawxHDrnUp/s1600/im8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFt293-doLUZLs8WDPWVOcr8nua73mQ-xV680MHW6gVRhNBDSxuRGV2OsPZDbhHdOp251b59hvz5TncO3o69Y_mEFj8hhf0tGTjpy11mL-7DBZTvXepxWzwIg-ysMzKrc7w3IawxHDrnUp/s400/im8.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Le projet étant sous controle de code source et donc susceptible d'être modifié par un ou plusieurs développeurs, l'outil de comparaison de Schéma va permettre de visualiser les différences entre le projet et la base de données cible. A noter que cet outil de comparaison peut également comparer deux bases de données. A l'aide du menu contextuel, lancer la commande Schema Compare</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-2buQVdHkdCkHAfgQSKn4PSO06gqvw02wmRIrbMCI4xUok7K9zd6FaEVcdc_BhmpgdJyTNrAvy9omyogMAKYLaI01SMCLlBtgpEx5dImtx1_9N03v_WLyIOAkxtpJiz9Tc0s6H7wWMbJT/s1600/im9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="111" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-2buQVdHkdCkHAfgQSKn4PSO06gqvw02wmRIrbMCI4xUok7K9zd6FaEVcdc_BhmpgdJyTNrAvy9omyogMAKYLaI01SMCLlBtgpEx5dImtx1_9N03v_WLyIOAkxtpJiz9Tc0s6H7wWMbJT/s320/im9.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
La référence pour la source sera le projet de base de données, il faut juste définir la cible, pour cela, selectionner l'option Select Target</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDMrrGfrXtIZAkCVWZn2EFtgo1K4VGYIRZBO6XRaTaSaQ_716rlBcsA0KWVl0YIq3eiXPU3BD18xkNInTSd5nRjtRxqml1oU3N_6-2ikIAva8gmzvSgGE3VhBmGAjt9wrH8ldC5lo9ITG3/s1600/im10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDMrrGfrXtIZAkCVWZn2EFtgo1K4VGYIRZBO6XRaTaSaQ_716rlBcsA0KWVl0YIq3eiXPU3BD18xkNInTSd5nRjtRxqml1oU3N_6-2ikIAva8gmzvSgGE3VhBmGAjt9wrH8ldC5lo9ITG3/s640/im10.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Un assistant permet de choisir simplement la base de données cible</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiym8NlRdMglE3lCxJGF96r9nNi0LYhHk7zTnToaMDX4fg1uj2KlVty-tfBCWbqg5d8iGKkLlH85kYW5dkR4o727JzFMFZTZgW5-eot_4Ca8FIRQHihOKwQdUEGNT8ndoUMSUii20g50KSL/s1600/im11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="311" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiym8NlRdMglE3lCxJGF96r9nNi0LYhHk7zTnToaMDX4fg1uj2KlVty-tfBCWbqg5d8iGKkLlH85kYW5dkR4o727JzFMFZTZgW5-eot_4Ca8FIRQHihOKwQdUEGNT8ndoUMSUii20g50KSL/s320/im11.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Après avoir cliqué sur le bouton Compare, les différences entre la source et la cible sont affichées, on peut savoir par les icones s'il s'agit de suppression, ajouts ou modifications.</div>
<div class="separator" style="clear: both; text-align: justify;">
Enfin le bouton Update peut permettre au développeur de mettre à jour la cible directement</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFurlHlqaJ3nWEfi4ty8FjVTXVjuoZcPBG2k0cfAljTs-7VtSsM1axVdgjJmw52k_1SKS2EGZvDCfnQ5AS7rcWqUFblOSuponmH7-8nwl-fXXQqCke8zoyKHJnBxdqru4wYoQ79YJRN1RK/s1600/im12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="154" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFurlHlqaJ3nWEfi4ty8FjVTXVjuoZcPBG2k0cfAljTs-7VtSsM1axVdgjJmw52k_1SKS2EGZvDCfnQ5AS7rcWqUFblOSuponmH7-8nwl-fXXQqCke8zoyKHJnBxdqru4wYoQ79YJRN1RK/s640/im12.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
A partir de Visual Studio, en utilisant la vue Server Explorer, il est possible de voir la structure de la base de données cible, dans notre cas SQL Azure, on obtient l'affichage suivant ou l'on remarque que le nouveau champ Description n'existe pas encore : </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcvXw2O0MC-h24V-ZoZzBwuL4OKABEnyDix8EE6HKGUdYrqrqT-Zi3Ed1MzqlVktH7y6NlSD9FkfzL2nOXuuFUdnlw8uFkI2zbkJgCNzTtOaCiH5V_ilctzCmYfwi5D_zXojJVwHnVMgNI/s1600/im13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcvXw2O0MC-h24V-ZoZzBwuL4OKABEnyDix8EE6HKGUdYrqrqT-Zi3Ed1MzqlVktH7y6NlSD9FkfzL2nOXuuFUdnlw8uFkI2zbkJgCNzTtOaCiH5V_ilctzCmYfwi5D_zXojJVwHnVMgNI/s320/im13.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
On va pouvoir également utiliser la commande Publish à partir du menu contextuel du projet</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicMdZjrvT-nJL8ZFwUtFEe5WWgvpSFvZojApScqixwPMA4JJvZzzgV1kGukfqRDCcZ8KRY8hpKcKUqYxmUXxGXtCEFYnvcKWWvFGPQyh0AoK1p4ynSsYsQCC5glKA0s-tTdpcUX8K2nI5X/s1600/im17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicMdZjrvT-nJL8ZFwUtFEe5WWgvpSFvZojApScqixwPMA4JJvZzzgV1kGukfqRDCcZ8KRY8hpKcKUqYxmUXxGXtCEFYnvcKWWvFGPQyh0AoK1p4ynSsYsQCC5glKA0s-tTdpcUX8K2nI5X/s400/im17.png" width="400" /></a>*</div>
<div class="separator" style="clear: both; text-align: justify;">
Simplement préciser les informations de connection puis cliquer sur Publish</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9iWi7Zsva7QuJcVwDkjOXJ2EBhj71MrTzb-5g_CekWRwKodKxrIjUZ75dCSrPGOfQsesZPMP6ElCL9KuMqcZIm6WNIkDYb8yvsT8hpCeb4CD9CsWHrOXBmaxCL2F_pABJF8vWVfjYQmH_/s1600/im18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9iWi7Zsva7QuJcVwDkjOXJ2EBhj71MrTzb-5g_CekWRwKodKxrIjUZ75dCSrPGOfQsesZPMP6ElCL9KuMqcZIm6WNIkDYb8yvsT8hpCeb4CD9CsWHrOXBmaxCL2F_pABJF8vWVfjYQmH_/s400/im18.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On peut suivre le déroulement de la publication </div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz-NJeR5fwQbWqgsfBSsqdsxfnu-qG1Q4AXqDIiAtWqma65t1dgBPX-bRyLb3jQQhNwVDux4kur4UJFtF82Mb3UwKMuDRYd1nCtsZ8S7Z78KsWJVQ9ajHJmzyMbz53oV0Qkd7VK7jNwX0Q/s1600/im15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="87" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiz-NJeR5fwQbWqgsfBSsqdsxfnu-qG1Q4AXqDIiAtWqma65t1dgBPX-bRyLb3jQQhNwVDux4kur4UJFtF82Mb3UwKMuDRYd1nCtsZ8S7Z78KsWJVQ9ajHJmzyMbz53oV0Qkd7VK7jNwX0Q/s320/im15.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Finalement, on raffraichit la vue de la base de données à partir du Server Explorer, on constate que le champ a bien été modifié</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TEv_w9-hKTpNHaPwHSMgZ6Ob232o695RgWb3ymzM-cWBJA1lcimb1jBdxUILrqwprTe_ffz233_iJiolHPFeUA8ezdLH5nzeWxLJ24xNZNS_ZL9tsNNb6YyA9OAx0w_s6XHdyMDQMOsm/s1600/im16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="207" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_TEv_w9-hKTpNHaPwHSMgZ6Ob232o695RgWb3ymzM-cWBJA1lcimb1jBdxUILrqwprTe_ffz233_iJiolHPFeUA8ezdLH5nzeWxLJ24xNZNS_ZL9tsNNb6YyA9OAx0w_s6XHdyMDQMOsm/s320/im16.png" width="320" /></a></div>
Dans le prochain article, nous verrons comment intégrer ce Publish dans notre pipeline de release<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com1tag:blogger.com,1999:blog-7985913466665944386.post-12195700890160820482017-03-10T09:18:00.003-08:002017-03-10T09:18:55.406-08:00Agile à l'échelle avec VSTS et la nouvelle extension Delivery Plans<div style="text-align: justify;">
Une fonctionnalité qui est restée longtemps non adressé par la plate forme VSTS est la capacité à suivre l'avancement de nos releases dans un dispositif multi équipes tel que l'on peut le retrouver avec des Framework d'Agilité à l'échelle tel que NEXUS de Scrum.org ou encore SAFe ou Less. C'est désormais du domaine du possible grace à la nouvelle extension disponible en preview sur le Market Place gratuitement</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjzDL3F2NyjHuiKjNXa-9bpqHPui-Zc4rBjwvIqYLBqtCH-5t8Z-1LMlkfIlw7BGWqbXmkd1ufvkqpe6zwnTLVP_-VHaKM5MlMw9n0W7S8if0KMAxb67fo96TDw_M7fQBfCtJ6ZGEXRxl5/s1600/im0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjzDL3F2NyjHuiKjNXa-9bpqHPui-Zc4rBjwvIqYLBqtCH-5t8Z-1LMlkfIlw7BGWqbXmkd1ufvkqpe6zwnTLVP_-VHaKM5MlMw9n0W7S8if0KMAxb67fo96TDw_M7fQBfCtJ6ZGEXRxl5/s400/im0.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Plutot que de longs discours, voyons le fonctionnement de ce nouveau composant au travers d'un exemple simple : nous disposons de deux équipes : Front Office et Back Office et souhaitons pouvoir suivre sur une même vue le plan de release ou plan de delivery. Le prérequis consiste à installer le composant à partir du Market Place.</div>
<div class="separator" style="clear: both; text-align: justify;">
Pour cela activons le nouveau menu Plans de l'onglet Work et Cliquer sur New Plan</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ev1p7lhZpEDr17bFBhMRj23FkZFvXPwHI8w0_vpO8AHlZWN9vzIfVT_eq9-Or4VCM2_om6-cZpLfQxGYzDYFW0eTCJiZ1LM-USvNP6o0sWGQICvmvQkVydFXYjliBUWcHjuYCLhqvHJn/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="360" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-ev1p7lhZpEDr17bFBhMRj23FkZFvXPwHI8w0_vpO8AHlZWN9vzIfVT_eq9-Or4VCM2_om6-cZpLfQxGYzDYFW0eTCJiZ1LM-USvNP6o0sWGQICvmvQkVydFXYjliBUWcHjuYCLhqvHJn/s640/im1.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
L'assistant création de plan s'affiche et là point interessant, nous pouvons ajouter autant d'équipes que l'on veut, y compris des équipes d'autres Team Project, et de plus nous pouvons choisir la granularité d'affichage par équipe. Dans notre exemple nous afficherons le niveau Feature pour l'équipe Front Office et le niveau Product Backlog Item pour l'équipe Back Office comme montré ci dessous</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-x6xIJuRirxZBEbanOGko7d_x9nv8rgrz8JZbGiV-hcnDomzbOX5IOaNH1I3VnwG6ZI-0yF4w26iJMo74yTaBxdAG5ivRXRvwj7BtEr_i691nXFM5mzracbNDFfjwcW7SabC9P-J0pb_4/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="348" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-x6xIJuRirxZBEbanOGko7d_x9nv8rgrz8JZbGiV-hcnDomzbOX5IOaNH1I3VnwG6ZI-0yF4w26iJMo74yTaBxdAG5ivRXRvwj7BtEr_i691nXFM5mzracbNDFfjwcW7SabC9P-J0pb_4/s640/im2.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Cliquer sur Create et le Delivery Plan s'affiche. On remarque de suite dans la partie haute de la vue une timeline "scrollable" pour se déplacer dans le temps, nous pouvons également ajuster l'échelle pour visualiser sur une période de temps plus ou moins longue.</div>
Nous avons bien des items de type Feature pour la première équipe et de type PBIs pour la seconde.<br />
La vue de l'équipe Back Office est repliée,on ne voit dans ce cas que le nombre d'items. Enfin, bien évidemment on va pouvoir déplacer ces items par simple cliquer glisser pour réordonnancer le contenu des Sprints<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ30ocU1zBq0Cv4MPS3nrQLCmdmMMAl-bXQQ7mJ36zJhmO5NM2c_aAEUXh94qv_ciBrwXmCkwaXnZCzyTaOLzQPU-9f8pNGtmzHvYIHBi0zlg3S6K5h0Eq-Pmh5r5mN-65K9TssU9P-1R6/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="244" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQ30ocU1zBq0Cv4MPS3nrQLCmdmMMAl-bXQQ7mJ36zJhmO5NM2c_aAEUXh94qv_ciBrwXmCkwaXnZCzyTaOLzQPU-9f8pNGtmzHvYIHBi0zlg3S6K5h0Eq-Pmh5r5mN-65K9TssU9P-1R6/s640/im3.png" width="640" /></a></div>
Ci dessous la vue avec Front Office replié et Back Office dépliée avec un Drag & Drop d'un PBI<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9JwBHc66V4dS_-0UvcRC1BKVCCe1blo0Yfvis8RxtMLlUs3kgXteyuxVkyrxyVFx-31vSFk3sj1q4Bp09_G3Syawi65PqKe6F1EdRclBdidJ-wJFcunn5pH0dvY2oxkcxvBPhrGUXP02/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="380" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9JwBHc66V4dS_-0UvcRC1BKVCCe1blo0Yfvis8RxtMLlUs3kgXteyuxVkyrxyVFx-31vSFk3sj1q4Bp09_G3Syawi65PqKe6F1EdRclBdidJ-wJFcunn5pH0dvY2oxkcxvBPhrGUXP02/s640/im4.png" width="640" /></a></div>
Cet outil va véritablement porter VSTS à un niveau professionnel pour la gestion de projet d'Agile à l'échelle avec par exemple la possibilité de créer des Nexus Sprint Backlog. Pour ce qui concerne les fonctionnalités à venir qui sont très attendues, nous aurons la visualisation des dépendances entre PBIs y compris cross team. Avis aux Product Managers, Program Manager, Product Owner et Coach Agile, cet outil va réellement outiller efficacement vos projets multi équipes à l'échelle, à tester absolument en attendant les prochaines fonctionnalités : filtrage, visualisation des dépendances etc..Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-42062859260484826022017-03-10T04:11:00.001-08:002017-03-10T04:11:10.345-08:00TDD avec Visual Studio 2017 Live Testing, NUnit et NFuent<div style="text-align: justify;">
Tout développeur ayant un mindset Software Craftsmanship adhère et pratique l'approche TDD (Test Driven Development) qui consiste à écrire les tests avant le code d'implémentation, TDD étant vu comme une activité de Design. l'objectif de cet article n'est pas de présenter cette pratique qui est déjà largement documentée mais de s'interesser à la nouvelle fonctionnalité Live Testing livrée avec Visual Studio 2017 et regarder comment la mettre en oeuvre avec quelque comparaisons avec NCrunch l'outil phare des développeurs TDD (http://www.ncrunch.net/)</div>
<div style="text-align: justify;">
Dans le cadre de cet article nous allons prendre pour exemple un kata bien connu, Roman Numeral, qui consiste à développer un convertisseur de nombres arabes en nombres romains.</div>
<div style="text-align: justify;">
Ci dessous la solution initialisée avec le code minimum pour convertir le chiffre 1 en "I".</div>
<div style="text-align: justify;">
La solution est affichée dans Visual Studio 2017, et utilise le couple NUnit / NFluent pour l'écriture des tests unitaires comme montré ci dessous:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAYOeckz_QJ0RqqDow7MVPVhYEY4RD-2BD00gy4328GyTOw8ko15WcBnhpa1WX4S2KmQhGGhoaEAjHT5oQPUB7kEfZkX7mVfokLJCN73d57IrgdsAIksl5PliGJMItZUgOVbYnxQd_8lFl/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="356" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAYOeckz_QJ0RqqDow7MVPVhYEY4RD-2BD00gy4328GyTOw8ko15WcBnhpa1WX4S2KmQhGGhoaEAjHT5oQPUB7kEfZkX7mVfokLJCN73d57IrgdsAIksl5PliGJMItZUgOVbYnxQd_8lFl/s640/im1.png" width="640" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Première étape: Démarre Live Testing, pour cela simplement ouvrir le menu Test et lancer la commande Live Testing / Start</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg01o1Zyt_jkV53ANZ3pQVYiCffTvEv6qXaxMi12yC6pGxlyFo3DVkDFxVqjF-dQi8OX2PkjTd3VmdIyIcAlPoQ8dYF_69sfGQeRp5Lz0wSTiRnKej-3Yzx3GEHdEa6npdVUfYduhydr3EW/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="132" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg01o1Zyt_jkV53ANZ3pQVYiCffTvEv6qXaxMi12yC6pGxlyFo3DVkDFxVqjF-dQi8OX2PkjTd3VmdIyIcAlPoQ8dYF_69sfGQeRp5Lz0wSTiRnKej-3Yzx3GEHdEa6npdVUfYduhydr3EW/s320/im2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On constate que rien ne se produit dans l'IDE et que le Test Explorer n'affiche pas le test dans la liste.</div>
<div class="separator" style="clear: both; text-align: justify;">
Ceci provient du fait que l'adapter pour NUnit n'est pas installé, d'ailleurs vous trouverez ci dessous la liste des adapters à installer en fonction des frameworks de tests unitaires que vous utilisez</div>
<div class="separator" style="clear: both; text-align: justify;">
</div>
<ul>
<li>Pour xUnit vous aurez besoin de xunit.runner.visualstudio version 2.2.0-beta3-build1187 et xunit 2.0 (minimum)</li>
<li>Pour NUnit vous aurez besoin de NUnit3TestAdapter version 3.5.1 et NUnit version 3.5.0 (minimum)</li>
<li>Pour MSTest vous aurez besoin de MSTest.TestAdapter 1.1.4-preview and MSTest.TestFramework 1.0.5-preview (minimum)</li>
</ul>
<br />
<div style="text-align: justify;">
Dans notre cas nous allons récupére via Nuget l'adapter NUnit en tapant dans la console</div>
<div style="text-align: justify;">
Install-Package NUnit3TestAdapter -Version 3.5.1</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitJRfNXxzQ8eZDXZESoD5nQ1Zh924_gbdD4aLSPX_t6w72hRoiqVBdvtS34ZM9L8sOedpB1FIt0w3pDBOReC7mCupwCW6O-ruW60gn_drA2Pk8Q_EVdEUn3pdr8XYWaC0j1w5F44qbUD5x/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitJRfNXxzQ8eZDXZESoD5nQ1Zh924_gbdD4aLSPX_t6w72hRoiqVBdvtS34ZM9L8sOedpB1FIt0w3pDBOReC7mCupwCW6O-ruW60gn_drA2Pk8Q_EVdEUn3pdr8XYWaC0j1w5F44qbUD5x/s320/im3.png" width="320" /></a></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Ci dessous la commande exécutée</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Fl4_sWrnpI-UPWnsHK1QNjdf8-KvrykgQmVZZ47PaXX3xnJ9Nd5_l4LUJ-5S66F_7p4LpsRkhKvHiqRHYWzD1xBlg79oIsMzQcZTGO8XnBE9AEsxjhkXfngcKR_PuHraZkmY2Y8lEEr9/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7Fl4_sWrnpI-UPWnsHK1QNjdf8-KvrykgQmVZZ47PaXX3xnJ9Nd5_l4LUJ-5S66F_7p4LpsRkhKvHiqRHYWzD1xBlg79oIsMzQcZTGO8XnBE9AEsxjhkXfngcKR_PuHraZkmY2Y8lEEr9/s640/im4.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Taper simplement Ctrl Shift B pour recompiler la solution, les tests apparaissent maintenant dans la fenêtre Test Explorer, on peut relancer la commande Live Unit Testing Start, on va voir apparaitre les symboles d'état des tests unitaires dans la marge nous permettant de constater que les test unitaires sont éxécutés avec Succès</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdqE1y6-MUDQPsa3teMWPXl9yf1YYnTkMAMh8KGdCoh7OpgVtD6drg0ahEpJIkg3RgmtwQ8XbcBsmgtZRW7o2Fa4bMR_yV_BhIRzjGRwDI9JzlamFzL-7tsNBcwE8jgkXsPSJ6-g0hxqwn/s1600/im5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="498" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdqE1y6-MUDQPsa3teMWPXl9yf1YYnTkMAMh8KGdCoh7OpgVtD6drg0ahEpJIkg3RgmtwQ8XbcBsmgtZRW7o2Fa4bMR_yV_BhIRzjGRwDI9JzlamFzL-7tsNBcwE8jgkXsPSJ6-g0hxqwn/s640/im5.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Le principe de Live Testing est de donner un feedback temps réel au développeur sur le résultat des tests unitaires après toute modification de code, par exemple, si l'on change le return de la méthode de conversion, on verra immédiatemment les symboles changer en rouge, tel que montré ci dessous:</div>
<div class="separator" style="clear: both; text-align: justify;">
Après modification, un symbole horloge apparait signifiant que les tests unitaires sont en train d'être exécutés</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtQS1xyu9QMqW9PfeR7S4jIKiEa9WmuHDqQWiK3uSy1ibxRpK7u2Z6uXF-MhfjoYFSRoVh-OYbN0TZE-1U9WQ2pJZ1kD6NquZiJmfoV-TMNtShi7NLJqgDhkdOWtaBjZqRtIVwb2DliL5O/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="167" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtQS1xyu9QMqW9PfeR7S4jIKiEa9WmuHDqQWiK3uSy1ibxRpK7u2Z6uXF-MhfjoYFSRoVh-OYbN0TZE-1U9WQ2pJZ1kD6NquZiJmfoV-TMNtShi7NLJqgDhkdOWtaBjZqRtIVwb2DliL5O/s320/im6.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
dès que terminé, on voit le symbole Echec apparaitre en regard des lignes, on remarquera que l'outil affiche sous la forme de Tool tip le nombre de Test qui exercent une méthode donnée</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis_Aqm6W0B9ciL9xDN5WfShzNM3JuDjWN8dLcMnfmLLZAOye1gGtipZ6iVu1TlsYRHyK5RuA2Zj2JAxLLhvJgb0KYeu2i9oL4MgoVmwt8yVKGVl7pSgdixnl8TMxY6mmjesiPwe88Rp7bs/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis_Aqm6W0B9ciL9xDN5WfShzNM3JuDjWN8dLcMnfmLLZAOye1gGtipZ6iVu1TlsYRHyK5RuA2Zj2JAxLLhvJgb0KYeu2i9oL4MgoVmwt8yVKGVl7pSgdixnl8TMxY6mmjesiPwe88Rp7bs/s320/im7.png" width="303" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Ci dessous la nomenclature des symboles utilisés par Live Unit Testing: </div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijm_hMoTsZ3-WqQQ6r4Q-7EVstk2ULJPJ_JcW5P5i9dBpAgbagXwfQNwX-SijdDIN1Q9eJQX2ZIYh1QrRaX2OqcevNNYmXw50gin42hv29L-emxiklA7ws0rPB8OIIVWHq8Wwh4WqrkNN8/s1600/im9.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijm_hMoTsZ3-WqQQ6r4Q-7EVstk2ULJPJ_JcW5P5i9dBpAgbagXwfQNwX-SijdDIN1Q9eJQX2ZIYh1QrRaX2OqcevNNYmXw50gin42hv29L-emxiklA7ws0rPB8OIIVWHq8Wwh4WqrkNN8/s1600/im9.png" /></a></div>
Si un ligne de code est couverte par des tests passés avec succès, affichage d'une coche verte<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8xxT9LC7uB-EP6Cg5W6uiKnGuDxBhSIDHSwOQpNMkJ2LW8kvpy0keJQR9AkSnqAyqTfhViPUlha7OaUcJgKBeDvvSi5QKlLk34Mly0uiyWkuJmwHsZATM8piZUtbZ8pIRSAjbw_F1AeH/s1600/im10.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjb8xxT9LC7uB-EP6Cg5W6uiKnGuDxBhSIDHSwOQpNMkJ2LW8kvpy0keJQR9AkSnqAyqTfhViPUlha7OaUcJgKBeDvvSi5QKlLk34Mly0uiyWkuJmwHsZATM8piZUtbZ8pIRSAjbw_F1AeH/s1600/im10.png" /></a></div>
Si un ligne de code n'est couverte par aucun test , affichage d'un trait bleu<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_kGw1w-w8dSdkL0TOETWN0atVshfX71qJMUFVRsYkjoNg2YaM5U4qCrgZWvLNGUvlDfuTtBxqdPe4dBya-PMleKUkafsJ5Jjg8EGIaiaxmXqAZsdV5kkWJRWw2FuPiJJtPNyzuF0m0X9/s1600/im8.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhz_kGw1w-w8dSdkL0TOETWN0atVshfX71qJMUFVRsYkjoNg2YaM5U4qCrgZWvLNGUvlDfuTtBxqdPe4dBya-PMleKUkafsJ5Jjg8EGIaiaxmXqAZsdV5kkWJRWw2FuPiJJtPNyzuF0m0X9/s1600/im8.png" /></a></div>
Si un ligne de code est couverte par au moins un test en échec, affichage d'une croix rouge<br />
<br />
<br />
Dans le cas de plusieurs tests exécutés sur une meme méthode, on aura en cliquant sur l'icone Live Testing en regard de la méthode, la liste des tests ainsi que le résultat:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdSuBdzqQdZBDa62of8T5pvvF8a4tXc8fIAjqDDDoAWKxoXF0E_pWUqmVBMxFtI9dNHF6uSrcZzj_-gwpqoySQU7KSVYzywdA2xdsiPSj6RXohvQTfb-rcqfVZv3AxcOglI9cOmIIFfN1F/s1600/im11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="144" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdSuBdzqQdZBDa62of8T5pvvF8a4tXc8fIAjqDDDoAWKxoXF0E_pWUqmVBMxFtI9dNHF6uSrcZzj_-gwpqoySQU7KSVYzywdA2xdsiPSj6RXohvQTfb-rcqfVZv3AxcOglI9cOmIIFfN1F/s640/im11.png" width="640" /></a></div>
<br />
Ce qu'il manque encore par rapport à NCrunch est la capacité à connaitre par exemple l'erreur sur l'assertion par simple mouse over sur l'icone rouge. Néanmoins ce début est très prometteur, et nous saluons le niveau de performance de l'outil.<br />
Pour terminer, dans le cas de projets très volumineux, on a la possibilité d'arrêter Live Unit Testing afin de réduire la consammation de CPU qui peut être importante à partir du menu Test / Live Unit Testing - StopPhilippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-64614869321503418612017-03-10T02:40:00.001-08:002017-03-10T02:40:15.732-08:00Visual Studio 2017 - Nouvelle expérience dès l'installation!<div class="separator" style="clear: both; text-align: justify;">
Disponible en téléchargement depuis le 7 mars, découvrons à quoi ressemble le nouveau processus d'installation de cette nouvelle version promettant notamment un gain de performance significatif du fait d'un assistant d'installation permettant de choisir plus efficacement les composants dont nous avons besoin et donc allèger le produit au chargement.</div>
<div class="separator" style="clear: both; text-align: justify;">
Première bonne suprise, la taille du téléchargement, moins d'un Mega pour commencer plus rapidement</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKUQXUSMT1O8H1zbxApPgfXVuz_Fh9AxpLouXI8kZR1e-TY2gZTCh3-bUZeCi6suS3Aah4dMwTeDg5XB5zo9MUA7SDPljy1hM8k40DHqLJSReYi-IknFJIyhFPGF5Mrdmx1RYbg7brigWd/s1600/im0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="92" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKUQXUSMT1O8H1zbxApPgfXVuz_Fh9AxpLouXI8kZR1e-TY2gZTCh3-bUZeCi6suS3Aah4dMwTeDg5XB5zo9MUA7SDPljy1hM8k40DHqLJSReYi-IknFJIyhFPGF5Mrdmx1RYbg7brigWd/s640/im0.jpg" width="640" /></a></div>
Le téléchargement prend moins d'une minute<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgthPLuLsbyZNxGzxhQt18eCIoTcanhumLMVe3P1nKtdjaNjpg9cqQmX4lEsk3BCbQKfeuVfIgNjoO2vULItyB25H-htOd_i3K1Y57srnJk4UqG0zclVicxUpOG1F16qvxEJx2k0qA7VJ0P/s1600/im1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgthPLuLsbyZNxGzxhQt18eCIoTcanhumLMVe3P1nKtdjaNjpg9cqQmX4lEsk3BCbQKfeuVfIgNjoO2vULItyB25H-htOd_i3K1Y57srnJk4UqG0zclVicxUpOG1F16qvxEJx2k0qA7VJ0P/s400/im1.jpg" width="400" /></a></div>
<div style="text-align: justify;">
Puis s'affiche l'assistant d'installation composé de 3 onglets, les 2 premiers proposent des vues différentes pour choisir les composants ou modules unitaires à installer, le 3ième concerne les Packs de langue</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZlmlrCtLPuDXnj1brHbDyLZwDftDG04X-5XbGldhpr_LQxsrr1oo3yWRIAn4LGuz9chqoa8e5Jr48vlZLJWmBd0cl26bt0IhhVeaL9H2l2gVjAKMvoaqMrSXaEBArDIG6BXVblvuC04QP/s1600/im2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZlmlrCtLPuDXnj1brHbDyLZwDftDG04X-5XbGldhpr_LQxsrr1oo3yWRIAn4LGuz9chqoa8e5Jr48vlZLJWmBd0cl26bt0IhhVeaL9H2l2gVjAKMvoaqMrSXaEBArDIG6BXVblvuC04QP/s640/im2.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Pour configurer, il suffit simplement de sélectionner un module, puis dans le panneau droit, simplement cocher / décocher les modules dont nous avons besoin, ci dessous par exemple le module développement pour la plateforme Windows Universelle</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Xi5_7pd_Zi8s0WYKHPZa-V9JjdujLg9q-4G76DcpfrW8FHzfCwK3KOSIg7F4DLjnLOHJqYiqIOBSUnN8DDtq0EHi0NQx9vTcRTV381VRWEquucOBmndStSjPJkgy1jeTLfEA_idj_baU/s1600/im3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi4Xi5_7pd_Zi8s0WYKHPZa-V9JjdujLg9q-4G76DcpfrW8FHzfCwK3KOSIg7F4DLjnLOHJqYiqIOBSUnN8DDtq0EHi0NQx9vTcRTV381VRWEquucOBmndStSjPJkgy1jeTLfEA_idj_baU/s640/im3.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On pourra répéter l'opération pour chaque module, à noter que certains composants seront transverses à plusieurs modules, par exemple Intellitrace. A Chaque modification de sélection, la taille de l'installation est mise à jour</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYZQ6rCCt-9XuLJO4fi50yYXrDwG_iuhxF2cIHlbsfKByn7XJrhbp929mXzHZG_8Yi_eL4vYsJAemRIM6xMpjPPeden2o1Hni5bBiIkCN6WLlGyuD6UzpOmzEt-x1D_pj1AV8IzxBcQJpS/s1600/im4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYZQ6rCCt-9XuLJO4fi50yYXrDwG_iuhxF2cIHlbsfKByn7XJrhbp929mXzHZG_8Yi_eL4vYsJAemRIM6xMpjPPeden2o1Hni5bBiIkCN6WLlGyuD6UzpOmzEt-x1D_pj1AV8IzxBcQJpS/s640/im4.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Toujours présent le module concernant les projets de bases de données avec DACPAC / BACPAC</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMXfzqtBOWKuxYB8ymLkmPOlDPJ0rcIXqpvYrFrPbMVQ0mSGHzaT377E75jTGPb2kHuXEx742SIr20sUoXxrRk6-QdMuhpJ3RApvS7oynGOR_MovJUfyQ_oqTExgrbjE99BBLCzYm8wr0l/s1600/im5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="322" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMXfzqtBOWKuxYB8ymLkmPOlDPJ0rcIXqpvYrFrPbMVQ0mSGHzaT377E75jTGPb2kHuXEx742SIr20sUoXxrRk6-QdMuhpJ3RApvS7oynGOR_MovJUfyQ_oqTExgrbjE99BBLCzYm8wr0l/s640/im5.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Une fois le choix par modules terminé, on peut passer sur l'onglet composant individuels qui nous propose un affichage différents plus orientés par catégories qui nous permet d'avoir une vue globale de l'ensemble des composants sélectionnés durant l'étape précédente et de potentiellement rajouter ou supprimer des composants pour optimiser encore un peu plus son installation</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9J6c14rJ73m0ocsbhjbBVg_cyk1ezwNUzyKFbTwqo5WYoZvxr8-1jM44blcEfMlWbuxvzZBV7Lw91wnEyfhXpcqiVLqCAgWwaFuu4S2JQPsyp_abdeN2KATkNbM4bvpo7THGkDblvz90M/s1600/im6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="324" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9J6c14rJ73m0ocsbhjbBVg_cyk1ezwNUzyKFbTwqo5WYoZvxr8-1jM44blcEfMlWbuxvzZBV7Lw91wnEyfhXpcqiVLqCAgWwaFuu4S2JQPsyp_abdeN2KATkNbM4bvpo7THGkDblvz90M/s640/im6.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
A titre d'exemple ci dessous les composants de la catégorie Débogage et Tests</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi90luQNxdKMbeQtyOKExbY12sQzEYAaGuZDyLhUXCVW5iskiFdpYcsajF0OF3BxozCPHFR5BnK_EqWC0RztHyvXWX8Gx71C_COMfySrFCP3PhKNngcJ3xvRHBuhBKg45XxfiiLUNGys-cS/s1600/im7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="280" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi90luQNxdKMbeQtyOKExbY12sQzEYAaGuZDyLhUXCVW5iskiFdpYcsajF0OF3BxozCPHFR5BnK_EqWC0RztHyvXWX8Gx71C_COMfySrFCP3PhKNngcJ3xvRHBuhBKg45XxfiiLUNGys-cS/s400/im7.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
L'étape finale va consister à choisir le pack linguistique</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUoOH95pj4WvpWyk3Nni7Z9cbvdAmWHEFLxSJ2kTMHcBYWwz_ht_MG35mN-8M8aVYDvhs6CnFUmQ_AMwiIr-QR-6y3u50mCenbgmZH7wF-q3Ph1EUpEA9lg4fOYsRVV_xD3itBV0jEeX3W/s1600/im8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUoOH95pj4WvpWyk3Nni7Z9cbvdAmWHEFLxSJ2kTMHcBYWwz_ht_MG35mN-8M8aVYDvhs6CnFUmQ_AMwiIr-QR-6y3u50mCenbgmZH7wF-q3Ph1EUpEA9lg4fOYsRVV_xD3itBV0jEeX3W/s400/im8.jpg" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Après le lancement de l'installation, les composants sont téléchargés et installés, un reboot sera demandé pour finaliser. Un premier test permet de comparer les temps de démarrage entre 2015 et 2017 avec 11s contre 6s, ce qui est un bon début, les autres tests à réaliser concerneront les temps de chargement de Solution contenant beaucoup de projets</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrkGWisMESSOKJzwMbrPyBfI3L6bwjf6YlntuSIG63I4lCYCcwkT0rKxr8ZN0BT1HCO8aYXJLKefrhyphenhyphenl9QzVoQTb1OqfW7HDuRm-xbonigrbjZeTjZ15g31kK6FVdZCfDOCpKfcIk2jU6P/s1600/im9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrkGWisMESSOKJzwMbrPyBfI3L6bwjf6YlntuSIG63I4lCYCcwkT0rKxr8ZN0BT1HCO8aYXJLKefrhyphenhyphenl9QzVoQTb1OqfW7HDuRm-xbonigrbjZeTjZ15g31kK6FVdZCfDOCpKfcIk2jU6P/s400/im9.jpg" width="400" /></a></div>
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-72358336368332809052017-03-02T10:14:00.001-08:002017-03-02T10:14:32.557-08:00Test Agile avec le Board VSTS<div style="text-align: justify;">
Généralement sur les projets, les tests sont écrits et exécutés à partir de la brique Test de VSTS voire MTM le client lourd, ce qui demande un approche structurée avec la création de plans de tests, suite de tests basées sur les Product Backlog Items à tester si on travaille en Scrum par exemple et enfin l'écriture des cas de tests. Cette approche peut sembler relativement lourde et VSTS nous permet aujourd'hui de le faire de manière beaucoup plus directe en partant du Backlog.</div>
<div style="text-align: justify;">
L'objectif de cet article est de démontrer comment mettre en oeuvre cette nouvelle manière d'écrire des tests.</div>
Tout d'abord, il faut se connecter à l'instance VSTS et naviguer à l'onglet Board du Backlog comme montré ci dessous<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw4CjCzleBmmay5z7gI9HnH7ocZPhx3aYZFstB5qRyZ6wdMsebCDPeL2x3RzDWlzoIDPR6PWYLWHgZvr-3XkOR7z0K3pyOU111oYoTBo8yDVATFGE_xEuPx8FXnl53ibL1b7IXuBmc_xsq/s1600/im01.jpg" imageanchor="1" style="clear: left; display: inline !important; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;"><img border="0" height="234" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw4CjCzleBmmay5z7gI9HnH7ocZPhx3aYZFstB5qRyZ6wdMsebCDPeL2x3RzDWlzoIDPR6PWYLWHgZvr-3XkOR7z0K3pyOU111oYoTBo8yDVATFGE_xEuPx8FXnl53ibL1b7IXuBmc_xsq/s640/im01.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;">On remarquera sur le PBI en cours une icone indiquant que 3 tests ont été écris pour ce PBI, il suffit de cliquer sur cette icone pour afficher les tests écris</span></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9LcqUNHjm63svjF2Ns-_QxC2j_PCF6TzSoHpksqMMAFM7vNqWs2n1fSCW94JilpU4ebeVdo4sALopOq4AyWAsaKrYYfn9ob-9rQCrfgTyLNHHoWhWwrPSSFhCuo3AQuURyUKxnElsQwV/s1600/im02.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhf9LcqUNHjm63svjF2Ns-_QxC2j_PCF6TzSoHpksqMMAFM7vNqWs2n1fSCW94JilpU4ebeVdo4sALopOq4AyWAsaKrYYfn9ob-9rQCrfgTyLNHHoWhWwrPSSFhCuo3AQuURyUKxnElsQwV/s320/im02.jpg" width="319" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Pour ajouter un nouveau test, il suffit simplement de cliquer sur ajouter un test et écrire le titre du test dans la zone de texte générée</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmTELhXYTMnqKbHIE1ORO6u_O1xqOTKxCZ__OFJ_U5M4ulvPaZSgZBBBaXoKB1kfZiu4vjXsDGs7AosQ7ZZcKYQIlkRwLZoCFWK2SaYBcWAy-RWrlFXdAPz3_ZnffOCrBYHV6At_H7uE9w/s1600/im03.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmTELhXYTMnqKbHIE1ORO6u_O1xqOTKxCZ__OFJ_U5M4ulvPaZSgZBBBaXoKB1kfZiu4vjXsDGs7AosQ7ZZcKYQIlkRwLZoCFWK2SaYBcWAy-RWrlFXdAPz3_ZnffOCrBYHV6At_H7uE9w/s320/im03.jpg" width="284" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Puis il faut ouvrir le nouveau cas de test afin d'entrer les étapes incluant les différentes actions ainsi que le résuttat attendu</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9dABCRXRP5rG9fXzXn4SyS6o_IMNkFFRi7ah_GbCp5MqYBE7sFQRxfybZInFIqwG27xU-BxX4fDvzg2EBWflewix9kEJqMw_LHFN98DexSv_WEFZ4kRmjSatJ3h_ub-XqVtElei9Utc2F/s1600/im04.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj9dABCRXRP5rG9fXzXn4SyS6o_IMNkFFRi7ah_GbCp5MqYBE7sFQRxfybZInFIqwG27xU-BxX4fDvzg2EBWflewix9kEJqMw_LHFN98DexSv_WEFZ4kRmjSatJ3h_ub-XqVtElei9Utc2F/s320/im04.jpg" width="279" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Dans le cas ci dessous, on renseigne la première étape en appelant un Shared Steps qui consiste en un set d'étapes prédéfinies qui sont communes à de nombreux de tests, ce qui présente un double intérêt, à savoir la productivité et la maintenabilité dans l'écriture des tests, on complète alors avec les étapes nécessaires à la validation, et on remarquera au bas, l'utilisation de paramètres ce qui permet de fiabiliser la saisie des données, dans notre exemple, l'adresse du site web à tester</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHgVvMOtRMRl_ZKJX7SFOsXDVtTlLDo5wKwaN1aEM1ruAPkCCXn4qzF8SXwkMLVxgWg-gEZ2HJa6Mn_iW4M8TJ1Qvj2RdicRfVMSjn_zLj6RD6RvBcbjfRyc8Emo613WHQzjmNEbN9P8fB/s1600/im05.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiHgVvMOtRMRl_ZKJX7SFOsXDVtTlLDo5wKwaN1aEM1ruAPkCCXn4qzF8SXwkMLVxgWg-gEZ2HJa6Mn_iW4M8TJ1Qvj2RdicRfVMSjn_zLj6RD6RvBcbjfRyc8Emo613WHQzjmNEbN9P8fB/s320/im05.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
L'étape suivante consistera à exécuter le test en lançant la commande Run test</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ0rl4E4XySpxLiGZFiVq9wxkNsDxALkq891GmBkwbgZFnUAx0-aBkP8m7OmT3DT5rZDQyn_uWNDR01qAYdlx4snHR3K_bHUt4K_4tZEbllm4dKUVmV8Bkr_-9Vs-bvbkruhsFjixFm65L/s1600/im06.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="287" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ0rl4E4XySpxLiGZFiVq9wxkNsDxALkq891GmBkwbgZFnUAx0-aBkP8m7OmT3DT5rZDQyn_uWNDR01qAYdlx4snHR3K_bHUt4K_4tZEbllm4dKUVmV8Bkr_-9Vs-bvbkruhsFjixFm65L/s320/im06.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On peut également comme montré ci dessous qualifier directement le résultat du test</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAV6YQIyJLopaFxgxfJe-Op0GQnwzMGSFs6Mre2rBmUSFfkuRmaqNEqYZpLsYXB6_kONtZDdbHem1hPTLxJFjZxvmeQGhg-2N0BGIQBSBOE86Ix1aodVIIxRLLGHhNlm0_yfOiT1_Ls_QW/s1600/im07.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAV6YQIyJLopaFxgxfJe-Op0GQnwzMGSFs6Mre2rBmUSFfkuRmaqNEqYZpLsYXB6_kONtZDdbHem1hPTLxJFjZxvmeQGhg-2N0BGIQBSBOE86Ix1aodVIIxRLLGHhNlm0_yfOiT1_Ls_QW/s320/im07.jpg" width="303" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
Dans le cas ou l'éxécution est lancée, Test Runner apparait docké sur la gauche et va permettre l'éxécution pas à pas du test, on notera la possibilité d'ouvrir un bug avec la collecte de toutes les informations collectée, pouvant incluer des screenshots par exemple</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Z8OEMz3sYBMuY18l-Zt6qTLxStLDQ5F9BuZqtEaoPbVUXIMWh-uRJDRCDJJxIuwRhc5_RmkclBQKj6VLrnWoF6kfuUgTbzYzZbKANR6ZB1hSMkiVIZMu_rUVUFPzUynblsGjZ9U8OThZ/s1600/im08.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="257" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3Z8OEMz3sYBMuY18l-Zt6qTLxStLDQ5F9BuZqtEaoPbVUXIMWh-uRJDRCDJJxIuwRhc5_RmkclBQKj6VLrnWoF6kfuUgTbzYzZbKANR6ZB1hSMkiVIZMu_rUVUFPzUynblsGjZ9U8OThZ/s640/im08.jpg" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
<span style="text-align: left;">Il faut noter qu'en tache de fond, VSTS a créé pour vous un plan de test dans lequel, il aura rajouté le ou les PBIs testés, on a donc bien ici un gain notable de productivité</span></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-18485053447167062982017-02-22T06:27:00.003-08:002017-02-22T06:29:04.586-08:00Visual Studio 2017 arrive ! Quoi de neuf?<br />
Visual Studio sera disponible en téléchargement Mardi 7 mars 2017, soyez prêt à suivre l'évenement en ligne sur les journées des 7 et 8 mars pour célébrer le lancement de Visual Studio 2017 et le 20° anniversaire de Visual Studio.<br />
Parmi les points clés faisant partie des améliorations nous retrouvons :<br />
<ul>
<li>Rationalisation et optimisation de performance de l'IDE pour débarasser le développeur de tout impact sur sa productivité au travers d'une interface plus sobre avec une diminution de l'impact sur les performances de son poste de développement : Le développeur pourra au premier lancement ne selectionner que ce dont il a besoin pour éliminer toute fonctions inutiles </li>
</ul>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUAU4X50KYcAB-FuEiy3ZW4VSRw1wvaA0Acof0sNJ63At1xLeDrPr0VLBB4HEGVx5CkAQUSUogMhT3HmEkwz_kNj9ixNZZNrc9kC8ldvnsUUl1xmvCCEBJmV0n84CDYgd-L2KiUSpIJH0r/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUAU4X50KYcAB-FuEiy3ZW4VSRw1wvaA0Acof0sNJ63At1xLeDrPr0VLBB4HEGVx5CkAQUSUogMhT3HmEkwz_kNj9ixNZZNrc9kC8ldvnsUUl1xmvCCEBJmV0n84CDYgd-L2KiUSpIJH0r/s400/im1.png" width="400" /></a></div>
Egalement un mode de chargement de solution optimisé<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4kKwhgf7jQNoYvplXwzBvI2q_Su8CH4RugvprckkvW9upcIAAKf31u9hixwpvmQ94qwIIj0dpMmtDRAhZ6qIvEKqtdH4URNHGw148zH5tfj30_1BfDNn4mUg6MiBS2LiDTsnQSSO7Dz-o/s1600/im+2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="124" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4kKwhgf7jQNoYvplXwzBvI2q_Su8CH4RugvprckkvW9upcIAAKf31u9hixwpvmQ94qwIIj0dpMmtDRAhZ6qIvEKqtdH4URNHGw148zH5tfj30_1BfDNn4mUg6MiBS2LiDTsnQSSO7Dz-o/s320/im+2.png" width="320" /></a></div>
<div>
On retrouvera également un module d'optimisation de performance de son environnment de développement</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZRost772b6iYkbX3Z449UR4pP3dDWKWg3Izb2SnIxq_mr5ZlPrwsfg2qRTUV8wG6Zwmbn3Exerm8uQRwITBk3h_9euxRJSdPYzIcTtsLwsEV0aKnpsnNYWvzM3LmmgBjYokCy4aKyqoA/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="143" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYZRost772b6iYkbX3Z449UR4pP3dDWKWg3Izb2SnIxq_mr5ZlPrwsfg2qRTUV8wG6Zwmbn3Exerm8uQRwITBk3h_9euxRJSdPYzIcTtsLwsEV0aKnpsnNYWvzM3LmmgBjYokCy4aKyqoA/s400/im3.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul></ul>
<br />
<br />
<br />
<li>Une intégration améliorer de Git pour gérer les repos locaux et remote</li>
<br />
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMbHTJJXonH3FM_5qkZRdHBTDtdsJJMRpgjSubM7qngHk_AgUh2nbe_-1B9ORjSLS6zWrh5fNVZo5ztlEQ8TlFfrIYcQobGqcHEtgHqxmwRvKs3jod4VU63z4C7ZBY5e7OES1H2IB6bHz/s1600/im4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="126" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQMbHTJJXonH3FM_5qkZRdHBTDtdsJJMRpgjSubM7qngHk_AgUh2nbe_-1B9ORjSLS6zWrh5fNVZo5ztlEQ8TlFfrIYcQobGqcHEtgHqxmwRvKs3jod4VU63z4C7ZBY5e7OES1H2IB6bHz/s320/im4.png" width="320" /></a></div>
<ul>
<li>La fonction d'intellisense a été oprimisée pour apporter plus d'intelligence et de pertinence</li>
<li>Une fonction d'analyse de code temps réel permet au développeur de mieux controler sa dette technique sans attendre par exemple un rapport à posteriori SonarQube</li>
<li>des fonctions de productivité pour retrouver rapidement des classes, méthodes ou tout artefacts de code au travers de la fonction Aller à analogues</li>
<li>La fonction <b>Live Unit Testing</b> apportant là encore une alternative à des produits phare tels que NCrunch permettant un run et suivi temps réel des Test unitaires,</li>
<li>On retrouvera également une meilleure intégration avec Windows Azure , Docker et de meilleures capacité pour les développement Android, iOS et également Javascript</li>
<li>La sortie de Visual Studio pour Mac </li>
<li>Développement Mobile 5 étoiles avec <b>Visual Studio Mobile Center</b> (dédié iOS et Android) </li>
</ul>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-30454812881350976882016-11-18T13:44:00.000-08:002016-11-18T13:44:05.340-08:00DevTest Labs une solution du cloud Microsoft de provisioning d'environnements en mode self service<div class="separator" style="clear: both; text-align: justify;">
Que vous ayez à monter un environnement pour une salle de training ou encore pour une équipe de développeurs / testeurs, DevTest Labs est la solution apportée par le Cloud Microsoft permettant d'optimiser les temps d’approvisionnement ainsi que les coûts.</div>
<div class="separator" style="clear: both; text-align: justify;">
Comme nous allons le démontrer dans cet article, la configuration d'environnements de développement ou de tests devient un jeu d'enfant comparé aux solutions traditionnelles que l'on connait, l'approche self service de Microsoft offre une solution dynamique et rapide à mettre en oeuvre, personnalisable avec également un concept de maîtrise des coûts.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
Ci dessous, la procédure pas à pas pour mettre en oeuvre un environnement de développement qui pourra être utilisé soit pour une classe de training ou encore pour du développement ou du test. Le déroulement de la procédure ci dessous ne prend pas plus de 15 minutes à titre d'information.</div>
<div class="separator" style="clear: both; text-align: justify;">
<br /></div>
<div class="separator" style="clear: both; text-align: justify;">
1- Se connecter à son abonnement Azure puis en cliquant sur Autre services, rechercher DevTest Labs, on cliquera l'étoile favori afin que le service apparaisse directement dans la Toolbar par défaut par la suite</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurSOEtN1wazXibjoHK0k9kVQUr8kDScdC-pYGg6peU1gHuv42cFlDhekjCQXoD4WwLCu56Xl371WUtmH8c3DoJvN6WygvKiQSs2kbdRZGxx0JBXlESrbQBUB4h9sUj8Yh6nurNc5TIz_Q/s1600/001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhurSOEtN1wazXibjoHK0k9kVQUr8kDScdC-pYGg6peU1gHuv42cFlDhekjCQXoD4WwLCu56Xl371WUtmH8c3DoJvN6WygvKiQSs2kbdRZGxx0JBXlESrbQBUB4h9sUj8Yh6nurNc5TIz_Q/s400/001.png" width="342" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
2 - Cliquer sur Ajouter, entrer le nom du Lab, l'abonnement et la localisation, ci dessous nous choisissons US car toutes les fonctionnalités ne sont pas encore disponible en Europe par exemple, comme montré ci dessous</div>
<div align="left" class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDMZ_sBPbRj5sqoWBAX3sWa0CJhX1QnPV9dzsOr11z6xCCExMab8uVcUjGMHSWIO2sKPObhyt3uYQnvu3l9gq2DgHIBzzgKwLcUud8fZ01D5_0gtp1KR2RvYRGrkS_C85EqpEYyMzT6wgh/s1600/im1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDMZ_sBPbRj5sqoWBAX3sWa0CJhX1QnPV9dzsOr11z6xCCExMab8uVcUjGMHSWIO2sKPObhyt3uYQnvu3l9gq2DgHIBzzgKwLcUud8fZ01D5_0gtp1KR2RvYRGrkS_C85EqpEYyMzT6wgh/s640/im1.png" width="264" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
3 - Cliquer sur Créer puis attendre que la création du Lab se termine</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DperQLUKyq1n3wlQD7TAMpSjCGbwF8Skly2SISdOU2I39FKD8dGQK_ZNHRWcWchPSeyH0tokXsSuv78C_gL51rRoru7VrSpqSJiASVntKl-kaXwh_Hit_hjXAWNeUn1WUmFwZ8a9KyTw/s1600/im2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0DperQLUKyq1n3wlQD7TAMpSjCGbwF8Skly2SISdOU2I39FKD8dGQK_ZNHRWcWchPSeyH0tokXsSuv78C_gL51rRoru7VrSpqSJiASVntKl-kaXwh_Hit_hjXAWNeUn1WUmFwZ8a9KyTw/s400/im2.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Une fois le Lab créé, il apparaît dans la liste, simplement procéder à sa sélection pour le configurer</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSYWfo_-andm-4hsNYsMyutXZywePBi-a0q4Gzzg6FYDcs0NJEkf2fk4QwxqqXTKpKO2zg7qbkTemeYN6Fj4lsfrP1UH2ARehGMNZ_3v1wikhi2zx6WBroDeC6Be0BTffAmtLSHKJTFQNt/s1600/im3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSYWfo_-andm-4hsNYsMyutXZywePBi-a0q4Gzzg6FYDcs0NJEkf2fk4QwxqqXTKpKO2zg7qbkTemeYN6Fj4lsfrP1UH2ARehGMNZ_3v1wikhi2zx6WBroDeC6Be0BTffAmtLSHKJTFQNt/s640/im3.png" width="640" /></a></div>
La fenêtre de configuration va s'afficher, puis cliquer sur le bouton Formulas. Les formules vont permettre de définir des templates à partir desquels les machines seront crées par la suite.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3NBN8orqoNMf_lfUlNkIPWQ5HBVJ7UWKYgUgbb3ygLFWAyKuoV9buiJKNjJ08QR2xCtdo7UdUI0zxEKYA1T88b8l-3D3DP5Z6pTSgeO013nndJ-Kvjn8WG4wYLe6EBSJmwpfvmjXc9ZZn/s1600/im5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="336" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3NBN8orqoNMf_lfUlNkIPWQ5HBVJ7UWKYgUgbb3ygLFWAyKuoV9buiJKNjJ08QR2xCtdo7UdUI0zxEKYA1T88b8l-3D3DP5Z6pTSgeO013nndJ-Kvjn8WG4wYLe6EBSJmwpfvmjXc9ZZn/s640/im5.png" width="640" /></a></div>
La première étape va consister à entrer un nom et un mot de passe dans le Secret Store qui sera utilisé pour les Formulas et la création des machines virtuelles. Valider en cliquant sur Enregistrer au bas de la page<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvIHXzloWEO5cpePICY74Ii9_1Ox3Mw2fESCQam3O49CdV8a09RTqJwCkKT2PxNvZhHQOKCAGAkrs6xXyaDwoJDj_GYjZPJlkcXz-IMyc6_i4Cdxhkt8DoeUkdOFadPQyPo75xsWiwCR6O/s1600/im6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="204" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvIHXzloWEO5cpePICY74Ii9_1Ox3Mw2fESCQam3O49CdV8a09RTqJwCkKT2PxNvZhHQOKCAGAkrs6xXyaDwoJDj_GYjZPJlkcXz-IMyc6_i4Cdxhkt8DoeUkdOFadPQyPo75xsWiwCR6O/s640/im6.png" width="640" /></a></div>
<div style="text-align: justify;">
Cliquer ensuite sur le Bouton Formulas, permettant de définir ce que sera l'environnement de développement : Type de machine Virtuelle, OS et logiciel installé. Pour ce faire Microsoft offre une bibliothèque prête à l'emploi; Cliquer sur Add, choisir par exemple une machine de type Windows 10 avec Visual Studio 2015 ou 2017 RC dans la liste</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjO0N5VaAjOEXeIK7h1MNmuxUE0Jaf_0TLByPlyMeSLLEfyk290z9XW99DKp-sIeBcRNcjntvCWfRHxspBoRhshoHWO7Fj9lbnxXYhfX-SuM3cfF5ipxXJaYs_yrW6-d0xalhI5-VZtwkN/s1600/im7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="376" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjO0N5VaAjOEXeIK7h1MNmuxUE0Jaf_0TLByPlyMeSLLEfyk290z9XW99DKp-sIeBcRNcjntvCWfRHxspBoRhshoHWO7Fj9lbnxXYhfX-SuM3cfF5ipxXJaYs_yrW6-d0xalhI5-VZtwkN/s640/im7.png" width="640" /></a></div>
Puis vous pouvez configurer le sizing de la machine sélectionnée au travers de la fenêtre suivante qui va s'afficher :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglASn28IASuGQ-K2JTtkoyQ_pcjrR3_G2nrTZs8yYmnXfJ6OJ-GxPR_yD8T-IyZbii8ZsfLV6ecFDfahewCB1tB-b9LPy8yvVQi527CsfEqZzn6GqvQSJbQKulW6jHpi-mrMRJ3NmdsBOL/s1600/003.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEglASn28IASuGQ-K2JTtkoyQ_pcjrR3_G2nrTZs8yYmnXfJ6OJ-GxPR_yD8T-IyZbii8ZsfLV6ecFDfahewCB1tB-b9LPy8yvVQi527CsfEqZzn6GqvQSJbQKulW6jHpi-mrMRJ3NmdsBOL/s640/003.png" width="520" /></a></div>
Valider<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPfVyy3OZwJSdw-fJd30qP360ZVsGF2RcCohNENGXqzMPfadcWIrXKPnAzxiSu0gfDluZtqLc2ygICouNCTg4Fz0bZWIgF2Yj5AnT_Y27LZS2Qx9yxLUOPjRd7Ydmd9LP3FLZQogJADcmf/s1600/im8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPfVyy3OZwJSdw-fJd30qP360ZVsGF2RcCohNENGXqzMPfadcWIrXKPnAzxiSu0gfDluZtqLc2ygICouNCTg4Fz0bZWIgF2Yj5AnT_Y27LZS2Qx9yxLUOPjRd7Ydmd9LP3FLZQogJADcmf/s640/im8.png" width="640" /></a></div>
Vous avez également la possibilité de rajouter des artefacts qui seront en fait des logiciels qui seront installés sur votre machine virtuelle, en plus de Visual Studio, comme montré ci dessous<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNu6-nB9J5Gn2vx3rcwfbgcW7kC4It9__Zlcx063VSBLRAdZVSkwwTkObcrbs49GUSosPtOMMy7mlvxog6mhrmxT35uEaBPrno6skIIF9eBbNAq512-TNJT87LqshlJNu3ftZohkbh7mug/s1600/im9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNu6-nB9J5Gn2vx3rcwfbgcW7kC4It9__Zlcx063VSBLRAdZVSkwwTkObcrbs49GUSosPtOMMy7mlvxog6mhrmxT35uEaBPrno6skIIF9eBbNAq512-TNJT87LqshlJNu3ftZohkbh7mug/s320/im9.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Ci dessous par exemple nous allons installer Chrome dans la liste des artefacts proposés</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1XelAgxzYClcVpZXJ7tcFL22BnAxCd9jkgfDWhaU8daaXIqFqjDukuR87ShG17C4lKgk3w82A5meNvJMsOUh9h5AmwW74kVHkyFuwA1XJ91LWTIx99M9_7LUtz3rHwXv5LHbkSGKyWcp/s1600/im10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="604" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj1XelAgxzYClcVpZXJ7tcFL22BnAxCd9jkgfDWhaU8daaXIqFqjDukuR87ShG17C4lKgk3w82A5meNvJMsOUh9h5AmwW74kVHkyFuwA1XJ91LWTIx99M9_7LUtz3rHwXv5LHbkSGKyWcp/s640/im10.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Pour valider, il suffit de cliquer sur le bouton Mise à jour</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQdN195K9yHkJIwJMAkbIlHxn9jIbsJOxaAm5yHVn_F40ai6OYP-AlTGlbVNTs9utOIJ-thgDsoeZOkwOnU1SXjOvtpZQo5d4MDaczLIivl_WXRRKEtlvqKG0_jArcy89D16sMFOTsQwP/s1600/im11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgQQdN195K9yHkJIwJMAkbIlHxn9jIbsJOxaAm5yHVn_F40ai6OYP-AlTGlbVNTs9utOIJ-thgDsoeZOkwOnU1SXjOvtpZQo5d4MDaczLIivl_WXRRKEtlvqKG0_jArcy89D16sMFOTsQwP/s400/im11.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
La Formule constitue donc un template qui va nous permettre de créer des machines virtuelles spécifiques par exemple pour une classe de training. Pour se faire, il suffit simplement de cliquer sur le bouton Mes machines virtuelles puis cliquer sur le bouton Ajouter</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrJ_dtPSjM8q6RN2MLgV-kkv32YAtQp3we4O9_kf8ubRQWACGZOiZYVx0Ck5QeeutjaUBA_oVY5AowxXOcIfrisj8n714aMvZv6SwSIzKaIiJvUYjMMX3iA0VEyCpW-9RDgKEIaGgb9DB/s1600/im12.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnrJ_dtPSjM8q6RN2MLgV-kkv32YAtQp3we4O9_kf8ubRQWACGZOiZYVx0Ck5QeeutjaUBA_oVY5AowxXOcIfrisj8n714aMvZv6SwSIzKaIiJvUYjMMX3iA0VEyCpW-9RDgKEIaGgb9DB/s400/im12.png" width="400" /></a></div>
Simplement sélectionner la formule précédemment créée puis renseigner dans le panneau de droite les informations nécessaires à la création de la machine virtuelle comme montré ci dessous :<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvAveLqevX_JQOKWIhjOjA1vMKknSTcDEuWhu2M2Z4K4nox7vYFks6F0L5EmFl0R0o-lD2Y6cWRFjYHJzwh8CI6aXg3HO0Z2hMkn6hKqRKnZsVKhWe5yu-SUaWGJmxTr4mQj9zryJxtc8/s1600/im13.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="601" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmvAveLqevX_JQOKWIhjOjA1vMKknSTcDEuWhu2M2Z4K4nox7vYFks6F0L5EmFl0R0o-lD2Y6cWRFjYHJzwh8CI6aXg3HO0Z2hMkn6hKqRKnZsVKhWe5yu-SUaWGJmxTr4mQj9zryJxtc8/s640/im13.png" width="640" /></a></div>
Une fois le formulaire complété, simplement cliquer sur Créer et attendre que la machine apparaisse dans la liste (on note ci dessous l'état "création en cours")<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm2TL1ApSrvFqFMtB4JrQYxfiBeaXzhiVJO4ReyNlUoPmDqygj1YgXx3qTE2GwDUHHw9ms1ltFkp6p6Hvf7r0XCfLmLluSzQtfyV8wB8QOqSOvOWk-MPgfjc04alFOdq_dArZiQUYKfBpN/s1600/im14.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhm2TL1ApSrvFqFMtB4JrQYxfiBeaXzhiVJO4ReyNlUoPmDqygj1YgXx3qTE2GwDUHHw9ms1ltFkp6p6Hvf7r0XCfLmLluSzQtfyV8wB8QOqSOvOWk-MPgfjc04alFOdq_dArZiQUYKfBpN/s640/im14.png" width="640" /></a></div>
Une fois la machine créée, le script applique l'ajout des artefacts sélectionnés en plus de la formule, dans notre cas, il s'agit de l'installation de Chrome<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSM7xi_5C3hiTKPiDt0ZA80Nw3lftkaHlM72A9N7FfhjN8O1shyWHn79LQa6rZSi0xacjziVMD5IeYPvAgsq09GXnJnpVHbHwt1Mt5m_SK_YGEhmjo7rcoLXm08bjWMu-j9Td06sQYanCT/s1600/im15.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="209" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSM7xi_5C3hiTKPiDt0ZA80Nw3lftkaHlM72A9N7FfhjN8O1shyWHn79LQa6rZSi0xacjziVMD5IeYPvAgsq09GXnJnpVHbHwt1Mt5m_SK_YGEhmjo7rcoLXm08bjWMu-j9Td06sQYanCT/s640/im15.png" width="640" /></a></div>
Finalement la machine virtuelle est démarrée<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1WYgQFlTz3odc3fus1Jp2hvWH9biklRTsgJ1YZFBSrJ3Rng-ShxyS1hKdOEtVqmbHSveArr4fPWqNnQpoigbYgUAtb9d9u41nU9I7bQwd5s06MDtATdUTGxnBaccxWAogFifOuvLA119/s1600/im16.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="272" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJ1WYgQFlTz3odc3fus1Jp2hvWH9biklRTsgJ1YZFBSrJ3Rng-ShxyS1hKdOEtVqmbHSveArr4fPWqNnQpoigbYgUAtb9d9u41nU9I7bQwd5s06MDtATdUTGxnBaccxWAogFifOuvLA119/s640/im16.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Il suffit de cliquer sur Connexion pour déclencher une connexion remote desktop sur la machine<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6hjf1BI3zUsug7Ly0DokfqPV0oPvuVc9NvGuMcfjNRHbj5hIWmpHmZr6QaZZPnQcTSJHJ49OYNO_iwXjI2LdTvC1fpqz7BrNTNLZJ86DD1pbU1XbA7pJcEsNNze99EdakE3FzBpeA4Dk5/s1600/im17.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="395" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6hjf1BI3zUsug7Ly0DokfqPV0oPvuVc9NvGuMcfjNRHbj5hIWmpHmZr6QaZZPnQcTSJHJ49OYNO_iwXjI2LdTvC1fpqz7BrNTNLZJ86DD1pbU1XbA7pJcEsNNze99EdakE3FzBpeA4Dk5/s640/im17.png" width="640" /></a></div>
Un lien Rdp est téléchargé, simplement cliquer dessus pour démarre la session rdp<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4P8D9q58oohogbZYzNnUfXdRPsXCf8ASCUs5KoNWXycS9G0l-pd0u6JE4jp6JaxcMp1M0M-5QpNd8i6sf2pj7NSi8RPoVxEOWVZkIRxFumVq8VTEkuYnjnszVCBQTk5kd8aZOh6Vq_Fyb/s1600/im18.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="196" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4P8D9q58oohogbZYzNnUfXdRPsXCf8ASCUs5KoNWXycS9G0l-pd0u6JE4jp6JaxcMp1M0M-5QpNd8i6sf2pj7NSi8RPoVxEOWVZkIRxFumVq8VTEkuYnjnszVCBQTk5kd8aZOh6Vq_Fyb/s320/im18.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Cliquer sur Connexion</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnMgfEQ8fH_tVAVfdRLZpemCcto5QpTORvvFviuKsyBNdltldgvkrgZ0UE6tQpG5-Oroq9BSmiJHiMpG_BtXzTG3Ys-fLlBUNdm7Vje1vxHkBPkHRqPIYbWHk7cNF-iSERxCXDeBW488Q/s1600/im19.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSnMgfEQ8fH_tVAVfdRLZpemCcto5QpTORvvFviuKsyBNdltldgvkrgZ0UE6tQpG5-Oroq9BSmiJHiMpG_BtXzTG3Ys-fLlBUNdm7Vje1vxHkBPkHRqPIYbWHk7cNF-iSERxCXDeBW488Q/s400/im19.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Entrer vos identifiants</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDeJMmAk9JClZ5snh42_4zxlEDlpupS3ONVeLRFyl5NGqsryvPLUZA8naVfJo8YKS8eNrwoA2DwTJ2BU2FYOw1to6LAR2qEOMQEf2o6mKdKXRVEilxZaW-DWDM_MifplXjymXbOsv4iqjJ/s1600/im20.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="271" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDeJMmAk9JClZ5snh42_4zxlEDlpupS3ONVeLRFyl5NGqsryvPLUZA8naVfJo8YKS8eNrwoA2DwTJ2BU2FYOw1to6LAR2qEOMQEf2o6mKdKXRVEilxZaW-DWDM_MifplXjymXbOsv4iqjJ/s320/im20.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
La machine est disponible pour utilisation</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguQd3UAXC7s4iKawtTTtHxlq7ayYBEFms7bUmDMsM7XNwSq795IAapV6mshS9u1NAxJMAirAgQIm4Vr3dCs8bTuuCHWRunBkzuMq8hNYHGuHj-WcBnIv1Nt7oU5orImLk8gO7UXzxDIgyy/s1600/im21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="482" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguQd3UAXC7s4iKawtTTtHxlq7ayYBEFms7bUmDMsM7XNwSq795IAapV6mshS9u1NAxJMAirAgQIm4Vr3dCs8bTuuCHWRunBkzuMq8hNYHGuHj-WcBnIv1Nt7oU5orImLk8gO7UXzxDIgyy/s640/im21.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: justify;">
On notera, que l'on a à notre disposition un dashboard pour suivre les consommations financières de nos Labs, pratique si l'on veut par exemple maîtriser les coûts dans le cadre d'une utilisation pour des sessions de formations.</div>
<br />Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0tag:blogger.com,1999:blog-7985913466665944386.post-74477909957148508582016-04-24T06:27:00.000-07:002016-04-24T06:33:24.525-07:00VSTS Build : Connecter une Build d'intégration continue à une instance SonarQube – Quick Start<div style="text-align: justify;">
SonarQube est un outil d'analyse de qualité de code Open Source permettant de controler la dette technique d'un projet en cours de développement. cet outil s'avère extrêmement utile à la fois pour les développeurs en permettant le controle de la dette technique de leur projet au sein du processus d'intégration continue et également de grandir dans le métier de développeur grace à l'approche didactique de Sonar, qui propose des solution actionables à tous les problèmes remontés, ce qui fait que les développeurs apprennent très vite en uilitsant l'outil à ne plus coder de dette technique. Niveau Management, cela permet de consolider à différents niveaux tels que Projet, Delivery Center, Entreprise des métiques pertinentes rendant transparent tout problème affectant potentiellement la profitabilité de l'entreprise du fait de production d'applications difficilement maintenables impactant à la fois la capacité d'innovation, et le Time to Market de l'entreprise.</div>
<div style="text-align: justify;">
Il est donc stratégique dans une démarche qualité et plus spécifiquement de controle de la dette technique et de transparence de pouvoir intégrer SonarQube à tout processus d'intégration continue. Microsoft, au travers du module Build a su rendre l'intégration de SonarQube très simple comme nous allons le voir dans cet article.</div>
Attention, cet article ne couvre pas la configuration de SonarQube qui est essentielle pour assurer une vision transparente et réaliste de la dette technique, ce qui passe par l'installation de plugins payant par exemple pour C# et également la mise en place de Quality Profiles et Quality Gates alignés avec les stratégies qualité de l'entreprise.<br />
Nous allons voir pas à pas comment configurer cette intégration au travers de la création d'une nouvelle Build CI<br />
<br />
<ol>
<li>S'assurer d'avoir accès à une instance SonarQube existante</li>
<li>Se connecter au portail VSTS du projet cible<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTNgx9bk3QNXNVxWU5flzlsfEcLQc5AM1pFSWQuhxLf3Fpt8xJRHmaAGek9BRNyjTTTAzqlHd3U2nMgsMt0fkU49YJj6jeeb5QfHBSZmQd0U2tNzO20iVUdVOLH4KJr4U8TQoNP1eTUYHI/s1600/im1.png" imageanchor="1"><img border="0" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhTNgx9bk3QNXNVxWU5flzlsfEcLQc5AM1pFSWQuhxLf3Fpt8xJRHmaAGek9BRNyjTTTAzqlHd3U2nMgsMt0fkU49YJj6jeeb5QfHBSZmQd0U2tNzO20iVUdVOLH4KJr4U8TQoNP1eTUYHI/s400/im1.png" width="400" /></a></li>
<li>Activer l'onglet Build et cliquer le bouton + pour créer une nouvelle Build<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitv69tqQ8ZHvgWC5oMl3GXvLAmVvzrPtkdZYFuRe3g_5EkQuSMgPsOQONjAFsf6Ti2WkZCRN66xD_QfkI7n2jEQaGFdJJK9p2acbRPhVxgdNCpImL__37bPo1Bfa7zAVN0F1olCXsHU8FC/s1600/im2.png" imageanchor="1"><img border="0" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitv69tqQ8ZHvgWC5oMl3GXvLAmVvzrPtkdZYFuRe3g_5EkQuSMgPsOQONjAFsf6Ti2WkZCRN66xD_QfkI7n2jEQaGFdJJK9p2acbRPhVxgdNCpImL__37bPo1Bfa7zAVN0F1olCXsHU8FC/s400/im2.png" width="400" /></a></li>
<li>Selectionner un template de Build, dans notre cas nous choisissons Visual Studio puis cliquer Next<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMbvJ8d8KeHd7ZiHtMbbN-9nJ_uHQcOdF1uQ7FGRXyA4-eetAMUtAQawg9IcbG1jgMoH88kin-r7bPm0M2ELpgzahLExGX5i5vKCuCtI5j-1n3xVyMv2wylDDE8DraS6MGsFZT8gytGbpu/s1600/im3.png" imageanchor="1"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMbvJ8d8KeHd7ZiHtMbbN-9nJ_uHQcOdF1uQ7FGRXyA4-eetAMUtAQawg9IcbG1jgMoH88kin-r7bPm0M2ELpgzahLExGX5i5vKCuCtI5j-1n3xVyMv2wylDDE8DraS6MGsFZT8gytGbpu/s320/im3.png" width="320" /></a></li>
<li>Configurer le type de Repository, le repository, la branche et l'agent (rafraichir la liste si besoin, dans le cas ou la liste est vide, rapprocher vous de votre Admin TFS pour la configuration de l'agent), n'oubliez pas de cocher la case Continuous integration pour s'intégrer dans un processus d'intégration continue (optionnel) puis cliquer sur le bouton Create<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdtTD58ODffm4NNX9xlKcMc8ZZkpJWrOnPiCehWD7baWyre4roSC797hTT8mTr29qDR4M2grTCReteJAtgOYisITGJyNR7dviLalVGy1okONmBa8mYGwa0HIbVhfEps3M9a2LYKflKmtsO/s1600/im4.png" imageanchor="1"><img border="0" height="316" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhdtTD58ODffm4NNX9xlKcMc8ZZkpJWrOnPiCehWD7baWyre4roSC797hTT8mTr29qDR4M2grTCReteJAtgOYisITGJyNR7dviLalVGy1okONmBa8mYGwa0HIbVhfEps3M9a2LYKflKmtsO/s320/im4.png" width="320" /></a></li>
<li>La Build definition est affichée en mode Edition, cliquer simplement sur Add Build Step pour ajouter les taches Sonar fournies par Microsoft en standard dans le workflow de la Build. On notera que le template vient avec la compilation de la solution, l'exécution des tests ainsi que la publication des artefacts de Build tel que les packages de déploiement par exemple<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTkr5WLpNfXMBzsfUdbiWaXB6aHSSP4FMgtSFHAwTi79sF7gaEv99BVpg6SfYPJ3o0XjXTJPuDzYk7Ng7-bEoqHCaKkXusciTW3pf294HUKGomH-9aVEq1YduyJHplaS4JLdc5L1t6yeue/s1600/im5.png" imageanchor="1"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTkr5WLpNfXMBzsfUdbiWaXB6aHSSP4FMgtSFHAwTi79sF7gaEv99BVpg6SfYPJ3o0XjXTJPuDzYk7Ng7-bEoqHCaKkXusciTW3pf294HUKGomH-9aVEq1YduyJHplaS4JLdc5L1t6yeue/s320/im5.png" width="320" /></a></li>
<li>La librairie des taches s'affiche en pop up, scroller jusqu'à atteindre les taches Sonar puis cliquer sur le bouton Add situé à droite des taches puis cliquer sur Close.<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrMEBLzE1oNjx0Ua9lRB8RJd5YwWWQqUFFth9_l-id0ed9FadOq9W1FWvNn9V1No7oPXuBRJmAveqZIsRUHpGLKgUEflhyunPXXcnhGWOfDIYyJoxBdsXD3KFtt8PRBtuzfIi72PCucsua/s1600/im6.png" imageanchor="1"><img border="0" height="294" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrMEBLzE1oNjx0Ua9lRB8RJd5YwWWQqUFFth9_l-id0ed9FadOq9W1FWvNn9V1No7oPXuBRJmAveqZIsRUHpGLKgUEflhyunPXXcnhGWOfDIYyJoxBdsXD3KFtt8PRBtuzfIi72PCucsua/s320/im6.png" width="320" /></a></li>
<li>Les taches Sonar sont ajoutées à la Définition de Build<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX9rUW-88lD91SRl2aPz3qvmpoHWG9vE3a59rTRbW_M5Gp_Jefbbl7fInQsC-r1SmseVr8sySiA6NHgEwGFCpqgzeqyE7MsSi72ACPi3NA9NJOO6uMSE2sYyg9fYxpVhyd2eFF2rPPRVNw/s1600/im7.png" imageanchor="1"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgX9rUW-88lD91SRl2aPz3qvmpoHWG9vE3a59rTRbW_M5Gp_Jefbbl7fInQsC-r1SmseVr8sySiA6NHgEwGFCpqgzeqyE7MsSi72ACPi3NA9NJOO6uMSE2sYyg9fYxpVhyd2eFF2rPPRVNw/s320/im7.png" width="320" /></a></li>
<li>Simplement cliquer glisser les taches pour les positionner au bon endroit dans le workflow comme montré ci dessous<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg4DtOMhcMUVgirnWCgJLtzcm22KtdgMZKon8ZqAaGb2jwdIchTotwNzRSdVKPvCOM-bgg3kU9A62bQ2qOOVkazt7XLydFrNpVHzFBBINwdwnsEWaVGzmPsSyqo3qrg6cYJubIE3JgEgWn/s1600/im8.png" imageanchor="1"><img border="0" height="281" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg4DtOMhcMUVgirnWCgJLtzcm22KtdgMZKon8ZqAaGb2jwdIchTotwNzRSdVKPvCOM-bgg3kU9A62bQ2qOOVkazt7XLydFrNpVHzFBBINwdwnsEWaVGzmPsSyqo3qrg6cYJubIE3JgEgWn/s320/im8.png" width="320" /></a></li>
<li>Nous allons maintenant configurer les taches Sonar afin que la Build CI puisse publier les informations de qualimétrie vers Sonar. Pour cela, vous devez disposer de la clé projet Sonar, le nom et la version comme montré ci dessous. A noter qu'un EndPoint SonarQube aura été provisionné par votre administrateur au préalable. Pour la partie Database Settings, nous allons utiliser des variables que l'on créera au préalable dans l'onglet variables<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOj9u9Krcqhy_xrQw9iyH8yO2ryh_plTmaiM4HDiCf-rLn7909T_fQMpbhalZoEHXuqEOhyphenhyphenI1Kdz8lvvjhnBFZaKaHw2WChSnZGhgXdyjR48gXkjM-D259vyWYd9gcl2_Bd6R_Xix6_PLP/s1600/im9.png" imageanchor="1"><img border="0" height="398" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOj9u9Krcqhy_xrQw9iyH8yO2ryh_plTmaiM4HDiCf-rLn7909T_fQMpbhalZoEHXuqEOhyphenhyphenI1Kdz8lvvjhnBFZaKaHw2WChSnZGhgXdyjR48gXkjM-D259vyWYd9gcl2_Bd6R_Xix6_PLP/s640/im9.png" width="640" /></a></li>
<li>La création des variables se fait comme montré ci dessous à partir de l'onglet variable. Il faut avoir la chaine de connection à la base de données, ainsi que le Login et mot de passe (A noter que dans la prochaine version de Sonar, les login mot de passe ne seront plus à fournir ce qui du point de vue de la sécurité sera une grande amélioration)<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmo7cSFzsGGEpJxYMWyX_6IaEkTXDKpoX93j7h4LaKmoOGtR9NmJ3l_xyBsR0nR0E3G9z2zfiOhhZ0DMWQ8pnRy062J8mCc41rWIy4rzhZmgH30l1-LSsNUhvpy3vYDH5BdYlqEBZmbzS7/s1600/im10.png" imageanchor="1"><img border="0" height="182" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmo7cSFzsGGEpJxYMWyX_6IaEkTXDKpoX93j7h4LaKmoOGtR9NmJ3l_xyBsR0nR0E3G9z2zfiOhhZ0DMWQ8pnRy062J8mCc41rWIy4rzhZmgH30l1-LSsNUhvpy3vYDH5BdYlqEBZmbzS7/s400/im10.png" width="400" /></a></li>
<li>Sauvegarder la build puis tester, si tout est correctement configuré, vous obtenez un rapport de build comme ci dessous avec un lien vous permettant d'accèder au Dashboard du projet Sonar directement pour voir les élements d'information<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghWeF-ScZhBccKNAiGLGA79xRK67NLYZfBGQhhUpbw_PI2q9uozglvVt74gqiJwbUW90Ut7Mmrjyl8AqQJSHkvSg1MqDdQDinwBGIVrtxEEW4BVzWnvzudqEkr5KEFYnTdFY_Ke_g0Eq-9/s1600/im11.png" imageanchor="1"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghWeF-ScZhBccKNAiGLGA79xRK67NLYZfBGQhhUpbw_PI2q9uozglvVt74gqiJwbUW90Ut7Mmrjyl8AqQJSHkvSg1MqDdQDinwBGIVrtxEEW4BVzWnvzudqEkr5KEFYnTdFY_Ke_g0Eq-9/s640/im11.png" width="640" /></a><br /><br />Pour information, la création du Endpoint SonarQube se fait à partir des settings de l'instance, pour y accèder cliquer sur le bouton settings comme montré ci dessous,<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSTSwj-TqAzDbWxYLdded6aN7Mor6v6ZPx4IvThokewn77gofsLignMrvldLKJBPCb3YHYYF36MVpY7PS2GyQ-UdBBwujBVd-SAJT8b0GeuW1HTiyHFnRkNFOm1uZhTlXEtvQYf9ueYgjc/s1600/im12.png" imageanchor="1"><img border="0" height="268" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiSTSwj-TqAzDbWxYLdded6aN7Mor6v6ZPx4IvThokewn77gofsLignMrvldLKJBPCb3YHYYF36MVpY7PS2GyQ-UdBBwujBVd-SAJT8b0GeuW1HTiyHFnRkNFOm1uZhTlXEtvQYf9ueYgjc/s640/im12.png" width="640" /></a><br />Cliquer sur l'onglet Services et cliquer sur Add a new Service Connection<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEMwpT8NYqQyQy4Pd8OITGnx71MUCojkc6j8_TOBrSXtD31lkCxgEY6Z_1aqkggzB1xDVY3y50rek5SGZ_0Hxdr3ljcRLIGLdiBlYlELuVZvFjjhyD2nrk8w8RuA6B5KAZpy33cuh7seR8/s1600/im13.png" imageanchor="1"><img border="0" height="192" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiEMwpT8NYqQyQy4Pd8OITGnx71MUCojkc6j8_TOBrSXtD31lkCxgEY6Z_1aqkggzB1xDVY3y50rek5SGZ_0Hxdr3ljcRLIGLdiBlYlELuVZvFjjhyD2nrk8w8RuA6B5KAZpy33cuh7seR8/s640/im13.png" width="640" /></a><br />Choisir Add a Generic<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhry95PADHVKqX09gtw04dguy1EUVDlf7nzvbjzj8elRc16kRdWPlKJOgN1UxpbrL_c5vlpHcNw344CroKza0XIPQDLXnf1O6r2VismUcYcTCcTG23WuzkehI8oBXlQfRB5Zm9eBP6adsWd/s1600/im14.png" imageanchor="1"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhry95PADHVKqX09gtw04dguy1EUVDlf7nzvbjzj8elRc16kRdWPlKJOgN1UxpbrL_c5vlpHcNw344CroKza0XIPQDLXnf1O6r2VismUcYcTCcTG23WuzkehI8oBXlQfRB5Zm9eBP6adsWd/s400/im14.png" /></a><br />Entrer le nom SonarQube par exemple puis l'adresse de votre instance Sonar par exemple : http://sonar.YourCompany.net:8080/ puis des credentials permettant de se connecter à l'instance Sonar avec les privilèges suffisants<br /><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGH5PFRG5gruuAT2-HD9AFfcIfI1gB4iQUzO8A1CYp9vHQwL1RqxAcKd0wxvQpDVjMEAq9drmmzcio279bZLbM2P6C4HnKCTQwWYjQBUn59QRer3devbPXxfEinkZVElD03Nsv66k0d7ql/s1600/im20.jpg" imageanchor="1"><img border="0" height="137" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGH5PFRG5gruuAT2-HD9AFfcIfI1gB4iQUzO8A1CYp9vHQwL1RqxAcKd0wxvQpDVjMEAq9drmmzcio279bZLbM2P6C4HnKCTQwWYjQBUn59QRer3devbPXxfEinkZVElD03Nsv66k0d7ql/s320/im20.jpg" width="320" /></a></li>
</ol>
Philippe PUSCHMANNhttp://www.blogger.com/profile/07942867682761308922noreply@blogger.com0