<?xml version="1.0" encoding="utf-8"?><rss xmlns:a10="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Hector Correa's blog</title><description>Thoughts on Software Development</description><copyright>Copyright (C) 2008 Hector Correa</copyright><a10:link title="Hector Correa's blog" href="http://hectorcorrea.com/blog.aspx" /><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Flow-Second-Generation-Lean-Product-Development.aspx</guid><link>http://hectorcorrea.com/blog/Flow-Second-Generation-Lean-Product-Development.aspx</link><author>hector@hectorcorrea.com</author><title>Flow: Second Generation Lean Product Development</title><description>&lt;p&gt;&lt;img alt="The Principles of Product Development Flow" width="120" height="178" align="left" src="http://hectorcorrea.com/images/flowbook.jpg" /&gt;The last few weeks I've been reading the book &amp;quot;&lt;a target="_blank" href="http://www.amazon.com/Principles-Product-Development-Flow-Generation/dp/1935401009"&gt;The Principles of Product Development Flow&lt;/a&gt;&amp;quot;&amp;nbsp;by Donald Reinertsen&lt;sup&gt;[1]&lt;/sup&gt; in which he describes what he calls the second generation of Lead Product Development.&lt;/p&gt;
&lt;p&gt;I've been reading the book from the perspective of software development products and this review will highlight examples on that area. However&amp;nbsp;Reinertsen's&amp;nbsp;book is about product development in general (e.g. the development of a new drug or a new cell phone) and not software in particular.&lt;/p&gt;
&lt;p&gt;Reinertsen&amp;nbsp;describes a paradigm for product development that although it could be called Lean Product Development he chooses to call&amp;nbsp;&lt;strong&gt;Flow-Based Product Development&lt;/strong&gt; (Flow) to highlight the differences that exist between lean manufacturing and lean product development.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unlike &lt;em&gt;lean manufacturing&lt;/em&gt; that primarily deals with predictable and repeatable tasks, homogeneous delay costs, and homogeneous task duration, in &lt;em&gt;lean product development&lt;/em&gt; these situations are not the norm. In product development the tasks (almost by definition) are not repeatable and hardly ever predictable, delay costs are not homogeneous, and tasks durations have very high variations.&lt;/p&gt;
&lt;p&gt;In the case of software development it's not uncommon for teams to be dealing with problems that they have&amp;nbsp;never&amp;nbsp;solved before (e.g. writing a brand new system) or and with technologies that are new to the team. Likewise, the cost of delaying the implementation of a new feature versus the cost of fixing a specific bug can be widely different.&lt;/p&gt;
&lt;p&gt;In chapter one&amp;nbsp;Reinertsen&amp;nbsp;starts by describing what he calls twelve critical problems with traditional product development orthodoxy including:&amp;nbsp;Failure to Correctly Quantify Economics,&amp;nbsp;Blindness to Queues,&amp;nbsp;Worship of Efficiency,&amp;nbsp;Hostility to Variability,&amp;nbsp;Institutionalization of Large Batch Sizes,&amp;nbsp;Underutilization of Cadence,&amp;nbsp;Managing Timelines instead of Queues,&amp;nbsp;Absence of Work-In-Progress Constraints,&amp;nbsp;and&amp;nbsp;Centralized Control.&lt;/p&gt;
&lt;p&gt;In the remaining chapters of the book&amp;nbsp;Reinertsen&amp;nbsp;presents eight ideas/themes that he suggests to address these problems.&amp;nbsp;&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;Economics&lt;/li&gt;
    &lt;li&gt;Queues&lt;/li&gt;
    &lt;li&gt;Variability&lt;/li&gt;
    &lt;li&gt;Batch Size&lt;/li&gt;
    &lt;li&gt;WIP Constraints&lt;/li&gt;
    &lt;li&gt;Cadence, Synchronization, and Flow Control&lt;/li&gt;
    &lt;li&gt;Fast Feedback&lt;/li&gt;
    &lt;li&gt;Decentralized Control&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In software development some of these ideas are already popular thanks in large to the wide spread adoption of agile software development processes. For example Scrum recommendation of short sprints helps reduce &lt;strong&gt;batch size&lt;/strong&gt;. Likewise, the daily collaboration between developers and QA during the sprint as well as frequent product demonstrations advocated by Scrum allow for &lt;strong&gt;fast feedback&lt;/strong&gt; to take place.&lt;/p&gt;
&lt;p&gt;However, some of the other ideas that&amp;nbsp;Reinertsen&amp;nbsp;presents on his book (like Economics, Queues, WIP Constraints) are not mainstream in software development yet. Some of the new development processes like Kanban&lt;sup&gt;[2][3]&lt;/sup&gt; are making strides in these areas and this book helps to clarify why these changes are important in product development in general.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;On Economics&lt;/h3&gt;
&lt;p&gt;On the topics of economics,&amp;nbsp;Reinertsen&amp;nbsp;starts with the premise that &amp;quot;we do product development to make money&amp;quot; (p.15) and yet&amp;nbsp;most product development teams cannot correctly quantify economics on their products. In his view product developers currently focus on proxy variables to calculate economic impact rather than using the real economic objective which he calls &lt;strong&gt;life-cycle profits&lt;/strong&gt;&amp;nbsp;(p.29)&lt;/p&gt;
&lt;p&gt;For example, a typical proxy variable is cycle-time. Most developers typically try to optimize cycle-time and make it shorter. On the surface this sounds all good. However, few product developers can correctly calculate how much a delay on cycle-time will actually cost in terms of life-cycle profits.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;An example of this in software development is when a team cannot objectively calculate the value (in terms of profit) of working on feature A or feature B. If the team does not know the impact to the bottom line, How can they make a decision that makes the more sense for the company? Without knowing the real value of two features, the team might decide to work on feature A because it's more appealing or because the developers needed for feature B are currently busy wrapping something else. However, if the team knew that feature B will bring four times more profit to the company if delivered first they might act different and rearrange the team to complete feature B before feature A.&lt;/p&gt;
&lt;p&gt;Reinertsen&amp;nbsp;points out that having a common unit of measure solves many problems as it allows the decisions on what makes more sense to take place on an even keel rather than using the unit of measurement that is popular at the moment.&amp;nbsp;The common measure that he proposes is profits.&lt;/p&gt;
&lt;p&gt;For example, given two choices to implement a feature a team might decide to rush it and release it to market rather than use a more comprehensive approach and wait a few months.&amp;nbsp;Either one of these choices could be the correct one at different points in the life cycle of a product. However, the right choice depends on the economics of this decision at a given point in time. Will the company make more money rushing the feature and being first too market or will it make more money delaying its implementation and doing a more comprehensive implementation? What about the &amp;quot;technical debt&amp;quot; that the team will incur by rushing a feature? Does this cost outweigh the benefits of being first to market? All of these things should be considered and measured with the same unit.&lt;/p&gt;
&lt;p&gt;Reinertsen&amp;nbsp;indicates that on his research teams tend to &lt;em&gt;think&lt;/em&gt; that they know the economics of their decisions. However, &amp;nbsp;when asking different people on the team to quantify (in economic terms) the value of the team decisions their responses vary on a 50 to 1 ratio. When the answers are in such wide range it's obvious that the team is not using a common unit of measurement.&lt;/p&gt;
&lt;p&gt;Chapter two contains nineteen principles to help product developers make good decisions based on economics. Although Reinertsen does not provide the &amp;quot;silver-bullet&amp;quot; to make economic decisions the principles that he provides are a good place for product developers to start focusing including paying attention to Cost of Delay (p. 31), U-Curve Optimizations (p.35), Economics Trade-off &amp;nbsp;(p. 37), Marginal Cost and Marginal Value (p.45),&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;On Queues and Batch Size&lt;/h3&gt;
&lt;p&gt;One of the areas where lean manufacturing is very different from product development is in the management of queues. In lean manufacturing the problem with queues is well understood and has been optimized for many years. Entire manufacturing books have been written on how to manage bottlenecks&amp;nbsp;on assembly lines to prevent inventory accumulation&amp;nbsp;&amp;nbsp;(e.g.&amp;nbsp;&lt;a target="_blank" href="http://www.amazon.com/Goal-Process-Ongoing-Improvement/dp/0884270610"&gt;The Goal&lt;/a&gt;&amp;nbsp;by Eli Goldratt.)&amp;nbsp;However, there is little literature in software development that addresses the effects of work in progress (which is the software equivalent to inventory.) An example of work in progress in software development are features developed but not yet in production either because they are under development or developed but still being tested.&lt;/p&gt;
&lt;p&gt;One of the reasons work in progress (WIP) is so poorly managed in product development is because it's almost invisible. In manufacturing you can walk around a plant and see work in progress lying on the floor. Although work in progress does not sits around on the shop floor in software development work in progress can be easily identified by looking at queues: queues of items ready to be coded, items ready to be tested, items ready to be released, and so on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You might be wondering, so what? Why should I care about queues in software development? Although there is no cost associated with &lt;em&gt;storing &lt;/em&gt;work in progress in software development&amp;nbsp;Reinertsen&amp;nbsp;indicates that work in progress cause several unwanted side effects in product development including: &lt;strong&gt;Longer Cycle Time,&amp;nbsp;Increased Risk,&amp;nbsp;More Variability,&amp;nbsp;More Overhead,&amp;nbsp;Lower Quality, and&amp;nbsp;Less Motivation.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;An example of this in software development is a queue of features coded but not tested. The larger the queue of features coded but not tested the larger the test cycle that the product will need to go before the features can be released. A large number of features to be tested and then released also translate in higher risk on the new version of the system.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;One of the principles of queue theory is called Little's Formula. In layman terms Little's Formula says &amp;quot;average queue size determines average cycle time&amp;quot; (p. 112.) This means that you can reduce cycle time by reducing batch size. This is important as it means that before we go looking for complex solutions to reduce long cycle times (like adding more staff or looking for bottlenecks) we can start by reducing the batch size. Software teams that are already using Agile methods like Scrum have experienced this with the use of short Sprints (e.g. 2-week long cycles) rather than the old-fashion multi-month development cycles.&lt;/p&gt;
&lt;p&gt;On his book Agile Management for Software Engineering&lt;sup&gt;[4]&lt;/sup&gt;, David Anderson gives a comprehensive explanation of how inventory and lead time apply to software and it's another good reference to learn more on this subject.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;On WIP Constraints&lt;/h3&gt;
&lt;p&gt;After making you aware of Queues and the importance of Batch Size,&amp;nbsp;Reinertsen&amp;nbsp;moves to Work In Progress Constraints (or WIP Constraints) and why they are important in product development.&amp;nbsp;Reinertsen&amp;nbsp;indicates that while limiting batch size helps by nature to reduce the amount of work in progress, it does not address the fundamental problem of&amp;nbsp;random variations in flow common to product development (p. 143)&amp;nbsp;As&amp;nbsp;Reinertsen&amp;nbsp;indicates at the beginning of his book, product development is subject to many variations not common in lean manufacturing. In the Chapter 6&amp;nbsp;Reinertsen&amp;nbsp;describes ideas and principles applied in telecommunication networks to deal with high variability and how they can be applied to product development. Instead of using a Theory of Constraints as a manufacturing book probably would,&amp;nbsp;Reinertsen&amp;nbsp;describes Kanban systems instead.&lt;/p&gt;
&lt;p&gt;There is an entire movement in the software development industry to raise awareness of the problems that work in progress (WIP) causes to software processes. You can take a look at their work at&amp;nbsp;&lt;a href="http://www.limitedwipsociety.org/"&gt;http://www.limitedwipsociety.org/&lt;/a&gt;&amp;nbsp;and also a new book in the works on Kanban for Technology Organizations&lt;sup&gt;[2]&lt;/sup&gt; by David Anderson.&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;In Summary&lt;/h3&gt;
&lt;p&gt;All in all I found Donald&amp;nbsp;Reinertsen&amp;nbsp;book very interesting and easy to read. Although the book is not specific to software development most of the concepts described on it apply to software development and would allow you to understand why the recommendations of agile, lean, or pull methods work and are important.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;References&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;[1] Principles of Product Development Flow, Second Generation Lean Product Development; Donald Reinertsen; Celeritas Publishing; 2009.&lt;/p&gt;
&lt;p&gt;[2] Kanban: Successful Change Management for Technology Organizations; David Anderson; Unpublished manuscript as of November 2009.&lt;/p&gt;
&lt;p&gt;[3] See&amp;nbsp;&lt;a href="http://www.kanban101.com/"&gt;http://www.kanban101.com/&lt;/a&gt;&amp;nbsp;for a quick introduction to Kanban&lt;/p&gt;
&lt;p&gt;[4] Agile Management for Software Engineering, Applying Theory of Constraints for Business Results; David Anderson; Prentice Hall; 2003.&lt;/p&gt;</description><a10:updated>2010-02-28T22:28:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Team-Dynamics.aspx</guid><link>http://hectorcorrea.com/blog/Team-Dynamics.aspx</link><author>hector@hectorcorrea.com</author><title>Team Dynamics</title><description>&lt;p&gt;A few years ago during my ScrumMaster certification our instructor talked about the different development stages that teams go through. He used Tuckman's development model which includes four stages: Form, Storm, Norm, and Perform.&lt;/p&gt;
&lt;p&gt;In this model teams start at the&amp;nbsp;&lt;strong&gt;Form&lt;/strong&gt; stage when they are first put together. This is the honeymoon period of new teams in which spirits are high,&amp;nbsp;everybody is optimistic,&amp;nbsp;but the work is just about to begin.&amp;nbsp;&lt;strong&gt;Storm&lt;/strong&gt; is the period after the honeymoon in which, once the work has commenced, team members try to find their place in the team. After the storm phase, teams go into the &lt;strong&gt;Norm&lt;/strong&gt; stage as members start to find their place on the team and the team starts working&amp;nbsp;as a cohesive unit. Finally, some teams reach another stage called &lt;strong&gt;Perform&lt;/strong&gt; in which they become high performance teams.&lt;/p&gt;
&lt;p&gt;I've always found this knowledge of incredible valuable. Knowing that teams go through these stages and that this is normal behavior is very important. As a&amp;nbsp;team leader is also important to recognize that teams need different leadership styles as they go through these stages.&lt;/p&gt;
&lt;p&gt;Blanchard et al. have a very nice chart where they explain the four stages and the kind of leadership recommended on each of them:&lt;/p&gt;
&lt;p style="text-align: center"&gt;&lt;img alt="" src="http://hectorcorrea.com/images/leadershipstyles.jpg" /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In the first stage&amp;nbsp;(Form) the team needs a significant amount of &lt;em&gt;direction&lt;/em&gt; (as the team is newly formed) but little support since they are typically excited just by being part of the new team.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As the team moves into the second stage (Storm) and tension among team members start to raise the leader need to act as a &lt;em&gt;coach&lt;/em&gt; and provide both, direction and support for the team to get through the rough period of recognizing each other talents and trust one another.&lt;/p&gt;
&lt;p&gt;The Storm stage is commonly misunderstood as a &amp;quot;bad stage&amp;quot; since during this phase team members tend to start feeling down as the discrepancies between the initial hopes and reality kicks [4], the initial politeness fade,&amp;nbsp;people start to get more into the work and their roles and so start to argue about things that were left unsaid or not realized when they first met [3]. However as Blanchard, et al. indicates calling Storm stage a bad stage is like calling adolescence a bad period. Storm is a process that teams go through as they develop. As a leader you should be careful to help teams grow out of this stage instead trying to prevent this stage altogether or letting the team perpetuate this stage.&amp;nbsp;The article in ChangeMinds.org [3] provides some guidelines on how to manage a team during this stage including:&lt;/p&gt;
&lt;address style="margin-left: 40px"&gt;&amp;quot;The manager here needs to assert their role and help draw out and resolve differences that might otherwise bubble along under the surface, causing continuing team cohesion problems.&amp;quot;&lt;/address&gt;
&lt;p&gt;and&amp;nbsp;&lt;/p&gt;
&lt;address style="margin-left: 40px"&gt;&amp;quot;Storming can also be reduced by clarifying work goals and individual role and objectives. When people know what individual success means, they become more focused.&amp;quot;&amp;nbsp;&lt;/address&gt;
&lt;p&gt;When teams start moving into the third stage (Norm) performance increases and the role of the leader is to keep&amp;nbsp;&lt;em&gt;supporting&lt;/em&gt;&amp;nbsp;the team to make sure the trust among team members is kept. At this point the team has a clear idea of the task at hand and need little direction. The team is already making decisions and the leader should step back to let the team flourish.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Finally, as the team reaches the fourth phase (Perform) the leader's role shift into&amp;nbsp;delegation&amp;nbsp;which means letting the team make their own decisions and support itself. Teams that reach this stage are called high performing teams.&lt;/p&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Beside Tuckman's group development stages other authors have proposed different stages but the main idea is the same. Teams go through phases through their lifetime.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;An important thing to note is that teams can step back to a previous stage. For example, a team that has reached the Perform stage might go back to the Norm or Storm phase. This can be caused by changes in team members or changes in the team's goals. In software development teams this could be the result of adding new developers to a team or changing the goal of the team as a result of new market pressures. In a small team just adding a few more developers (say going from four to six developers) might be enough to disrupt the roles already established by the team.&amp;nbsp;As a team leader you should be aware of this and act accordingly.&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;An unfortunately common occurrence in software teams is adding QA resources to a development team after the team has formed and bonded. Not only it is a bad practice to push the testing of the system towards the end of a cycle but adding a new role (that will find bugs in the code and &amp;quot;slow down&amp;quot; the development!)&amp;nbsp;to a team already formed&amp;nbsp;exacerbates the impact of this new role and increases the likelihood of taking a team from a norm or perform stage to a less productive stage like storm. A better approach in this case would be to include QA from the beginning and make it part of the development effort. If you don't have that luxury and have to add this role towards the end make sure you address both, functional and behavior changes that the new role will bring to the team.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;The take away from this post is twofold. On one hand remember that all teams go through these development stages and that this is a normal process. On the other hand is important that you as a leader recognize the stage that your team is at and manage it accordingly.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;There is a lot of material regarding the stages of a team and team productivity. A good reading is Alasdair White paper From Comfort Zone to Performance Management [5].&amp;nbsp;&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;[1] A copy of Bruce Tuckman's original 1965 paper &amp;quot;Developmental Sequence in Small Groups&amp;quot; can be found &lt;a target="_blank" href="http://findarticles.com/p/articles/mi_qa3954/is_200104/ai_n8943663/?tag=content;col1"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[2] Wikipedia&amp;nbsp;&lt;a href="http://en.wikipedia.org/wiki/Forming-storming-norming-performing"&gt;http://en.wikipedia.org/wiki/Forming-storming-norming-performing&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[3]&amp;nbsp;ChangingMinds.org&amp;nbsp;article &lt;a href="http://changingminds.org/explanations/groups/form_storm_norm_perform.htm"&gt;http://changingminds.org/explanations/groups/form_storm_norm_perform.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;[4] The chart and explanation of the different roles that the manager plays on each of the team development stages was taken from the&amp;nbsp;&lt;em&gt;The One Minute Manager Builds High Performing Teams&lt;/em&gt; by Ken Blanchard et al. (William Morrow, 1990, page 70.)&lt;/p&gt;
&lt;p&gt;[5] Alasdair White's &lt;em&gt;From Comfort Zone to Performance Management &lt;/em&gt;paper&amp;nbsp;&lt;a href="http://www.pm-solutions.com/Performance_ManagementApril2008.pdf"&gt;http://www.pm-solutions.com/Performance_ManagementApril2008.pdf&lt;/a&gt;&lt;/p&gt;</description><a10:updated>2009-06-02T22:20:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/TransactionScope.Complete-Maybe.aspx</guid><link>http://hectorcorrea.com/blog/TransactionScope.Complete-Maybe.aspx</link><author>hector@hectorcorrea.com</author><title>TransactionScope.Complete Maybe</title><description>&lt;p&gt;During a class this week I learned that the &lt;strong&gt;Complete()&lt;/strong&gt; method in the &lt;strong&gt;TransactionScope&lt;/strong&gt; class works different from what I have always thought.&amp;nbsp;I've always thought that when you issue a call to the Complete() method&amp;nbsp;the transaction is either committed or you get an exception if the transaction cannot be committed. In my mind once the call to Complete() returned it was a sure bet that the transaction was successfully committed. It turns out that is not necessarily true.&lt;/p&gt;
&lt;p&gt;The following code snippet shows a typical usage of TransactionScope when connecting to a SQL Server database. The steps are basically start a transaction, issue a few SQL Commands, and call the complete method to commit the transaction. In a real application you will have more than one SQL Command and perhaps nested transactions but the idea is pretty much the same.&lt;/p&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;strong&gt;using (TransactionScope tx = new TransactionScope())&lt;/strong&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;strong&gt;{&lt;/strong&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using (SqlConnection conn = new SqlConnection(connString))&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;conn.Open();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string sql =&amp;quot;INSERT INTO MyTable(ID,Name) VALUES(1,'Test')&amp;quot;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;SqlCommand command = new SqlCommand(sql, conn);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;command.ExecuteNonQuery();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;} // conn&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&amp;quot;INSERT command has been issued but not committed.&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&amp;quot;Stop SQL Server and press [ENTER] to continue...&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.ReadLine();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;strong&gt;tx.Complete();&lt;/strong&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&amp;quot;Yikes! tx.Complete() didn't throw an exception even though SQL Server has been stopped.&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.WriteLine(&amp;quot;Press [ENTER] to continue...&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Console.ReadLine();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;strong&gt;} // tx&lt;/strong&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;p&gt;In this particular example however I am purposely forcing an error condition by pausing the program right before the call to Complete, then manually shutting down SQL Server, and finally letting the program continue its execution. This is definitively not something that you will do in an application but the point of this example is to emulate what happens if the server goes down right before the call to tx.Complete().&amp;nbsp;My thought was that the program will throw an exception on the call to tx.Complete() but to my surprise that was not the case. The call to tx.Complete() executed and came back with no indication that an error has happened. Below is the output that this program gave me:&lt;/p&gt;
&lt;p style="text-align: center; "&gt;&amp;nbsp;&lt;img alt="tx.Complete didn't throw exception " src="http://www.hectorcorrea.com/UserFiles/image/txComplete.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;Notice how the lines after tx.Complete() were executed which means that no Exception was thrown even though SQL Server was down at the time of the call!&amp;nbsp;How come this is possible? Does this mean that I have no way of knowing that the transaction succeeded or failed. This is kind of a big deal.&lt;/p&gt;
&lt;p&gt;It turns out the real issue here is that the Complete() method does not work quite the way I thought it did. Here is what what &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.complete.aspx"&gt;MSDN&lt;/a&gt; says:&lt;/p&gt;
&lt;address style="margin-left: 40px; "&gt;When you are satisfied that all operations within the scope are completed successfully, you should call this method only once to inform that transaction manager that the state across all resources is consistent, and the transaction can be committed. It is very good practice to put the call as the last statement in the using block.&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;[...]&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;The actual work of commit between the resources manager happens at the End Using statement if the TransactionScope object created the transaction. If it did not create the transaction, the commit occurs whenever Commit is called by the owner of the CommittableTransaction object. At that point the Transaction Manager calls the resource managers and informs them to either commit or rollback, based on whether this method was called on the TransactionScope object.&lt;/address&gt;
&lt;p&gt;Notice that it clearly says you call this method to &lt;em&gt;&lt;strong&gt;inform&lt;/strong&gt;&lt;/em&gt; the transaction manager that the transaction can be committed. The actual commit happens at the end using statement. Indeed, if I let the program continue its execution I do get an exception when I reach to the end of the using statement.&amp;nbsp;Below is an example of the Exception that I got:&lt;/p&gt;
&lt;p style="text-align: center; "&gt;&amp;nbsp;&amp;nbsp;&lt;img width="550" height="156" alt="Exception was thrown here" src="http://www.hectorcorrea.com/userfiles/image/txCompleteEx.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;With this knowledge, let's review what happened when the line tx.Complete() was executed and SQL Server was already shutdown. The call to tx.Complete() informed the transaction manager that as far as we were concerned the transaction could be committed. This is why that line executed with no problems. Next, when the transaction scope reached the end using statement and it tried to commit it detected that something was wrong and threw an exception indicating that&amp;nbsp;&lt;strong&gt;&amp;quot;the transaction is in doubt&amp;quot;&lt;/strong&gt;. There was also an inner exception that&amp;nbsp;elaborated that a &amp;quot;transport-level error has occurred&amp;quot; in this case as a result of .NET not being able to reach SQL Server to confirm if indeed SQL Server committed the transaction or not. The best TransactionScope could do is doubt it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is actually really good. If a similar situation where to happen in a production environment I would doubt that the transaction was committed too. In this particular example I know for sure it wasn't committed since I shutdown SQL Server at the right moment, but in real application there wouldn't be a way for us to know if we lost connectivity with SQL before or after the commit command was sent. For example, let's say that SQL Server didn't go down but rather that our program lost network connectivity with it. In that case we couldn't confirm that SQL Server committed the transaction but SQL Server might have received the commit command just before we lost connectivity and indeed committed the transaction successfully. In that case the best TransactionScope can do is doubt it and that's as correct as you can ask for.&lt;/p&gt;
&lt;p&gt;To make matters more interesting you can use TransactionScope to handle nested transactions and transactions against resources other than databases. I am glad to know that whoever wrote this code in the framework already thought of these conditions so that I don't have to. Check out the MDSN documentation for the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx"&gt;TransactionScope&lt;/a&gt;&amp;nbsp;class and on &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms229973.aspx"&gt;Writting Transactional Applications&lt;/a&gt; for&amp;nbsp;more information.&lt;/p&gt;</description><a10:updated>2009-04-18T12:07:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/The-Model-View-Controller-is-dead-long-live-the-Model-View-Controller.aspx</guid><link>http://hectorcorrea.com/blog/The-Model-View-Controller-is-dead-long-live-the-Model-View-Controller.aspx</link><author>hector@hectorcorrea.com</author><title>The Model View Controller is dead, long live the Model View Controller</title><description>&lt;p class="MsoNormal"&gt;The last few days I&amp;rsquo;ve been reading &lt;a target="_blank" href="http://www.amazon.com/Microsoft&amp;reg;-NET-Architecting-Applications-PRO-Developer/dp/073562609X"&gt;Microsoft .NET: Architecting Applications for the Enterprise&lt;/a&gt; by Dino Esposito and Andrea Saltarello. On Chapter 7 Dino and Andrea talk about the Presentation Layer and in particular they touch on the Model View Controller (MVC), Model View Presenter (MVP), and Presentation Model (PM) design patterns. I really like how they demystify MVC and MVP and put them in context. Dino and Andrea start describing how these design patterns have evolved over time and state that&lt;/p&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;ldquo;the definition of MVC that worked in the 1980s and even the 1990s might not work for today. As a result, probably nobody uses MVC today as its authors originally devised it.&amp;rdquo;&lt;/address&gt;
&lt;p class="MsoNormal"&gt;I completely agree with this statement and as a matter of fact this quote is the reason I stopped on the Presentation Layer chapter as I was browsing through the book even though I didn&amp;rsquo;t have an immediate need for Presentation Layer patterns. I was actually looking for Business Layer and Service Layer Patterns but that&amp;rsquo;s a topic for a future blog entry.&lt;/p&gt;
&lt;p&gt;Another interesting observation that Dino and Andrea make is that &amp;ldquo;when MVC was initially developed it was intended to be used on the whole application and not just in the presentation layer&amp;rdquo;. However, since these days most developers intuitively design applications in layers as opposed to building monolithic applications as it might have been the norm in the 1980s, the role of the MVC pattern has shifted to a presentation layer pattern more than application level pattern.&lt;/p&gt;
&lt;p&gt;Dino and Andrea do a great job of explaining the MVC pattern with a simple sequence diagram rather than using the quintessential chart with three circles and the words model, view and controller inside them. Below is a drawing of the sequence diagram that they use in the book:&lt;/p&gt;
&lt;p style="text-align: center; "&gt;&lt;img width="540" height="313" alt="Model View Controller pattern" src="http://hectorcorrea.com/images/mvc.jpg" /&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;From this diagram is easy to see that upon a user action (e.g. click of a button) the view talks to a controller, and the controller in turn talks to the model. It makes me wonder if this pattern should have been called View Controller Model pattern instead. The model notifies the view that changes have occurred in the model and the view in turn reads the new model. Another observation that Dino and Andrea make is that the &lt;i style="mso-bidi-font-style:normal"&gt;model&lt;/i&gt; in MVC is what we call these days &lt;i style="mso-bidi-font-style:normal"&gt;the business logic layer&lt;/i&gt;.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;strong&gt;The &lt;b style="mso-bidi-font-weight:normal"&gt;View&lt;/b&gt; in MVC&lt;/strong&gt; represents the controls that are drawn on the screen. In a .NET application they might represent Windows Forms controls or Web Controls. &lt;i style="mso-bidi-font-style:normal"&gt;Ideally&lt;/i&gt; the view should be as simple as possible. The view should just draw the controls, intercept user actions, and forward them to a controller. In &lt;i style="mso-bidi-font-style:normal"&gt;practice&lt;/i&gt; the view typically has some logic inside of it for handle things related to the presentation layer (e.g. data binding and sometimes even simple data validation.) There is a tradeoff between having the simplest of the views (one with no logic) and one with some logic on it. If the view has no logic the controller tends to be more involved but there is only one place with code logic on it. If the view has some logic on it the controller tens to be simpler but now you have logic in two places. This is neither right nor wrong. It&amp;rsquo;s just a decision that you as a developer will face and need to choose what is best for you given the particular application that you are building.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;From the sequence diagram above you can also see how &lt;strong&gt;the &lt;b style="mso-bidi-font-weight:
normal"&gt;Controller&lt;/b&gt;&lt;/strong&gt; talks to the model (business layer) to take care of the request made by the user through the view. One of the main jobs of the controller is to script the required calls to the model. If the user&amp;rsquo;s action requires a new view the controller is also responsible for creating a new view, model, and controller and passing the control to this new MVC triad. If the user&amp;rsquo;s action does not require a new view then the controller just scripts the calls to the existing model. Something to keep in mind is that selecting which view to go to next can be a complex job in a real application. There is nothing intrinsic in MVC to make this simpler.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;A common misunderstanding is that the controller in MVC separates the view from the model. However, as Dino and Andrea point out, and as you can see from the aforementioned sequence diagram, in MVC &amp;ldquo;the view knows the model directly and the model knows the view through the Observer relationship&amp;rdquo;&amp;nbsp;Newer patterns (some of them derived from MVC) have addressed this issue and made other improvements to MVC to produce design patterns more suitable for today's applications. To put it in the words of Dino and Andrea&lt;/p&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;ldquo;It is a sharp and bold statement, but we have to make it: today classic MVC is gone. However, some of its variations are healthy and thrive. They are Model2 for the Web and MVP for both Web and Windows. In turn, and only more recently, MVP has undergone a facelift. In July 2006, Martin Fowler proposed to retire MVP entirely and replace it with two variations Passive View (PV) and Supervising Controller (SVC). &amp;ldquo;&lt;/address&gt;
&lt;h2&gt;Model 2: MVC for the web&lt;/h2&gt;
&lt;p class="MsoNormal"&gt;Model2 is a new pattern derived from Model View Controller. Again, to quote Dino and Andrea&amp;nbsp;&amp;ldquo;Model2 is just MVC adapted to a new medium &amp;ndash; the Web &amp;ndash; that just wasn&amp;rsquo;t around at the time MVC was first devised&amp;rdquo;&amp;nbsp;Model2 was originally created for Java Server Pages but is now also used in the &lt;a target="_blank" href="http://www.asp.net/mvc/"&gt;Microsoft&amp;rsquo;s ASP.NET MVC Framework&lt;/a&gt; which makes it the more relevant for .NET developers.&lt;/p&gt;
&lt;p class="MsoNormal"&gt;To review the differences between Model2 and the classic MVC let's look at a sequence diagram of the Model2:&lt;/p&gt;
&lt;p class="MsoNormal"&gt;&lt;img alt="Model2 pattern" width="541" height="354" src="http://hectorcorrea.com/images/model2.jpg" /&gt;&lt;/p&gt;
&lt;p class="MsoNormal"&gt;There are a couple of things that become evident as soon as you compare this diagram with the classic MVC diagram that we reviewed first. The first thing is that the Model2 diagram is a little bit more complicated than MVC since there are more components involved. Secondly there is still a view, a model, and a controller embedded on it.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;Another two of things that are also shown in this diagram that might not very evident at first are that (1) the view is rather passive in this pattern as it does not talk to anything and (2) in Model2 the controller (and not the view) is the one that talks to both the model and the view which is quite different from classic MVC.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;The fact that the view becomes passive in Model2 means that is very much just a set of controls that are drawn based on some information (the &amp;ldquo;viewModel&amp;rdquo;) passed from the controller. ViewModel is a class with data like a dataset or a custom data class that the view uses to render HTML controls (remember that Model2 is targeted to the web.) &lt;em&gt;The view in this case receives data through the viewModel but does not have access to the business layer (Model.)&lt;/em&gt; Although this is a subtle difference it makes the view in Model2 simpler than in MVC which is one of the goals on some frameworks like the Microsoft ASP.NET MVC framework.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;So what about the new elements introduced in Model2 like Browser and Front Controller? Browser represents the users&amp;rsquo; browser and, as the diagram indicates, its job is to submit HTTP POST requests and render HTML. &lt;span style="mso-spacerun:yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;The Front Controller in ASP.NET Front Controller is implemented via an HTTP module that captures the requests, analyzes them and decides what controller should handle them. Scott Gu has a very good post on &lt;a target="_blank" href="http://weblogs.asp.net/scottgu/archive/2007/12/03/asp-net-mvc-framework-part-2-url-routing.aspx"&gt;how this works&lt;/a&gt; in ASP.NET MVC.&amp;nbsp;&lt;/p&gt;
&lt;h2&gt;Model View Presenter&lt;/h2&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;As I mentioned before, another variation of the MVC design pattern is the &amp;nbsp;Model View Presenter (MVP) pattern. MVP has in turn been superseded by two other patterns (Passive View and Supervising Controller) that are worth exploring but are beyond the scope of this blog entry. Dino and Andrea do a great job of explaining the differences between these three patterns on their book.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;I highly recommend &lt;a target="_blank" href="http://www.amazon.com/Microsoft&amp;reg;-NET-Architecting-Applications-PRO-Developer/dp/073562609X"&gt;Dino and Andrea's book&lt;/a&gt; to anyone doing applications with .NET and that has not reviewed design patterns in a while. Dino and Andrea do a great good job describing well known design patterns for business, service, data access, and presentation layers in a modern perspective and targeted for .NET development.&lt;/p&gt;
&lt;p class="MsoNormal" style="text-align: left; "&gt;In addition to their book, Dino has a very good MSDN article on &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/magazine/dd252940.aspx"&gt;ASP.NET Presentation Patterns&lt;/a&gt; that is worth checking out.&amp;nbsp;&lt;/p&gt;</description><a10:updated>2009-02-01T21:23:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Rubber-Band-Reports-with-Pivot-Tables-reprint.aspx</guid><link>http://hectorcorrea.com/blog/Rubber-Band-Reports-with-Pivot-Tables-reprint.aspx</link><author>hector@hectorcorrea.com</author><title>Rubber Band Reports with Pivot Tables (reprint)</title><description>&lt;p&gt;&lt;img width="120" height="62" hspace="5" align="left" alt="" src="http://hectorcorrea.com/images/pivottable.jpg" /&gt;A few years ago I wrote an article for the &lt;a target="_blank" href="http://utmag.com"&gt;Universal Thread Magazine&lt;/a&gt; on how to create reports using Excel's Pivot Tables. The article was titled &lt;strong&gt;Programming Rubber Band Reports with Pivot Tables&lt;/strong&gt; and showed how to create Excel Pivot Tables from a Visual FoxPro (VFP) application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Although the article is more than 6 years old I still get questions every now and then about the code samples that I mentioned in the article.&amp;nbsp;The code samples mentioned in the article can be found at &lt;a href="http://hectorcorrea.com/downloads/correa_pivottablesvfp.zip"&gt;http://hectorcorrea.com/downloads/correa_pivottablesvfp.zip&lt;/a&gt; A VB.NET version of the code can be found at &lt;a href="http://hectorcorrea.com/downloads/pivottable.zip"&gt;http://hectorcorrea.com/downloads/pivottable.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A PDF version of the article can also be found &lt;a target="_blank" href="http://hectorcorrea.com/downloads/correapivottableswhitepaper.pdf"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><a10:updated>2009-01-12T22:43:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Expose-your-data-as-an-RSS-Feed-with-.NET-3.5.aspx</guid><link>http://hectorcorrea.com/blog/Expose-your-data-as-an-RSS-Feed-with-.NET-3.5.aspx</link><author>hector@hectorcorrea.com</author><title>Expose your data as an RSS Feed with .NET 3.5 </title><description>&lt;p&gt;In talking with my &lt;a target="_blank" href="http://geekswithblogs.net/TheCodeMonkey/Default.aspx"&gt;one of my friends&lt;/a&gt;&amp;nbsp;a couple of months ago I found that .NET 3.5 now has built-in classes to generate RSS Feeds. This was great news to me since both my personal blog (this site) and the &lt;a target="_blank" href="http://code.hectorcorrea.com/dotwiki/Default.aspx"&gt;DotWiki&lt;/a&gt; expose data as RSS Feeds but for the longest time I've been using an unsupported library that I downloaded from the web years ago.&lt;/p&gt;
&lt;p&gt;Last month I updated the DotWiki to use these new .NET classes (instead of the old unsupported library) to expose recent changes to Wiki topics as an RSS Feed. Although I found the .NET classes to generate feeds rather comprehensive I had a hard time finding good practical examples on MSDN on how to use them&lt;sup&gt;[*]&lt;/sup&gt;. Luckly Bipin Joshi posted two great examples on how to &lt;a target="_blank" href="http://www.dotnetbips.com/articles/4826711c-3f25-48ef-94d0-5c40b628c203.aspx"&gt;generate RSS feeds&lt;/a&gt; and&amp;nbsp;&lt;a target="_blank" href="http://www.dotnetbips.com/articles/addaf09f-9b6b-45d2-aba8-da11f23aa53e.aspx"&gt;consume RSS feeds&lt;/a&gt; with these .NET classes.&lt;/p&gt;
&lt;p&gt;Below is how the code in the DotWiki looks like to expose as an RSS Feed the list of changes in the last 24 hours. The complete code is available from the &lt;a target="_blank" href="http://code.hectorcorrea.com/dotwiki/Default.aspx?topic=DotWiki+Source+Code"&gt;DotWiki source code&lt;/a&gt; page.&amp;nbsp;&lt;/p&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 0, 255); "&gt;using&lt;/span&gt; System.ServiceModel.Syndication;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// Define the feed&amp;nbsp;&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&lt;span style="color: rgb(51, 153, 102); "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationFeed &lt;/span&gt;feed = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationFeed&lt;/span&gt;();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;feed.Title = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;TextSyndicationContent&lt;/span&gt;(&lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;DotWiki&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;feed.Copyright = &lt;span style="color: rgb(0, 0, 255); "&gt;new&amp;nbsp;&lt;/span&gt;TextSyndicationContent(&lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;Copyright (C) 2008. All rights reserved.&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;feed.Description = &lt;span style="color: rgb(0, 0, 255); "&gt;new&amp;nbsp;&lt;/span&gt;TextSyndicationContent(&lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;DotWiki RSS Feed&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// ... and the link for the site the feed represents&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationLink &lt;/span&gt;link = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationLink&lt;/span&gt;();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;link.Title = &lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;DotWiki&amp;quot;&lt;/span&gt;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;link.Uri = new Uri(&lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;http://code.hectorcorrea.com/DotWiki/&lt;/span&gt;&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;feed.Links.Add(link);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// Load items that we want on the feed (more on this below)&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;feed.Items = LoadBlogItems();&lt;/address&gt;
&lt;address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// Prepare the response with the proper encoding and content type &amp;nbsp;&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.Clear();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ContentEncoding = System.Text.&lt;span style="color: rgb(51, 204, 204); "&gt;Encoding&lt;/span&gt;.UTF8;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.ContentType = &lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;text/xml&amp;quot;&lt;/span&gt;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// Dump the content of the feed as an RSS 2.0 feed into the response&lt;/span&gt;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;XmlWriter &lt;/span&gt;rssWriter = &lt;span style="color: rgb(51, 204, 204); "&gt;XmlWriter&lt;/span&gt;.Create(Response.Output);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Rss20FeedFormatter rssFormatter = new &lt;span style="color: rgb(51, 204, 204); "&gt;Rss20FeedFormatter&lt;/span&gt;(feed);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rssFormatter.WriteTo(rssWriter);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rssWriter.Flush();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;rssWriter.Close();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Response.End();&lt;/address&gt;
&lt;/address&gt;
&lt;p&gt;The code for &lt;strong&gt;LoadBlogItems &lt;/strong&gt;which is the one that adds individual items to the feed is shown below. This method returns a generic list of SyndicationItems. Each element in the list contains the information about a topic that has been changed in the last 24 hours. Classes Topic and TopicList in this example are DotWiki specific classes but the rest is plain .NET code.&amp;nbsp;&lt;/p&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 0, 255); "&gt;private &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;List&lt;/span&gt;&lt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationItem&lt;/span&gt;&gt; LoadBlogItems()&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;List&lt;/span&gt;&lt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationItem&lt;/span&gt;&gt; items = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;List&lt;/span&gt;&lt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationItem&lt;/span&gt;&gt;();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;TopicList &lt;/span&gt;topics = &lt;span style="color: rgb(51, 204, 204); "&gt;TopicList&lt;/span&gt;.GetRecentChanges(GetLatest.Last24Hours);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 0, 255); "&gt;foreach &lt;/span&gt;(TopicInfo topicInfo &lt;span style="color: rgb(0, 0, 255); "&gt;in &lt;/span&gt;topics)&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;Topic &lt;/span&gt;topic = &lt;span style="color: rgb(51, 204, 204); "&gt;Topic&lt;/span&gt;.GetTopic(topicInfo.Id);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// Define basic element about this topic&lt;/span&gt;&lt;/address&gt;
&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationItem &lt;/span&gt;item = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationItem&lt;/span&gt;();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.Id = topic.Id.ToString();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.Title = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;TextSyndicationContent&lt;/span&gt;(topic.Name);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.Content = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 204, 204); "&gt;TextSyndicationContent&lt;/span&gt;(topic.Content);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.LastUpdatedTime = topic.UpdatedOn;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;string url = string.Format(&lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;http://code.hectorcorrea.com/DotWiki/?topic={0}&amp;quot;&lt;/span&gt;, &lt;span style="color: rgb(51, 204, 204); "&gt;HttpUtility&lt;/span&gt;.UrlEncode(topic.Name));&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.AddPermalink(new Uri(url));&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(128, 128, 0); "&gt;// ...and the author of the topic&lt;/span&gt;&lt;/address&gt;
&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationPerson &lt;/span&gt;author = new &lt;span style="color: rgb(51, 204, 204); "&gt;SyndicationPerson&lt;/span&gt;();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;author.Email = &lt;span style="color: rgb(255, 0, 0); "&gt;&amp;quot;somebody@somesite.com&amp;quot;&lt;/span&gt;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;item.Authors.Add(author);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;items.Add(item);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return items;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;p&gt;The RSS Feed generated by the .NET classes seems to be fully compatible with popular feed readers like Bloglines and Google Reader. From reading the MSDN documentation on the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.aspx"&gt;System.ServiceModel.Syndication&lt;/a&gt; namespace it seems that there is support for Atom 1.0 in addition to RSS 2.0. I have only tested the RSS 2.0 formatter, though.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;[*] update:&amp;nbsp;&lt;/strong&gt;&lt;/em&gt;Actually there is a rather nice MSDN code sample under the &lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/system.servicemodel.syndication.syndicationfeed.aspx"&gt;SyndicationFeed class&lt;/a&gt; documentation that shows how to expose the same feed as an Atom or RSS feed.&amp;nbsp;&lt;/p&gt;</description><a10:updated>2009-01-06T22:14:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Multiple-Endpoints-for-a-WCF-Service.aspx</guid><link>http://hectorcorrea.com/blog/Multiple-Endpoints-for-a-WCF-Service.aspx</link><author>hector@hectorcorrea.com</author><title>Multiple Endpoints for a WCF Service</title><description>&lt;p&gt;One of the nice features that Windows Communication Foundation (WCF) provides is the ability to expose a single service via multiple endpoints so that different client applications can consume the same service over different network protocols. For example the same service can be exposed via HTTP for external clients and via TCP for internal clients.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In WCF an &lt;strong&gt;endpoint&lt;/strong&gt; refers to the combination of the address where service is available, the binding used to communicate to it, and the contract that the service exposes, these three parameters are commonly known as the &amp;quot;ABC&amp;quot; of the endpoint.&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;The &lt;strong&gt;address &lt;/strong&gt;represents the URL where the service is to be found, for example&amp;nbsp;&lt;span style="color: rgb(0, 0, 255); "&gt;&lt;em&gt;http://localhost:8000/HelloWorld/HelloWorldService&lt;/em&gt;&lt;/span&gt; or&amp;nbsp;&lt;span style="color: rgb(0, 0, 255); "&gt;&lt;em&gt;net.tcp://localhost:9000/HelloWorld/HelloWorldService&lt;/em&gt;&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;The &lt;strong&gt;binding &lt;/strong&gt;describes the transport protocols for the communication channel, for example HTTP vs TCP&lt;/li&gt;
    &lt;li&gt;The &lt;strong&gt;contract &lt;/strong&gt;represents the functionality that the service exposes and it maps to a [ServiceContract] interface in your C# code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;An endpoint for a WCF Service can be configured via the app.config of the service or through code. In this post I am going to focus on how to configure a service via the app.config file to be available to multiple endpoints.&lt;/p&gt;
&lt;h3&gt;The Service&lt;/h3&gt;
&lt;p&gt;So let's assume we have a simple &amp;quot;Hello World&amp;quot; WCF service that implements IHelloWorld interface like the one shown in the following code snippet.&amp;nbsp;&lt;/p&gt;
&lt;address style="margin-left: 40px; "&gt;[&lt;span style="color: rgb(0, 128, 128); "&gt;ServiceContract&lt;/span&gt;(Namespace=&amp;quot;http://hectorcorrea.com/wcf&amp;quot;)]&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;public interface &lt;span style="color: rgb(0, 128, 128); "&gt;IHelloWorld&lt;/span&gt;&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;{&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[&lt;span style="color: rgb(0, 128, 128); "&gt;OperationContract&lt;/span&gt;] string Greetings(string yourName);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;[&lt;span style="color: rgb(0, 128, 128); "&gt;OperationContract&lt;/span&gt;] DateTime TheTimeIs();&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;}&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&lt;/address&gt;
&lt;div&gt;
&lt;address style="margin-left: 40px; "&gt;public class &lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldService &lt;/span&gt;: &lt;span style="color: rgb(0, 128, 128); "&gt;IHelloWorld&lt;/span&gt;&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;{&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public string Greetings(string yourName)&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return string.Format(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Hello {0}&amp;quot;&lt;/span&gt;, String.IsNullOrEmpty(yourName) ? &lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Guest&amp;quot;&lt;/span&gt; : yourName);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;public DateTime TheTimeIs()&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return DateTime.Now;&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;}&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&lt;/address&gt;
&lt;/div&gt;
&lt;div&gt;To host this service you can use the following code. The first line creates a host object for the HelloWorldService and the second line opens a communication channel to receive and process requests for this service. The call to host.Open() in this example will read the settings from the app.config (more on this later) to decide what endpoints will be opened for the service. The rest of the code displays what endpoints were found in the app.config for this service and finally we use ReadLine to put the host in a wait state and let it process requests as they come.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;ServiceHost&amp;nbsp;&lt;/span&gt;host = new&amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;ServiceHost&lt;/span&gt;(typeof(TheService.&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldService&lt;/span&gt;));&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;host.Open();&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Host has been started&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Endpoints&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;foreach (&lt;span style="color: rgb(0, 128, 128); "&gt;ServiceEndpoint&amp;nbsp;&lt;/span&gt;endpoint in host.Description.Endpoints)&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;{&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Address: {0}&amp;quot;&lt;/span&gt;, endpoint.Address);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Binding: {0}&amp;quot;&lt;/span&gt;, endpoint.Binding);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Contract: {0}&amp;quot;&lt;/span&gt;, endpoint.Contract.ContractType);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine();&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;}&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&amp;nbsp;&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Please [ENTER] to close the service host...&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.ReadLine();&lt;/address&gt;
&lt;address style="margin-left: 40px; "&gt;host.Close();&amp;nbsp;&lt;/address&gt;
&lt;h3&gt;Server Side Configuration&lt;/h3&gt;
&lt;/div&gt;
&lt;p&gt;The following XML shows how the different endpoints for the &lt;strong&gt;TheService.HelloWorldService&lt;/strong&gt; are defined in the app.config. This is the config file that lives on the &lt;em&gt;server side&lt;/em&gt;. Notice the three endpoints for the contract &lt;strong&gt;TheService.IHelloWorld&lt;/strong&gt;, these endpoints expose the service via basic HTTP binding, TCP binding, and WS binding and each of them has its own URL.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[[[xml:MultipleEndpointsService01.xml]]]&lt;/p&gt;
&lt;h3&gt;On the Client Side&lt;/h3&gt;
&lt;p&gt;Now that we have a WCF HelloWorld service implemented and a host running waiting for requests to be send let's turn to the client side and create a simple console application to consume it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The following code will connect to the HelloWorld service via a proxy class called HelloWorldClient using the endpoint named &amp;quot;tcpEndpoint&amp;quot;. It then makes a couple of calls to the Greetings and TheTimeIs methods in the service and finally closes the conection.&amp;nbsp;&lt;/p&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient &lt;/span&gt;service = new &lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient&lt;/span&gt;(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;tcpEndpoint&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Greetings: {0}&amp;quot;&lt;/span&gt;, service.Greetings(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Hector&amp;quot;&lt;/span&gt;));&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;The time is: {0}&amp;quot;&lt;/span&gt;, service.TheTimeIs());&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;service.Close();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;Channel closed.&amp;quot;&lt;/span&gt;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;Console&lt;/span&gt;.WriteLine();&amp;nbsp;&lt;/address&gt;
&lt;p&gt;In this code the class &lt;strong&gt;HelloWorldClient &lt;/strong&gt;is a proxy for the &lt;strong&gt;HelloWorld &lt;/strong&gt;service that we created before. The process to generate this proxy class is beyond the scope of this post (see references at the bottom of this post for more information.) In a nutshell, this proxy is a class that implements a skinny version of the HelloWorldService that uses WCF to forward the request accross the wire to the actual server. Thanks to WCF we don't have to write any of the low level networking stuff to deal with HTTP or TCP since WCF wraps that functionality for us.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This proxy class makes the code in the client application looks like its calling a class running on the same machine as the client. By just looking at this code, you have no idea if the call to &lt;strong&gt;service.Greetings&lt;/strong&gt; is to a class running on the same machine as the client or in a different machine across the country.&lt;/p&gt;
&lt;p&gt;So how do we tell the client where to find the real HelloWorld service? As with the server side settings you can do it either via code or using a config file. In this post I am going to show how to do it using a config file&amp;nbsp;(keep in mind that this client side config file is different config from the server side config file that we discussed before.)&lt;/p&gt;
&lt;h3&gt;Client Side Configuration&lt;/h3&gt;
&lt;p&gt;Like the server side configuration file that we reviewed before, the client side configuration also has endpoints and, as you can imagine, they are subset of the endpoints that the server exposes. &lt;em&gt;The client side config tells the client application where to find the service while the server side config tells the server where to listen for requests.&lt;/em&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The following XML shows how the endpoints are defined in the client side config. In this particular example we have all three endpoints for the HelloWorldService listed for illustration purposes, but we could have as well just one.&amp;nbsp;You will notice that the definition of these endpoints is similar to the ones that we used for the server config file as they also have an address, a binding, and a contract. Yet, keep in mind that this is a different config file -- this config defines client side settings. &amp;nbsp; &amp;nbsp;&lt;/p&gt;
&lt;p&gt;[[[xml:MultipleEndpointsService02.xml]]]&lt;/p&gt;
&lt;div&gt;You will notice that the name (tcpEndpoint) of the second endpoint in this XML matches with the name of the endpoint that we indicated in the line&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient&amp;nbsp;&lt;/span&gt;service = new&amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient&lt;/span&gt;(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;tcpEndpoint&amp;quot;&lt;/span&gt;);&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/address&gt;
&lt;p&gt;When this line is executed WCF will read the values of the &lt;strong&gt;tcpEndpoint&lt;/strong&gt;&amp;nbsp;from the client config file and open a TCP communication channel at the address indicated to communicate with a service that recognizes messages for the HelloWorldService contract.&lt;/p&gt;
&lt;p&gt;After this the calls to service.Greetings() and service.TheTimeIs() are automatically forwarded to the real service. If our service is up and running and listening for request on the same endpoint (i.e. same address, binding, and contract) it will process the request and return the expected result.&lt;/p&gt;
&lt;p&gt;You could change the first line to use the HTTP endpoint by just changing the name of the endpoint&lt;/p&gt;
&lt;address style="margin-left: 40px; "&gt;&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient&amp;nbsp;&lt;/span&gt;service = new&amp;nbsp;&lt;span style="color: rgb(0, 128, 128); "&gt;HelloWorldClient&lt;/span&gt;(&lt;span style="color: rgb(128, 0, 0); "&gt;&amp;quot;httpEndpoint&amp;quot;&lt;/span&gt;);&amp;nbsp;&lt;/address&gt;
&lt;p&gt;That's it, with one little change the client application will now use HTTP instead of TCP to send requests to the server but &lt;em&gt;the rest of the code in the client application remains unchanged&lt;/em&gt;. As I mentioned at the beginning a typical scenario is to use TCP for internal clients and HTTP for external clients.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;/div&gt;
&lt;p&gt;&lt;span style="font-size: smaller; "&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: smaller; "&gt;A great book on WCF and where I learned most the information in this blog post is &lt;/span&gt;&lt;a target="_blank" href="http://www.amazon.com/Learning-WCF-Hands-Michele-Bustamante/dp/0596101627"&gt;&lt;span style="font-size: smaller; "&gt;Learning WCF&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: smaller; "&gt; by Michelle Leroux Bustamante (aka &lt;/span&gt;&lt;a target="_blank" href="http://www.thatindigogirl.com/"&gt;&lt;span style="font-size: smaller; "&gt;that indigo girl&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: smaller; "&gt;).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: smaller; "&gt;If you want more information on how to create the proxy class used on the client two good references are &lt;/span&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/en-us/library/ms733133.aspx"&gt;&lt;span style="font-size: smaller; "&gt;this MSDN link&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: smaller; "&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: smaller; "&gt;and Miguel Castro's article on &lt;/span&gt;&lt;a target="_blank" href="http://www.devx.com/codemag/Article/39837/0/page/1"&gt;&lt;span style="font-size: smaller; "&gt;how to do it manually&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: smaller; "&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;</description><a10:updated>2008-12-22T21:56:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Flickr-Library-in-C-Sharp.aspx</guid><link>http://hectorcorrea.com/blog/Flickr-Library-in-C-Sharp.aspx</link><author>hector@hectorcorrea.com</author><title>Flickr Library in C#</title><description>&lt;p&gt;The last few days I've been working on a sample C# library to access Flickr pictures using Flickr's own API. This library is a light-weight C# class that provides two basic features: (1) retrieve the list of photosets in your account and (2) retrieve information about the photos in a photoset.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can view a running version of this code at&amp;nbsp;&lt;a target="_blank" href="http://code.hectorcorrea.com/FlickrLibDemo"&gt;http://code.hectorcorrea.com/FlickrLibDemo&lt;/a&gt;&amp;nbsp;It's nothing fancy but it should give you an idea of what the class can do for you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Using this class you can retrieve the&amp;nbsp;photosets in your Flickr account and display them in a combobox with a few lines of code like these:&amp;nbsp;&lt;/p&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 153, 102); "&gt;Flickr &lt;/span&gt;flickr = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 102); "&gt;Flickr&lt;/span&gt;(&amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;YourApiKey&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;YourUserID&lt;/span&gt;&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 153, 102); "&gt;List&lt;/span&gt;&lt;&lt;span style="color: rgb(51, 153, 102); "&gt;PhotoSetInfo&lt;/span&gt;
&lt;photosetinfo&gt;&gt;&amp;nbsp;photosets&amp;nbsp;= flickr.GetPhotoSets();&lt;/photosetinfo&gt;
&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cboPhotoSets.DataSource = photosets;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cboPhotoSets.DataTextField = &amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;Title&lt;/span&gt;&amp;quot;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cboPhotoSets.DataValueField = &amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;PhotoSetID&lt;/span&gt;&amp;quot;;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;cboPhotoSets.DataBind();&lt;/address&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Once you select a photoset you can retrieve information about the photos inside it (like title and URL)&amp;nbsp;with the following code. In this example I am binding the list of photos to an ASP.NET datalist control to display them:&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style="color: rgb(51, 153, 102); "&gt;Flickr &lt;/span&gt;flickr = &lt;span style="color: rgb(0, 0, 255); "&gt;new &lt;/span&gt;&lt;span style="color: rgb(51, 153, 102); "&gt;Flickr&lt;/span&gt;(&amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;YourApiKey&lt;/span&gt;&amp;quot;, &amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;YourUserID&lt;/span&gt;&amp;quot;);&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;List&lt;&lt;span style="color: rgb(51, 153, 102); "&gt;PhotoInfo&lt;/span&gt;&gt;
&lt;photoinfo&gt; photos = flickr.GetPhotosInSet(cboPhotoSets.SelectedValue);&lt;/photoinfo&gt;
&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;listPhotos.DataSource = photos;&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;listPhotos.DataBind();&lt;/address&gt;
&lt;address&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;lblPhotosMsg.Text = (photos.Count == 0) ? &amp;quot;&lt;span style="color: rgb(255, 0, 0); "&gt;No photos in this photoset&lt;/span&gt;&amp;quot; : &amp;quot;&amp;quot;;&lt;/address&gt;
&lt;p&gt;The Flickr API supports multiple requests and response formats. I am using the REST format for requests and responses in my FlickrLib library. A typicall Flickr REST request looks like this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;http://api.flickr.com/services/rest/?method=&lt;strong&gt;methodName&lt;/strong&gt;&amp;amp;parameter1=value1&amp;amp;parameter2=value2&lt;/p&gt;
&lt;p&gt;where methodName is the name of the method to call, for example &lt;b&gt;flickr.photosets.getList&lt;/b&gt; to return a list of photosets.&lt;/p&gt;
&lt;p&gt;REST responses that Flickr provide are XML documents with the pertinent information for the request. For the flickr.photosets.getList method the reponse would be an XML document with a photosets node and several photoset children nodes. These XML responses are very easy to parse with LINQ to XML and turn them into C# strong-typed objects (like PhotoSetInfo and PhotoInfo) which then can be bound to .NET classes. That's exactly what the FlickrLib library does, it provides a wrapper to the Flickr API functionality so that you can easily consume it from your .NET applications.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div&gt;&lt;strong&gt;References&lt;/strong&gt;&lt;/div&gt;
&lt;div&gt;You can download the C# source code for this class from &lt;a target="_blank" href="http://hectorcorrea.com/downloads/FlickrLibDemo.zip"&gt;http://hectorcorrea.com/downloads/FlickrLibDemo.zip&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;For information about the Flick API visit &lt;a target="_blank" href="http://www.flickr.com/services/api/"&gt;http://www.flickr.com/services/api/&lt;/a&gt;&amp;nbsp;there is a lot of information there on what the API provides and how to use it. There are tons of Flickr features that the API provide that you might find useful and that my little class does not expose. &amp;nbsp;&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;You will need to obtain an API key from Flickr in order to use their API through this class or any other class. The API key is free but it is needed so that Flickr can prevent a single user from submitting too many requests to their site and take it down.&amp;nbsp;&lt;/div&gt;</description><a10:updated>2008-11-30T12:27:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/DevConnections-2008.aspx</guid><link>http://hectorcorrea.com/blog/DevConnections-2008.aspx</link><author>hector@hectorcorrea.com</author><title>DevConnections 2008</title><description>&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Below are the brief notes that I took while at DevConnections in Las Vegas (November/2008) This blog entry is mostly bullet points of things that I found interesting without much details. I'll elaborate on some of these topics in future blog entries.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;Tuesday, November 11th&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;span style="font-size: 10pt; color: black; font-family: 'Arial','sans-serif'; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_mandalaybay.jpg" /&gt;&lt;/span&gt;Opening Keynote &lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Scott Gu started with an overview of some of the new features released in the last year which included:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Dynamic data access (to build a database application with a wizard&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Charting controls for ASP.NET&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;ASP.NET MVC - &lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;TDD friendly,&amp;nbsp;c&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;loser to the metal (HTML) programming model, &lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Not for everyone&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Several Silverlight demos&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Then he went to describe some of the new things coming in Visual Studio 2010 and ASP.NET 4.0 which included:&lt;/span&gt;&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Visual Studio's UI will use WPF rather than Windows Form&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Better support for release and deployment (e.g. support for multiple web.config files, one for each environment)&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Better support for documentation and integration with TFS work items&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Native support for SharePoint&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;TDD workflow&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Distributed caching for ASP.NET apps (look for project Velocity)&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;NET continuum (web, desktop, RIA)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;a href="http://weblogs.asp.net/christoc/archive/2008/11/11/scott-guthrie-s-keynote-at-devconnections-openforce.aspx"&gt;Chris Hammond&lt;/a&gt; has a&amp;nbsp;very nice summary of this sesion&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; text-align: center; mso-outline-level: 2" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Entity Framework in a World of Services and Processes&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_backpack.jpg" /&gt;The Entity Data Model (.edmx) generated with the Entity Framework (EF) is serializable by default which makes it compatible with WCF out of the box.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Context in EF is the equivalent to a database connection in data access&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Gotcha: You need to enumerate LINQ results before passing them back with the EF if you (as you should) surround your context with a using statement &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;using (EF context)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;{&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;var blog = from x in ctx.Blogs select y;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;return blogs.ToArray() // enumerate before end of using&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;}&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;In my opinion, the Entity Framework seems unfinished. Although EF makes really easy to ready data using an object model the interface to save data (inserts and updates) looks complicated. Several &amp;quot;hacks&amp;quot; were needed to save data.&amp;nbsp;The problem seems to stem from the&amp;nbsp;fact that the EF is very&amp;nbsp;good understanding state but not inferring intent. Currently all operations apply to the entire object graph and there is no easy way to make operations more granular. This will be worked out in version 2.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;ADO.NET Data Sets (formerly known as Astoria) makes data accessible through HTTP via a REST approach. In this approach the intent is inferred from the URL. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;SOAP uses lots of&amp;nbsp;verbs while REST&amp;nbsp;few&amp;nbsp;verbs (put/get/post/delete) but lots of nouns.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; text-align: center; mso-outline-level: 2" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;ASP.NET MVC - so what?&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_bike.jpg" /&gt;Scott Hanselman gave a very good presentation describing what MVC provides and does not when compared with traditional ASP.NET Web Forms. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The first thing he clarified is that ASP.NET is greater than MVC&amp;nbsp;or WebForms. Secondly, both approaches are here to stay. They target different audiences. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;ASP.NET with Web Forms hides HTML from the developer and adds a state subsystem to HTML.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;MVC is a new project type in ASP.NET. It gives the developer more control over the HTML, lends to code easier to test (TDD friendly), but it is not for everyone. Unlike WebForms there are no event in MVC, that is there is no button&amp;rsquo;s click event, no page postback, no viewstate, and no page lifecycle. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;If we lose so many &amp;ldquo;web form&amp;rdquo; features with MVC, isn&amp;rsquo;t it like going back to classic ASP? No, there was no separation of concerns in classic ASP (more on this below) the code was all lumped in a single page and it wasn&amp;rsquo;t easy to test.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You can mix and match WebForms and MVC in a single web site. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;A typical URL in an MVC follows this format: &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font color="#0000ff"&gt;http://controller/method/methodparameter&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;, for example: &lt;/span&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font color="#0000ff"&gt;http://products/retrieve/3&lt;/font&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The name MVC comes from the Model View Controller pattern. Sites with MVC use a controller (C) to interact with a model (M) to get data and return views (V). This model enforces a clear separation of concerns between the model, the view, and the controller, for example, the controller does not know anything about HTML, that&amp;rsquo;s the job of the view. The view does not know anything about the database, that&amp;rsquo;s the job of the model. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The default view used by MVC uses WebForms. You can build your own or use third party views. Scott showed a kind of view using a third party product called NHAML that was quite different to a traditional WebForm way of constructing an HTML page.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;LINQ to everything&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_lion.jpg" /&gt;The speakers gave a tour of all the different LINQ flavors to query a variety of data sources. Slides&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&amp;nbsp;can be found at &lt;/span&gt;&lt;span style="font-size: 10pt; color: #573323; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;a target="_blank" href="http://blogs.msdn.com/aconrad/"&gt;http://blogs.msdn.com/aconrad/&lt;/a&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to objects&lt;/strong&gt; - Provides a mechanism to query objects. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to SQL&lt;/strong&gt; &amp;ndash; Provides LINQ&amp;rsquo;s functionality but targeting a database (SQL Server only) rather than objects.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to Entities&lt;/strong&gt; &amp;ndash; A higher level of abstraction than LINQ to SQL, includes support for modeling (Entity Data Models) and supports multiple backend via plug-ins (although the only available at this point is for SQL Server)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to DataSet&lt;/strong&gt; &amp;ndash; So that you don&amp;rsquo;t los you investment on DataSets Microsoft provides this flavor. The tag line is: &amp;quot;Not having to say you're sorry&amp;quot; Supports everything from DataSets (e.g. offline access) with a few extra features (e.g. LINQ joins)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to XML&lt;/strong&gt; &amp;ndash; Provides a lightweight XML API (lighter than the DOM.) Several new XML classes are LINQ aware. For example, the new XDocument is LINQ aware but not the old XmlDocument.&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Easier to generate XML documents with Linq to XML than traditional use of the DOM.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;XDocument xdoc = new XDocument(&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;new XElement(&amp;quot;contacts&amp;quot;,&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;from c in contacts where country = &amp;quot;South Africa&amp;quot;)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;em&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;select new XElement(&amp;quot;name&amp;quot;)&lt;/span&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&amp;nbsp;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;VB.NET you can type XML directly as regular VB code (without having to add quotes) and embed expressions in the XML&amp;nbsp;(similar to the way they are embedded in an ASP.NET) that get rendered at runtime to produce the final XML. This is really cool. Too bad we don&amp;rsquo;t have it in C#.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to ADO.NET Data Services&lt;/strong&gt; - ADO.NET Data Services allow you to publish your data model as REST-based web services so that any HTTP client can consume them. For example you can use a URL like this http:/localhost/myservice.svc/customers(&amp;quot;ALFKI&amp;quot;)/Orders to retrieve orders for customer with key &amp;ldquo;ALFKI&amp;rdquo;. You can query ADO.NET Data Services with LINQ. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to Cloud Data Sources&lt;/strong&gt; - At PDC earlier this year Microsoft unveiled two &amp;quot;cloud data sources&amp;quot;: Microsoft Azure and SQL Data Services&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;strong&gt;LINQ to [insert your custom provider here]&lt;/strong&gt; &amp;ndash; You can write your own data source and make it LINQ friendly. Must implement IQueryable&amp;lt;T&amp;gt; and IQueryProvider. The two main challenges are (1) translate LINQ expressions to your native data source language and (2) transform query results to objects. They demo a LINQ to Twitter implementation. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Implementing RESTful Services with WCF 3.5 SP1&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: 21.6pt"&gt;&lt;span&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_geeks.jpg" /&gt;&amp;nbsp;&lt;a target="_blank" href="http://www.RobBagby.com"&gt;www.RobBagby.com&lt;o:p&gt;&lt;/o:p&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;In 1993 Web = Content, today Web = Content + Capabilities. Web is a graph of linked resources. Resources support a fixed set of operations (HTTP verbs)&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt; mso-bidi-font-weight: bold; mso-bidi-font-style: italic"&gt;REST is an architectural style, not a specification&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Play well with HTTP (honor response codes, use verbs) as we build other applications to run on the web. HTTP&amp;nbsp;has proven to be good why not continuing using it.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;New 3.5 binding webHttpBinding does not use SOAP envelope, it's RESTful friendly.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Use&amp;nbsp;WebGet and WebInvoke attributes.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt; mso-bidi-font-weight: bold"&gt;WCF REST Starter Kit (CodePlex project) has three components:&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;New DLL Microsoft.ServiceModel.Web.dll,&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: Symbol; mso-fareast-font-family: Symbol; mso-bidi-font-family: Symbol"&gt;&lt;span style="mso-list: Ignore"&gt;&lt;span style="font: 7pt &amp;quot;Times New Roman&amp;quot;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Visual Studio 2008 Templates and&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;REST Samples.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 2.4pt 0in 1.2pt; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Rob suggested four features our services should provide: (1) Use appropriated HTTP verbs, (2) Chose a representation, (3) Provide addressability, and (4) use valid HTTP response codes. These features are fully supported in the WCF REST Starter Kit via (1) WebGet attribute, (2) ResponseFormat parameter, (3) URITemplate, and (4) WebProtocolException class.&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 2.4pt 0in 1.2pt; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;Wednesday, November 12th&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;From one server to two: Making the leap&lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_stratosphere.jpg" /&gt;I came late to this session so I don&amp;rsquo;t have much on the first part of it but I found it very interesting. The speaker (Richard Campbell) was very honest on what you get and what you don&amp;rsquo;t get when you start using more than one server to host your application.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You use load balancing to improve reliability and scalability, but that does not necessarily translate into performance. By using load balancing the application will be more resistant to hardware faults (reliability) and support more users (scalability) but it won&amp;rsquo;t become faster.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;NLB adds overhead to the processing of a request, especially if you use server affinity. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You tell the cluster to drain a server, this will let the server finish processing whatever requests/sessions are currently on the server but it won&amp;rsquo;t take more requests. This work as expected when no affinity is used. When affinity is used draining a server can take hours since sessions don&amp;rsquo;t expire immediately and users could keep submitting requests on the same session and the machine won&amp;rsquo;t be free up until all sessions have been closed or expired.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;If you use the no affinity approach objects need to be marked as serializable to be saved in the session cache. This is because with no affinity session is stored out of proc. It&amp;rsquo;s very important to keep session information to a minimal when storing it out of process. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Windows comes with a State Server that stores session (state) information in memory. It&amp;rsquo;s about twice as fast as storing information in SQL Server but it is a single point of failure. You can store session information in SQL Server as well and cluster SQL Server to prevent single point of failure. Third parties are worth considering.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;He recommends that if you create a cluster, go all the way: use the no affinity approach. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;When testing clusters make sure you test large time spans (10-15 minutes at least) to make sure you get a realistic picture. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Windows NLB detects if a machine goes down but it does not detect if IIS becomes non-responsive. You get what you paid for it.&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; text-align: center; mso-outline-level: 2" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;WCF Durable Services&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_belagio.jpg" /&gt;Juval Lowy started this session by talking about Custom Context in WCF and you can use this to pass out of band parameters in the header of a request. For example, if you need to have a way to identify who is making the call instead of passing an extra parameter on each method call you can store this information in the Context of the request and pass it back and forth. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There are three bindings that support this feature, look for bindings with the word &amp;ldquo;Context&amp;rdquo; on them, for example BasicHttpContextBinding.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;He&amp;rsquo;s build a few wrapper classes that make using the context information a breeze. Download them from his site: &lt;/span&gt;&lt;a href="http://idesign.com/"&gt;&lt;span style="font-size: 10pt; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;font color="#0000ff"&gt;http://idesign.com&lt;/font&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;After explaining this Juval moved to talk about durable sessions. He started by describing how in most client/server programming there is the implicit assumption that requests are short (milliseconds to minutes) Most client/server programming models assume this and work OK when the duration of the requests are short but fall short when requests take hours or days. On large time spans clients may come and go; hosts may come and go or move to different machines. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;For long running requests you cannot keep service state in memory at all times, you need to persist it. Clients need to provide a state identifier so that the server can pull the correct state from the persistent storage. There are two basic was ways to pass this information around. One is to add an extra parameter to every call and pass the session identifier there but this is ugly and introduces &amp;ldquo;infrastructure&amp;rdquo; information to the business methods. A better approach is to pass this information in the context of the request. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You can add values to the context of a request from both, the client and the server. Server is the preferred approach. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;If you change values on a static context on the server side make sure you make it thread safe (i.e. use lock)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;To use durable services add DurableService attribute to your service class.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You can mark some of your methods with DurableOperation(CompleteInstance=true) to indicate that this method completes a session (e.g. the work to be done has been completed) and let the server know that when this method is called it can clear the session information for this caller. Once you end a session you need to recreate it (custom code required.)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Juval showed all his examples using a &amp;ldquo;File Persistent&amp;rdquo; provider to keep things simple. WCF provides a SQL Persistent provider. Look under the 3.5\SQL folder for the scripts to create the database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Towards the end Juval closed the session by demoing &amp;ldquo;transactional memory&amp;rdquo; &amp;ndash; this was very cool but I got lost in the process and my notes are not very clear. The basic idea was that you can implement transactions for operations that happen in memory. For example, execute this process but don&amp;rsquo;t change any values in memory if an exception happens in the process. Basically you decide when changes to values in memory are committed.&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Building a WCF Router for Your Applications&lt;/span&gt;&lt;span style="font-size: 12pt; color: red; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_atnight.jpg" /&gt;This Michelle Leroux Bustamante talked how to create a WCF Service to route messages. There are two kinds of routers: Pass-Through routers and Processing Routers. This was by far the most advanced session that attended in the conference.&amp;nbsp;Even though&amp;nbsp;Michelle&amp;nbsp;did a great job explaining the topic it was waaaaay more than I could understand. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;She described several reasons why you might want to build your own router. A routing service can serve as a software load balancer (which is typically not very practical since routers are cheap these days) but it can also do routing based on the content of the message (requests from strict SLA clients go to the best servers) something that a hardware solution couldn&amp;rsquo;t provide. A router service is also useful if you want to support online/offline scenarios.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There are several considerations that you need to be aware when building a service router. When a router receives a message and forwards it to a different service it can change its header, content, both, or none. If a router A does not change the header information and forwards it to service A that does not use security the request will be accepted by service A. However if the Service A implements security at it will reject the message because in the header indicates that the message was originally for router A (not Service A.) If the router is smart enough it can change the header of the message to indicate that the receiving end is really Service A but this introduces another issue because now Service A will see that somebody has tampered with the original headers. Michelle explained ways to address these issues using supported WCF functionality. She even showed how to support different transport protocols between the client and the router (e.g. HTTP) and the router and the service (TCP.) None of this was trivial for the uneducated like me but nevertheless possible and well supported in WCF.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;In general it seems that routing is very easy until you turn on security. It&amp;rsquo;s very easy to thing that it only took a couple of minutes to get it working until you realize that security is off. Once you turn security on then you&amp;rsquo;ll deal into the things that she described.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There were several interesting demos showing how messages would go back and forth to different servers depending on different algorithms including round robin, information on the message header or the message body. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;LINQ to SQL&lt;/span&gt;&lt;span style="font-size: 12pt; color: red; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_casino.jpg" /&gt;Dino Esposito presented a very good introduction to LINQ to SQL. LINQ to SQL provides an object model on which LINQ operates to read and write data to a database. It also provides an abstraction layer on top of connections, data readers, datasets, transactions, and such.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;LINQ to SQL is SQL Server specific. Other vendors might support it in the future.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Classes generated in the object model used by LINQ to SQL have C# attributes that describe what table/column they represent in the database. These classes are partial and you can extend them, for example to add business logic.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Relationships between tables are implemented as composite classes in the object model provided by LINQ to SQL. For example, Customer.Invoices[0].DueDate and Invoice.Customer.FirstName&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The entry point to the object model is the DataContext class. This is the class that tracks changes. This class is short-lived and it&amp;rsquo;s recreated on each ASP.NET request. Opening a DataContext does not necessarily open a database connection, the database will not be hit until the first read or write to the data is detected. The fact that this class is recreated on each request is an issue in n-tier applications. This is the issue mentioned on the &amp;ldquo;Entity Framework in a World of Services and Processes&amp;rdquo; session yesterday and that will not be addressed until V2.0 of the Entity Framework.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Something that I found curious is that for queries you use LINQ syntax (which looks a lot like SQL syntax) but for updated you need to create a new object, populate the values that you want to change, and then call some specific methods (like SubmitChanges) to push the data to the database. Like in the session about the Entity Framework yesterday it seems that they&amp;rsquo;ve done a great job when it comes to reading data but the procedure to perform updates seems kludgy. That whole concept that you clone an object and then attached to a different DataContext just does not look right. I am sure you can get used to it but it just makes the product seem unfinished. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Dino was extremely honest on some of the awkward things when working with LINQ to SQL (most of which also apply to EF.) For example if you turn of lazy loading (aka deferred instantiation) some of the children collections like Customer.Orders.Count will return zero. He also showed some of the hacks that he had to go through when trying to force an update when a property that didn&amp;rsquo;t match one to one to a field was used. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: 21.6pt"&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;In general LINQ to SQL and the Entity Framework look like great ideas that one should keep an eye on. If I didn&amp;rsquo;t knew about the &lt;a target="_blank" href="http://www.lhotka.net/cslanet/"&gt;CSLA Framework&lt;/a&gt; that Rockford Lhotka provides for free I would be all over this stuff, but since Lhotka&amp;rsquo;s framework has been around for a while is a more mature product. You can use LINQ (and LINQ to SQL and I suppose even the Entity Framework) with CSLA but CSLA provides enough that I don&amp;rsquo;t see much value on LINQ to SQL and EF in their current state.&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;Thursday, November 13th&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&amp;nbsp;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;High Performance Computing (HPC) &lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_excalibur.jpg" /&gt;Nick Landry presented this session. High Performance Computing is used in scenarios when a user needs to submit a massive job, where as load balancing is used to handle massive number of users. An HPC Cluster is similar to a super computer, more than a typical network cluster. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;An example where HPC is used is to calculate stock projections. Calculating the stock projection for a single stock is a very intensive job and it gets even worse when we need to calculate projections for the entire portfolio of a large client. In this case a massive job (calculate stock projections for these 100 stocks) is submitted to HPC cluster in which multiple machines work on the same job.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Microsoft provides a product called Windows HPC Server 2008 (formerly known as &amp;ldquo;Compute Cluster Server) that runs on top of Windows 2008 to create a HPC Cluster. &lt;a href="http://microsoft.com/hpc"&gt;&lt;font color="#0000ff"&gt;http://microsoft.com/hpc&lt;/font&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Version 1 of Windows HCP accepted batch jobs only submitted via a command line. In Version 2 there is an API that allows you to submit jobs. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;To get started you need Windows Server 2008 plus the HPC Pack. The HPC Pack is licensed by CPU and Microsoft&amp;rsquo;s offer is the cheapest of the products around. The HPC Pack is what you use to setup the &amp;ldquo;head node&amp;rdquo; or to join an existing cluster. The head node runs the scheduler and knows about other machines. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There are .NET libraries to submit jobs to a HPC Cluster. For example, a single GetProjectionsForAllMyStocks() call will be broken down into multiple tasks (for example one per available computer) and run in parallel.&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Productive WCF &lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_sign.jpg" /&gt;In this session Juval Lowy focused on how to use WCF more than the plumbing underneath. He started by talking about WcfSvcHost.exe to host WCF Services without having to write your own host wrapper code. You can use it to start a WCF library project. You can call it with a /client parameter to fire both server and client applications at the same time. You can also call WcfTestClient.exe program to call a particular server (similar to the ASP.NET Web Service test page)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Instrumentation.&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt; WCF has several performance counters that you can use to monitor WCF Services. Just turn on performance counters in your config file (under ServiceModel) and monitor them with perfmon like you would typically would.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Tracing and logging&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;. &amp;ldquo;It&amp;rsquo;s an illusion that clients care about the details of an exception&amp;rdquo; &amp;ndash; most clients application have &amp;ldquo;if returnValue == OK then do X else display message to the user&amp;rdquo; In reality there is very little that the client application can do with the error other than telling the user &amp;ldquo;sorry&amp;rdquo; &amp;ndash; if there was something to do the app would have already done it. Don&amp;rsquo;t create custom exception. Use the already build in ones.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;You can turn on tracing and logging via the configuration file or with the WCF Configuration tool (look under diagnosis.) Make sure you turn on &amp;ldquo;auto-flush&amp;rdquo; so that the logging information is saved even if you stop the debugger in the middle of a session. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The &amp;ldquo;activity ID&amp;rdquo; checkbox in the WCF Configuration tool refers to a &amp;ldquo;logical thread&amp;rdquo; that tracks the activity across all tiers (client, host, service, et cetera.) The TraceViewer utility can automatically merge the log file from the client and the server with this activity ID. This is really cool.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Operations Overloading&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;. You &lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;can modify the proxy class to support multiple method overloading by tagging them different via an attribute. For example to alias Add(int, int) into AddInt and Add(float, float) into AddFloat. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;DataSets and DataTables&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;. You should not return DataSets in your services. They are not good for other platforms other than .NET and are bound to database schema. You should use arrays instead&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;strong style="mso-bidi-font-weight: normal"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Fault Debugging&lt;/span&gt;&lt;/strong&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;. By default exception information is not bubbled up to the client application. He showed some code on the server side where he throws exception using throw new FaultException(ExceptionDetail) where ExceptionDetail is a custom class. You need to turn on &amp;ldquo;include exception detail&amp;rdquo; at the service level for this to work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Once you turn use this code you can catch FaultException&amp;lt;ExceptionDetail&amp;gt; in addition to a generic catch FaultException in your client application.&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;span style="mso-spacerun: yes"&gt;&amp;nbsp;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Using jQuery with ASP.NET &lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_lamp.jpg" /&gt;Rick Strahl gave a very good overview of what is jQuery, what it can do, and how to use it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;jQuery is conceptually like &amp;ldquo;LINQ to HTML&amp;rdquo; in the sense that it allows you to query the HTML document at runtime and returns collections of objects. Rick called it the new HTML API.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;jQuery is open source and quite popular, there are 100s of plug-ins available for it. The download is pretty small: 16KB. It uses CSS 3 selector syntax (dot to select classes, pound sign to select IDs)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;jQuery is open source but it also come as part of Visual Studio 2008 SP1.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Rick showed several examples on how to select rows inside a table and change the background color of the even rows to produce an alternate grid. He then added with a very simple line of code a OnMouseHover JavaScript to all rows of the table to highlight the current row as the user hovers the mouse. The library is very powerful and once you know a few simple commands you can start using it. Below are some examples. $() is the selector operator and is a shortcut for jQuery()&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;$(&amp;ldquo;#someElementID&amp;rdquo;).css(&amp;ldquo;color&amp;rdquo;,&amp;rdquo;blue&amp;rdquo;) changes the font to blue of some element&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;$(&amp;ldquo;.someClass, .someOtherClass&amp;rdquo;).hide() hides all elements of someClass and someOtherClass&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;$(&amp;ldquo;table tbody tr:even&amp;rdquo;).addClass(&amp;ldquo;gAlternate&amp;rdquo;).css(&amp;ldquo;{font-weight:bold}&amp;rdquo;) to assign gAlternate class to all even rows on a table and change their font to bold. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There were some neat examples on how to use client side sorting, drag and drop, pop-up screens with fading effects. All of this with pure JavaScript and cross-browser compatible. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;Towards the end Rick also showed some examples on how to use jQuery to call ASP.NET pages AJAX-like. He also demoed some stuff on serializing objects using JSON, consuming WCF services with jQuery, and a bunch of other things.&amp;nbsp;&lt;/span&gt;&lt;span style="font-size: 10pt; color: black; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;div class="MsoNormal" style="margin: 0in 0in 0pt; line-height: normal; text-align: center" align="center"&gt;&lt;span style="font-size: 10pt; color: red; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'; mso-bidi-font-size: 11.0pt"&gt;&lt;hr align="center" width="100%" size="2" /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;p class="MsoNormal" style="margin: 0.2in 0in; line-height: normal; mso-outline-level: 2"&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;PLINQ: LINQ but faster &lt;/span&gt;&lt;span style="font-size: 16pt; color: #bc8f5f; font-family: &amp;quot;Times New Roman&amp;quot;,&amp;quot;serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/vg_venetian.jpg" /&gt;Stephen Toub from Microsoft gave an outstanding presentation on Parallel LINQ which is something that Microsoft is working for .NET 4.0 &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;PLINQ is for data in memory (i.e. LINQ to Objects, not LINQ to SQL)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The basic premise is that people are not taking advantage of multi-code machines because parallelism is (very) hard. Stephen showed a typical example how a loop that selects some values from a collection and sorts them can be done in parallel. The code is nasty to put it mildly, you need to use lock, synching results, creating multiple threads, and so on. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;With PLINQ the idea is that you tell LINQ &amp;ldquo;run this in parallel&amp;rdquo; and let the framework do the work for you. All you would need to do is add AsParallel to a LINQ statement like in the following example: var v = from c in collection.&lt;strong style="mso-bidi-font-weight: normal"&gt;AsParallel()&lt;/strong&gt; when c.name &amp;gt; &amp;ldquo;x&amp;rdquo; select c.name, c.age &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;PLINQ is currently in CTP stage. The June CTP release works with .NET 3.5 Go to &lt;font color="#0000ff"&gt;&lt;a target="_blank" href="http://msdn.microsoft.com/concurrency"&gt;http://msdn.microsoft.com/concurrency&lt;/a&gt;&lt;/font&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There are two kinds of collections that LINQ can use. Collections that implement IEnumerable and collections that implement IList. IEnumerable is the most primitive and since it not thread safe PLINQ results to brute force (lock, get current, move next) and therefore you might not benefit a lot of parallelism in these collections. IList on the other hand is thread safe and allows PLINQ to make &amp;ldquo;smarter&amp;rdquo; decision on how to break the job like using Range and Stripe partitions.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;The benefit of parallelism is not linear. A machine with 2 cores might be 1.75x faster than a machine with one core and a machine with 4 cores might be 3x faster than the machine with one core. This is because there is some cost associated with breaking apart a job to be run in parallel and merge the results at the end. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;If there is a lot of I/O in your process you can increase the degree of parallelism (DOP) to a large number than the number of processors since the processors might become idle as they wait of the data to be retrieved/saved.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;When using AsParallel the order of the results is not guaranteed. You can add AsOrdered to force ordering but that also adds overhead.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p class="MsoNormal" style="margin: 0in 0in 10pt"&gt;&lt;span style="font-size: 10pt; color: black; line-height: 115%; font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; mso-fareast-font-family: 'Times New Roman'"&gt;There are several kinds of partitions used by PLINQ. Chunk and Hash for IEnumerable collections and Range and Stripe for IList collections. There are also several kind of merge procedures that PLINQ can use like Pipeline, Stop and Go, and Inverted. You have some control on what kind of partition and merge process is used but you are probably better off letting the framework make those decisions, similar to the way a database management system does.&lt;/span&gt;&lt;/p&gt;</description><a10:updated>2008-11-11T05:03:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Managing-and-Leading-The-One-Thing.aspx</guid><link>http://hectorcorrea.com/blog/Managing-and-Leading-The-One-Thing.aspx</link><author>hector@hectorcorrea.com</author><title>Managing and Leading (The One Thing)</title><description>&lt;p&gt;&lt;img alt="" hspace="10" align="left" src="http://hectorcorrea.com/images/onething.jpg" /&gt;A few years ago my friend Bill from &lt;a target="_blank" href="http://rebarbusinessbuilders.com/Contact.aspx"&gt;Rebar Business Builders&lt;/a&gt; recommended me the book &amp;quot;The &lt;a target="_blank" href="http://www.amazon.com/One-Thing-You-Need-Know/dp/0743261658"&gt;One Thing You Need to Know&lt;/a&gt;...About Great Managing, Great Leading, and Sustained Individual Success&amp;quot; by Marcus Buckingham.&amp;nbsp;For a while I hesitated to buy this book, initially the title about &amp;quot;the one thing&amp;quot; kind of put me off but I ended up buying it&amp;nbsp;and reading it.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Back then I knew I&amp;nbsp;had enjoyed the book but until recently I didn't realize how much I took from it.&lt;/p&gt;
&lt;p&gt;The first thing that the book helped me clarify was the difference between managing and leading. Not only are these two roles (and the talents needed to perform them) different but they are oposite. Marcus points that the main focus of great managers are his/her employees while the main focus of great leaders is a better future.&lt;/p&gt;
&lt;p&gt;Here is how Marcus puts it in regards to management [p. 83]&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The One Thing that all great managers know about great managing is this: &lt;strong&gt;Discovery What Is Unique About Each Person and Capitalize on It&lt;/strong&gt;.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;and in regard to leadership [p. 132]&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;The One Thing every great leader knows he must do is: &lt;strong&gt;Discover What Is Universal and Capitalize on It&lt;/strong&gt;.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Marcus provides several examples on how &lt;strong&gt;great managers&lt;/strong&gt; &amp;quot;see people as an end unto themselves&amp;quot; and &amp;quot;derive satisfaction from seeing tiny increments of growth in someone else&amp;quot;. Their focus is to serve their employees first, find what is unique about each of them, care for them, and put them in situations where their individual talents shine. Great managers will go above and beyond to &amp;quot;rearrange the world&amp;quot; to take advantage of each employee's individual strengths. This in turn&amp;nbsp;tends to drive productivity in employees and teams which is why companies need great managers.&lt;/p&gt;
&lt;p&gt;The two most important talents that allow great managers to perform their role is the ability to coach people and perceive their individual differences.&lt;/p&gt;
&lt;p&gt;On the other hand leaders&amp;nbsp;have a different role.&amp;nbsp;&lt;strong&gt;Great leaders &lt;/strong&gt;&amp;quot;perform [their] role well only when they find a way to make many people, regardless of each person's uniqueness, excited by and confident in [a] better future&amp;quot; Leaders tend to be fascinated by the future and they believe they have what it takes to take people to this better future.&lt;/p&gt;
&lt;p&gt;The two talents that all great leaders have are optimism and ego.&amp;nbsp;Optimism because they are convinced they can overcome present challenges and that there is a better way to do something. Marcus points that the oposite of a leader is a pessimistic.&amp;nbsp;Ego because they believe they have what it takes to get there. As Marcus puts it, &amp;quot;they are not humble in their assessment of their own abilities&amp;quot; -- yet, this does not mean they are brash or abrasive, as a matter of fact most of them are quite reserved. [p. 66-68]&lt;/p&gt;
&lt;p&gt;On the Agile Management Blog, David Anderson has an interesting post on &lt;a target="_blank" href="http://www.agilemanagement.net/Articles/Weblog/LeadWellandProsper.html"&gt;Lead Well and Prosper&lt;/a&gt; that echoes some of these thoughts on optimism and leadership.&lt;/p&gt;
&lt;p&gt;I think having a clear idea of the different roles and talents needed for managing and leading is very important in software development teams, particularly as developers start getting promoted to positions in which they are expected to lead and/or manage. Each company has a different expectation on what a senior or lead developer should do. Make sure you know what your role is, what your skills are, and how to make sure you are in a position that you enjoy, can perform,&amp;nbsp;and is the best for the team.&lt;/p&gt;
&lt;p&gt;Some people are very good at managing but not at leading, and vice-versa. Some people are good at both, some are not good at either. This is something applies to you, your peers, the people that report to you, and also to the people that you report to.&lt;/p&gt;
&lt;p&gt;Marcus goes as far as to claim that leaders are born, not made [p 69] He bases this claim on the fact that optimism and ego is something that people are born with, not something that leaders learn. I am not sure I agree (or disagree) with his statement --&amp;nbsp;it's an uncomfortable thought, but I am not sure it's wrong.&lt;/p&gt;
&lt;p&gt;The book is very good in general and I highly recommend it&amp;nbsp;to people that are getting into management or leadership positions.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;References&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;Buckingham, Marcus. &lt;em&gt;The One Thing You Need to Know...About Great Managing, Great Leading, and Sustained Individual Success&lt;/em&gt;. 2005. Free Press.&lt;/font&gt;&lt;/p&gt;</description><a10:updated>2008-11-09T22:24:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Skeletons-Mona-Lisa-and-Problem-Solving.aspx</guid><link>http://hectorcorrea.com/blog/Skeletons-Mona-Lisa-and-Problem-Solving.aspx</link><author>hector@hectorcorrea.com</author><title>Skeletons, Mona Lisa, and Problem Solving</title><description>&lt;p&gt;One of the best practices when building applications that I've learned over the years is the value of always having a running version of the application available to show end-to-end progress on the system being developed. Although this is common sense it's easy to get caught on the day-to-day activities and lose track of these things.&lt;/p&gt;
&lt;p&gt;A typical situation in which teams seem to forget the value of always having a running version of the application is when writting a brand new application. In this scenario is common to have a bunch of components half-way written and not ready for production and most development teams tend to be OK with this. I am OK with this &lt;em&gt;as long as they all compile and can be run successfully to show the functionality implemented so far&lt;/em&gt;. It does not matter the system can only perform a sub-set of features that the final system will have. It should always run so that people can experience first hand how each of the modules interact with each other.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/skeleton.jpg" /&gt;Walking Skeleton&lt;/h4&gt;
&lt;p&gt;In trying to explain this concept to a friend of mine I found that there is even&amp;nbsp;a pattern that explains this idea when it comes to building new applications. Cockburn&lt;sup&gt;[1]&lt;/sup&gt; calls it a &lt;a target="_blank" href="http://alistair.cockburn.us/index.php/Walking_skeleton"&gt;Walking Skeleton&lt;/a&gt;:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;A Walking Skeleton is a tiny implementation of the system that performs a small end-to-end function. It need not use the final architecture, but it should link together the main architectural components. The architecture and the functionality can then evolve in parallel.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;As Cockburn points out a Walking Skeleton is different from a proof of concept (or spike) in the sense that the later is meant to be throw away code while the Walking Skeleton is meant to evolve over time.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This approach relies heavily on having a procedure in place to support the evolution of the code as the skeleton is fleshed out (pun intended.) Cockburn calls this strategy Incremental Rearchitecture.&lt;/p&gt;
&lt;p&gt;I recommend that teams use unit testing to make sure the code that performs some basic features today remains fully functional tomorrow as new few features are implemented and the architecture of the system updated to accommodate new features and new ideas.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/monalisa.jpg" /&gt;Mona Lisa&lt;/h4&gt;
&lt;p&gt;On his article &lt;a target="_blank" href="http://www.stickyminds.com/sitewide.asp?Function=edetail&amp;amp;ObjectType=COL&amp;amp;ObjectId=13178"&gt;The Neglected Practice of Iteration&lt;/a&gt; Jeff Patton&amp;nbsp;talks about the difference between iterating and incrementing (no, they are not synonyms) and touches on the idea of a Walking Skeleton from a different angle.&lt;/p&gt;
&lt;p&gt;Jeff uses a Mona Lisa drawing to describe the differences between an iterative and an incremental approach to software development. If we were to use a &lt;em&gt;pure incremental &lt;/em&gt;approach to drawing the Mona Lisa we would start by drawing to perfection a section of this paiting (say her hands), then we'll draw completelly her arms, then her face, and so on and so forth.&amp;nbsp;Using an iterative approach we would start by drawing a sketch of the Mona Lisa in pencil (that's our first iteration), then we'll do a second iteration in which we&amp;nbsp;increment the detail and perhaps give some&amp;nbsp;coloring to the drawing, then we'll do a third iteration and put the final touches (keep incrementing the&amp;nbsp;detail) on the painting. His article has great images that show this graphically.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;point of Jeff's article is that you need both&amp;nbsp;(iterations and increments) in software development. A lot of people thing these two words are synonyms and use a pure incremental approach in which they&amp;nbsp;work one a single module of the software to perfection before moving to the next module. The pure incremental approach has the disadvantage that neither the user nor the developers get to see the complete picture until&amp;nbsp;the system is complete...and by then&amp;nbsp;is usually too late. By using an iterative and incremental approach both the users and the developers get a rough idea of the whole system early on and how each module relates to each other.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h4&gt;Depth-First versus Breadth-First Problem Solving&lt;/h4&gt;
&lt;p&gt;On their book Lean Software Development the Poppendiecks&lt;sup&gt;[2]&lt;/sup&gt; talk about two different ways to solve problems: Depth-First versus Breadth-First.&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Breadth-first problem solving might be thought of as funnel, while depth-first problem solving is more like a tunel. Breadth-first involves delaying commitments, while depth-first invokes making early commitments.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;The breadth-first approach is similar to the Walking Skeleton in the sense that&amp;nbsp;aim first to get an application running end-to-end and then incrementally update its architecture as more is known about the problem domain.&lt;/p&gt;
&lt;p&gt;I think both approaches are complimentary, just like incremental and iterative are. There are times where breadth-first is preferred over depth-first and vice-versa. The Poppendiecks put it in these words:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;Notice that both breadth-first and depth-first approaches require expertise in the domain. A depth-first approach will work only if there was a correct selection of the area to zero in on. Getting this selection right requires two things: someone with the expertise to make the early decisions correctly and assurance that there will not be any changes that render these decisions obsolete. Lacking these two conditions, a breadth-first approach will lead to better results.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;One of the observations that the Poppendiecks made on their book is that &amp;quot;most novice designers are biased toward the depth-first approach.&amp;quot; The irony on this is that depth-first requires people to get the decision right early on, something that a novice designer (by definition) probably won't do. Further more, I believe this bias on novice designers is the reason they tend to apply a pure incremental approach instead of an iterative and incremental approach.&lt;/p&gt;
&lt;p&gt;Breadth-first work&amp;nbsp;better than depth-first when the knowledge of the business domain is expected to evolve (as it typically does&amp;nbsp;in software development) and it is also very effective when the domain is stable (e.g. you have strong knowledge about the problem domain.) Again, in the words of the Poppendiecks:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;A breadth-first approach requires someone with expertise to understand how the details will most likely emerge and the savvy to know when the time to make commitments has arrived. However, the breadth-first approach does not need a stable domain; it is the approach of choice when the business domain is expected to evolve. It is also an effective approach when the domain is stable.&amp;quot;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Personality types play a big factor in the way people use breadth-first or depth-first approach. This is an important consideration since there are probably people in your team that would favor one approach over the other. This is OK. Remember that these approaches are complimentary. When you are not sure about the domain use a breadth-first approach, once you know enough and are ready to make a commitment go deep.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;References:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;[1] Cockburn, Alistar. &lt;em&gt;Crystal Clear A Human-Powered Methodology for Small Teams&lt;/em&gt;. 2005. Addison Wesley. Pages 49-53.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="1"&gt;[2] Poppendieck, Mary et al. &lt;em&gt;Lean Software Development An Agile Toolkit&lt;/em&gt;. 2003. Addison Wesley. Pages 60-62.&lt;/font&gt;&lt;/p&gt;</description><a10:updated>2008-09-15T22:41:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Static-constructors-and-ASP.NET-applications.aspx</guid><link>http://hectorcorrea.com/blog/Static-constructors-and-ASP.NET-applications.aspx</link><author>hector@hectorcorrea.com</author><title>Static constructors and ASP.NET applications</title><description>&lt;p&gt;A few days ago I was running into an issue with a static class in an ASP.NET application. The issue (I thought) was that the static constructor was not being fired. It turns out the static constructor was being fired as it should but not as often as I thought it would be.&lt;/p&gt;
&lt;p&gt;Static constructs are fired once per App Domain.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In a Windows application this means that the constructor is fired once everytime I launch the application and access the static class. If I close the application,&amp;nbsp;run it again, and hit the static class&amp;nbsp;the constructor will be fired again.&lt;/p&gt;
&lt;p&gt;In a Web application that is also the case, but that does not translate to everytime I close and re-open the browser. Closing the browser and re-launching it does not terminate the application and re-launches it.&lt;/p&gt;
&lt;p&gt;Here is a simplified example of the scenario that I ran into. The static constructor is highlighted:&lt;/p&gt;
&lt;p&gt;public static class StaticClass&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; static int _count;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font style="background-color: #ffff00"&gt;static StaticClass()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _count = 0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/font&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static int Count&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; get&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _count++;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return _count;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&amp;nbsp;&lt;br /&gt;
public partial class _Default : System.Web.UI.Page&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;strong&gt;// print the count&lt;/strong&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lblText.Text = string.Format(&amp;quot;Count={0}&amp;quot;, StaticClass.Count);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;The very first time I run this code the count prints 1. If I refresh the page it prints 2. &lt;strong&gt;&lt;em&gt;If I close the browser and run the application again, what would you expect it would print?&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If you guessed 1 you guessed wrong (like I did.) It will print 3.&lt;/p&gt;
&lt;p&gt;Closing the browser does not get rid of the static class since apparently the App Domain still is running under IIS. If you really want to force the constructor of the static class to be fired (and in this case reset the counter to 0) you need to kill the worker process in IIS (e.g. run iisreset)&lt;/p&gt;
&lt;p&gt;In highsight this is obvious and,&amp;nbsp;as one of my co-workers pointed out, we are lucky ASP.NET apps work like that! It would suck big time if I everytime a user closed their browser the application would be closed as well and the next user will need to pay the load time.&lt;/p&gt;
&lt;p&gt;The moral of the story is keep in mind that you don't have much control on &lt;em&gt;when &lt;/em&gt;the static constructor will be fired in an ASP.NET application. You have the guarantee that it will be fired the very first time the class is accessed in the application domain. This includes the very first time the class is accessed after the app is loaded into IIS, but it also means that if the worker process is recycled (and your app domain goes away with it,) the static constructor will be fired (again) the next time the class is hit when a new user visits your site. This is all good and the desired effect, but just keep it in mind.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><a10:updated>2008-09-10T21:25:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Computer-Museum-Paris.aspx</guid><link>http://hectorcorrea.com/blog/Computer-Museum-Paris.aspx</link><author>hector@hectorcorrea.com</author><title>Computer Museum (Paris)</title><description>&lt;p&gt;Early August I had the opportunity to visit the computer museum in Paris. The &lt;a target="_blank" href="http://www.museeinformatique.fr/"&gt;Musee de l'Informatique&lt;/a&gt; has a neat variety of computers in display that range from 1960s mainframe computers, early personal computer models (IBM, Apple, Commodore) from the 80s, and other computer related stuff including punch cards, old hard drives, mother boards, software, to name a few.&lt;/p&gt;
&lt;p&gt;Here are a few pictures that I took while I was there.&lt;/p&gt;
&lt;p&gt;First things first: a 1960's mainframe. The big cabinet to the left with a bunch of yellow wires (below the clock) is the memory bank: 32K of RAM! The other big cabinet to the right is the CPU. I need to remember this picture next time I complain that my laptop is &amp;quot;too heavy&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/mainframe.jpg"&gt;&lt;img height="267" alt="Mainframe" width="401" src="http://hectorcorrea.com/images/mainframe.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;This IBM PC is almost identical to the first computer that I owned. Check it out, it had two (not one!) floppy drives :)&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/ibmpc.jpg"&gt;&lt;img height="450" alt="IBM PC" width="300" src="http://hectorcorrea.com/images/ibmpc.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I also saw this Commodore computer. They didn't have a Commodore 64 which was the very first computer that I used but this one reminded me a lot of those days.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/commodore.jpg"&gt;&lt;img height="200" alt="Commodore" width="300" src="http://hectorcorrea.com/images/commodore.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;And of course, for those of you who started on the &amp;quot;dark side&amp;quot; there was also an Apple II.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/apple.jpg"&gt;&lt;img height="450" alt="Apple II" width="300" src="http://hectorcorrea.com/images/apple.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Walk down on memory lane: Sidekick anyone? You've got to admit that there was no better way to edit Turbo Pascal 3.0 code than with a &amp;quot;terminate and stay resident&amp;quot; editor like Sidekick. High tech circa 1985.&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/software.jpg"&gt;&lt;img height="450" alt="software" width="300" src="http://hectorcorrea.com/images/software.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;A DOS developer?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a target="_blank" href="http://hectorcorrea.com/images/cartoon.jpg"&gt;&lt;img height="400" alt="Cartoon" width="300" src="http://hectorcorrea.com/images/cartoon.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hard drives and floppy disks&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/harddrive.jpg"&gt;&lt;img style="width: 242px; height: 189px" height="100" alt="Hard drive" width="150" src="http://hectorcorrea.com/images/harddrive.jpg" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a target="_blank" href="http://hectorcorrea.com/images/floppies.jpg"&gt;&lt;img height="138" alt="Floopy disks" width="207" src="http://hectorcorrea.com/images/floppies.jpg" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><a10:updated>2008-09-03T09:11:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/DotWiki-2.0.aspx</guid><link>http://hectorcorrea.com/blog/DotWiki-2.0.aspx</link><author>hector@hectorcorrea.com</author><title>DotWiki 2.0</title><description>&lt;p&gt;I've posted a new version of the &lt;a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/DotWiki/Default.aspx"&gt;DotWiki&lt;/a&gt;. This new version 2.0&amp;nbsp;is a complete rewrite using C# and it has several new features and a more attractive look and feel. Security is probably the most important new feature since it had been by far the most commonly requested feature since I released the original version in 2002.&lt;/p&gt;
&lt;p&gt;Previous versions of the DotWiki had been updates to the original VB.NET code and I felt that a full rewrite was in order to clean up the code, remove unused features, reflect what I've learn since the original release, and add a few more features. Since I've been doing exclusively C# for the last few years I took the plunge and rewrote it in C#.&lt;/p&gt;
&lt;p&gt;The look and feel is using the ASP.NET Design Starter Kit Templates that I &lt;a target="_blank" href="http://www.hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx"&gt;wrote&lt;/a&gt; about a few months ago and that this very site uses.&lt;/p&gt;
&lt;p&gt;Security is implemented using the ASP.NET Membership provider. It's amazing how easy was to secure the site using the built-in features for membership for creating new users, resetting your password, logging in, logging out, and such.&lt;/p&gt;
&lt;p&gt;This new version also uses Rockford Lhotka's &lt;a target="_blank" href="http://www.lhotka.net/cslanet/Default.aspx"&gt;CSLA&lt;/a&gt; business objects framework. The business objects to read and write data are typical CSLA business objects. You don't need to know much (if anything) about CSLA to understand the code and yet it helps me tremendously to keep the code in logical tiers. Check out the &lt;a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/DotWiki/Default.aspx?topic=DotWiki+Design+Documentation"&gt;DotWiki Design Documentation&lt;/a&gt; to get an idea of where CSLA business objects fit in the DotWiki.&lt;/p&gt;
&lt;p&gt;This version still uses the &lt;a target="_blank" href="http://www.fckeditor.net/"&gt;FCKeditor&lt;/a&gt; to provide a what&amp;nbsp; you see is what you get (WYSIWYG) experience to the user. I updated the code to use version 2.6 which supports the Safari browser. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am continuosly amazed on how much free stuff there is for ASP.NET applications and how good it is. CSLA is a fantastic middle tier business object framework and is open source. The FCKeditor integrates seamlessly with ASP.NET and comes with all the JavaScript source code. The ASP.NET Membership provider is part of the .NET framework since version 2.0 and the design starter kits for ASP.NET applications have always been free.&lt;/p&gt;
&lt;p&gt;The DotWiki itself is open source and I hope developers find the new version as useful (or more!) as previous versions.&lt;/p&gt;
&lt;p&gt;You can download the source code from the &lt;a target="_blank" href="http://hectorcorrea.s27.dotnetsql.com/dotwiki/Default.aspx?topic=DotWiki+Source+Code"&gt;DotWiki Source Code&lt;/a&gt; page.&lt;/p&gt;</description><a10:updated>2008-07-27T10:59:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Introduction-to-Scrum.aspx</guid><link>http://hectorcorrea.com/blog/Introduction-to-Scrum.aspx</link><author>hector@hectorcorrea.com</author><title>Introduction to Scrum</title><description>&lt;p&gt;&lt;img alt="" align="left" src="http://hectorcorrea.com/images/CodeMayJune2008.jpg" /&gt;My article Introduction to Scrum has been published in the May/June 2008 issue of &lt;a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805051"&gt;CoDe&lt;/a&gt; magazine and is also availabe on &lt;a target="_blank" href="http://www.devx.com/codemag/Article/38611"&gt;DevX&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;As I said in this&amp;nbsp;article&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&amp;quot;Scrum is an agile process to manage software development projects. Scrum is not prescriptive on engineering practices, but rather it is a lightweight framework based on a few (common sense) guidelines for managing projects.&amp;quot; &lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This issue of CoDe is dedicated to Agile Development.&lt;/p&gt;
&lt;p&gt;Jeffrey Palermo has an interesting article on &lt;a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805041"&gt;managing agile software projects&lt;/a&gt;&amp;nbsp;that starts with quite a line:&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&amp;quot;Everything right or wrong with a software project is management's fault&amp;quot;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Jeff then goes to talk about the falacy of fixed scope, the unspoken quality variable, hiring and firing, managing the customer, and other areas where management needs to act and how this is done in an agile project.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Jean-Paul&amp;nbsp;S. Boodhoo&amp;nbsp;provides a list of &lt;a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805021"&gt;16 steps&lt;/a&gt; to improve your development skills using techniques that are common on agile projects. I particularly like his&amp;nbsp;approach of trying these techniques little by little. For example, start doing unit testing, get comfortable with it and then evaluate test driven development (TDD)&lt;/p&gt;
&lt;p&gt;Scott Bellware&amp;nbsp;talks about &lt;a target="_blank" href="http://www.code-magazine.com/Article.aspx?quickid=0805061"&gt;Behavior-Driven Development&lt;/a&gt; (BDD)&lt;/p&gt;
&lt;blockquote dir="ltr" style="margin-right: 0px"&gt;
&lt;p&gt;&lt;font face="Courier New"&gt;&amp;quot;TDD is often specifically about the design of code units and modules such as classes. BDD is aso concerned with unit design, but its focus addresses a much broader range of design concerns&amp;quot;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;He talks about the common misunderstanding that Test Driven Development is about testing while in fact is about design.&lt;/p&gt;
&lt;p&gt;All in all an interesting &lt;a target="_blank" href="http://www.code-magazine.com/DisplayIssue.aspx?id=4659d960-1235-4848-aeb3-a02c1a441300"&gt;CoDe magazine&lt;/a&gt; issue.&amp;nbsp;&lt;/p&gt;</description><a10:updated>2008-04-10T08:53:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx</guid><link>http://hectorcorrea.com/blog/ASP.NET-Design-Templates.aspx</link><author>hector@hectorcorrea.com</author><title>ASP.NET Design Templates</title><description>&lt;p&gt;I've received several nice comments about the design of this site. I wish I could take all the credit for it but the truth is that I created it using the &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/asp.net/aa336613.aspx"&gt;Visual C# Personal Design template&lt;/a&gt; that Microsoft provides.&lt;/p&gt;
&lt;p&gt;The Design Templates web site provides several ASP.NET Design Starter Kit Templates that allow you to create web sites using some predefined look and feel options. When you install these templates they become available to you in Visual Studio when you create a new web site. This is how my Visual Studio 2005 Express looks like with the Personal Design Template installed.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt="" src="http://hectorcorrea.com/images/VisualStudioNewSite.jpg" /&gt;&lt;/p&gt;
&lt;p&gt;For the UI impared developer like me these templates are amazing. They are ready to use, attractive, and allow us to learn by example. The one that I am using comes with master pages, themes, and site maps.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description><a10:updated>2008-03-23T12:09:00-04:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/HTTP-Handlers-in-.NET-2.0.aspx</guid><link>http://hectorcorrea.com/blog/HTTP-Handlers-in-.NET-2.0.aspx</link><author>hector@hectorcorrea.com</author><title>HTTP Handlers in .NET 2.0</title><description>&lt;div style="margin: 0in 0in 0pt"&gt;When I rewrote my web site late last year I knew I wanted to use friendly names for my blog pages instead of using URL parameters. For example, the URL to the post on Binary Trees in C# initially was this:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;a href="http://hectorcorrea.com/Blog.aspx?t=c8ff6dbb-284f-4bde-bf07-909f785529ae"&gt;http://hectorcorrea.com/Blog.aspx?t=c8ff6dbb-284f-4bde-bf07-909f785529ae&lt;/a&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;I wanted something friendlier and I knew this could be done easily with an &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/library/f3ff8w4a(VS.71).aspx"&gt;HTTP Handler&lt;/a&gt; in .NET 2.0 but it has been a very long time since I had written one. So I procrastinated.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;A few weeks ago I bumped into a blog post by &lt;a target="_blank" href="http://www.singingeels.com/Blogs/Nullable/2007/09/14/URL_ReWriting_The_Right_Way_Its_Easy.aspx"&gt;Timothy Khuori&lt;/a&gt; that described how easy it was to implement one. The code was not longer than 20 lines of code (including curly braces!) that I felt ashamed I hadn&amp;rsquo;t implemented it my site. I took Timothy&amp;rsquo;s code, stuffed it into my project, and voila, now I have friendly URLs for my blog posts. The URL for the Binary Trees in C# post now is:&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&lt;a href="http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx"&gt;http://hectorcorrea.com/blog/Binary-Tree-in-C-Sharp.aspx&lt;/a&gt;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;Behing the scenes, my HTTP Handler still uses my original Blog.aspx page to serve the request but it preserves the original URL that the user submited. I updated Blog.aspx to parse the name of the blog topic to retrieve directly from the URL rather than expect it in the query string.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;Beside being more human readable, these kinds of URLs are also better for tracking purposes. Since to the web server the request looks like the request for a specific page for each topic (rather than the generic blog.aspx with a parameter with the topic name) the web server can keep track of how many times each topic is requested. This means that I can get statistics in how popular a blog topic is using the tools that I already use to track how popular some pages from my site are.&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;div style="margin: 0in 0in 0pt"&gt;&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;</description><a10:updated>2008-03-02T04:26:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Upgrading-Your-Software-Development-Tools.aspx</guid><link>http://hectorcorrea.com/blog/Upgrading-Your-Software-Development-Tools.aspx</link><author>hector@hectorcorrea.com</author><title>Upgrading Your Software Development Tools </title><description>&lt;div&gt;Late last year (late November 2007 to be exact) Microsoft released &lt;a target="_blank" href="http://msdn2.microsoft.com/en-us/vs2008/default.aspx"&gt;Visual Studio 2008&lt;/a&gt; with .NET 3.5 to production. This has generated a lot of buzz around the new features, what&amp;rsquo;s hot, what you should be looking into, and so on. The beta cycle for VS 2008 was long and very public. There has been a lot of articles and access to the new features for a while but now it&amp;rsquo;s here, now it&amp;rsquo;s real. People can go and buy VS 2008 today or download it from MSDN. Teams that have been just wondering how to go about the upgrade now need to answer the question: how do we upgrade?&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Most software developers are technology driven so we love new tools and technologies. This seems to be a personality trait regardless of the technology that we chose. The desire to move to the latest and greatest version seems to be as strong in .NET developers today as it was for FoxPro and VB 6 developers in the late nineties. We crave the day when we can use new tools. Yet, we have a responsibility to our users in doing this responsibly. Upgrades can be hard to perform on medium to large systems that have large number of users in production. Like most things on these kinds of systems upgrades need to be planned in order to give the most to the customers.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;Although the decision to upgrade or not to upgrade to a new version of development tools is very specific to every project, I usually tend to recommend upgrading on-going projects (with new features actively being developed) and thinking twice before upgrading projects that have been switched to maintenance mode (no new features are being developed.)&amp;nbsp;&lt;/div&gt;
&lt;h3&gt;So why would you want to upgrade?&lt;/h3&gt;
&lt;div&gt;If updating a project to use the latest technology options for you environment takes time and money, why would you even consider want to upgrade? The fact that a new version of your development tools is available is hardly enough reason for a team to stop developing new features, spend days/weeks performing the upgrade, retest the system, and then continue with new development. There has to be some benefit for the customer for an upgrade to make sense.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;em&gt;New tools do come with benefits, but you need to be realistic about what will your project benefit from in the short and long term when upgrading to a new version. &lt;/em&gt;I tend to be wary of short term &amp;ldquo;magic&amp;rdquo; benefits that come with new development tools. One of the most common mistakes that teams do is promise (to themselves or to others) that productivity will increase incredibly with new version of the tool. Thinking that your application magically will be developed in half the time and will look much better than before just because you switched to VS 2008 and WPF is foolish. Assuming that the Windows Workflow engine in .NET 3.0 will solve all your workflow issues when you have never used a workflow engine before would also be a poor assumption. It takes time to get used to new tools and to learn what really works for your project and what does not.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;In the case of Visual Studio 2008 there are a ton of benefits that apply to a wide variety of projects. A lot of the tools that Microsoft made available more than a year ago when it released .NET 3.0 are now finally easy to use for most of us. VS 2008 provides the (long awaited) designers to make the most of WPF, AJAX, WCF, and LINQ to name a few. These new technologies can indeed help your application look better, be more responsive to users, provide better communication with other applications, and such.&amp;nbsp;&lt;/div&gt;
&lt;h3&gt;How to upgrade to the latest version?&lt;/h3&gt;
&lt;div&gt;Although the process to upgrade a project to use a new tool varies from project to project there are two main guidelines that I&amp;rsquo;ve found useful. One is to try the upgrade first in a test environment and with ample time (i.e. don&amp;rsquo;t try it the week before going to production.) The second is that you need to consider the entire project, not only the source code (How will the deployment be affected with the new tool? Will the users be affected? Will third party tools need to be upgraded as well?)&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;In my experience tests in the testing environment with the new version of the tool always work out and come out with glaring reviews. The issues with the new version of your tool usually show up once you&amp;rsquo;ve upgraded the entire system. The testing environment, although necessary, usually only covers a small portion of the system (e.g. the code but not the deployment) and some of the pitfalls might be in those other areas that will be upgraded later. This can be sort of a catch-22, you need to test the upgrade first to get an initial idea but you won&amp;rsquo;t get a good idea until you&amp;rsquo;ve upgraded the entire system. You can try to evaluate a wide range of areas of your system (code, deployment, third party tools, et cetera) but don&amp;rsquo;t hold your breath -- you might still run into issues once the entire app is upgraded. C&amp;rsquo;est la vie.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;
&lt;div&gt;In the case of Visual Studio 2008 Microsoft did a tremendous benefit to the .NET developers by allowing projects to be upgraded to use VS 2008 and still target the .NET 2.0 runtime. This is a huge advantage for teams that need to take more time to upgrade since it allows them to upgrade the IDE but keep the runtimes and code the same. To make things even better once you've switched your project to use the .NET 3.5 runtime you can incorporate .NET 3.0 features little by little. For example, it is possible to have Windows Forms and WPF forms on the same application, which means that you don&amp;rsquo;t need to rewrite your entire user interface on day one. You can keep your existing Windows Forms and only upgrade to WPF one of two forms at a time, become comfortable with the new technology and plan how to (or if you want to) migrate the rest of the application to use WPF.&lt;/div&gt;
&lt;div&gt;&amp;nbsp;&lt;/div&gt;</description><a10:updated>2008-02-25T10:49:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/Estimates-on-Software-Projects.aspx</guid><link>http://hectorcorrea.com/blog/Estimates-on-Software-Projects.aspx</link><author>hector@hectorcorrea.com</author><title>Estimates on Software Projects</title><description>&lt;p style="margin-bottom: 0in"&gt;Estimates is one of the most controversial topics on software development, including the process to calculate them and the value that they add to the software development process.&lt;/p&gt;
&lt;p style="margin-bottom: 0in"&gt;Every team that I have worked with needs to provide estimates on how long it's going to take to complete a specific feature of a system. Yet, most teams seem to struggle with this activity. Developers enjoy attending a meeting to provide estimates as much as they enjoy visiting the dentist. Project owners typically complain how unreliable estimates on software projects are, to them is unbelievable that even that developers have been writing software for many years cannot give accurate estimates.&lt;/p&gt;
&lt;p style="margin-bottom: 0in"&gt;In my experience there are several reasons why providing estimates is so hard:&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;Poor specifications/Lack of domain knowledge&lt;/li&gt;
    &lt;li&gt;Technology challenges&lt;/li&gt;
    &lt;li&gt;Developers are optimistic&lt;/li&gt;
    &lt;li&gt;Software development is tough&lt;/li&gt;
&lt;/ul&gt;
&lt;h5&gt;Poor specifications&lt;/h5&gt;
&lt;p&gt;Poor specifications is the most commonly voiced reason for inaccurate estimates. And for a good reason. It is typical for developers to be asked to estimate features that they don't fully understand. The client requests a new screen to do X but there is a lot of unwritten expectations for this new feature that users will demand once they start using it but that developers don't know about. This is usually due to lack of business domain knowledge. Developers are trained on software development and very little (or nothing) in the specific business domain. If the software that is being written is for insurance billing is very unlikely that the developers will have enough education and training on insurance and/or accounting. They might have been working many years in software development but this might be the first time they are faced with a screen for insurance billing purposes.&lt;/p&gt;
&lt;p&gt;Even when a decent amount of conversation between developers, business analysts, and product owners take place to explore what the requested feature will entail, there is inevitable a lot of things that are left unsaid that will be find out when the feature is developed and presented to the user. I've worked on companies where we received reams of paper with specifications that looked like they covered every possible detail about the feature to be built just to find out that (1) they are still incomplete or (2) they don't really represent what the customer wants. I've produced my fair share of specs that I thought were enough to&amp;nbsp;provide accurate estimates just to find out that nope, there is still a lot left unsaid that will not be discovered until the software is written and presented to the users for feedback.&lt;/p&gt;
&lt;h5&gt;Technology challenges&lt;/h5&gt;
&lt;p&gt;Most software development groups try to stay up to date on technology and upgrade to new versions of compilers, databases, development environments, and such. This is usually a good thing since these new tools are meant to speed up the development process and make better use of existing hardware. But there is a cost associated with these upgrades. Developers need to spend time performing upgrades, learning new tools and ways of doing things, and this might not be cheap. Plus this happens on a regular basis. For example, since 2000 Microsoft has released three versions of C# (C# in 2000, C# 2.0 in 2005, and C# 3.0 in 2007) during the same time Microsoft has released three versions of SQL Server (SQL 2000, SQL 2005, and SQL 2008.)&lt;/p&gt;
&lt;p&gt;You may be tempted to say 'the heck with it, we are not going to update anymore' but there is also a cost associated with this. For once, your system might not run on new computers or just look ugly (e.g. imagine a DOS application running on Windows.) Secondly, developers tend to be technology driven and you may lose some of your best developers if they see that they are falling behind in technology and their skills are not up to date.&lt;/p&gt;
&lt;h5&gt;Developers are optimistic&lt;/h5&gt;
&lt;p&gt;Most developers that I've met (myself included) are optimistic by nature. We are optimistic people and we like to please our customers. This has an impact on the estimates that we provide. We tend to provide estimates for the best case scenario even when experience tells us that the best case scenario hardly ever materializes in software development. Even when we try to account for the unexpected we do it in an optimistic way. Or as Brooks will say in the Mythical Man-Month [p. 15] &amp;quot;the assumption that all will go well has a probabilistic effect on the schedule.&amp;quot;&lt;/p&gt;
&lt;h5&gt;Software development is tough&lt;/h5&gt;
&lt;p&gt;Software development is a tough activity. It requires dealing with abstractions, a lot of unknowns, on a tight schedule, and with new tools and technologies. Most activities in a business environments deal with physical limitations like size, weight, cost, counts, and other well understood constrains. Software on the other hand deals with &amp;quot;almost pure thought-stuff&amp;quot; [Brooks, p. 7] Estimates on an unconstrained environment like this are not trivial.&lt;/p&gt;
&lt;h4&gt;Do we need estimates?&lt;/h4&gt;
&lt;p&gt;Yes, we definitively do. Despite the grim picture that I might have painted so far, I strongly believe that estimates are valuable in software projects. Estimates are like price tags in the sense that they allow product owners make better decisions when it comes to deciding priorities for a software project. If there are four new features being requested by the users and three of them will take one week each but the fourth one looks like it is going to take two months alone, the product owner will be better able to decide what is best for the product. She might decide to complete the three one-week features and delay the large one for a better time, or vice-versa. But she will be able to make this decision having an idea on the size of the features.&lt;/p&gt;
&lt;p&gt;In my experience there are two things that you can do to get the most out of estimates for software projects &lt;em&gt;even when &lt;/em&gt;they are not accurate ..&lt;/p&gt;
&lt;p&gt;One is to divide and conquer. Estimate small blocks of functionality so that even if estimates are not accurate they are not off by a lot either.&amp;nbsp;If a task is estimated to take 2 days and it takes twice as much you can deal with it 2 days later and adjust your planning.&amp;nbsp;However, if a task is estimated to take 2 months and it takes twice as much, four months later is probably too late to address the problem. Even more, if developers in a team can blow a 2 days estimated (for whatever reasons) imagine the likelihood of blowing a 2 months estimate.&lt;/p&gt;
&lt;p&gt;The second thing that we can do is to constantly calibrate project expectations. To put it bluntly be realistic and use history as a guidance on how long stuff takes to be completed rather than be guided by hope. It is very common for people to say &amp;quot;this time it took me 2 weeks to complete X but with what I know now it would take me only 1 week next time.&amp;quot; This hardly ever works out. For once, remember that developers are optimistic. We are bound to take this posture. If it took 2 weeks to do something there is probably a very good reason for it. You should use that number as your baseline in the future and only reduce the estimate once you have proven than it can be done in half as much. Koskela and Howell have a great &lt;a target="_blank" href="http://www.leanconstruction.org/pdf/ObsoleteTheory.pdf "&gt;paper&lt;/a&gt;&amp;nbsp;in which they propose moving away from the thermostat model (in which an arbitrary productivity goal is set at the onset) into a scientific experimentation model in which we adjust based on previous results.&lt;/p&gt;
&lt;h4&gt;How to calculate&amp;nbsp;estimates?&lt;/h4&gt;
&lt;p&gt;Since estimates are approximations, not promises, I prefer a light weight approach to&amp;nbsp;calculate them rather than spending a whole lot of time on them.&amp;nbsp;By light weight I mean the team getting together for no more than 3 hours to estimate what we think will be able to accomplish in the next two weeks. In my experience teams can come up with &amp;quot;good enough&amp;quot; estimates in relatively short term. David Anderson has a tongue-in-cheek post where he calls for people to &lt;a href="http://www.agilemanagement.net/Articles/Weblog/StopEstimating.html"&gt;stop estimating&lt;/a&gt;. In reality he calls for &lt;a href="http://www.agilemanagement.net/Articles/Weblog/AgileEstimating.html"&gt;agile estimating&lt;/a&gt; rather than no estimates at all.&amp;nbsp;In agile methods&amp;nbsp;not a lot of time is spent calculating something that we cannot guarantee. It's better to spend that time producing software and delivering features to the user rather than promises.&lt;/p&gt;
&lt;p&gt;Mike Cohn's book on &lt;a href="http://www.amazon.com/Agile-Estimating-Planning-Robert-Martin/dp/0131479415"&gt;Agile Estimating and Planning&lt;/a&gt; is a very good book on the subject. He does a great way of describing the use of story points and velocity to do long term planning on projects. Highly recommended if you are doing agile software development.&lt;/p&gt;
&lt;p&gt;Joel Spolsky has an article on &lt;a target="_blank" href="http://www.stickyminds.com/BetterSoftware/magazine.asp?fn=cifea&amp;amp;id=94"&gt;Evidence-Based Scheduling&lt;/a&gt; (EBS) in which he uses a Monte Carlo simulation to calculate&amp;nbsp;the likelihood that a particular estimate will be met. Spolsky's approach sounds interesting but I have not tried it myself. The fact that uses historic values to calculate probabilities sounds promising. Still, I am afraid that it requires more time and effort than the value that it provides but I don't have any experience with it.&lt;/p&gt;
&lt;h4&gt;What to do about missed estimates?&lt;/h4&gt;
&lt;p&gt;Of the things that are controversial about estimates the one about missed estimates is probably the worst. It's almost taboo. Although everybody misses estimates but nobody wants to talk about it.&lt;/p&gt;
&lt;p&gt;If you (or your team) misses an estimate, get over it. It happens. Don't let it bring you down. Review why you missed it and act on your findings. Perhaps the task is just more complicated than you thought -- it is perfectly OK to admit this. Maybe you need to break the task down in smaller chunks next time, or you need less distractions. What ever you do however, make sure to use the knowledge that it took longer than you expected next time you estimate a similar task. Don't tell yourself that &amp;quot;next time will be better because I've been there before.&amp;quot;&amp;nbsp;Remember: use history as a guidance rather than hope.&lt;/p&gt;
&lt;p&gt;If somebody else misses an estimate see the previous paragraph. Talk with them to see why it was missed and act on it. Don't expect that because somebody thought something would take 5 days that is the time it will take. Remember that it is an estimate, a forecast.&lt;/p&gt;
&lt;p&gt;There might be instances where a team or an individual developer &lt;em&gt;constantly misses estimates by a long shot. &lt;/em&gt;If that is the case,&lt;em&gt;&amp;nbsp;&lt;/em&gt;there are perhaps larger issues&amp;nbsp;that need to be addressed. Does the team/developer has the right tools for the job? Is the team/developer qualified for the job?&amp;nbsp;Are the expectations&amp;nbsp;for the team/developer realistic?&amp;nbsp;Is it always the same&amp;nbsp;team/individual?&amp;nbsp;These are perfectly valid questions on a team/individual that is not performing at the pace that the business expects. The problem migh be the team, the expectations, or both.&lt;/p&gt;
&lt;h4&gt;The role of the product owner&lt;/h4&gt;
&lt;p&gt;In my experience most product owners learn the effectiveness of their team's estimates in a few cycles. Product owners are not necessarily as optimistics as developers and they can provide valuable feedback to the team after just a few rounds of estimates. This is great feedback that a lot of teams don't use. Product owners bring differerent experiences, business knowledge, and personality styles to the team that can be very useful when estimating and setting expectations.&lt;/p&gt;</description><a10:updated>2008-01-08T23:25:00-05:00</a10:updated></item><item><guid isPermaLink="true">http://hectorcorrea.com/blog/The-Scrum-Daily-Meeting.aspx</guid><link>http://hectorcorrea.com/blog/The-Scrum-Daily-Meeting.aspx</link><author>hector@hectorcorrea.com</author><title>The Scrum Daily Meeting</title><description>&lt;p&gt;We use Scrum at the office to manage our projects. One of the key practices of Scrum is the daily meeting (or &lt;a target="_blank" href="http://www.controlchaos.com/about/management.php"&gt;daily Scrum&lt;/a&gt;.) The daily meeting is a short meeting (15 minutes in our case) held every day at the same time with the whole team (product owners, QA, and developers.)&lt;/p&gt;
&lt;p&gt;The goal of the meeting is to keep everybody informed of the progress since the last meeting and make sure there are no roadblocks.&lt;/p&gt;
&lt;p&gt;The rules for the daily meeting are simple: The meeting must be short, timeboxed, and every team member must report&lt;/p&gt;
&lt;ol&gt;
    &lt;li&gt;What have you done since the last daily meeting?&lt;/li&gt;
    &lt;li&gt;What will you do from now until the next daily meeting?&lt;/li&gt;
    &lt;li&gt;Are there any roadblocks preventing you to move on?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Since in most of our projects we have remote participants I used to show a spreadsheet with our Sprint Backlog in a projector and have everybody report their status. The spreadsheet was shared real time with remote users and updates were seen by everybody.&lt;/p&gt;
&lt;p&gt;This was a nice idea since it kept all participants (local and remote) involved in the meeting. However the spreadsheet approach had a huge disadvantage: the focus of the meeting became the spreadsheet rather than the status of the team.&lt;/p&gt;
&lt;p&gt;With the spreadsheet approach developers tended to be very mechanical when reporting what they had done and what they will do next. It was very common for people to say &amp;quot;take 3 hours down from line 25 of the spreadsheet and 4 hours from line 28&amp;quot; rather than describing what they did (e.g. &amp;quot;I worked on the problem that prevent users outside the domain from logging in.&amp;quot;)&lt;/p&gt;
&lt;p&gt;Last year I decided to stop using the spreadsheet in our daily meetings. We still get together and report our status, but instead of looking at a spreadsheet some people bring a notepad with a list of things to report while others do it of memory.&lt;/p&gt;
&lt;p&gt;This little change has made a huge difference in our daily meetings. The meetings are much more conversational now than they ever were. Since there is no central spreadsheet to look at participants now report to their peers rather than to the spreadsheet.&lt;/p&gt;
&lt;p&gt;Now that the focus of the meeting has moved away from the spreadsheet it has been easier to make it a meeting where everybody gets informed on what's going on with the project. People really talk about what they are doing rather than just taking hours down from tasks. For example, since there is no spreadsheet during the meeting the participants need to describe what they are working on (e.g. &amp;quot;working on a bug in the login process&amp;quot;) rather than just saying &amp;quot;working on bug report #20&amp;quot;.)&lt;/p&gt;
&lt;p&gt;We still keep track of the number of hours remaining in our Sprint Backlog items but is done outside of the daily meeting.&lt;/p&gt;</description><a10:updated>2007-12-12T20:21:00-05:00</a10:updated></item></channel></rss>