<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Diary of a rocker nerd</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/saguar/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/saguar/feed.xml</link>
    <description>tricks, lessons learned, personal thoughts and funny facts</description>
    <lastBuildDate>Wed, 17 Apr 2019 03:27:23 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Late night Blockchain thoughts</title>
      <link>https://docs.microsoft.com/archive/blogs/saguar/late-night-blockchain-thoughts</link>
      <pubDate>Fri, 09 Mar 2018 11:48:34 GMT</pubDate>
      <dc:creator><![CDATA[Saverio Guardato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saguar/?p=365</guid>
      <description><![CDATA[The beginning
In the past few months I’ve been involved in several activities whose subject was one...]]></description>
      <content:encoded><![CDATA[<h1><span style="font-family: 'Segoe UI Light';color: #4f81bd">The beginning</span></h1>
<span style="font-family: 'Segoe UI Light';font-size: medium">In the past few months I’ve been involved in several activities whose subject was one of the most <em>trending</em> and discussed topic in the tech world: <strong>Blockchain</strong>.</span>

<span style="font-family: 'Segoe UI Light';font-size: medium">To be honest, the first time I was asked to work with this “<em>new”</em> technology my first thought has been:</span>
<blockquote><span style="font-family: 'Segoe UI Light';font-size: medium"> <em>Blockchain? That stuff behind the hacker crypto-currency? COOL!</em>
</span></blockquote>
<span style="font-family: 'Segoe UI Light';font-size: medium">Obviously I had no clue of the technology behind Bitcoin and my knowledge at that time was based on some lectures and chats with colleagues. </span>

<span style="font-size: medium"><span style="font-family: 'Segoe UI Light'">Actually many people talk about Blockchain thinking to have a clear vision and awareness about it, but the (sad) truth is that most of them have just a slight knowledge built on internet. Well, just to clarify, I’m not saying that I am an expert or that only experts can talk and discuss about it, but keep in mind that complex topics, like <span>Blockchain</span>, require at least a <strong>basic learning </strong>which is, in my opinion, more then reading blogs or websites on internet.</span>
</span>
<h1><span style="font-family: 'Segoe UI Light';color: #4f81bd">Why this post</span></h1>
<span style="font-family: 'Segoe UI Light';font-size: medium">The reason why I've decided to write a blog post about Blockchain is not because I want to add a(nother) quick-start or easy explanation of the technology into the internet archive. So why should you continue to read it? </span>

<span style="font-family: 'Segoe UI Light';font-size: medium">As I said before, I’ve had the chance to study, work and learn from the field what this technology may offer (a lot of potential opportunities) but of course also when it would be better to invest in something different.</span>

<span style="font-family: 'Segoe UI Light';font-size: medium">So my goal is to give you some food for thought and to feed your curiosity sharing my honest feedbacks and thoughts.</span>
<h1><span style="font-family: 'Segoe UI Light';color: #4f81bd">The Five Ws</span></h1>
<span style="font-family: 'Segoe UI Light';font-size: medium">Ok so, let’s start the discussion using the journalistic rule of the <strong><em>Five Ws </em></strong>which, I hope, will give us a more critical approach: </span>

<span style="font-family: 'Segoe UI Light';font-size: large;color: #4f81bd">
<strong>WHO?</strong>
</span>

<span style="font-family: 'Segoe UI Light';font-size: medium">The first questions you should ask when start studying or working with a technology are:</span>
<blockquote><span style="font-size: medium"><em><span style="font-family: 'Segoe UI Light'"><strong>Who</strong> decided to use it?</span>
</em></span></blockquote>
<span style="font-size: medium"> <span style="font-family: 'Segoe UI Light'">You and your team, both technical and business, are <strong>the only one </strong>to be responsible into the difficult decision on which technology to invest, and to use, during the analysis and architecting process. Generally even if you or someone in your team is not 100% confident with the technology chosen there’s a common though that everything is mutable or replaceable; well, consider that if you’ll take the decision to remove or replace the Blockchain components from your ecosystem you will probably need to reinvent end re-engineer your <strong>whole ecosystem</strong>. </span></span><span style="font-family: 'Segoe UI Light';font-size: medium">So yes, you can break your relationship with Blockchain, but it will be an expensive divorce :)</span>

<span style="font-family: 'Segoe UI Light';font-size: medium"></span>
<blockquote><span style="font-size: medium"><em><span style="font-family: 'Segoe UI Light'"><strong>Who</strong> is going to use it? </span>
</em></span></blockquote>
<span style="font-size: medium"> <span style="font-family: 'Segoe UI Light'">The most simple and abstract definition of a Blockchain is “ <em>a distributed database of transactions where each transaction (or block) encapsulates some information from the
previous transaction, forming a chain of transactions</em>“. <strong>Keep in mind</strong> that even if the literature definition contains the <em>database</em> word, a Blockchain is built to be <strong>an irreversible database! </strong>The most correct term to use is <strong>Ledger </strong>and the “ <em>Right to be forgotten</em>” is incompatible with the <strong>immutable laws of ledgers</strong>! So be sure that the utilizer of your system agrees with these laws. </span></span>

&nbsp;

<span style="font-family: 'Segoe UI Light';font-size: large;color: #4f81bd"><strong>WHAT? </strong>
</span>

<span style="font-size: medium"><span style="font-family: 'Segoe UI Light'">Looking at the second “Who” question you will probably better understand why <strong>it’s crucial</strong> to have a deep knowledge of <strong>what exactly Blockchain is</strong> before to start any project which is more than an experiment. So here's a list of questions you should be able to answer:</span>
</span>
<ol>
 	<li>
<div><span style="font-family: 'Segoe UI Light';font-size: medium">What is <strong>hashing</strong>?</span></div></li>
 	<li>
<div><span style="font-family: 'Segoe UI Light';font-size: medium">What is a <strong>Ledger</strong>?</span></div></li>
 	<li>
<div><span style="font-family: 'Segoe UI Light';font-size: medium">What is a <strong>distributed </strong>database/ledger?</span></div></li>
 	<li>
<div><span style="font-family: 'Segoe UI Light';font-size: medium">What is a <strong>shared </strong>(and shared) database/ledger?</span></div></li>
 	<li>
<div><span style="font-size: medium"><span style="font-family: 'Segoe UI Light'">What does it means <strong>mining?</strong>
</span></span></div></li>
 	<li>
<div><span style="font-size: medium"> <span style="font-family: 'Segoe UI Light'">What is the <strong>consensus?</strong></span>
</span></div></li>
</ol>
<span style="font-family: 'Segoe UI Light';font-size: medium">If you can’t answer to all the questions above, in a detailed way, it’s clear that you need to study more and deeper this topic. </span>

<span style="font-family: 'Segoe UI Light';font-size: large;color: #4f81bd">
<strong>WHEN?</strong>
</span>

<span style="font-family: 'Segoe UI Light';font-size: medium">Blockchain is not so young as you may believe! The first work on a cryptographically secured chain of blocks was described in <strong>1991 </strong>and the most famous public <span>Blockchain</span> project (Bitcoin) was conceptualized in <strong>2008</strong>. This is just to say that if you feel some pressure about timing or you can’t wait to start because tomorrow“ <em>it will be too late</em>”, let’s relax and take your time to have a <strong>complete envision </strong>and to avoid bad situations. Remember that it’s never too late to make the right decision.</span>

<span style="font-family: 'Segoe UI Light';font-size: large;color: #4f81bd">
<strong>WHERE? </strong>
</span>

<span style="font-family: 'Segoe UI Light';font-size: medium">When talking about a technology like Blockchain, distributed and decentralized, it’s obvious (at least for me) that the best place <em>where</em> to deploy it’s on <strong>Cloud</strong>. If you think to design and distribute a Blockchain on your computer or your local server, you are probably wasting your time in the worst way I’ve ever seen :) </span>

<span style="font-family: 'Segoe UI Light';font-size: medium">Furthermore all the most important Cloud providers are investing so much in this technology, and you should invest in cloud too because it will let you save a lot of time and energies! </span>

<span style="font-family: 'Segoe UI Light';font-size: medium">Another important consideration is that <em>Blockchain solutions </em>are <strong>more </strong>than just <strong>Distributed Ledger Technology</strong>, which would be actually just one piece of the whole puzzle! Imagine for example all the involved components of a <em>supply chain</em> scenario like below:</span>

<img src="https://msdnshared.blob.core.windows.net/media/2018/03/supply-chain.png" alt="" width="854" height="311" class="aligncenter wp-image-345" />

<span style="font-family: 'Segoe UI Light';font-size: medium">So when you ask “<em>where”</em> it’s very important to imagine <strong>where </strong>to place your whole system, and I think that Microsoft has one of the best <a href="https://azure.microsoft.com/en-us/solutions/blockchain/">Blockchain solution</a> approach on the market.</span><span style="font-size: medium"><span style="font-family: 'Segoe UI Light';color: #4f81bd">
<span style="font-size: large">
<strong>WHY?</strong>
</span></span></span><span style="font-family: 'Segoe UI Light';font-size: medium">And here’s the last, but not least, question:  <strong><em>why should I use Blockchain?</em></strong></span>

<span style="font-family: 'Segoe UI Light';font-size: medium">Before to show you a very useful graphic I want to share with you the most important think I’ve learnt in these months: </span><span style="font-family: 'Segoe UI Light';font-size: medium">even if you are able to use the Blockchain in every market industry, this does not mean that it’s always the best choice! So, how to make the right decision? Try to check how many of the following requisites you need for your project:</span>

<img src="https://msdnshared.blob.core.windows.net/media/2018/03/decision.png" alt="" width="579" height="439" class="aligncenter wp-image-355" />
<h1><span style="font-family: 'Segoe UI Light';color: #4f81bd">Conclusion</span></h1>
<span style="font-family: 'Segoe UI Light';font-size: medium">I hope you enjoyed my post and I'm open to your feedbacks and opinions. As I've already said before, the goal of this discussion is to share with you my experience and, hopefully, to give you some hints about this topic.</span>]]></content:encoded>
    </item>
    <item>
      <title>Top 5 mistakes when people talk about Azure</title>
      <link>https://docs.microsoft.com/archive/blogs/saguar/top-5-mistakes-when-people-talk-about-azure</link>
      <pubDate>Fri, 09 Jun 2017 17:06:24 GMT</pubDate>
      <dc:creator><![CDATA[Saverio Guardato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saguar/?p=285</guid>
      <description><![CDATA[A sad story
I recently got to talk to some people about Cloud technology and I tried to share my...]]></description>
      <content:encoded><![CDATA[<h1><span style="color: #4f81bd;font-weight: bold">A sad story</span></h1>
<span style="font-size: medium">I recently got to talk to some people about Cloud technology and I tried to share my experience on this topic. I use to talk honestly to people, showing my point of view  gained with my everyday work and not based on my role in Microsoft. </span>

<span style="font-size: medium">In the past I used to work with a lot of technologies, and I’m still a big fan of <a target="_blank" href="https://opensource.microsoft.com/">Open Source</a> (that’s one of the reason why I love software) and this seems to be an hot topic in Microsoft too since we are in the <a target="_blank" href="http://www.businessinsider.com/microsoft-github-open-source-2016-9?IR=T">TOP 10 contributors on GitHub</a>.</span>

<span style="font-size: medium">Both for my work and for my passion for technology, I always try to be active on social communities, blogs, conferences and hackathon, and in the last year I faced with a very <strong>sad story</strong> about <strong>Microsoft Azure</strong> and tons of urban myths related to it.</span>

<span style="font-size: medium"> </span>
<h1><span style="color: #4f81bd;font-weight: bold">The problem</span></h1>
<span style="font-size: medium">I’ve learned that when someone talks about technology there are two crucial factors of influence:</span>
<ul>
 	<li>
<div><span style="font-size: medium">the good or bad experiences he/she had with it</span></div></li>
 	<li>
<div><span style="font-size: medium">his/her personal thoughs about the owner of the technology</span></div></li>
</ul>
<span style="font-size: medium">Microsoft has been one of the leading tech company in the last 40 years, and one of most known product is for sure Windows… the so much hated (and sometime also loved) Operating System of the Redmond’s company. </span>

<span style="font-size: medium">I guess that a lot of people have experienced issues with Windows and I’m pretty sure that at least the 50% of them have seen a <a target="_blank" href="https://en.wikipedia.org/wiki/Blue_Screen_of_Death">BSOD</a> </span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/06/image267.png"><img width="526" height="248" title="image" class="aligncenter" style="margin-right: auto;margin-left: auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/06/image_thumb251.png" border="0" /></a>

<span style="font-size: medium"><strong>The problem</strong> is that you cannot jump to conclusion that all Microsoft’s products are bad and, primarily, you should not have a negative opinion of a Product/Service if you haven’t tried and <u>stressed</u> it <strong>for real</strong>. </span><span style="font-size: medium">So the first trouble I struggle with in my job is to reset people’s bias about <strong>Azure </strong>and let them explore all the services and products offered by this platform, which has been recognized as one of the best Cloud solution on the market; after that I am ready to hear a real feedback.</span>

<span style="font-size: medium"> </span>
<h1><span style="color: #4f81bd;font-weight: bold">The top 5 mistakes</span></h1>
<span style="font-size: medium">The simplest way for me to make people think over Microsoft Azure is to explain why some thoughts are totally wrong, showing them how many benefits they can reach using it. </span>
<h2><span style="color: #ff0000;font-weight: bold"><em>1. I need a powerful Cloud platform for my complex infrastructure, I'm not developing a simple website! </em></span></h2>
<span style="font-size: medium">This is for sure one of the <u>worst thing</u> I’ve ever heard from people. Azure is a <strong>complete</strong> cloud platform which offers a competitive and even more rich <a target="_blank" href="https://azure.microsoft.com/en-us/overview/what-is-iaas"><strong>IaaS</strong></a><strong> </strong>offering. </span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/06/image268.png"><img width="855" height="299" title="image" class="aligncenter" style="margin-right: auto;margin-left: auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/06/image_thumb252.png" border="0" /></a>

<span style="font-size: medium">So if you are talking with someone who says this, he/she has probably <strong>never used</strong>, or explored in deep, Microsoft Azure! So just ignore this assertion and try to understand how you could use it to build even more a simple website.</span><span style="font-size: medium"> </span>
<h2></h2>
<h2><em><span style="color: #ff0000;font-weight: bold">2. Sorry but for my business I need to use Linux OS and Open Source software, that’s why I’m forced to choose &lt;other-name&gt; provider instead of Microsoft</span></em></h2>
<span style="font-size: medium"><u>Nobody</u> never said that you have product or technology lock-in when adopting <strong>Azure</strong> as Cloud provider, rather you can choose from a full range of Linux distributions like <strong>Red Hat, Ubuntu, CentOS, SUSE</strong>, and community-driven solutions like <strong>Chef, Puppet, </strong>and<strong> Docker</strong>. There are no constraints for your DEV team (a lot of PaaS products for example propose Node.js as development environment) and there’s a full compatibility with 3rd party components from <a href="https://azure.microsoft.com/en-us/campaigns/oracle/">Oracle</a>, <a href="https://azure.microsoft.com/en-us/campaigns/ibm/">IBM</a>, and <a href="https://azure.microsoft.com/en-us/services/virtual-machines/sap-hana/">SAP</a>. </span>

<span style="font-size: medium">So if you do not choose Azure for your concerns about its Microsoft’s constraints, probably you don’t know (yet) the <a target="_blank" href="https://azure.microsoft.com/en-us/overview/choose-azure-opensource">Open Source opportunities</a> that Azure offers.  </span>

<span style="font-size: medium"> </span>
<h2><em><span style="color: #ff0000;font-weight: bold">3. Azure has less services than &lt;other-name&gt; Cloud provider</span></em></h2>
<span style="font-size: medium">In the Cloud competition, Azure has to fight harder to fill the gap with other competitors on <strong>IaaS </strong>battlefield, but what I’ve learned in the past two years is that Microsoft Azure has the most complete, diversified and flexible <a target="_blank" href="https://azure.microsoft.com/en-us/overview/what-is-paas"><strong>PaaS</strong></a> offering on the market. To give you an idea of the number of available services here’s a nice “Periodic Table” picture by <em>Concurrency, Inc</em>:</span>

<a href="http://www.concurrency.com/landing/azure-periodic-table"><img width="890" height="543" title="image" class="aligncenter" style="margin-right: auto;margin-left: auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/06/image269.png" border="0" /></a>

<span style="font-size: medium">Where each color represents an area of interest of the following list:</span>

<span style="color: #ff0000;font-size: medium"><a href="https://msdnshared.blob.core.windows.net/media/2017/06/image270.png"><strong><em><img width="456" height="407" title="image" class="aligncenter" style="margin-right: auto;margin-left: auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/06/image_thumb253.png" border="0" /></em></strong></a></span>
<h2><span style="color: #ff0000;font-weight: bold"><em> </em></span></h2>
<h2><span style="color: #ff0000;font-weight: bold"><em>4. Microsoft pricing model is too complicated</em></span></h2>
<span style="font-size: medium">I have to admit it, if you are a tech-guy and not a commercial, it’s not easy to understand all the pricing and financial aspect of Cloud, but there are 4 important things you should know about <a href="https://azure.microsoft.com/en-us/pricing">Azure Pricing Model</a>:</span>
<ul>
 	<li><span style="font-size: medium"><strong>No upfront costs</strong></span></li>
 	<li><span style="font-size: medium"><strong>No termination fees</strong></span></li>
 	<li><span style="font-size: medium"><strong>Pay only for what you use</strong></span></li>
 	<li><span style="font-size: medium"><strong>Per minute billing</strong></span></li>
</ul>
<span style="font-size: medium">Said that, the best way to understand more about pricing and to estimate how much your infrastructure would cost, is to play with these two awesome tools:</span>
<ul>
 	<li>
<div><span style="font-size: medium"><strong><a href="https://azure.microsoft.com/en-us/pricing/calculator/">Pricing Calculator</a></strong> </span></div></li>
 	<li>
<div><span style="font-size: medium"><strong><a href="https://www.tco.microsoft.com/">Total Cost of Ownership (TCO) Calculator</a></strong></span></div></li>
</ul>
<span style="font-size: medium"> </span>
<h2><span style="color: #ff0000"><em><span style="font-weight: bold">5. I read on a &lt;social-network-name&gt; that Azure has less geographic replication and not so much datacenters for its cloud services. I prefer to choose &lt;other-cloud-provider&gt; because they are better distributed</span></em></span></h2>
<p align="justify"><span style="font-size: medium">I heard this from the CEO of a startup during an Hackathon few months ago, and I was very surprised about it because in my mind startups have (or should have) always an up-to-date knowhow and they should not have bias about providers. My honest opinion is this: </span><span style="font-size: medium">as a startup you should work with <strong>everything</strong> available on the market, try all the services and <strong>explore more and more</strong>, since this will help your company to differentiate your business and to be open to all technologies.</span></p>
<p align="justify"><span style="font-size: medium">Said that, the datacenter global distribution of Azure is <a href="https://azure.microsoft.com/en-us/regions">public and available</a> and despite of the “heard from a friend of mine” assertion, Azure is available in 34 regions around the world, with plans announced for 6 additional regions. This means that Microsoft guarantee an <a href="https://www.microsoft.com/en-us/TrustCenter/Privacy/default.aspx">high level Privacy</a> and a well defined strategy for <a href="https://docs.microsoft.com/en-us/azure/best-practices-availability-paired-regions">Availability and Disaster Recovery</a> for customers.</span></p>
&nbsp;
<h1><span style="color: #4f81bd;font-weight: bold">Conclusion</span></h1>
<p align="justify"><span style="font-size: medium">As a tech lover and professional worker I’ve learned that you must set your mood to “<strong>continuous learning”</strong> state, especially when talking about innovative and growing things like Cloud. I never put my <em>personal opinion</em> ahead <strong>facts</strong>, and if my point of view is different from a friend/colleague/partner/customer that is a good reason for me to further investigate and learn new things. </span></p>
<p align="justify"><span style="font-size: medium">When I talk with a friend/colleague/partner/customer I tell them to do not look at me as <em>the Microsoft employee who has to sell his products</em> but rather then a passionate guy who always tries to do the best on his work and is always open to <strong>study and learn more</strong>, which is basically what everyone should do.</span></p>
&nbsp;
<h1><span style="color: #4f81bd;font-weight: bold">Post scriptum =)</span></h1>
<a href="https://msdnshared.blob.core.windows.net/media/2017/06/image271.png"><img width="422" height="291" title="image" style="margin-right: auto;margin-left: auto;float: none" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/06/image_thumb254.png" border="0" /></a>]]></content:encoded>
    </item>
    <item>
      <title>The story of a un-bindable string</title>
      <link>https://docs.microsoft.com/archive/blogs/saguar/the-story-of-a-in-bindable-string</link>
      <pubDate>Fri, 03 Mar 2017 10:32:14 GMT</pubDate>
      <dc:creator><![CDATA[Saverio Guardato]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/saguar/?p=125</guid>
      <description><![CDATA[Prologue
Few days ago I was working on a simple WPF application using all the best practices I’ve...]]></description>
      <content:encoded><![CDATA[<h1><span style="color: #4f81bd"><span></span><span style="font-weight: bold">Prologue</span></span></h1>
<span style="font-size: medium">Few days ago I was working on a simple WPF application using all the best practices I’ve learned during these years: </span>
<ul>
 	<li>
<p align="justify"><span style="font-size: medium">Singleton</span></p>
</li>
 	<li>
<p align="justify"><span style="font-size: medium">Code grouping</span></p>
</li>
 	<li>
<p align="justify"><span style="font-size: medium">Inversion of Control</span></p>
</li>
 	<li>
<p align="justify"><span style="font-size: medium">Mvvm pattern</span></p>
</li>
 	<li>
<p align="justify"><span style="font-size: medium">Properties binding</span></p>
</li>
</ul>
<span style="font-size: medium">but at some point I faced with an issue that made me crazy! </span>
<h1 align="justify"><span style="color: #4f81bd"><span></span><span style="font-weight: bold">The problem</span></span></h1>
<p align="justify"><span style="font-size: medium">In my simple application I had to load a list of words from a file and then show them into a simple list, giving the possibility to the user to change one of these words by clicking a “Edit” button. </span><span style="font-size: medium">I know… You are thinking “come on! this is the simplest exercise I’ve ever done using <em>Mvvm</em> Pattern! What’s wrong with this?” Okay, let me explain it showing you some screenshots: This is the code I wrote in <em>XAML</em> page for the list </span></p>
<p align="justify"><a href="https://msdnshared.blob.core.windows.net/media/2017/03/image19.png"><span></span></a><span><a href="https://msdnshared.blob.core.windows.net/media/2017/03/image20.png"><span><img width="524" height="179" title="image" class="aligncenter" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/03/image_thumb19.png" border="0" /></span></a></span></p>
<p align="justify"><span style="font-size: medium">As you may notice I’ve used a simple <em>ListView</em> with a binded <em>ItemSource</em> (I’m not showing you the details of the <em>Mvvm</em> implementation since it doesn’t matter) and I’ve defined a simple <em>DataTemplate</em> for the list items. </span></p>
<p align="justify"><span style="font-size: medium">Note: since the <strong><em>MyStringList</em></strong> object is an <strong><em>ObservableCollection&lt;string&gt;</em></strong> I binded the <strong><em>Text</em></strong> property of my <strong><em>TextBox</em></strong> items to the object itself (.) with a <strong><em>Mode=Two-way</em></strong> behavior. </span><span style="font-size: medium">Nothing special, right? Okay… this is the result when I run the application:</span></p>
<a href="https://msdnshared.blob.core.windows.net/media/2017/03/image21.png"><img width="408" height="288" title="image" class="aligncenter" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/03/image_thumb20.png" border="0" /></a><span style="font-size: medium"> My first thoughts: </span>
<ul>
 	<li><span style="font-size: medium">is the list correctly initialized? </span></li>
 	<li><span style="font-size: medium">is the binding process working? </span></li>
 	<li><span style="font-size: medium">am I using a “raisable” object? </span></li>
</ul>
<span style="font-size: medium">So I started <strong>debugging</strong> the View Model initialization to be sure that the <em>ObservableCollection</em> was correctly instantiated and then I checked in the View’s code behind that the <strong><em>DataContext</em></strong> property was correctly setted. All was fine… To be sure about the binding process I decided to remove the <em>Mode=TwoWay</em> from the Binding definition, just to see if the values were at least showed in read-only mode. </span><a href="https://msdnshared.blob.core.windows.net/media/2017/03/image22.png"><img width="412" height="290" title="image" class="aligncenter" style="padding-top: 0px;padding-left: 0px;padding-right: 0px;border-width: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/03/image_thumb21.png" border="0" /></a><span style="font-size: medium"> And… I was totally confused! What's wrong with that code? Why binding a string is not working with the <em>TwoWay mode</em>? Here a quick video to show it: </span>

[video width="1836" height="868" mp4="https://msdnshared.blob.core.windows.net/media/2017/03/repro-steps.mp4"][/video]
<h1 align="justify"><span style="color: #4f81bd"><span></span><span style="font-weight: bold">Eureka!</span></span></h1>
<span style="font-size: medium">After a quick chat with <a target="_blank" href="https://blogs.msdn.microsoft.com/nicold/">a colleague</a> he suggested to me to encapsulate that string in a container object, and bind the property to <strong><em>Container.Value </em></strong>instead of the value itself, because the binding problem could be related to the code notation:</span>
<blockquote>{Binding Path=., Mode=TwoWay}</blockquote>
<span style="font-size: medium">As a result of this test, the bi-directional binding was now working… for an unexplainable reason:</span>
<ul>
 	<li><span style="font-size: medium">binding the <em>Text</em> property to a string variable <strong>DOES NOT WORK in TwoWay</strong></span></li>
 	<li><span style="font-size: medium">binding the <em>Text </em>property to a <strong><em>Value</em></strong> field (of string type) inside a container object<strong> WORKS in TwoWay</strong></span></li>
</ul>
<span style="font-size: medium">Honestly I have no idea if it’s a bug/problem or it’s just something wrong with my approach, by the way I decided to define a <strong><em>BindableObject</em></strong> class in order to bypass this issue.</span>
<h1><span style="color: #4f81bd;font-weight: bold">The solution</span></h1>
<span style="font-size: medium">Since this issue made me mad for 45 minutes, I decided to implement an <em>efficient</em> and <em>reusable</em> solution! </span>

<a href="https://msdnshared.blob.core.windows.net/media/2017/03/image23.png"><img width="627" height="284" title="image" class="aligncenter" style="float: none;padding-top: 0px;padding-left: 0px;margin-left: auto;padding-right: 0px;margin-right: auto;border: 0px" alt="image" src="https://msdnshared.blob.core.windows.net/media/2017/03/image_thumb22.png" border="0" /></a>

<span style="font-size: medium">As a result of this experience, I’ve coded a <strong><em>BindableObject&lt;T&gt;</em></strong> container class which can be used with any property type (simple or complex), and since the object itself implements the <strong><em>INotifyPropertyChanged</em></strong> interface, the contained property will raise a <em>changed</em> event for binding. </span>

<span style="font-size: medium">So the new line of code for binding a value to the <em>Text</em> property would be:</span>
<blockquote>&lt;TextBox Text="{Binding Path=Value, Mode=TwoWay}" /&gt;</blockquote>
<span style="font-size: medium">In addition to the <strong><em>Value</em></strong> property, which is the <em>core</em> objective of this utility class, I’ve also added a <em><strong>OldValue</strong></em> property (which is automatically set when the <em>Value </em>property changes) and a <strong><em>FormattedValue </em></strong>property which would return a formatted version of the <em>Value </em>property itself (the formatting method must be implemented and customized). </span>

And here's another quick video with the working solution:

[video width="1836" height="868" mp4="https://msdnshared.blob.core.windows.net/media/2017/03/works-repro-steps.mp4"][/video]
<h1 align="justify"><span style="color: #4f81bd;font-weight: bold">Conclusion</span></h1>
<p align="justify"><span style="font-size: medium">I have uploaded the code of this helper object to my <a target="_blank" href="https://github.com/saguar/saguar-blog-code">Github repository</a> and additionally I’ve created a <a target="_blank" href="https://www.nuget.org/packages/Saguar.MvvmUtils.PCL/">Nuget package</a> for this and all the future helpers/utilities I usually use for Mvvm projects.</span></p>
<p align="justify"><span style="color: #ff0000"><strong>Update (16/03/2017)</strong></span></p>
<p align="justify">As suggested by Tyrrrz in a comment, this issue could be related to the immutable behavior of the string type (as also described in the <a href="https://msdn.microsoft.com/en-us/library/362314fe.aspx">official documentation</a>), so whereas binding a single string property to a TextBox works (probably because after the RaisePropertyChanged event the <em>Text </em>property of the component uses the new string object reference) if you define a <em>List </em>of strings then the <em>TextBoxe(</em>s) inside the <em>ListView</em> would always refer to the original string objects (whose value is not changing).</p>]]></content:encoded>
    </item>
  </channel>
</rss>