<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Blogs @ UGIdotNET</title><link>http://blogs.ugidotnet.org/MainFeed.aspx?GroupID=2</link><description>Bloggers UGIdotNET</description><generator>Subtext Version 2.6.0.0</generator><item><title>This blog has been moved&amp;hellip;</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2012/01/29/this-blog-has-been-movedhellip.aspx</link><pubDate>Sun, 29 Jan 2012 14:55:39 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2012/01/29/this-blog-has-been-movedhellip.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/100738.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/100738.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2012/01/29/this-blog-has-been-movedhellip.aspx#comment</comments><slash:comments>8</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/100738.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">This blog has been moved&amp;hellip;</source><description>&lt;p&gt; &lt;/p&gt;  &lt;p&gt;This is my new blog:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;font size="3"&gt;&lt;a href="http://andrea-angella.blogspot.com/"&gt;Andrea Angella – Official Blog&lt;/a&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;Hello everybody,&lt;/p&gt;  &lt;p&gt;It is time for me to have my personal space.&lt;/p&gt;  &lt;p&gt;There are many reasons and you can find a description in the following post:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://andrea-angella.blogspot.com/2012/01/my-new-official-blog.html" href="http://andrea-angella.blogspot.com/2012/01/my-new-official-blog.html"&gt;http://andrea-angella.blogspot.com/2012/01/my-new-official-blog.html&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;This is not certainty an goodbye because I will continue to follow all the Italian community as I always did and help DotNetToscana to grow.&lt;/p&gt;  &lt;p&gt;I hope that this will be the opportunity to blog more and that some of you will subscribe to my new feed:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://feeds.feedburner.com/AndreaAngella-OfficialBlog" href="http://feeds.feedburner.com/AndreaAngella-OfficialBlog"&gt;http://feeds.feedburner.com/AndreaAngella-OfficialBlog&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Thanks a lot to &lt;a href="http://www.ugidotnet.org/"&gt;UgiDotNet&lt;/a&gt; for all these yeas of service&lt;/p&gt;  &lt;p&gt;Regards&lt;/p&gt;  &lt;p&gt;Andrea&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/100738.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>No, NSK is not (about) Northwind</title><link>http://blogs.ugidotnet.org/mrbrightside/archive/2012/01/10/no-nsk-is-not-about-northwind.aspx</link><pubDate>Tue, 10 Jan 2012 12:17:30 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/mrbrightside/archive/2012/01/10/no-nsk-is-not-about-northwind.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/mrbrightside/comments/100688.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/mrbrightside/comments/commentRss/100688.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/mrbrightside/archive/2012/01/10/no-nsk-is-not-about-northwind.aspx#comment</comments><slash:comments>56</slash:comments><trackback:ping>http://blogs.ugidotnet.org/mrbrightside/services/trackbacks/100688.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/mrbrightside/rss.aspx">No, NSK is not (about) Northwind</source><description>&lt;p&gt;So it seems my &lt;a href="http://nsk.codeplex.com/"&gt;pet project&lt;/a&gt; &lt;a href="http://goo.gl/W3GQc"&gt;has been Ayende-ified&lt;/a&gt;; Oren has been so kind to let me have a preview at his posts and that urged me to talk a bit about what NSK is and what it is aimed for.&lt;/p&gt;  &lt;p&gt;I started NSK in 2004 in order to have a “one size fits all” demo for the talks and classes I and my colleagues at &lt;a href="http://www.manageddesigns.it/"&gt;Managed Designs&lt;/a&gt; were holding; all I wanted was a way to showcase topics such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How an O/RM works (Unit of Work, proxies, queries &amp;amp; fetch plan management, …) &lt;/li&gt;    &lt;li&gt;How to implement common presentation design patterns (MVC, MVP, …) &lt;/li&gt;    &lt;li&gt;How to unit test code &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Other than having that demo, I also wanted to make everyone able to have it up &amp;amp; running as frictionless as possible, so I:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Made it open source (choosing IBM’s OSI-approved Common Public License) and &lt;a href="http://sourceforge.net/projects/nsk/files/"&gt;downloadable from Sourgeforge&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Had it use the “ubiquitous” Northwind database &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;I knew from the start that such a db would have impaired my ability to design an effective &lt;strong&gt;Domain Model&lt;/strong&gt;, but I didn’t care ‘cause that was code that I was expected to show (and comment), and not targeted to the casual downloader. &lt;/p&gt;  &lt;p&gt;Let’s just have an example: in order to allow me to explain how an O/RM works and avoid early adopters (remember, we are talking about year 2004/2005) fear for “O/RMs black magic”, I defined both a &lt;strong&gt;IUnitOfWork&lt;/strong&gt; interface and my own &lt;em&gt;query object&lt;/em&gt;, and then implemented both delegating the real work to &lt;strong&gt;NHibernate&lt;/strong&gt;. I even implemented proxies for a couple of entities in order to show how O/RMs manage concurrency. Frankly, I did not pay much attention to my implementation of UoW/query object/proxies, because that implementation wasn’t neither expected to go live in a “production” system nor looked at as an advice to encapsulate an O/RM. That “poor man’s” O/RM, let me stress about that, was only meant to allow me to talk about how an O/RMs works without having to resort to NHibernate source, which IMHO would have been overkill. And when &lt;strike&gt;DLINQ&lt;/strike&gt; &lt;strong&gt;Linq 2 SQL&lt;/strong&gt; came to us, I renamed the &lt;strong&gt;IUnitOfWork&lt;/strong&gt; interface to &lt;strong&gt;IDataContext&lt;/strong&gt; in order to better adhere to .NET’s emerging jargon: again, I was only trying to have a “companion demo” which fitted my own presenting needs so, when the “pioneering era of O/RM” relating to the .NET community ended (which, IMHO, happened with Microsoft releasing L2SQL and then EF) I considered my “introduce O/RMs by explaining the inner workings” strategy obsolete, made a branch for those still interested in having a look to that code and had NSK switched to the LINQ side of the Force.&lt;/p&gt;  &lt;p&gt;And then came the &lt;a href="http://goo.gl/58173"&gt;book&lt;/a&gt; (to which, BTW, both me and &lt;a href="http://weblogs.asp.net/despos/"&gt;Dino&lt;/a&gt; refer to as “the brick” &amp;lt;g&amp;gt;): we needed a companion demo, and ultimately chose to use NSK so I had to fit into the codebase a bunch of samples covering nearly all the book’s topics, such as:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;The book talks about IoC and unit testing, so I ended implementing custom factories for both ASP.NET MVC (which at the time was in the “v1 beta” timeframe) and WCF in order to inject dependencies and/or mock objects &lt;/li&gt;    &lt;li&gt;the book talks about validation and we wanted to show the capabilities of Enterprise Library’s Validation Application Block (which I still think is pretty gorgeous), so I did put in demos using both the custom attributes and the xml rulesets to validate the domain model &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Again, the codebase was intended to be looked at while being guided by the book and not as a fully fledged application (please note that NSK &lt;a href="http://nsk.codeplex.com/releases"&gt;still does not sport a release&lt;/a&gt;) or as an example of how to implement a Domain Model. If you look to NSK this way, you will find a lot of thing you would do very differently in a “real” application. Just to make an example: you have a look at the &lt;strong&gt;CalculateTotalIncome()&lt;/strong&gt; method of the &lt;strong&gt;Customer&lt;/strong&gt; class and find the following, pretty sub-optimal, code:&lt;/p&gt;  &lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;   &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;     &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; CalculateTotalIncome()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     Contract.Ensures(Contract.Result&amp;lt;&lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt;&amp;gt;()&amp;gt;=0);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; income = &lt;span style="color: #0000ff"&gt;this&lt;/span&gt;.Orders.Sum(o =&amp;gt; o.CalculatePrice());&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; income;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;In a “real world” application, should the evaluation of the total income be a mere sum, I’d have the O/RM generating a proper query. But, for the sake of the project, I only wanted both a mockable customer repository and the above shown method in order to set up a unit testing demo for the following service:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;virtual&lt;/span&gt; &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; CalculateSuggestedDiscountRate(&lt;span style="color: #0000ff"&gt;string&lt;/span&gt; customerId)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt;     Contract.Requires&amp;lt;ArgumentNullException&amp;gt;(customerId != &lt;span style="color: #0000ff"&gt;null&lt;/span&gt;, &lt;span style="color: #006080"&gt;"customerId"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     Contract.Requires&amp;lt;ArgumentException&amp;gt;(!&lt;span style="color: #0000ff"&gt;string&lt;/span&gt;.IsNullOrWhiteSpace(customerId), &lt;span style="color: #006080"&gt;"customerId"&lt;/span&gt;);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     Customer customer = customerRepository.FindById(customerId);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; income = customer.CalculateTotalIncome();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; discount = 0;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;if&lt;/span&gt; (income &amp;gt; 5000)&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;         &lt;span style="color: #008000"&gt;//Suggests a 6% discount if income&amp;gt;5000USD&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;         discount = 0.06M;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum14"&gt;  14:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;else&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum15"&gt;  15:&lt;/span&gt;     {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum16"&gt;  16:&lt;/span&gt;         &lt;span style="color: #008000"&gt;//Suggests a 1% discount for every 1000USD of income&lt;/span&gt;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum17"&gt;  17:&lt;/span&gt;         discount = income / 100000;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum18"&gt;  18:&lt;/span&gt;     }&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum19"&gt;  19:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;return&lt;/span&gt; discount;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum20"&gt;  20:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;This way, I could write down the following test:&lt;/p&gt;

&lt;div style="border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: 'Courier New', courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px" id="codeSnippetWrapper"&gt;
  &lt;div style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px" id="codeSnippet"&gt;
    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum1"&gt;   1:&lt;/span&gt; [TestMethod]&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum2"&gt;   2:&lt;/span&gt; &lt;span style="color: #0000ff"&gt;public&lt;/span&gt; &lt;span style="color: #0000ff"&gt;void&lt;/span&gt; Test_Calculation_Of_Suggested_Discount_Rate_For_Customers_With_Total_Income_Of_Less_Than_5000_Dollars()&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum3"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum4"&gt;   4:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt; generatedIncome = 3500;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum5"&gt;   5:&lt;/span&gt;     &lt;span style="color: #0000ff"&gt;string&lt;/span&gt; customerId = &lt;span style="color: #006080"&gt;"FAKE1"&lt;/span&gt;;&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum6"&gt;   6:&lt;/span&gt;     var custMockBuilder = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Mock&amp;lt;Customer&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum7"&gt;   7:&lt;/span&gt;     custMockBuilder.Setup(c =&amp;gt; c.CalculateTotalIncome()).Returns(generatedIncome);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum8"&gt;   8:&lt;/span&gt;     var repoMockBuilder = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; Mock&amp;lt;ICustomerRepository&amp;gt;();&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum9"&gt;   9:&lt;/span&gt;     repoMockBuilder.Setup(r =&amp;gt; r.FindById(customerId)).Returns(custMockBuilder.Object);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum10"&gt;  10:&lt;/span&gt;  &lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum11"&gt;  11:&lt;/span&gt;     MarketingServices svc = &lt;span style="color: #0000ff"&gt;new&lt;/span&gt; MarketingServices(repoMockBuilder.Object);&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum12"&gt;  12:&lt;/span&gt;     Assert.AreEqual&amp;lt;&lt;span style="color: #0000ff"&gt;decimal&lt;/span&gt;&amp;gt;(0.035M, svc.CalculateSuggestedDiscountRate(customerId));&lt;/pre&gt;
&lt;!--CRLF--&gt;

    &lt;pre style="border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: white; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: 'Courier New', courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px"&gt;&lt;span style="color: #606060" id="lnum13"&gt;  13:&lt;/span&gt; }&lt;/pre&gt;
&lt;!--CRLF--&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;To cut a long story short: the reader should look neither at the &lt;strong&gt;CalculateTotalIncome&lt;/strong&gt; nor at the &lt;strong&gt;CalculateSuggestedDiscountRate&lt;/strong&gt; service &lt;em&gt;per se&lt;/em&gt;, but at the unit test. Think about it as a &lt;strong&gt;MSTest&lt;/strong&gt; + &lt;strong&gt;Moq&lt;/strong&gt; demo, and maybe you’ll get the picture I wanted to give to the reader. Being the code targeted at someone who has attended a class/talk or read the book, I thought there was no way to have someone misunderstanding the scope of the project.&lt;/p&gt;

&lt;p&gt;The same goes for the domain model at large: if you take a look at it, you’ll notice that aggregates encapsulation is pretty low; I just managed to:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;define an aggregate root abstraction (the &lt;strong&gt;IAggregateRoot&lt;/strong&gt; interface), and built an eco-system aware of it (i.e. the repositories which uses IAggregateRoot explicit implementation and code contracts to enforce domain logic) &lt;/li&gt;

  &lt;li&gt;have the aggregate roots implement factories in order to prevent bad instantiation to happen (builder pattern anyone?) &lt;/li&gt;

  &lt;li&gt;encapsulate some navigation properties having the domain model “users” forced to use domain logic (i.e. the, &lt;strong&gt;AddProduct&lt;/strong&gt; method of the &lt;strong&gt;Order&lt;/strong&gt; entity which is the only way to add a product to the order… or avoiding that, from a domain logic perspective) &lt;/li&gt;

  &lt;li&gt;added a bunch of domain services (i.e.: &lt;strong&gt;GetRelatedProducts&lt;/strong&gt;, &lt;strong&gt;CalculateSuggestedDiscountRate&lt;/strong&gt;, …) in order to show the differences lying in implementing domain logic within the model and/or by means of services &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Again, that was enough for my own needings; demo after demo, technology after technology (code contracts, entity framework POCO mapping, jquery, MVVM) NSK grew up and nearly became the “one size fits all” demo I needed in my talks. Up to late 2010/early 2011, I only managed to update NSK in order to remain useful for my own needings. &lt;/p&gt;

&lt;p&gt;All of a sudden, though, “developing” NSK wasn’t fun anymore so I settled down and asked myself what I wanted to do with it; my answer was: “make it a real application under the form of an Amazon-like e-commerce web site”. That would have justified the complexity DDD kicks in and also (hopefully) make the project a foundation for solutions we build at &lt;a href="http://www.manageddesigns.it/"&gt;Managed Designs&lt;/a&gt;. I opted to go for the CQRS way and started focusing of the front-end: so I quickly implemented a read model and started implementing a couple of user stories only to define a structure for the project (architecture, file system, NuGet-based pre build actions, …), only to discover that such a project is too much of an effort for a single person which is going to develop it in his spare time, so I contacted &lt;a href="http://nsk.codeplex.com/team/view"&gt;a bunch of friends&lt;/a&gt; in order to ask for their support. Then we stopped committing code and &lt;a href="http://goo.gl/cKtk7"&gt;started writing down the user stories&lt;/a&gt; that will lead our effort from now on.&lt;/p&gt;

&lt;p&gt;That’s why the read model and the domain model appear so similar, being the former a mere database reverse engineering and the latter the model that fitted my own “demoing” needings, but we’ll remove this model (and other code, such as the repositories) as soon as we’ll have the new ones, which will emerge from the user stories. Remember that I *still* need demoes for my talks, so I won’t be able to remove “demoable” code until when I have a replacement for it. The nice part is that we &lt;u&gt;think&lt;/u&gt; that the new model will be composed by “real” aggregates and that we’ll switch from SQL server to a NoSQL database, so the “R” and “C” parts are going to be pretty different.&lt;/p&gt;

&lt;p&gt;At this very moment, being the “code writing” on a hiatus, the only code I would recommend a casual downloader to look at is the stack that shows the recommended projects onto the home page, which picks the products following the following strategy: “&lt;em&gt;Given all products-&amp;gt;Choose the ones we are selling (which, of course, aren’t all the products we have in the db)-&amp;gt;Then select only the available ones-&amp;gt;Let’s pick up the projection we need within this view&lt;/em&gt;”. That happens picking them (the products) by means of an expression tree that is composed while goin’ up the application stack: that’s an idiom we at &lt;a href="http://www.manageddesigns.it/"&gt;Managed Designs&lt;/a&gt; nicknamed &lt;strong&gt;LET&lt;/strong&gt; (which stands for &lt;em&gt;Layered Expression Trees&lt;/em&gt;) and we think that it’s a pretty powerful idiomatic way to express logic in a DDD context. I’ll talk about it at the &lt;a href="http://ugialt.net/"&gt;next local ALT.net event&lt;/a&gt;, and dedicate soon a blog post to it.&lt;/p&gt;

&lt;p&gt;To sum it up: if you’re looking for a sample application, you’d better search for a project sporting a release version (which is &lt;a href="http://nsk.codeplex.com/releases"&gt;something NSK still doesn’t&lt;/a&gt;) or, at least, wait for we to implement some more user stories in order to allow the whole design to consolidate. In the meantime, the project can still be looked at in order to take advantage of some “pills” you could be interested in for your projects, such as:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;JQueryUI&lt;/strong&gt; integration with ASP.NET MVC (i.e.: the DateTime partial view implemented for both &lt;strong&gt;WebFormsEngine&lt;/strong&gt; and &lt;strong&gt;Razor&lt;/strong&gt; engine) &lt;/li&gt;

  &lt;li&gt;MVC and WCF custom factories &lt;/li&gt;

  &lt;li&gt;NuGet-based pre build actions in order to easen you first “compile&amp;amp;run” (for those using the recently released v1.6 of NuGet, I’d recommend to have a look at the “package restore” feature) &lt;/li&gt;

  &lt;li&gt;Code Contracts aware IRepository interface (don’t focus on actual designs: the real meat lies in having IAggregateRoot + code contracts enforcing your validation even when application code “forgets” to do domain object validation) &lt;/li&gt;

  &lt;li&gt;&lt;strong&gt;Rss&lt;/strong&gt; and &lt;strong&gt;Atom&lt;/strong&gt; custom &lt;strong&gt;ActionResult&lt;/strong&gt;s for ASP.NET MVC, taking advantage of framework’s built-in serializers &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s all code you can use (and refactor to satisfy your own needings) due to the license chosen. Enjoy NSK!&lt;/p&gt;

&lt;p&gt;P.S.: I know, project’s description on Codeplex sucks bad. Mea culpa: I’ll fix it ASAP.&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/mrbrightside/aggbug/100688.aspx" width="1" height="1" /&gt;</description><dc:creator>Andrea Saltarello</dc:creator></item><item><title>Windows Phone Camp in London</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/31/windows-phone-camp-in-london.aspx</link><pubDate>Wed, 31 Aug 2011 21:24:53 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/31/windows-phone-camp-in-london.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/100314.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/100314.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/31/windows-phone-camp-in-london.aspx#comment</comments><slash:comments>7</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/100314.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">Windows Phone Camp in London</source><description>&lt;p&gt;Next 17 September will be a full immersion day of Windows Phone 7 Mango &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Sorriso" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/Windows-Live-Writer/2a10cd367d12_13A6A/wlEmoticon-smile_2.png" /&gt;    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/Windows-Live-Writer/2a10cd367d12_13A6A/image_2.png" rel="lightbox"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="image" border="0" alt="image" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/Windows-Live-Writer/2a10cd367d12_13A6A/image_thumb.png" width="682" height="245" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/100314.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Unit Test Lab il 24 Settembre 2011 &amp;ndash; Tenetevi pronti</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/12/unit-test-lab-il-24-settembre-2011-ndash-tenetevi-pronti.aspx</link><pubDate>Fri, 12 Aug 2011 21:06:19 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/12/unit-test-lab-il-24-settembre-2011-ndash-tenetevi-pronti.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/100267.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/100267.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2011/08/12/unit-test-lab-il-24-settembre-2011-ndash-tenetevi-pronti.aspx#comment</comments><slash:comments>24</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/100267.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">Unit Test Lab il 24 Settembre 2011 &amp;ndash; Tenetevi pronti</source><description>&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/Windows-Live-Writer/Unit-Test-Lab-il-24-SettembreTenetevi-pr_13305/dotnettoscana_hight_resolution_4.png" rel="lightbox"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 8px 15px 0px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top: 0px; border-right: 0px; padding-top: 0px" title="dotnettoscana_hight_resolution" border="0" alt="dotnettoscana_hight_resolution" align="left" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/Windows-Live-Writer/Unit-Test-Lab-il-24-SettembreTenetevi-pr_13305/dotnettoscana_hight_resolution_thumb_1.png" width="159" height="159" /&gt;&lt;/a&gt;    &lt;br /&gt;    &lt;br /&gt;Ciao a tutti,    &lt;br /&gt;appena prima delle meritate vacanze estive &lt;a href="http://www.dotnettoscana.org/"&gt;&lt;strong&gt;DotNetToscana&lt;/strong&gt;&lt;/a&gt;&lt;strong&gt; &lt;/strong&gt;vuole rivelare alcuni dettagli del prossivo evento laboratorio.&lt;/p&gt;  &lt;p&gt;La data à già stata fissata a &lt;strong&gt;Sabato 24 Settembre 2011&lt;/strong&gt; mentre il luogo deve ancora essere confermato.&lt;/p&gt;  &lt;p&gt;Il laboratorio sarà guidato da&lt;strong&gt; &lt;/strong&gt;&lt;a href="http://blogs.ugidotnet.org/bmatte/Default.aspx"&gt;&lt;strong&gt;Matteo Baglini&lt;/strong&gt;&lt;/a&gt; mentre gli altri membri dello staff forniranno supporto tecnico ai partecipanti.&lt;/p&gt;  &lt;p&gt;   &lt;br /&gt;    &lt;br /&gt;    &lt;br /&gt;Segue una breve descrizione dell’evento:&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Uno degli aspetti più controversi dello sviluppo software è sicuramente il test.     &lt;br /&gt;Pratica da molti reputata importante per ottenere un software di qualità ma allo stesso tempo snobbata.      &lt;br /&gt;La realtà è che gli sviluppatori preferiscono progettare e realizzare il software piuttosto che testarlo lasciando quest'ultimo compito al team di tester.      &lt;br /&gt;Esistono molteplici tipologie di test, lo Unit Test è uno di questi e rappresenta uno strumento importante per i tester, ma soprattutto per gli sviluppatori.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Durante questo laboratorio potrai provare con mano la pratica dello Unit Test e trovare risposta alle tipiche domande: perchè, come e quando effettuare Unit Test.     &lt;br /&gt;Imparerai i principi che guidano lo Unit Test passando dalla teoria alla pratica, applicando questa tecnica in svariati contesti.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Maggiori dettagli seguiranno alla fine del mese,&lt;/p&gt;  &lt;p&gt;Buone vacanze a tutti,&lt;/p&gt;  &lt;p&gt;Vi aspettiamo,&lt;/p&gt;  &lt;p&gt;Andrea&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/100267.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>101 Ways to Motivate Yourselft and Others &amp;ndash; My favourites</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2011/07/23/101-ways-to-motivate-yourselft-and-others-ndash-my-favourites.aspx</link><pubDate>Sat, 23 Jul 2011 16:23:36 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2011/07/23/101-ways-to-motivate-yourselft-and-others-ndash-my-favourites.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/100230.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/100230.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2011/07/23/101-ways-to-motivate-yourselft-and-others-ndash-my-favourites.aspx#comment</comments><slash:comments>9</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/100230.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">101 Ways to Motivate Yourselft and Others &amp;ndash; My favourites</source><description>&lt;p&gt;Recentely &lt;a href="http://sourcesofinsight.com/"&gt;Sources of Insight&lt;/a&gt; published a really interesting post: &lt;a href="http://sourcesofinsight.com/2011/07/13/101-ways-to-motivate-yourself-and-others/"&gt;101 Ways to Motivate Yourselft and Others&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;As a reminder, I would like to write the points I considere more important for me and where I want to work.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Act on your inspiration&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Use your best energy for your best results”&lt;/li&gt;      &lt;li&gt;"Your passion can expire, if you wait too long or miss the window of opportunity”&lt;/li&gt;      &lt;li&gt;“A common way to kill idea or momentum is to spread them out over time, or keep pushing them out”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Be a coach, not a critic&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Use your inner coach for constructive feedback, and give your inner-critic a break”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Be on fire&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“You know when you’re on fire. You kno what you’re like when you’re in the zone and you’re fully engaged and you’re at your best. Sometimes, the easiest way to get back to this mode is to simply remember what if feels like”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Be YOUR best&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Compete with yourselft and make it a game”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Build your band of merry men&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Surround yourself with the people that inspire and deligh you, wherever you go”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Change the frame, to change your game&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Problems aren’t problems when you reframe them as challenges. Challenges are opportunities for growth, excellence and your personal best”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Chart your progress&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“If you want to motivate, find a way to keep the score. Progress is the top motivator of performance. Even incremental progress boosts motivation”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Choose significant tasks that are meaningful for you&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“If you like excellence, then challenge yourself to shine”.&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Create a wall of inspiration&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Put those pictures up that show you the greates things in life and what’s possible. Get those hopes and dreams up on the wall that remind you what’s worth fighting for.”&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;“Put those wards on the wall and quotable quotes that fire you up and make you feel alive”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Decide&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Nothing builds momentum like decisive action. Just Decide.Decisive action is motivation, it build momentum and it crowds out excuses”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Do worst things first&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Don’t let things loom over you. Once they’re out of the waym the rest is a glide-path”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Don’t let feat stop you&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“A great way to conquer fear is to put the fears on the table and find a way to take away the thread or prepare for the worst case scenario”&lt;/li&gt;      &lt;li&gt;“The only thing we have to fear is fear itself”, Roosevelt&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Don’t be perfectionist&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Perfection is a fallacy and it’s over-rated. A better focus is to be effective. Make it work, then make it right. Think of perfection as a process of improvement.”&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;“Focus on good enough for now. and satisfice”.&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;“Taking action is a key way to stay out of analysis paralysis, and keep your motivation strong. Don’t worry about the perfect place to start, just start”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Don’t look for execuse&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Don’t take yourselft too seriously&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Build your sense of humor”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Eat, sleep and exercise on a cadence&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Your cadence will serve you emotionally, mentally and physically”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Find your “one thing”&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“One thing matters to you most. Do more of that. That’s the thing to focus on”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Finish faster&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“The faster you finish, the more you will finish. The more you finish, the easier it gets”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Focus on what you want&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Get a clear and compelling picture of what you do want and focus on that”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Play your favorite music&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Play the songs that make your spirit soar”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Reming yourself how short life is&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“One way to give your fall is to remember that nothing lasts forever”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Set a deadline&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Knowing when something is due can help you funnel and focus your action and attention”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Set extreme goals&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“Sometimes goals have to be extreme to feel worth it. Dream big. Set crazy limits or hurdles”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;Want it with a passion&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;“Nothing beats the pursuit of a worhy and compelling objective”&lt;/li&gt;   &lt;/ul&gt;    &lt;li&gt;&lt;strong&gt;Keep in mind that knowing and doing are two different things&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;&lt;strong&gt;“You hold the keys to unleashing what you’re capable of”&lt;/strong&gt;&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/100230.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Jquery with mvc3</title><link>http://blogs.ugidotnet.org/cfolini/archive/2011/02/18/jquery-with-mvc3.aspx</link><pubDate>Fri, 18 Feb 2011 01:25:06 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2011/02/18/jquery-with-mvc3.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/99734.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/99734.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2011/02/18/jquery-with-mvc3.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/99734.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Jquery with mvc3</source><description>&lt;p&gt;JQuery has been always an interesting topic, but I didn’t find time to try it… looking into MVC3 finally I get in touch with it.&lt;/p&gt;  &lt;p&gt;I &lt;a href="http://blogs.ugidotnet.org/cfolini/archive/2011/02/17/upgrading-to-asp.net-4.0-amp-mvc-3.aspx" target="_blank"&gt;succeded&lt;/a&gt; in using asp.net engine together with MVC3 in the same web app. &lt;/p&gt;  &lt;p&gt;For some reason global.asax events didn’t fire up, but &lt;a href="http://bytes.com/topic/asp-net/answers/292813-application_start-not-firing-global-asax" target="_blank"&gt;I found&lt;/a&gt; that deleting the file and adding back fixes this problem.PaceSpeedCalculatorModel&lt;/p&gt;  &lt;p&gt;&lt;a href="http://eworldui.net/blog/post/2011/01/07/Using-Razor-Pages-with-WebForms-Master-Pages.aspx" target="_blank"&gt;&lt;strike&gt;I tried&lt;/strike&gt;&lt;/a&gt;&lt;strike&gt; to reuse asp.net master pages, without success. I gave up when I got an error saying that System.Web.Mvc.ViewMasterPage doesn’t derive from the correct class. I‘ll wait when this will be natively supported (MVC4?) or when someone else will discover a workaround.&lt;/strike&gt;&lt;/p&gt;  &lt;p&gt;The solution &lt;a href="http://eworldui.net/blog/post/2011/01/07/Using-Razor-Pages-with-WebForms-Master-Pages.aspx" target="_blank"&gt;proposed&lt;/a&gt; works fine for reusing aspx master pages in a razor view (extensions methods does the magic!!!)&lt;/p&gt;  &lt;p&gt;The goal I want to achieve is a simple conversion between pace and speed (pace is how much minutes and seconds I takes to cross 1km, speed is in km/h).&lt;/p&gt;  &lt;p&gt;So 3 textbox minutes, seconds, speed.&lt;/p&gt;  &lt;p&gt;I created a model for this, with appropriate annotations.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4726d1e6-f92d-4ddb-a960-c919cd5a530e" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;PaceSpeedCalculatorModel.cs&lt;/div&gt; &lt;div style="background: #ddd; max-height: 300px; overflow: auto"&gt; &lt;ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; FitCalc.Models&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    {&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Required&lt;/span&gt;]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;StringLength&lt;/span&gt;(2, MinimumLength = 1)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Display&lt;/span&gt;(Name = &lt;span style="color:#a31515"&gt;"paceMinutes"&lt;/span&gt;)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;RegularExpression&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@"[0-9]{1,2}"&lt;/span&gt;, ErrorMessage = &lt;span style="color:#a31515"&gt;"Minutes must be in the range 00-99"&lt;/span&gt;)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;ScaffoldColumn&lt;/span&gt;(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;(&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;.Text)]&lt;/li&gt; &lt;li&gt;       &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;Range&lt;/span&gt;(0,99)]&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; paceMinutes { &lt;span style="color:#0000ff"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Required&lt;/span&gt;]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;StringLength&lt;/span&gt;(2, MinimumLength = 1)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Display&lt;/span&gt;(Name = &lt;span style="color:#a31515"&gt;"paceSeconds"&lt;/span&gt;)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;RegularExpression&lt;/span&gt;(&lt;span style="color:#a31515"&gt;@"[0-9]{1,2}"&lt;/span&gt;, ErrorMessage = &lt;span style="color:#a31515"&gt;"Seconds must be in the range 00-59"&lt;/span&gt;)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;ScaffoldColumn&lt;/span&gt;(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;(&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;.Text)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Range&lt;/span&gt;(0, 59)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; paceSeconds { &lt;span style="color:#0000ff"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;Required&lt;/span&gt;]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;StringLength&lt;/span&gt;(2, MinimumLength = 1)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;Display&lt;/span&gt;(Name = &lt;span style="color:#a31515"&gt;"speed"&lt;/span&gt;)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;ScaffoldColumn&lt;/span&gt;(&lt;span style="color:#0000ff"&gt;false&lt;/span&gt;)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;(&lt;span style="color:#2b91af"&gt;DataType&lt;/span&gt;.Text)]&lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;Range&lt;/span&gt;(0,99)]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;string&lt;/span&gt; speed { &lt;span style="color:#0000ff"&gt;get&lt;/span&gt;; &lt;span style="color:#0000ff"&gt;set&lt;/span&gt;; }&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;    }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;Well, not really appropriate… It would be better if the DataType was an integer value for minutes and seconds, but I didn’t find the corresponding value (maybe custom, but for now Text is enough).&lt;/p&gt;  &lt;p&gt;Created the controller. I wanted to calculate values either by posting the form data and by doing calculation as you type.&lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:0c0d928d-4bbf-4772-aa97-a6d9b74ca6cc" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;CalculatorController.cs&lt;/div&gt; &lt;div style="background: #ddd; max-height: 300px; overflow: auto"&gt; &lt;ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Web;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Web.Mvc;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; FitCalc.Models;&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; FitCalc.Controllers&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;CalculatorController&lt;/span&gt; : &lt;span style="color:#2b91af"&gt;Controller&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#008000"&gt;// GET: /Calculator/&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;private&lt;/span&gt; &lt;span style="color:#0000ff"&gt;static&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt; _paceSpeed = &lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt;();&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;ActionResult&lt;/span&gt; Index()&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        {&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#008000"&gt;//_paceSpeed.paceMinutes = "1";&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#008000"&gt;//_paceSpeed.paceSeconds = "0";&lt;/span&gt;&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.RazorView(_paceSpeed);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        [&lt;span style="color:#2b91af"&gt;HttpPost&lt;/span&gt;]&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;ActionResult&lt;/span&gt; Index(&lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt; pscm)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        {&lt;/li&gt; &lt;li&gt;            _paceSpeed = pscm;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; RedirectToAction(&lt;span style="color:#a31515"&gt;"Index"&lt;/span&gt;);&lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;        [&lt;span style="color:#2b91af"&gt;HttpPost&lt;/span&gt;]&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;ActionResult&lt;/span&gt; PaceToSpeed(&lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt; pscm)&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (pscm.speed == &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;                pscm.speed = &lt;span style="color:#2b91af"&gt;RunningCalc&lt;/span&gt;.PaceToSpeed(&lt;span style="color:#0000ff"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af"&gt;RunningTime&lt;/span&gt;(pscm.paceMinutes, pscm.paceSeconds)).ToString();&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#0000ff"&gt;else&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#0000ff"&gt;double&lt;/span&gt; speed = 0;&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#2b91af"&gt;RunningTime&lt;/span&gt; rt = &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (&lt;span style="color:#0000ff"&gt;double&lt;/span&gt;.TryParse(pscm.speed, &lt;span style="color:#0000ff"&gt;out&lt;/span&gt; speed))&lt;/li&gt; &lt;li&gt;                    rt = &lt;span style="color:#2b91af"&gt;RunningCalc&lt;/span&gt;.SpeedToPace(speed);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                pscm.paceMinutes = rt.Minutes.ToString();&lt;/li&gt; &lt;li&gt;                pscm.paceSeconds = rt.Seconds.ToString();&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            }&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff"&gt;this&lt;/span&gt;.View(pscm);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;        }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; For the first the Action is “Index”. Being an asp, asp.net folk it takes a moment to understand how the data posted by the form is handled. Normally there will be an Index.asp with the form that post to a Calculate.asp. With MVC the action is the same, differentiated by the “HttpPost” attribute. The first time (Index.asp) the browser uses a GET and calls “public ActionResult Index()”. When you submit the form (Calculate.asp) the browser uses a POST activating the “public ActionResult Index(PaceSpeedCalculatorModel pscm)” method. MVC runtime fills automagically the PaceSpeedCalculatorModel parameter, matching POST payload names with class ones.  &lt;p&gt;Creating the view based on the annotated model class is really easy and everything went smooth.&lt;/p&gt;  &lt;p&gt;   &lt;/p&gt;&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4673832a-9d41-4604-b639-d4eae213f422" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;Index.cshtml&lt;/div&gt; &lt;div style="background: #ddd; max-height: 300px; overflow: auto"&gt; &lt;ol style="background: #ffffff; margin: 0 0 0 3em; padding: 0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="background:#ffff00"&gt;@model &lt;/span&gt;FitCalc.Models.&lt;span style="color:#2b91af"&gt;PaceSpeedCalculatorModel&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000"&gt;src&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="../../Scripts/jquery-1.4.4-vsdoc.js"&lt;/span&gt; &lt;span style="color:#ff0000"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="text/javascript"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000"&gt;src&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="../../Scripts/json2.js"&lt;/span&gt; &lt;span style="color:#ff0000"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="text/javascript"&amp;gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="background:#ffff00"&gt;@{&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    ViewBag.Title = &lt;span style="color:#a31515"&gt;"Index"&lt;/span&gt;;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    Layout = &lt;span style="color:#a31515"&gt;"~/Views/Shared/_Layout.cshtml"&lt;/span&gt;;&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt; &lt;span style="color:#ff0000"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="text/javascript"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;   &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    $(InitPage);&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;function&lt;/span&gt; InitPage()&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    {&lt;/li&gt; &lt;li&gt;    &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;          &lt;span style="color:#0000ff"&gt;var&lt;/span&gt; paceSpeed = { paceMinutes: $(&lt;span style="color:#800000"&gt;"#paceMinutes"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        paceSeconds: $(&lt;span style="color:#800000"&gt;"#paceSeconds"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li&gt;                        speed: $(&lt;span style="color:#800000"&gt;"#speed"&lt;/span&gt;).val()&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    };&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        $(&lt;span style="color:#0000ff"&gt;function&lt;/span&gt; ()&lt;/li&gt; &lt;li&gt;        {   setTimeout(checkSearchChanged, 0.1);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        });&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;function&lt;/span&gt; checkSearchChanged()&lt;/li&gt; &lt;li&gt;        {   &lt;span style="color:#0000ff"&gt;var&lt;/span&gt; currentPaceSpeed = { paceMinutes: $(&lt;span style="color:#800000"&gt;"#paceMinutes"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                paceSeconds: $(&lt;span style="color:#800000"&gt;"#paceSeconds"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li&gt;                speed: $(&lt;span style="color:#800000"&gt;"#speed"&lt;/span&gt;).val()&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            };&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (&lt;span style="color:#0000ff"&gt;true&lt;/span&gt; &amp;amp;&amp;amp;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                ((currentPaceSpeed.paceMinutes)&lt;/li&gt; &lt;li&gt;                &amp;amp;&amp;amp; (paceSpeed.paceMinutes)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &amp;amp;&amp;amp; currentPaceSpeed.paceMinutes != paceSpeed.paceMinutes&lt;/li&gt; &lt;li&gt;                 &amp;amp;&amp;amp; currentPaceSpeed.paceMinutes != &lt;span style="color:#800000"&gt;''&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                  &amp;amp;&amp;amp; currentPaceSpeed.paceMinutes &amp;gt; 0&lt;/li&gt; &lt;li&gt;                  ) &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                || ((currentPaceSpeed.paceSeconds) &amp;amp;&amp;amp; currentPaceSpeed.paceSeconds != paceSpeed.paceSeconds &amp;amp;&amp;amp; currentPaceSpeed.paceSeconds != &lt;span style="color:#800000"&gt;''&lt;/span&gt; &amp;amp;&amp;amp; currentPaceSpeed.paceSeconds &amp;gt; -1) &lt;/li&gt; &lt;li&gt;                || ((currentPaceSpeed.speed) &amp;amp;&amp;amp;  currentPaceSpeed.speed != paceSpeed.speed &amp;amp;&amp;amp; currentPaceSpeed.speed != &lt;span style="color:#800000"&gt;''&lt;/span&gt; &amp;amp;&amp;amp; currentPaceSpeed.speed.replace(&lt;span style="color:#800000"&gt;','&lt;/span&gt;,&lt;span style="color:#800000"&gt;'.'&lt;/span&gt;) &amp;gt; 0) &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;                )&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            {&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#006400"&gt;//alert("ok inizioe");&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; ((currentPaceSpeed.speed) &amp;amp;&amp;amp; (paceSpeed.speed != &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;) &amp;amp;&amp;amp; currentPaceSpeed.speed != paceSpeed.speed)&lt;/li&gt; &lt;li&gt;                {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    &lt;span style="color:#006400"&gt;// if speed changed&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    paceSpeed =&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    { paceMinutes: &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;,&lt;/li&gt; &lt;li&gt;                        paceSeconds: &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;,&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        speed: $(&lt;span style="color:#800000"&gt;"#speed"&lt;/span&gt;).val()&lt;/li&gt; &lt;li&gt;                    };&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                }&lt;/li&gt; &lt;li&gt;                &lt;span style="color:#0000ff"&gt;else&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                {&lt;/li&gt; &lt;li&gt;                    paceSpeed =&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    { paceMinutes: $(&lt;span style="color:#800000"&gt;"#paceMinutes"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li&gt;                        paceSeconds: $(&lt;span style="color:#800000"&gt;"#paceSeconds"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        speed: &lt;span style="color:#0000ff"&gt;null&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                    }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                }&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                &lt;span style="color:#0000ff"&gt;var&lt;/span&gt; jsonString = JSON.stringify(paceSpeed);&lt;/li&gt; &lt;li&gt;                $.ajax(&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                {&lt;/li&gt; &lt;li&gt;                    url: &lt;span style="color:#800000"&gt;'/Calculator/PaceToSpeed'&lt;/span&gt;,&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    type: &lt;span style="color:#800000"&gt;"POST"&lt;/span&gt;,&lt;/li&gt; &lt;li&gt;                    data: jsonString,&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    dataType: &lt;span style="color:#800000"&gt;"json"&lt;/span&gt;,&lt;/li&gt; &lt;li&gt;                    contentType: &lt;span style="color:#800000"&gt;"application/json; charset=utf-8"&lt;/span&gt;,&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    dataFilter: &lt;span style="color:#0000ff"&gt;function&lt;/span&gt;(data, dataType) {&lt;/li&gt; &lt;li&gt;                    &lt;span style="color:#0000ff"&gt;if&lt;/span&gt; (data.indexOf(&lt;span style="color:#800000"&gt;"&amp;lt;!-"&lt;/span&gt;) &amp;gt; 0)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        {&lt;/li&gt; &lt;li&gt;                            &lt;span style="color:#006400"&gt;//alert(data.indexOf("&amp;lt;!-"));&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                            &lt;span style="color:#006400"&gt;//alert(data.substring(0, data.indexOf("&amp;lt;!-")));&lt;/span&gt;&lt;/li&gt; &lt;li&gt;                            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; data.substring(0, data.indexOf(&lt;span style="color:#800000"&gt;"&amp;lt;!-"&lt;/span&gt;));&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        }&lt;/li&gt; &lt;li&gt;                        &lt;span style="color:#0000ff"&gt;else&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; data;&lt;/li&gt; &lt;li&gt;                    },&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    success: &lt;span style="color:#0000ff"&gt;function&lt;/span&gt; (objResult)&lt;/li&gt; &lt;li&gt;                    {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        &lt;span style="color:#0000ff"&gt;var&lt;/span&gt; paceSpeedResult = objResult;&lt;/li&gt; &lt;li&gt;                        &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        $(&lt;span style="color:#800000"&gt;"#speed"&lt;/span&gt;).val(objResult.speed);&lt;/li&gt; &lt;li&gt;                        $(&lt;span style="color:#800000"&gt;"#paceSeconds"&lt;/span&gt;).val(objResult.paceSeconds);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        $(&lt;span style="color:#800000"&gt;"#paceMinutes"&lt;/span&gt;).val(objResult.paceMinutes);&lt;/li&gt; &lt;li&gt;                        paceSpeed = { paceMinutes: $(&lt;span style="color:#800000"&gt;"#paceMinutes"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                            paceSeconds: $(&lt;span style="color:#800000"&gt;"#paceSeconds"&lt;/span&gt;).val(),&lt;/li&gt; &lt;li&gt;                            speed: $(&lt;span style="color:#800000"&gt;"#speed"&lt;/span&gt;).val()&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        };&lt;/li&gt; &lt;li&gt;                        setTimeout(checkSearchChanged, 0.1);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    },&lt;/li&gt; &lt;li&gt;                    error: &lt;span style="color:#0000ff"&gt;function&lt;/span&gt; (objResult)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                    {&lt;/li&gt; &lt;li&gt;                        alert(&lt;span style="color:#800000"&gt;"errore"&lt;/span&gt; + objResult);&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                        setTimeout(checkSearchChanged, 0.1);&lt;/li&gt; &lt;li&gt;                    }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                });   &lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="color:#0000ff"&gt;else&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;                setTimeout(checkSearchChanged, 0.1);&lt;/li&gt; &lt;li&gt;            }&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        }&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    }&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;script&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;h2&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    Index&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;h2&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="background:#ffff00"&gt;@&lt;/span&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; (Html.BeginForm())&lt;/li&gt; &lt;li&gt;{&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.ValidationSummary(&lt;span style="color:#0000ff"&gt;true&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;fieldset&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;legend&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;PaceSpeedCalculatorModel&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;legend&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-label"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.LabelFor(model =&amp;gt; model.paceMinutes)&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-field"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.EditorFor(model =&amp;gt; model.paceMinutes)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.ValidationMessageFor(model =&amp;gt; model.paceMinutes)&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-label"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.LabelFor(model =&amp;gt; model.paceSeconds)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-field"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.EditorFor(model =&amp;gt; model.paceSeconds)&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.ValidationMessageFor(model =&amp;gt; model.paceSeconds)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-label"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.LabelFor(model =&amp;gt; model.speed)&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt; &lt;span style="color:#ff0000"&gt;class&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="editor-field"&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.EditorFor(model =&amp;gt; model.speed)&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.ValidationMessageFor(model =&amp;gt; model.speed)&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;p&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;input&lt;/span&gt; &lt;span style="color:#ff0000"&gt;type&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="submit"&lt;/span&gt; &lt;span style="color:#ff0000"&gt;value&lt;/span&gt;&lt;span style="color:#0000ff"&gt;="Save"&lt;/span&gt; &lt;span style="color:#0000ff"&gt;/&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;p&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;fieldset&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;}&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    &lt;span style="background:#ffff00"&gt;@&lt;/span&gt;Html.ActionLink(&lt;span style="color:#a31515"&gt;"Back to List"&lt;/span&gt;, &lt;span style="color:#a31515"&gt;"Index"&lt;/span&gt;)&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color:#800000"&gt;div&lt;/span&gt;&lt;span style="color:#0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;   &lt;p&gt;Doing calculation as you type it’s a little bit tricky. I found Scott Allen “jQuery for the .NET Developer” video very interesting. Then followed Scott &lt;a href="http://weblogs.asp.net/scottgu/archive/2010/07/27/introducing-asp-net-mvc-3-preview-1.aspx" target="_blank"&gt;post&lt;/a&gt; when he talks about using jquery and JSON to post data to the server. In the sample it wasn’t clear where the JSON.stringify method comes from. To make it work I downloaded Json2.js from &lt;a href="http://www.json.org"&gt;www.json.org&lt;/a&gt; (well, from &lt;a href="https://github.com/douglascrockford/JSON-js" target="_blank"&gt;github&lt;/a&gt; because Json.org wasn’t available). &lt;a href="http://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx" target="_blank"&gt;Here&lt;/a&gt; the solution found in comments.&lt;/p&gt;  &lt;p&gt;With keypress event you didn’t catch all modification to the textbox (say mouse paste), so I switched to &lt;a href="http://geekswithblogs.net/DougLampe/archive/2010/12/21/simple-interactive-search-with-jquery-and-asp.net-mvc.aspx" target="_blank"&gt;this&lt;/a&gt; solution.&lt;/p&gt;  &lt;p&gt;With the previous view, I got what I was looking for. I send and receive JSON data to the PaceToSpeed Action. In the view I send the model JSON encoded with raw HTML.&lt;/p&gt;  &lt;p&gt;@Html.Raw(@Json.Encode(@Model))&lt;/p&gt;  &lt;p&gt;My &lt;a href="http://www.somee.com/" target="_blank"&gt;hoster&lt;/a&gt; append some ad to the HTML stream, so I have to filter it when received by the ajax call using the dataFilter method.&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/99734.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item><item><title>Upgrading to asp.net 4.0 &amp;amp; MVC 3</title><link>http://blogs.ugidotnet.org/cfolini/archive/2011/02/17/upgrading-to-asp.net-4.0-amp-mvc-3.aspx</link><pubDate>Thu, 17 Feb 2011 22:25:39 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2011/02/17/upgrading-to-asp.net-4.0-amp-mvc-3.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/99733.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/99733.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2011/02/17/upgrading-to-asp.net-4.0-amp-mvc-3.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/99733.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Upgrading to asp.net 4.0 &amp;amp; MVC 3</source><description>&lt;p&gt;Time to get my hand dirty with some new web app.&lt;/p&gt;  &lt;p&gt;I setup a new account on &lt;a href="http://fitcalc.somee.com/" target="_blank"&gt;somee&lt;/a&gt;, that hosts asp.net 4 apps for free.&lt;/p&gt;  &lt;p&gt;Uploaded a fresh new “hello world” app created by Visual studio 2010.&lt;/p&gt;  &lt;p&gt;Wanting to make something with asp.net and MVC I configured the web app to also support MVC 3 following instruction foun &lt;a href="http://www.packtpub.com/article/mixing-asp.net-webforms-and-asp.net-mvc" target="_blank"&gt;here&lt;/a&gt;. Nothing fancy, only few steps to get things done.&lt;/p&gt;  &lt;p&gt;To ease this process I created another web app configured as MVC 3 and compared the two. &lt;/p&gt;  &lt;p&gt;So I added references to appropriate assembly (some assembly not found directly, but for System.Web.Mvc.dll under C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll).&lt;/p&gt;  &lt;p&gt;Then modified web.config adding relevant tags.&lt;/p&gt;  &lt;p&gt;Same thing for global.asax.cs, registering filters into the app.&lt;/p&gt;  &lt;p&gt;Also modify the .csproj file and especially add proper ProjectTypeGuids i.e. &lt;/p&gt; &amp;lt;ProjectTypeGuids&amp;gt;{E53F8FEA-EAE0-44A6-8774-FFD645390401};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}&amp;lt;/ProjectTypeGuids&amp;gt;   &lt;p&gt;To start quickly I followed the &lt;a href="http://www.pluralsight-training.net" target="_blank"&gt;pluralsight&lt;/a&gt; training &lt;a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=aspdotnet-mvc3&amp;amp;wmp=true" target="_blank"&gt;video&lt;/a&gt; as suggested by &lt;a href="http://weblogs.asp.net/scottgu/archive/2011/02/08/special-48-hour-offer-free-asp-net-mvc-3-video-training.aspx" target="_blank"&gt;Scott Guthrie&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the /Controllers dir there’s (guess what..) the controllers. Named with the name we choose terminating with a “Controller” string.&lt;/p&gt;  &lt;p&gt;Views are stored under the /Views dir, grouped in a dir named as the controller.&lt;/p&gt;  &lt;p&gt;So if we want to create a “Hello” controller the directory structure will be:&lt;/p&gt;  &lt;p&gt;/Controllers/HelloControlles&lt;/p&gt;  &lt;p&gt;/Views/Hello/Index.cshtml&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:d5fc7490-06e0-4b27-9e17-bd7fa9dbaafe" class="wlWriterEditableSmartContent"&gt; &lt;div style="border: #000080 1px solid; color: #000; font-family: 'Courier New', Courier, Monospace; font-size: 10pt"&gt; &lt;div style="background: #000080; color: #fff; font-family: Verdana, Tahoma, Arial, sans-serif; font-weight: bold; padding: 2px 5px"&gt;HelloController.cs&lt;/div&gt; &lt;div style="background: #ddd; max-height: 500px; overflow: auto"&gt; &lt;ol style="background: #ffffff; margin: 0 0 0 2.5em; padding: 0 0 0 5px;"&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Collections.Generic;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Linq;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Web;&lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;using&lt;/span&gt; System.Web.Mvc;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt; &lt;/li&gt; &lt;li&gt;&lt;span style="color:#0000ff"&gt;namespace&lt;/span&gt; FitCalc.Controllers&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;{&lt;/li&gt; &lt;li&gt;    &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff"&gt;class&lt;/span&gt; &lt;span style="color:#2b91af"&gt;HelloController&lt;/span&gt; : &lt;span style="color:#2b91af"&gt;Controller&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    {&lt;/li&gt; &lt;li&gt;        &lt;span style="color:#008000"&gt;//&lt;/span&gt;&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#008000"&gt;// GET: /Hello/&lt;/span&gt;&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        &lt;span style="color:#0000ff"&gt;public&lt;/span&gt; &lt;span style="color:#2b91af"&gt;ActionResult&lt;/span&gt; Index()&lt;/li&gt; &lt;li&gt;        {&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;            ViewBag.Message = &lt;span style="color:#a31515"&gt;"Welcome to ASP.NET MVC!"&lt;/span&gt;;&lt;/li&gt; &lt;li&gt;            &lt;span style="color:#0000ff"&gt;return&lt;/span&gt; View();&lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;        }&lt;/li&gt; &lt;li&gt; &lt;/li&gt; &lt;li style="background: #f3f3f3"&gt;    }&lt;/li&gt; &lt;li&gt;}&lt;/li&gt; &lt;/ol&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt;  &lt;p&gt;.cshtml is the razor file implementing the view.&lt;/p&gt; The URL for this view is /Hello/Index.    &lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/99733.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item><item><title>NHDay debriefed</title><link>http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/13/nhday.aspx</link><pubDate>Wed, 13 Oct 2010 14:09:42 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/13/nhday.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/mrbrightside/comments/99349.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/mrbrightside/comments/commentRss/99349.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/13/nhday.aspx#comment</comments><slash:comments>3</slash:comments><trackback:ping>http://blogs.ugidotnet.org/mrbrightside/services/trackbacks/99349.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/mrbrightside/rss.aspx">NHDay debriefed</source><description>&lt;p&gt;“Astonishing”: that’s the only way I have to describe how much I enjoyed living the &lt;strong&gt;&lt;a href="http://nhday.eu/"&gt;NHDay&lt;/a&gt;&lt;/strong&gt;: I sincerely thank the staff, the speakers and all attendants for having made possibile such an event. As a “side note”, here are the &lt;a href="http://goo.gl/rJF6"&gt;slides&lt;/a&gt; &amp;amp; &lt;a href="http://downloads.ugidotnet.org/blog/pape/NHDay_demo.zip"&gt;demos&lt;/a&gt; I’ve shown. Ad maiora!&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:aad69712-3ee5-4dc2-84c3-187560288f08" class="wlWriterEditableSmartContent"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/nhday" rel="tag"&gt;nhday&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ORM" rel="tag"&gt;ORM&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/mrbrightside/aggbug/99349.aspx" width="1" height="1" /&gt;</description><dc:creator>Andrea Saltarello</dc:creator></item><item><title>NHDay, as one of the other speakers</title><link>http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/06/nhday-as-one-of-the-other-speakers.aspx</link><pubDate>Wed, 06 Oct 2010 08:12:00 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/06/nhday-as-one-of-the-other-speakers.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/mrbrightside/comments/99322.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/mrbrightside/comments/commentRss/99322.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/mrbrightside/archive/2010/10/06/nhday-as-one-of-the-other-speakers.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://blogs.ugidotnet.org/mrbrightside/services/trackbacks/99322.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/mrbrightside/rss.aspx">NHDay, as one of the other speakers</source><description>&lt;p&gt;In real life, you are not allowed to drive a car without a licence: that’s both for your own and other’s safety. In our dev life, we can start using O/RMs without knowing what an identity map or an object space is, which leads to low-perf, memory hungry applications and, in the end, to ourselves blaming O/RMs for them.&lt;/p&gt;  &lt;p&gt;If the Five Ws of O/RMs matter to you, then we could meet &lt;a href="http://nhday.eu/en/call-for-presenters.aspx#p3"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:2497c1da-1660-42f2-98da-16b3f8594eae" class="wlWriterEditableSmartContent"&gt;Technorati Tag: &lt;a href="http://technorati.com/tags/NHDay" rel="tag"&gt;NHDay&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ORM" rel="tag"&gt;ORM&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/mrbrightside/aggbug/99322.aspx" width="1" height="1" /&gt;</description><dc:creator>Andrea Saltarello</dc:creator></item><item><title>The first program I wrote !</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/08/25/the-first-program-i-wrote.aspx</link><pubDate>Wed, 25 Aug 2010 00:15:02 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/08/25/the-first-program-i-wrote.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/99112.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/99112.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/08/25/the-first-program-i-wrote.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/99112.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">The first program I wrote !</source><description>&lt;p&gt;I entered in the fantastic world of programming when I was &lt;strong&gt;9 years old&lt;/strong&gt;. &lt;/p&gt;  &lt;p&gt;My father give me a Casio graphical/programmable calculator as a present. It was exactly a&lt;strong&gt; FX-7400 G.&lt;/strong&gt; &lt;/p&gt;  &lt;p&gt;Quick Specifications:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Maximum of 26 variables (alphabet letters) &lt;/li&gt;    &lt;li&gt;13-character x 6-line display &lt;/li&gt;    &lt;li&gt;7 Kbytes of memory &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/ThefirstprogramIwrote_E77/fx-7400G_2.jpg" rel="lightbox"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="fx-7400G" border="0" alt="fx-7400G" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/ThefirstprogramIwrote_E77/fx-7400G_thumb.jpg" width="353" height="321" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;If you ask me what is the first program that I have created the right answer is that I simply copied the first example in the &lt;a href="http://support.casio.com/manualfile.php?rgn=5&amp;amp;cid=004002007"&gt;manual&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;This is the first program I wrote, and I’m writing this post just to share my enthusiasm in reading this again:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/ThefirstprogramIwrote_E77/first_program_2.jpg" rel="lightbox"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="first_program" border="0" alt="first_program" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/ThefirstprogramIwrote_E77/first_program_thumb.jpg" width="778" height="517" /&gt;&lt;/a&gt;  &lt;/p&gt;  &lt;p /&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;This is the beginning of my career in the computer science field :)&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/99112.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Have you been called by a telepest?</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/17/have-you-been-called-by-a-telepest.aspx</link><pubDate>Thu, 17 Jun 2010 06:40:40 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/17/have-you-been-called-by-a-telepest.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98805.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98805.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/17/have-you-been-called-by-a-telepest.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98805.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">Have you been called by a telepest?</source><description>&lt;p&gt;Yesterday, I received an &lt;strong&gt;unusual voice message&lt;/strong&gt; in my mobile phone from my English Bank. I immediately was suspicious.&lt;/p&gt;  &lt;p&gt;For this reason, I found out the sender number on Internet and I discovered that this number is present in the database of unsolicited calling numbers.&lt;/p&gt;  &lt;p&gt;The following website can help you to find if the sender number is a possible &lt;strong&gt;telepest&lt;/strong&gt;:    &lt;br /&gt;&lt;a title="http://www.telepest.co.uk/" href="http://www.telepest.co.uk/"&gt;http://www.telepest.co.uk/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Please, make attention when you receive an unsolicited call from an unknown telephone number.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Never reveals personal details and/or passwords in this case.&lt;/strong&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98805.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Windows 7 - Pin folder to taskbar</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/15/windows-7-pin-folder-to-taskbar.aspx</link><pubDate>Tue, 15 Jun 2010 18:06:37 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/15/windows-7-pin-folder-to-taskbar.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98799.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98799.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/15/windows-7-pin-folder-to-taskbar.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98799.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">Windows 7 - Pin folder to taskbar</source><description>&lt;p&gt;I really like the Windows 7 Taskbar and in particular the jump lists to have access of my documents/folders that I frequently use. Adding a program link in the taskbar is extremely easy but there is not an easy way to create a quick link to a particular folder.&lt;/p&gt;  &lt;p&gt;For example, I wanted a taskbar link to my Download folder:&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/Windows7Pinfoldertotaskbar_10AA9/taskbar%20link_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="taskbar link" border="0" alt="taskbar link" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/Windows7Pinfoldertotaskbar_10AA9/taskbar%20link_thumb.jpg" width="332" height="49" /&gt;&lt;/a&gt;  &lt;/p&gt;  &lt;p&gt;In the following page, you can find a useful tip to solve this problem:   &lt;br /&gt;&lt;a href="http://www.unawave.de/windows-7-tipps/folder-to-taskbar.html?lang=EN"&gt;http://www.unawave.de/windows-7-tipps/folder-to-taskbar.html?lang=EN&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98799.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>BOOKS - The Art of Happiness</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/06/books-the-art-of-happiness.aspx</link><pubDate>Sun, 06 Jun 2010 15:13:56 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/06/books-the-art-of-happiness.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98729.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98729.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/06/06/books-the-art-of-happiness.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98729.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">BOOKS - The Art of Happiness</source><description>&lt;p&gt;   &lt;br /&gt;Few minutes ago, I finished to read the &lt;a href="http://www.dalailama.com/"&gt;Dalai Lama&lt;/a&gt; book: “&lt;a href="http://www.amazon.com/Art-Happiness-10th-Anniversary-Handbook/dp/1594488894/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1275830130&amp;amp;sr=8-1"&gt;The Art of Happiness&lt;/a&gt;”. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.amazon.com/Art-Happiness-10th-Anniversary-Handbook/dp/1594488894/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1275830130&amp;amp;sr=8-1"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="the art of happiness" border="0" alt="the art of happiness" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/BOOKSTheArtofHappiness10thAnniversaryEdi_C8F3/the%20art%20of%20happiness_3.jpg" width="260" height="260" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I truly think this is a valuable book to understand the real value of the human life. This is a book that force you to reflect deeply about yourself and your relations with all human beings.&lt;/p&gt;  &lt;p&gt;The book is divided in 5 sections. &lt;/p&gt;  &lt;p&gt;I report some sentences that, for me, are the most significant:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;THE PURPOSE OF LIFE&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;The very purpose of life is to seek &lt;strong&gt;happiness&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;Happy people are generally found to be more sociable, flexible, and creative and are able to tolerate life’s daily frustrations more easily than unhappy people. And, most important, they are found to be more loving and forgiving than unhappy people.&lt;/li&gt;      &lt;li&gt;Happiness is determined more by one’s &lt;strong&gt;state of mind&lt;/strong&gt; than by external events. &lt;/li&gt;      &lt;li&gt;Happiness can be achieved through &lt;strong&gt;training the mind&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;Our feelings of contentment are strongly influenced by our tendency to compare. We can increase our feeling of life satisfaction by comparing ourselves to those who are less fortunate than us and by reflecting on all things we have.&lt;/li&gt;      &lt;li&gt;The greater the level of &lt;strong&gt;calmness of our mind&lt;/strong&gt;, the greater our peace of mind, the greater our ability to enjoy and joyful life&lt;/li&gt;      &lt;li&gt;The demarcation between a positive and a negative desire or action is not whether it gives you a immediate feeling of satisfaction but whether it ultimately results in positive or negative consequences.&lt;/li&gt;      &lt;li&gt;Is not to have what we want but rather to want and&lt;strong&gt; appreciate what we have&lt;/strong&gt;. &lt;/li&gt;      &lt;li&gt;Sometimes people confuse happiness with pleasure. True happiness relates more to the mind and heart. Happiness that depends mainly on physical pleasure is unstable.&lt;/li&gt;      &lt;li&gt;Framing any decision we face by asking ourselves: “&lt;strong&gt;Will it bring me happiness?&lt;/strong&gt;”&lt;/li&gt;      &lt;li&gt;The first step in seeking happiness is learning. We first have to learn how negative emotions and behaviours are harmful to us and how positive emotions are helpful.&lt;/li&gt;      &lt;li&gt;The proper utilization of our intelligence and knowledge is to effect changes from within to develop a good heart.&lt;/li&gt;      &lt;li&gt;It is still my firm conviction that &lt;strong&gt;human nature is essentially compassionate&lt;/strong&gt;, gentle. That is the predominant feature of human nature.&lt;/li&gt;      &lt;li&gt;When we combine a warm heart with knowledge and education, we can learn to &lt;strong&gt;respect other’s views and other’s rights&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;Scientists are discovering that those who lack close social ties seem to suffer from poor health, higher levels of unhappiness, and a greater vulnerability to stress&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;HUMAN WARMTH AND COMPASSION&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Once you accept the fact that compassion is not something childish or sentimental, once you realize that compassion is something really worthwhile, realize it’s deeper value, then you immediate develop an attraction towards it, a willingness to cultivate it.&lt;/li&gt;      &lt;li&gt;There is a widespread notion in our culture that deep intimacy is best achieved within the context of a passionate romantic relationship. This can be a profoundly limiting viewpoint, cutting us off from other potential sources of intimacy, and the cause of much misery and unhappiness when that Special Someone isn’t there. &lt;/li&gt;      &lt;li&gt;Intimacy is based on a willingness to &lt;strong&gt;open ourselves to many others&lt;/strong&gt;, to family, friends, and even strangers, forming a genuine and deep bonds based on our common humanity. &lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Empathy&lt;/strong&gt; is an important factor.&lt;strong&gt; The ability to appreciate another’s suffering&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;If you are having some difficulties, it’s extremely helpful to be able to try to put yourself in the other person’s place and see how you would react to the situation.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;We are all born in the same way, and we all die.&lt;/strong&gt; All of us want happiness and do not want to suffer. Relating to others on that level makes it much easier to exchange and communicate with one another.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Married people are happier&lt;/strong&gt; and more satisfied with life than single or widowed people, or especially compared to divorced or separated people.&lt;/li&gt;      &lt;li&gt;Compassion can be roughly defined in terms of a state of mind that is nonviolent, non harming, and nonaggressive. It is a mental attitude based on the wish for others to be free of their suffering and is associated with a sense of commitment, responsibility, and respect towards the other.&lt;/li&gt;      &lt;li&gt;Positive states of mind can improve our physical health.&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;TRANSFORMING SUFFERING&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;As long as we view suffering as an unnatural state, an abnormal condition that we fear, avoid, and reject, we will never uproot the causes of suffering and begin to live a happier life.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;We tend to take small things too seriously&lt;/strong&gt;, and blow them up out of proportion, while at the same time we often remain indifferent to the really important things.&lt;/li&gt;      &lt;li&gt;As a product of an imperfect world, all of us are imperfect. Every one of us has one some wrong.&lt;/li&gt;      &lt;li&gt;The &lt;strong&gt;acceptance of change&lt;/strong&gt; can be an important factor in reducing a large measure of our self-created suffering.&lt;/li&gt;      &lt;li&gt;One must understand that every phenomena, every event, has different aspects. Everything is of a relative nature.&lt;/li&gt;      &lt;li&gt;You might reflect on the fact that when you are really angry at someone you tend to perceive them as having 100 percent negative qualities. The tendency to see someone as completely negative is due to your own perception based on your own mental projection, rather than the true nature of that individual.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;The enemy is the necessary condition for practicing patience.&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;A balanced and skilful approach to life, taking care to avoid extremes, becomes a very important factor in conducting one’s everyday existence.&lt;/li&gt;      &lt;li&gt;The vulnerability we experience in the midst of our suffering can open us and deepen our connection with others&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;We convert pain into suffering in the mind.&lt;/strong&gt; It is our suffering that is the most basic element that we share with others, the factor that unifies us with all living creatures.&lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;OVERCOMING OBSTACLES&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;Learning and education are important because they help one develop conviction of the need to change and help increase one’s commitment. This conviction to change than develops into determination. Next, one transforms determination into action – the strong determination to change enables one to make a sustained effort to implement the actual changes. The final factor of effort is critical.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;You have to be always aware of the destructive effects of the negative behaviour.&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Genuine change does not happen overnight&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;Numerous surveys have conclusively found that higher levels of education have a positive correlation with better health and a longer life, and even protect an individual from depression.&lt;/li&gt;      &lt;li&gt;Through proper training we can gradually&lt;strong&gt; reduce our negative emotions and increase positive states of mind&lt;/strong&gt; such as love, compassion, and forgiveness.&lt;/li&gt;      &lt;li&gt;We need to actively cultivate the antidotes to hatred: &lt;strong&gt;patience and tolerance&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;An end result, or a product of patience and tolerance, is &lt;strong&gt;forgiveness&lt;/strong&gt;. When you are truly patient and tolerant, then forgiveness comes naturally.&lt;/li&gt;      &lt;li&gt;Working on improving our physical health through proper diet and exercise can be useful to &lt;strong&gt;reduce anxiety and stress&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;If the situation or problem is such that it can be remedied, then there is no need to worry about it. Alternatively, if there is no way out, no solution, no possibility of resolution, then there is also no point in being worried about it, because you can’t do anything about it anyway.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;Sincere motivation&lt;/strong&gt; acts as an antidote to reduce fear and anxiety.&lt;/li&gt;      &lt;li&gt;A healthy sense of self-confidence is a critical factor in achieving our goals.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;The more honest you are, the more self-confident you will be.&lt;/strong&gt;&lt;/li&gt;      &lt;li&gt;Love is a genuine wish for someone’s happiness. &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;strong&gt;CLOSING REFLECTIONS ON LIVING A SPIRITUAL LIFE&lt;/strong&gt;&lt;/li&gt;    &lt;ul&gt;     &lt;li&gt;In helping us understand the true meaning of spirituality is important to &lt;strong&gt;distinguish between spirituality and religion&lt;/strong&gt;.&lt;/li&gt;      &lt;li&gt;&lt;strong&gt;True spirituality is a mental attitude&lt;/strong&gt; that you can practice at any time.&lt;/li&gt;      &lt;li&gt;Independent researchers have found that religious people report feeling happy and satisfied with life more often than non-religious people.&lt;/li&gt;      &lt;li&gt;It is important to respect the rights of others. We must to learn to respect all there major religion traditions. &lt;/li&gt;   &lt;/ul&gt; &lt;/ul&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;I strongly recommend to read this book.&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98729.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Adding libraries and headers in Visual C++ 2010</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/adding-libraries-and-headers-in-visual-c-2010.aspx</link><pubDate>Sat, 29 May 2010 14:11:44 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/adding-libraries-and-headers-in-visual-c-2010.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98681.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98681.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/adding-libraries-and-headers-in-visual-c-2010.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98681.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">Adding libraries and headers in Visual C++ 2010</source><description>&lt;p&gt;   &lt;br /&gt;When you need to use a library in your C++ application you should tell the following things to the compiler:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;The name of the lib file&lt;/li&gt;    &lt;li&gt;The folder where to find the lib file&lt;/li&gt;    &lt;li&gt;The folder where to find the header file&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;In this post, I show how you can do this using Microsoft Visual Studio 2010. All the options are available as &lt;strong&gt;Properties&lt;/strong&gt; of your current project.&lt;/p&gt;  &lt;p&gt;Right click the project name under the Solution Explorer and select &lt;strong&gt;Properties&lt;/strong&gt; from the dropdown menu:    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/properties_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 15px; display: inline; border-top: 0px; border-right: 0px" title="properties" border="0" alt="properties" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/properties_thumb.jpg" width="433" height="524" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;You can add all the names of your libraries in the “&lt;strong&gt;Configuration Properties –&amp;gt; Linker –&amp;gt; Input&lt;/strong&gt;“ section:&lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/lib_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 15px; display: inline; border-top: 0px; border-right: 0px" title="lib" border="0" alt="lib" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/lib_thumb.jpg" width="855" height="607" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p /&gt;  &lt;p&gt;   &lt;br /&gt;At the end, you can set the lib folders (“&lt;strong&gt;Library Directories&lt;/strong&gt;”) and the headers folders (“&lt;strong&gt;Include Directories&lt;/strong&gt;”) in the “&lt;strong&gt;Configuration Properties –&amp;gt; VC++ Directories&lt;/strong&gt;” section. &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/folders_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 15px; display: inline; border-top: 0px; border-right: 0px" title="folders" border="0" alt="folders" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/AddlibrariesandheadersinVisualC2010_D2A7/folders_thumb.jpg" width="851" height="605" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98681.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>XNA &amp;ndash; DirectX Capabilities Viewer</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-directx-capabilities-viewer.aspx</link><pubDate>Sat, 29 May 2010 01:33:09 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-directx-capabilities-viewer.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98678.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98678.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-directx-capabilities-viewer.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98678.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">XNA &amp;ndash; DirectX Capabilities Viewer</source><description>&lt;p&gt;   &lt;br /&gt;If you want to know the capabilities available in your graphics card you can use a tool in the DirectX SDK\Utilities\Bin\x86.&lt;/p&gt;  &lt;p&gt;This tool is called “&lt;strong&gt;DXCapsViewer.exe&lt;/strong&gt;”.&lt;/p&gt;  &lt;p&gt;Here a screenshot with the capabilities of my NVIDIA GeForce 8600M GT:   &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/XNADirectXCapabilitiesViewer_22BB/capsviewer_2.jpg" rel="lightbox"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="capsviewer" border="0" alt="capsviewer" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/XNADirectXCapabilitiesViewer_22BB/capsviewer_thumb.jpg" width="983" height="669" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt; &lt;/p&gt;  &lt;p&gt;You can download the latest DirectX SDK at the following link:&lt;/p&gt;  &lt;p&gt;&lt;a title="http://msdn.microsoft.com/en-us/directx/aa937788.aspx" href="http://msdn.microsoft.com/en-us/directx/aa937788.aspx"&gt;http://msdn.microsoft.com/en-us/directx/aa937788.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98678.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>XNA &amp;ndash; Multisampling</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-multisampling.aspx</link><pubDate>Sat, 29 May 2010 01:00:01 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-multisampling.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98677.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98677.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-multisampling.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98677.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">XNA &amp;ndash; Multisampling</source><description>&lt;p&gt;&lt;strong&gt;Multisampling&lt;/strong&gt; is an &lt;strong&gt;antialiasing&lt;/strong&gt; technique directly supported by DirectX and obviously by XNA. The problem of aliasing occurs when you draw a line on a monitor with low resolution. In that cases you see a stair step when approximating a line by a matrix of pixels. Multisampling use neighbouring pixels (called &lt;strong&gt;samples&lt;/strong&gt;) to calculate the final color of a pixel.&lt;/p&gt;
&lt;p&gt;You can enable multisampling in XNA in this simple way:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;graphics&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PreferMultiSampling &lt;/span&gt;= &lt;span style="color: blue;"&gt;true&lt;/span&gt;;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;   &lt;br /&gt;
Then you should also specify two options. &lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;type&lt;/strong&gt; is an enumerator (&lt;strong&gt;MultiSampleType&lt;/strong&gt;) that represent the number of samples to use in multisampling. The &lt;strong&gt;quality&lt;/strong&gt; is an integer that represent the quality level. This value is always set to zero. Before to set the type of multisampling you should always check if the graphic adapter support it using the method &lt;strong&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;adapter&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CheckDeviceMultiSampleType()&lt;/span&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;graphics&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PreparingDeviceSettings &lt;/span&gt;+= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;EventHandler&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;PreparingDeviceSettingsEventArgs&lt;/span&gt;&amp;gt;((&lt;span style="color: rgb(1, 0, 1);"&gt;sender&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;e&lt;/span&gt;) =&amp;gt; &lt;br /&gt;{&lt;br /&gt;    &lt;span style="color: rgb(43, 145, 175);"&gt;PresentationParameters &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;parameters &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;e&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDeviceInformation&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PresentationParameters&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(1, 0, 1);"&gt;parameters&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;MultiSampleQuality &lt;/span&gt;= 0;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;#if &lt;/span&gt;XBOX&lt;br /&gt;        &lt;span style="color: gray;"&gt;pp.MultiSampleType = MultiSampleType.FourSamples;&lt;br /&gt;        return;&lt;br /&gt;    &lt;/span&gt;&lt;span style="color: blue;"&gt;#else&lt;br /&gt;&lt;br /&gt;    int &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;quality&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsAdapter &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;adapter &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;e&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDeviceInformation&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Adapter&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: rgb(43, 145, 175);"&gt;SurfaceFormat &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;format &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;adapter&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CurrentDisplayMode&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Format&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;if &lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;adapter&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CheckDeviceMultiSampleType&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;DeviceType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Hardware&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;format&lt;/span&gt;, &lt;span style="color: blue;"&gt;false&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;MultiSampleType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;FourSamples&lt;/span&gt;, &lt;span style="color: blue;"&gt;out &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;quality&lt;/span&gt;))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;parameters&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;MultiSampleType &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MultiSampleType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;FourSamples&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;    &lt;span style="color: blue;"&gt;else if &lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;adapter&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CheckDeviceMultiSampleType&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;DeviceType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Hardware&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;format&lt;/span&gt;, &lt;span style="color: blue;"&gt;false&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;MultiSampleType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;TwoSamples&lt;/span&gt;, &lt;span style="color: blue;"&gt;out &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;quality&lt;/span&gt;))&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;parameters&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;MultiSampleType &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MultiSampleType&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;TwoSamples&lt;/span&gt;;&lt;br /&gt;    }                &lt;br /&gt;});&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;For more information:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://en.wikipedia.org/wiki/Multisample_anti-aliasing" title="http://en.wikipedia.org/wiki/Multisample_anti-aliasing"&gt;http://en.wikipedia.org/wiki/Multisample_anti-aliasing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/bb975403.aspx" title="http://msdn.microsoft.com/en-us/library/bb975403.aspx"&gt;http://msdn.microsoft.com/en-us/library/bb975403.aspx&lt;/a&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98677.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>XNA &amp;ndash; Nuclex Framework</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-nuclex-framework.aspx</link><pubDate>Fri, 28 May 2010 23:55:20 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-nuclex-framework.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98676.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98676.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/29/xna-ndash-nuclex-framework.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98676.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">XNA &amp;ndash; Nuclex Framework</source><description>&lt;p&gt;I would like to inform you that an interesting stable project is available on codeplex. This is the Nuclex Framework.&lt;/p&gt;
&lt;p&gt;This is the main page of the project:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://nuclexframework.codeplex.com/" title="http://nuclexframework.codeplex.com/"&gt;http://nuclexframework.codeplex.com/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The more interesting features for me are the following:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://nuclexframework.codeplex.com/wikipage?title=Vector%20Fonts&amp;amp;referringTitle=Documentation"&gt;3D Text Rendering&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://nuclexframework.codeplex.com/wikipage?title=LzmaContentManager&amp;amp;referringTitle=Documentation"&gt;LZMA Content Compression&lt;/a&gt; (that's 7-Zip's compression)&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://nuclexframework.codeplex.com/wikipage?title=Nuclex.UserInterface&amp;amp;referringTitle=Documentation"&gt;Themeable Graphical User Interfaces&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://nuclexframework.codeplex.com/wikipage?title=Game%20State%20Management&amp;amp;referringTitle=Documentation"&gt;Game State Management&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://nuclexframework.codeplex.com/wikipage?title=DebugDrawer&amp;amp;referringTitle=Documentation"&gt;Debugging Overlays&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98676.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>XNA &amp;ndash; Analytical Geometry</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/28/xna-ndash-analytical-geometry.aspx</link><pubDate>Fri, 28 May 2010 22:21:58 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/28/xna-ndash-analytical-geometry.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98675.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98675.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/28/xna-ndash-analytical-geometry.aspx#comment</comments><slash:comments>1</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98675.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">XNA &amp;ndash; Analytical Geometry</source><description>&lt;p&gt;Mathematics plays a fundamental role in video game development. I strongly recommend to study the basics of linear algebra to have a better control of what you create. However, in XNA there is a lot of support for analytical geometry. There are some complex algorithms already implemented so it’s extremely important to know what it is available.&lt;/p&gt;
&lt;p&gt;You can manage positions, speeds and directions using the classes: &lt;strong&gt;Point&lt;/strong&gt;, &lt;strong&gt;Vector2&lt;/strong&gt;, &lt;strong&gt;Vector3 &lt;/strong&gt;and &lt;strong&gt;Vector4&lt;/strong&gt;. &lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;a &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;(0, 0, 10);&lt;br /&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Normalize&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;x &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;X&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;y &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Y&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;z &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Z&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;length &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Length&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;b &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Right&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;c &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;a &lt;/span&gt;+ &lt;span style="color: rgb(1, 0, 1);"&gt;b&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;distance &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Distance&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;b&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;dotProduct &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Dot&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;b&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;crossProduct &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Cross&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;b&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;trasform &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Transform&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;a&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateScale&lt;/span&gt;(5));&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;   &lt;br /&gt;
The most important class in XNA is the &lt;strong&gt;Matrix&lt;/strong&gt; class:&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Matrix &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;identity &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Identity&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;cameraPosition &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;(0, 0, 10);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;cameraTarget &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Zero&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3 &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;cameraUp &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Forward&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;viewMatrix &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateLookAt&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;cameraPosition&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;cameraTarget&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;cameraUp&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Matrix &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;projectionMatrix &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreatePerspectiveFieldOfView&lt;/span&gt;(&lt;br /&gt;    &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver4&lt;/span&gt;, &lt;br /&gt;    &lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDevice&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Viewport&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Width &lt;/span&gt;/ &lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDevice&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Viewport&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Height&lt;/span&gt;, &lt;br /&gt;    1, 100);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Matrix &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;viewProjectionMatrix &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;viewMatrix &lt;/span&gt;* &lt;span style="color: rgb(1, 0, 1);"&gt;projectionMatrix&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;scale &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateScale&lt;/span&gt;(5);&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;translation &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateTranslation&lt;/span&gt;(10, 20, 30);&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rotationX &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateRotationX&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver4&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rotationY &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateRotationY&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver4&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rotationZ &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateRotationZ&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver4&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;var &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rotation &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;Matrix&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;CreateFromAxisAngle&lt;/span&gt;(&lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;(1, 2, 3), &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver4&lt;/span&gt;);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;   &lt;br /&gt;
The &lt;strong&gt;Ray&lt;/strong&gt; class represent a straight line. The &lt;strong&gt;Plane&lt;/strong&gt; class represent a plane in the 3d world. Then there other important classes like &lt;strong&gt;Rectangle&lt;/strong&gt;, &lt;strong&gt;BoundingBox&lt;/strong&gt;, &lt;strong&gt;BoundingFrustum &lt;/strong&gt;and &lt;strong&gt;BoundingSphere. &lt;/strong&gt;&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Rectangle &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rectangle1 &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Rectangle&lt;/span&gt;(0, 0, 10, 10);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Rectangle &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;rectangle2 &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Rectangle&lt;/span&gt;(5, 5, 10, 10);&lt;br /&gt;&lt;span style="color: blue;"&gt;bool &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;intersect &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;rectangle1&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Intersects&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;rectangle2&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;bool &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;contains &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;rectangle1&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Contains&lt;/span&gt;(&lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Point&lt;/span&gt;(10, 20));&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Ray &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;ray &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Ray&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Zero&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Forward&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Plane &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;plane &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Plane&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Up&lt;/span&gt;, 10);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingSphere &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;sphere &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingSphere&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;One&lt;/span&gt;, 5);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingBox &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;box &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingBox&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Zero&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;One&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;&lt;span style="color: blue;"&gt;float&lt;/span&gt;? &lt;span style="color: rgb(1, 0, 1);"&gt;distance &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;ray&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Intersects&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;plane&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;PlaneIntersectionType &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;pit &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;plane&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Intersects&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;sphere&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;ContainmentType &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;ct &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;box&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Contains&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;sphere&lt;/span&gt;);&lt;br /&gt;         &lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingFrustum &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;frustum &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;BoundingFrustum&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;ViewMatrix &lt;/span&gt;* &lt;span style="color: rgb(1, 0, 1);"&gt;ProjectionMatrix&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector3&lt;/span&gt;[] &lt;span style="color: rgb(1, 0, 1);"&gt;corners &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;frustum&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;GetCorners&lt;/span&gt;();&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Plane &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;nearPlane &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;frustum&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Near&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Plane &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;farPlane &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;frustum&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Far&lt;/span&gt;;&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;p&gt;   &lt;br /&gt;
With the class &lt;strong&gt;Curve&lt;/strong&gt; is then possible to handle curves. &lt;/p&gt;
&lt;p&gt;Finally, it is important to remember the class &lt;strong&gt;MathHelper&lt;/strong&gt; that contains some useful methods&lt;/p&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;max &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Max&lt;/span&gt;(5, 10);&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;min &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Min&lt;/span&gt;(5, 10);&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;piOver2 &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;PiOver2&lt;/span&gt;;&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;degrees &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;ToDegrees&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;piOver2&lt;/span&gt;);&lt;br /&gt;&lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;radians &lt;/span&gt;= &lt;span style="color: rgb(43, 145, 175);"&gt;MathHelper&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;ToRadians&lt;/span&gt;(90);&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98675.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>XNA &amp;ndash; Console Component</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/xna-ndash-console-component.aspx</link><pubDate>Wed, 26 May 2010 22:30:40 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/xna-ndash-console-component.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98663.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98663.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/xna-ndash-console-component.aspx#comment</comments><slash:comments>2</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98663.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">XNA &amp;ndash; Console Component</source><description>&lt;p&gt;&lt;br /&gt;
XNA is a fantastic technology and I want to learn it well.&lt;/p&gt;
&lt;p&gt;If you don’t know nothing about 2D and 3D game development, I strongly recommend to buy the book “&lt;a href="http://www.amazon.com/Learning-XNA-3-0-Game-Development/dp/0596521952/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1274910186&amp;amp;sr=8-1"&gt;&lt;strong&gt;Learning XNA 3.0&lt;/strong&gt;&lt;/a&gt;”. This is really easy to understand and it introduce to many concepts in a simple step by step approach. I read other three books about XNA but this is definitely the best as a starting point.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.amazon.com/Learning-XNA-3-0-Game-Development/dp/0596521952/ref=sr_1_1?ie=UTF8&amp;amp;s=books&amp;amp;qid=1274910186&amp;amp;sr=8-1"&gt;&lt;img width="240" height="240" border="0" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/XNAConsoleComponent_13F56/learning%20xna_3.jpg" alt="learning xna" title="learning xna" style="border-width: 0px; display: inline;" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;&lt;br /&gt;
I would like to share with you my demo programs, without the purpose to be exhaustive but just to share interesting stuffs that I can find during my learning process.&lt;/p&gt;
&lt;p&gt;It is quite useful to have a way to print text on the screen for debugging help. For this reason I created the ConsoleComponent class.&lt;/p&gt;
&lt;p&gt;Firstly, I’ll show you how to use the console class in the game: &lt;/p&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;public class &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;MyGame &lt;/span&gt;: &lt;span style="color: rgb(43, 145, 175);"&gt;Game&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;graphics&lt;/span&gt;;&lt;br /&gt;   &lt;strong&gt;&lt;font size="3"&gt; &lt;span style="color: rgb(43, 145, 175);"&gt;ConsoleComponent &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;;&lt;/font&gt;&lt;/strong&gt;          &lt;span style="color: blue;"&gt;public &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;MyGame&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;graphics &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;Content&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;RootDirectory &lt;/span&gt;= &lt;span style="color: rgb(163, 21, 21);"&gt;"Content"&lt;/span&gt;;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;protected override void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;Initialize&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;        &lt;strong&gt;&lt;font size="3"&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;console &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;ConsoleComponent&lt;/span&gt;(&lt;span style="color: blue;"&gt;this&lt;/span&gt;, 17, &lt;span style="color: rgb(43, 145, 175);"&gt;Color&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Yellow&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;Components&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Add&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;);&lt;/font&gt;&lt;/strong&gt;     }      &lt;span style="color: blue;"&gt;protected override void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;Update&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;GameTime &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;font size="3"&gt;&lt;strong&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Clear&lt;/span&gt;();&lt;/strong&gt; &lt;/font&gt;         &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"GraphicsDeviceManager.DefaultBackBufferHeight = " &lt;/span&gt;+ &lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;DefaultBackBufferHeight&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"GraphicsDeviceManager.DefaultBackBufferWidth = " &lt;/span&gt;+ &lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;DefaultBackBufferWidth&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;strong&gt;&lt;font size="3"&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;();&lt;/font&gt;         &lt;font size="3"&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"ValidAdapterFormats: "&lt;/span&gt;);&lt;/font&gt;&lt;/strong&gt;         &lt;span style="color: blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;SurfaceFormat &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;surfaceFormat &lt;/span&gt;&lt;span style="color: blue;"&gt;in &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;ValidAdapterFormats&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;" - " &lt;/span&gt;+ &lt;span style="color: rgb(1, 0, 1);"&gt;surfaceFormat&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"ValidBackBufferFormats: "&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;SurfaceFormat &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;surfaceFormat &lt;/span&gt;&lt;span style="color: blue;"&gt;in &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;ValidBackBufferFormats&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;" - " &lt;/span&gt;+ &lt;span style="color: rgb(1, 0, 1);"&gt;surfaceFormat&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;();&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"ValidDeviceTypes: "&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;DeviceType &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;deviceType &lt;/span&gt;&lt;span style="color: blue;"&gt;in &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;GraphicsDeviceManager&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;ValidDeviceTypes&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(1, 0, 1);"&gt;console&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;" - " &lt;/span&gt;+ &lt;span style="color: rgb(1, 0, 1);"&gt;deviceType&lt;/span&gt;);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;base&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Update&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;protected override void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;Draw&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;GameTime &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDevice&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Clear&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;Color&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Black&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;base&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Draw&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;
&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;
&lt;pre class="code"&gt;&lt;font size="2"&gt;&lt;font size="1"&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;
&lt;p&gt;&lt;font size="2"&gt;It is extremely simple to use. You create an instance of the ConsoleComponent class passing a reference to the game object, the interline and the text color. Then you can use the WriteLine() method to draw a text while with the Clear() method you can clear all the text.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;This is the code of the component:&lt;/font&gt;&lt;/p&gt;
&lt;pre class="code"&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/pre&gt;
&lt;font size="2"&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/font&gt;
&lt;pre class="code"&gt;&lt;span style="color: blue;"&gt;&lt;font size="2"&gt;public class &lt;/font&gt;&lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;&lt;font size="2"&gt;ConsoleComponent &lt;/font&gt;&lt;/span&gt;&lt;font size="2"&gt;: &lt;span style="color: rgb(43, 145, 175);"&gt;DrawableGameComponent&lt;br /&gt;&lt;/span&gt;{&lt;br /&gt;    &lt;span style="color: blue;"&gt;private &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;SpriteBatch &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;spriteBatch&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue;"&gt;private &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;SpriteFont &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;consoleFont&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;private float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;;&lt;br /&gt;    &lt;span style="color: blue;"&gt;private &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Color &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;textColor&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;private &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt; &lt;span style="color: rgb(1, 0, 1);"&gt;messages&lt;/span&gt;;&lt;br /&gt;    &lt;br /&gt;    &lt;span style="color: blue;"&gt;public &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;ConsoleComponent&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;MyGame &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;game&lt;/span&gt;, &lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;, &lt;span style="color: rgb(43, 145, 175);"&gt;Color &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;defaultTextColor&lt;/span&gt;) : &lt;span style="color: blue;"&gt;base&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;game&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue;"&gt;this&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;interline &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue;"&gt;this&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;textColor &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;defaultTextColor&lt;/span&gt;;&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;this&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;messages &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;List&lt;/span&gt;&amp;lt;&lt;span style="color: blue;"&gt;string&lt;/span&gt;&amp;gt;();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;spriteBatch &lt;/span&gt;= &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;SpriteBatch&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;game&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;GraphicsDevice&lt;/span&gt;);&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;consoleFont &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;game&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Content&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Load&lt;/span&gt;&amp;lt;&lt;span style="color: rgb(43, 145, 175);"&gt;SpriteFont&lt;/span&gt;&amp;gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;"consoleFont"&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;public void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;Clear&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;messages&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Clear&lt;/span&gt;();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;public void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;()&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;messages&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Add&lt;/span&gt;(&lt;span style="color: rgb(163, 21, 21);"&gt;""&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;public void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;WriteLine&lt;/span&gt;(&lt;span style="color: blue;"&gt;string &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;text&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;messages&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Add&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;text&lt;/span&gt;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    &lt;span style="color: blue;"&gt;public override void &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;Draw&lt;/span&gt;(&lt;span style="color: rgb(43, 145, 175);"&gt;GameTime &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;)&lt;br /&gt;    {&lt;br /&gt;        &lt;span style="color: blue;"&gt;base&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Draw&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;gameTime&lt;/span&gt;);&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;spriteBatch&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;Begin&lt;/span&gt;();&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: blue;"&gt;float &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;y &lt;/span&gt;= &lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;;&lt;br /&gt;        &lt;span style="color: blue;"&gt;foreach &lt;/span&gt;(&lt;span style="color: blue;"&gt;string &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;text &lt;/span&gt;&lt;span style="color: blue;"&gt;in &lt;/span&gt;&lt;span style="color: rgb(1, 0, 1);"&gt;messages&lt;/span&gt;)&lt;br /&gt;        {&lt;br /&gt;            &lt;span style="color: rgb(1, 0, 1);"&gt;spriteBatch&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;DrawString&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;consoleFont&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;text&lt;/span&gt;, &lt;span style="color: blue;"&gt;new &lt;/span&gt;&lt;span style="color: rgb(43, 145, 175);"&gt;Vector2&lt;/span&gt;(&lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;, &lt;span style="color: rgb(1, 0, 1);"&gt;y&lt;/span&gt;), &lt;span style="color: rgb(1, 0, 1);"&gt;textColor&lt;/span&gt;);&lt;br /&gt;            &lt;span style="color: rgb(1, 0, 1);"&gt;y &lt;/span&gt;+= &lt;span style="color: rgb(1, 0, 1);"&gt;interline&lt;/span&gt;;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        &lt;span style="color: rgb(1, 0, 1);"&gt;spriteBatch&lt;/span&gt;.&lt;span style="color: rgb(1, 0, 1);"&gt;End&lt;/span&gt;();&lt;br /&gt;    }&lt;br /&gt;}&lt;/font&gt;&lt;/pre&gt;
&lt;font size="2"&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt; &lt;/font&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;br /&gt;
In this simple example you can see how it is easier to draw 2D strings using XNA.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;This is a screenshot of the application: &lt;br /&gt;
&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;a target="_blank" href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/XNAConsoleComponent_13F56/consolecomponent_2.jpg"&gt;&lt;img width="663" height="517" border="0" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/angellaa-en/WindowsLiveWriter/XNAConsoleComponent_13F56/consolecomponent_thumb.jpg" alt="consolecomponent" title="consolecomponent" style="border: 0px none; display: inline;" /&gt;&lt;/a&gt; &lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;br /&gt;
The complete Visual Studio 2008 project is available to the following link:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;a href="http://cid-1dcae6b548e3761c.skydrive.live.com/self.aspx/.Public/XNA/ConsoleComponent.zip" title="http://cid-1dcae6b548e3761c.skydrive.live.com/self.aspx/.Public/XNA/ConsoleComponent.zip"&gt;http://cid-1dcae6b548e3761c.skydrive.live.com/self.aspx/.Public/XNA/ConsoleComponent.zip&lt;/a&gt;&lt;a href="http://11011.net/software/vspaste"&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98663.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>My First English Blog</title><link>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/my-first-english-blog.aspx</link><pubDate>Wed, 26 May 2010 21:27:57 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/my-first-english-blog.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/angellaa-en/comments/98662.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/angellaa-en/comments/commentRss/98662.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/angellaa-en/archive/2010/05/26/my-first-english-blog.aspx#comment</comments><slash:comments>3</slash:comments><trackback:ping>http://blogs.ugidotnet.org/angellaa-en/services/trackbacks/98662.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/angellaa-en/rss.aspx">My First English Blog</source><description>&lt;p&gt;Hello everybody,    &lt;br /&gt;this is my first post in my new English blog.&lt;/p&gt;  &lt;p&gt;I decided to create an English blog for few simple reasons (in order of importance):&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Learning English &lt;/li&gt;    &lt;li&gt;Increase the audience of my posts &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I would like to use this blog to share, with the international community, my efforts in learning new technologies but not only this. I would like also talk about my personal experiences and interests.&lt;/p&gt;  &lt;p&gt;I’m sorry if my English will not be perfect. Please, tell me if I make some terrible mistakes.&lt;/p&gt;  &lt;p&gt;See you soon,&lt;/p&gt;  &lt;p&gt;Andrea&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/angellaa-en/aggbug/98662.aspx" width="1" height="1" /&gt;</description><dc:creator>Angella Andrea</dc:creator></item><item><title>Model-View-ViewModel: Slides and Demos</title><link>http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx</link><pubDate>Fri, 21 Nov 2008 10:52:44 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/ccavalli/comments/94720.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/ccavalli/comments/commentRss/94720.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/ccavalli/archive/2008/11/21/94720.aspx#comment</comments><slash:comments>276</slash:comments><trackback:ping>http://blogs.ugidotnet.org/ccavalli/services/trackbacks/94720.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/ccavalli/rss.aspx">Model-View-ViewModel: Slides and Demos</source><description>&lt;p&gt;I’ve had talk at recent &lt;a href="http://www.ugidotnet.org/News/Detail/34625b4b-6861-443a-b9c0-7bde72eeb960" target="_blank"&gt;Technical After Hours 2008&lt;/a&gt; named &lt;strong&gt;WPF in Action&lt;/strong&gt; dedicated &lt;strong&gt;Model-View-ViewModel&lt;/strong&gt; pattern in WPF, so, as promised, here you can find associated slides and demos.     &lt;br /&gt;Slides are in Italian so they probably won’t help you much but demos are all in English (comments included) so you may find it more interesting.     &lt;br /&gt;Demos follow a specific order to describe the evolution from a classical winform style application to a final solution totally based on M-V-VM.&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Trivial application that use Databinding to visualize a list of bikes. &lt;/li&gt;    &lt;li&gt;Evolution of previous app that uses a control template that firstly introduces some of classical approach limitations. &lt;/li&gt;    &lt;li&gt;First approach to M-V-VM pattern, incomplete under some aspects. &lt;/li&gt;    &lt;li&gt;Migration of remaining part that uses WPF commanding model. &lt;/li&gt;    &lt;li&gt;Test project for point 4. &lt;/li&gt;    &lt;li&gt;Full application that includes navigation and necessary tricks to use M-V-VM in real world applications. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Have fun!&lt;/p&gt;  &lt;p&gt;&lt;a href="http://www.codeworks.it/public/tah08/Slides.zip" target="_blank"&gt;Slides&lt;/a&gt; – &lt;a href="http://www.codeworks.it/public/tah08/Demos.zip" target="_blank"&gt;Demo&lt;/a&gt;&lt;/p&gt;  &lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:359857c4-497c-4912-b51e-12b39a4b1451" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Model-View-ViewModel" rel="tag"&gt;Model-View-ViewModel&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/ccavalli/aggbug/94720.aspx" width="1" height="1" /&gt;</description><dc:creator>Corrado Cavalli</dc:creator></item><item><title>Install a dictionary in Windows Live Writer Beta 3</title><link>http://blogs.ugidotnet.org/cfolini/archive/2008/10/01/install-a-dictionary-in-windows-live-writer-beta-3.aspx</link><pubDate>Wed, 01 Oct 2008 21:51:37 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2008/10/01/install-a-dictionary-in-windows-live-writer-beta-3.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/94222.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/94222.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2008/10/01/install-a-dictionary-in-windows-live-writer-beta-3.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/94222.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Install a dictionary in Windows Live Writer Beta 3</source><description>&lt;p&gt;Many source for this problem around…&lt;/p&gt;  &lt;p&gt;&lt;a title="http://veroblog.wordpress.com/2007/08/28/using-british-english-spelling-in-windows-live-writer/" href="http://veroblog.wordpress.com/2007/08/28/using-british-english-spelling-in-windows-live-writer/"&gt;http://veroblog.wordpress.com/2007/08/28/using-british-english-spelling-in-windows-live-writer/&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I found a way easier to solve the problem (it works for italian dictionary).   &lt;br /&gt;I have WLW 14.0.5025.904 under Vista.    &lt;br /&gt;In C:\Users\&amp;lt;my user&amp;gt;\AppData\Local\Microsoft\Windows Live Mail\Proof\prf0010\7 (the last two directories may change for different locale) copy the 3 files (.lex .dll .ini).     &lt;br /&gt;For italian the name is mssp7it .    &lt;br /&gt;Maybe not all are necessary... I didn't investigate!    &lt;br /&gt;Paste into C:\Program Files\Windows Live\Writer\Dictionaries.    &lt;br /&gt;Restart WLW ...now in Tools-&amp;gt;Options-&amp;gt;Spelling you should see a new entry (Italian in my case).    &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Hope this helps&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/94222.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item><item><title>Custom drop target</title><link>http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/custom-drop-target.aspx</link><pubDate>Fri, 09 May 2008 19:59:40 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/custom-drop-target.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/92595.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/92595.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/custom-drop-target.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/92595.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Custom drop target</source><description>&lt;p&gt;The automatically generated designer in DSL assumes that you have to put the shape on the surface and then eventually connect to others.&lt;/p&gt;  &lt;p&gt;Statements, in microbasic, are executed sequentially so I want the designer to attach my shapes to one previously placed, dropping it in the link between two shapes.&lt;/p&gt;  &lt;p&gt;To drive the shapes drop behaviour I have to modify where the shapes are allowed to be dropped.&lt;/p&gt;  &lt;p&gt;Setting the attribute UsesCustomAccept does this (or at least I hope!!!).&lt;/p&gt;  &lt;div style="border-right: gray 1px solid; padding-right: 4px; border-top: gray 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: gray 1px solid; width: 97.5%; cursor: text; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: gray 1px solid; font-family: consolas, 'Courier New', courier, monospace; background-color: #f4f4f4"&gt;   &lt;pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, 'Courier New', courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"&gt;&lt;span style="color: #0000ff"&gt;&amp;lt;?&lt;/span&gt;&lt;span style="color: #800000"&gt;xml&lt;/span&gt; &lt;span style="color: #ff0000"&gt;version&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;encoding&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="utf-8"&lt;/span&gt;?&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
&lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Dsl&lt;/span&gt; &lt;span style="color: #ff0000"&gt;dslVersion&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="1.0.0.0"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="bd36672a-93b9-4dce-82f8-2551432eb244"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="Description for myns.Language1.Language1"&lt;/span&gt; ...&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
  &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Classes&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DomainClass&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Id&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="3a3a6bfd-90ef-4418-91a7-3792d2201167"&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Description&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="The root in which all other elements are embedded. Appears as a diagram."&lt;/span&gt; ....&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ElementMergeDirectives&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;ElementMergeDirective&lt;/span&gt; &lt;font size="+1"&gt;&lt;span style="color: #ff0000"&gt;UsesCustomAccept&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="true"&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/font&gt;
          &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Notes&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;Creates an embedding link when an element is dropped onto a model. &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Notes&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
          &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;Index&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DomainClassMoniker&lt;/span&gt; &lt;span style="color: #ff0000"&gt;Name&lt;/span&gt;&lt;span style="color: #0000ff"&gt;="ExampleElement"&lt;/span&gt; &lt;span style="color: #0000ff"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;Index&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
          &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;LinkCreationPaths&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
            &lt;span style="color: #0000ff"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: #800000"&gt;DomainPath&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;ExampleModelHasElements.Elements&lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DomainPath&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
          &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;LinkCreationPaths&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
        &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ElementMergeDirective&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
      &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;ElementMergeDirectives&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;
    &lt;span style="color: #0000ff"&gt;&amp;lt;/&lt;/span&gt;&lt;span style="color: #800000"&gt;DomainClass&lt;/span&gt;&lt;span style="color: #0000ff"&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;As usual regenerate the templates and recompile.&lt;/p&gt;

&lt;p&gt;An error appears...&lt;/p&gt;

&lt;p&gt;Error    1    'myns.Language1.ExampleModel' does not contain a definition for 'CanMergeExampleElement' and no extension method 'CanMergeExampleElement' accepting a first argument of type 'myns.Language1.ExampleModel' could be found &lt;/p&gt;

&lt;p&gt;Clicking on the error you are taken to the  call to the method that you have to implement. Using vs is easy to do this..hover your mouse to the little rectangle at the beginning of the method name.&lt;/p&gt;

&lt;p&gt; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/cfolini/WindowsLiveWriter/Customdroptarget_ED5C/CanMerge_2.jpg"&gt;&lt;img style="border-top-width: 0px; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="148" alt="CanMerge" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/cfolini/WindowsLiveWriter/Customdroptarget_ED5C/CanMerge_thumb.jpg" width="725" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Copy the generated method stub to your partial class and implement it. &lt;/p&gt;

&lt;p&gt;How? I don't know...Stay tuned...&lt;/p&gt;&lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/92595.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item><item><title>Double derived pattern in DSL</title><link>http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/double-derived-pattern-in-dsl.aspx</link><pubDate>Thu, 08 May 2008 22:40:13 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/double-derived-pattern-in-dsl.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/92581.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/92581.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2008/05/09/double-derived-pattern-in-dsl.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/92581.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Double derived pattern in DSL</source><description>&lt;p&gt;Customizing a DSL needs different expertise based on the amount of customization that you want to apply.&lt;/p&gt;
&lt;p&gt;A 'basic' concept that you need to understand is the double derived pattern.&lt;/p&gt;
&lt;p&gt;The DSL engine generates classes based on the dsl definition. Those classes are partial class so, like in asp.net or winform, you can create your code for the same class in another file separating it from the automatically generated.&lt;/p&gt;
&lt;p&gt;Those classes are split in two separate files, but is essentially the same class so you can't replace a method automatically generated.&lt;/p&gt;
&lt;p&gt;To address this problem the DSL framework introduce the double derived pattern. For each class (with the "Generates Double Derived" attribute set) the generated code is set on the base class so you are free to override the automatically generated code in the derived class.&lt;/p&gt;
&lt;p&gt;If you have a class named ExampleElement (the one automatically generated if you create a new MinimalLanguage project) and you mark it with "Generates Double Derived" you'll get the following class structure&lt;/p&gt;
&lt;p&gt;&lt;a href="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/cfolini/WindowsLiveWriter/DoublederivedinDSL_D5E3/DoubleDerive_2.jpg"&gt;&lt;img style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" height="244" alt="DoubleDerive" width="163" border="0" src="http://blogs.ugidotnet.org/images/blogs_ugidotnet_org/cfolini/WindowsLiveWriter/DoublederivedinDSL_D5E3/DoubleDerive_thumb.jpg" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;The framework generates an ExampleElementBase class that contains all the generated code, in the derived class (ExampleElement) you are free to override everything (except the constructor see below).&lt;/p&gt;
&lt;p&gt;In case of the Sources property you'll write&lt;/p&gt;
&lt;div style="BORDER-RIGHT: gray 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: gray 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 8pt; PADDING-BOTTOM: 4px; MARGIN: 20px 0px 10px; OVERFLOW: auto; BORDER-LEFT: gray 1px solid; WIDTH: 97.5%; CURSOR: text; MAX-HEIGHT: 200px; LINE-HEIGHT: 12pt; PADDING-TOP: 4px; BORDER-BOTTOM: gray 1px solid; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BACKGROUND-COLOR: #f4f4f4"&gt;
&lt;pre style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; FONT-SIZE: 8pt; PADDING-BOTTOM: 0px; MARGIN: 0em; OVERFLOW: visible; WIDTH: 100%; COLOR: black; BORDER-TOP-STYLE: none; LINE-HEIGHT: 12pt; PADDING-TOP: 0px; FONT-FAMILY: consolas, 'Courier New', courier, monospace; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: #f4f4f4; BORDER-BOTTOM-STYLE: none"&gt;&lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;partial&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;class&lt;/span&gt; ExampleElement
{
    &lt;span style="COLOR: #0000ff"&gt;public&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;override&lt;/span&gt; Microsoft.VisualStudio.Modeling.LinkedElementCollection&amp;lt;ExampleElement&amp;gt; Sources
    {
        get
        {
            &lt;span style="COLOR: #0000ff"&gt;return&lt;/span&gt; &lt;span style="COLOR: #0000ff"&gt;base&lt;/span&gt;.Sources;
        }
    }
}          &lt;/pre&gt;
&lt;/div&gt;
&lt;p&gt;The case of constructor it's a little bit different....the problem is that DSL tools must generate the constructor for the derived class (if not the framework couldn't instantiate the class). So if you need to override also the constructor you can set the "Has custom constructor".&lt;/p&gt;
&lt;p&gt;(Remember to select "Transform all templates" and rebuild!)&lt;/p&gt;
&lt;p&gt;In this case a compilation error is generated stating that you have to implement the constructor. Something like&lt;/p&gt;
&lt;p&gt;Error    1    "...ExampleElement' does not contain a constructor that takes '0' arguments  &lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b2bdb723-1c0d-4732-bef6-1075d7e4040c" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;del.icio.us Tags: &lt;a rel="tag" href="http://del.icio.us/popular/DSL"&gt;DSL&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/92581.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item><item><title>Visual programming language using visual studio DSL</title><link>http://blogs.ugidotnet.org/cfolini/archive/2008/05/08/visual-programming-language-using-visual-studio-dsl-again.aspx</link><pubDate>Thu, 08 May 2008 10:45:56 GMT</pubDate><guid isPermaLink="true">http://blogs.ugidotnet.org/cfolini/archive/2008/05/08/visual-programming-language-using-visual-studio-dsl-again.aspx</guid><wfw:comment>http://blogs.ugidotnet.org/cfolini/comments/92575.aspx</wfw:comment><wfw:commentRss>http://blogs.ugidotnet.org/cfolini/comments/commentRss/92575.aspx</wfw:commentRss><comments>http://blogs.ugidotnet.org/cfolini/archive/2008/05/08/visual-programming-language-using-visual-studio-dsl-again.aspx#comment</comments><slash:comments>0</slash:comments><trackback:ping>http://blogs.ugidotnet.org/cfolini/services/trackbacks/92575.aspx</trackback:ping><source url="http://blogs.ugidotnet.org/cfolini/rss.aspx">Visual programming language using visual studio DSL</source><description>&lt;p&gt;I found a very interesting &lt;a href="http://chdk.wikia.com/wiki/Main_Page"&gt;firmware&lt;/a&gt; for my &lt;a href="http://www.canon-europe.com/for_home/product_finder/cameras/digital_camera/powershot/powershot-a550/index.asp"&gt;Canon A550&lt;/a&gt;. This new firmware adds tons of new feature. One of those, is the scripting support using a language similar to basic.&lt;/p&gt;
&lt;p&gt;As a programmer it's easy to program with it...well...too easy!&lt;/p&gt;
&lt;p&gt;So I decided to throw some of my spare time to play with &lt;a href="http://msdn.microsoft.com/en-us/library/bb126235.aspx"&gt;DSL&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The basic idea is to create a DSL that let's you visually program the canon scripting.&lt;/p&gt;
&lt;p&gt;What I want to achieve is a tool having a toolbar with all the language (if, do, variable declaration...) and camera (shoot, zoom...) statements that you can drag on the programming surface to construct a script.&lt;/p&gt;
&lt;p&gt;The first look at DSL give me the idea that the learning curve is very steep...so it's perfect to save me from the current &lt;a href="http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=Folini"&gt;time waster&lt;/a&gt;. &lt;iframe style="WIDTH: 100%; HEIGHT: 100%" src="http://www.popfly.com/users/Crasch/MyGamerTag.small" frameborder="no" allowtransparency="allowtransparency"&gt;&lt;/iframe&gt;&lt;/p&gt;
&lt;p&gt;Stay tuned for future posts about it...&lt;/p&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:3ca61cca-8898-4be4-8f9f-2c6377adadaf" style="PADDING-RIGHT: 0px; DISPLAY: inline; PADDING-LEFT: 0px; FLOAT: none; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"&gt;del.icio.us Tags: &lt;a rel="tag" href="http://del.icio.us/popular/Visual%20programming%20language%20DSL"&gt;Visual programming language DSL&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blogs.ugidotnet.org/cfolini/aggbug/92575.aspx" width="1" height="1" /&gt;</description><dc:creator>Carlo Folini</dc:creator></item></channel></rss>