Design Patterns

There are 4 entries for the tag Design Patterns

Prism for Silverlight 2: Taking ‘Hello World' to a Whole New Level

The World's Most Over-engineered “Hello World” DemoDownload SourceI wanted to build a demo/guidance application for Silverlight that merges everything I want to accomplish in a Silverlight 2 application. These were my goals: WCF integration Design-time data binding Independent, decoupled modules Commanding support I chose to use the Composite Application Library for WCF/Silverlight (aka Prism 2) since it came out of the box with commanding support and a framework for pluggable modules. Prism 2 was developed by Microsoft's Patterns and Practices (PnP) group.I've posted a copy of my solution for anyone who's interested in...

Silverlight and Prism: Decoupling the WCF Client Proxy

I'm in the process of creating the world's most complex “Hello World” Silverlight application. Hopefully, for once, I'll see it through to the end and also post the source and an insightful blog entry to help everybody who's struggling to do the same. Anyone who follows my blog knows that I don't always follow through on a series to the end. But, “I can dream can't I?”. Anyhow, I've taken the recent release of Prism v2, which introduced Silverlight support, to dig in and get to know both Prism and Silverlight. As background, I have one production WFP application under...

Entity Framework: Abstracting ObjectContext

Wither you are a TDD purest or not, if you are developing with Entity Framework and testability is important to you, then you have tried some workaround or applied some pattern to make testing possible in your project. When you have a class or method which depends on any external resource it is important to create some sort of abstraction in order to remove a dependency upon that resource so you can effectively test your code. The client I am currently working for has chosen to create a repository class which takes an ObjectContext argument in the constructor. The repository...

Abstracting System.Web.UI.ScriptManager away from the Web Forms model

As I continue to work with the ASP.NET MVC framework I continue to be inspired to dig deeper into things, to find out how they work and how I can make them work with this awesome new framework.The case in point here is using ASP.NET Ajax controls with MVC. Currently this doesn't work because it is closely tied to the web forms model. More specifically, ASP.NET Ajax requires an html form element with the runat attribute set to “server”. Without it, client enabled controls written to use the ScriptManager server control won't work.Here's the error message if you include ScriptManager...

 

 

Copyright © Mark J. Miller