Community Blogs

Browse by Tags

Related Posts

  • MAB ContainerModel / Funq: a transparent container

    From the point of view of the user of the container, he doesn't have to do anything at all. He just creates classes as usual: public class EditCustomersPresenter { public EditCustomersPresenter(IEditCustomersView view, ICustomerRepository repository) { this.view = view; this.repository = repository; view.Presenter = this; } ... } Container configuration is done through lambdas that specify which object to construct for the registered type. For the view used by this presenter (an EditCustomersView form), it would look like: ... Read full article Read More...


  • Mobile Application Blocks ContainerModel / Funq: an introduction

    If you follow my blog, you probably heard about Funq , and maybe you even watched the screencasts I did about it while developing it (yeah, I'm missing a bunch of new ones!). When we started working on a rev for the original Mobile Client Software Factory v1 for patterns & practices , we had a list of top-priority issues and feature requests expressed by the community and the advisory board. Very high on the list was *removal* of the Composite UI Application Block (CAB) from the blocks, as its performance impact was too great for mobile apps. ... Read full article Read More...


  • What would you like to see in Enterprise Library 5.0?

    There are few groups within Microsoft that are as open and so quick to deliver as patterns & practices . When you give them feedback or request features, chances are you'll see them implemented within months, rather than years (if they get enough support of the rest of the community!). It's now time to engage in shaping EntLib 5.0! From Grigori's blog : At this point, we would like to invite you to select and prioritize candidate features/stories you care about. Please review them carefully along with the associated effort estimates and cast your votes.  Do remember to stay within the budget (100 points). Here's the link to the ... Read full article Read More...


  • Crazy Linq: replacing multiple and nested foreach statements with a query

    Objective of the method: determine whether the given EnvDTE code class contains the given GeneratedCodeAttribute: "old" foreach/if approach: private bool IsPresentationModel(CodeClass2 baseClass) { foreach (CodeClass2 pc in baseClass.PartialClasses) { foreach (CodeAttribute2 attr in pc.Attributes) { if (attr.FullName == typeof(GeneratedCodeAttribute).FullName && attr.Value.Contains(ThisAssembly.Title)) { return true; } } } foreach (CodeAttribute2 attr in baseClass.Attributes) { if (attr.FullName == typeof(GeneratedCodeAttribute).FullName && attr.Value.Contains(ThisAssembly.Title)) { return true; } } return false; } ... Read full article Read More...


  • A picture is worth a thousand words: is XML dying?

    (does that answer Jeremy's question too ?) Read full article Read More...


  • Approaching Behavior Driven Development (BDD) from a Test Driven Development (TDD) perspective

    Over the years doing TDD, I'm getting increasingly concerned about the value my test fixtures are bringing to the table in terms of documenting features and expected behavior. So far, I followed the typical pattern in TDD of creating one class (fixture) per object under test: if I have DirectoryService, I create DirectoryServiceFixture. Inside the fixture (and for the past couple years now), I've been pushing teams I work with to stick to a convention where every test method is prefixed with the word "Should": this seems to be at least a bit ... Read full article Read More...


  • Making WCF services amenable to testing

    You know that using WebOperationContext.Current is BAD for making your service implementation testable, don't you? My friend Pablo Cibraro continued to evolve his ideas around decoupling your service implementation from this static dependency, and came up with the most simple yet totally unobtrusive (for production code) approach to this, which he calls WCFMock . The idea is quite simple: you can leverage C# class aliasing functionality (which few know it even exists) to conditionally (i.e. DEBUG vs RELEASE builds) replace the WebOperationContext implementation, like so: ... Read full article Read More...


  • Moq 3.0 RTM!!!

    I've just released the latest version of Moq :)))) It's quite late on an intense week at Redmond, so I'm just going to paste the relevant portion of the changelog : Version 3.0 * Silverlight support! Finally integrated Jason's Silverlight contribution! Issue #73 * Brand-new simplified event raising syntax (#130): mock.Raise(foo => foo.MyEvent += null, new MyArgs(...)); * Support for custom event signatures (not compatible with EventHandler): mock.Raise(foo => foo.MyEvent += null, arg1, arg2, arg3); ... Read full article Read More...


  • Freeing up data and collaboration via the mesh

    Last weekend, during the ALT.NET Seattle conference, I spoke for quite a while with Miguel de Icaza on the work we're doing with InSTEDD in the area of data synchronization. He was very excited, and wondered how come this wasn't more broadly known. I realized that I hadn't blogged about it in a while , and it seems to me that this seemingly niche technology isn't getting the broad publicity it deserves. So I'll try to explain in simple terms what it is, and why it matters in many, many scenarios. Imagine you have an application (mobile or desktop), which can be partially connected, and needs to synchronize data with a server, bi-directionally. That's not very innovative or disruptive, is it? Of course NOT. We have been...


  • Leveraging ILMerge to simplify deployment and your users experience

    ILMerge is one of those little-known gems that are an absolute must-have once you know how to apply them effectively to scenarios you didn't even think about. Specifically, whenever you work on a multi-project solution that may also use external projects in turn, forcing your users to add (say) five assembly references just to your "entry point" library is clearly a bad experience. One example that comes to mind is Enterprise Library , where you add a minimum of 3 (IIRC) assembly references to use just about *any* block in isolation. If you use more than one, it quickly becomes quite a big list. Wouldn't you want to just give your users a single EnterpriseLibrary.dll? ... Read full article Read More...


Page 1 of 9 (89 items) 1 2 3 4 5 Next > ... Last »
Microsoft Communities