-
I spent some time recently working with Microsoft Composite Application Guidance (A.K.A. "Prism", “CAL”) and I think it is very good platform for building composite UI by either using WPF or Silverlight. One of its greatest advantages is that...
-
How to build Microsoft Unity Auto Mocking container in less then 20 minutes of work… I have written before in detail about Auto Mocking Containers so I’ll skip here details on what is it etc and jump to the main point of this post: implementation of auto...
-
Story about how fluent nhibernate idea was born Fluent NHibernate is an open source project ( fluent NHibernate trunk ) which implements fluent interface on top of the NHibernate ORM configuration capabilities which are based on xml configuration files...
-
Patrick left a comment on one of my previous blog posts asking a couple of very interesting questions that I’ve been asking myself too: Is service locator legitimate way of doing IoC? (I’ll use example code from that blog post as a base for my today blog...
-
NHibernate is great, (no doubt about it) but every time I was supposed to work with it, the fact that I had to manually type in all those xml configuration entries was something I really didn’t like at all. The most important complains I personally have...
-
Today’s hurdle: Using HttpContext without System.Web
One of the principles I really feel strong about can be formulated like this:”Presenter is not allowed to reference System.Web assembly at all”.
Main reason why I feel so strong about that, is based on the fact that once referenced System.Web enables developers in your team to use types from that assembly (HttpContext, Session, Query, Cache etc) and we all know what PITA those types can be when testing Presenters.
Here’s very simple example I’ll use in today’s post:
Imagine you have a presenter which based on value of some query parameter is performing some redirecting or updating UI elements.
The easiest way (referencing the System.Web into presenter) will enable very easy implementation of required functionality but testing that code will require things like creating fake web context which IMHO is good sign of of important web test smell.
To check out rest of my MVP (Model View Presenter) blog post please visit my blog page (thanks to feedburner limit of 500K per feed)
-
RAD tooling style Microsoft is supporting last couple of years usually leads to the code where presentation and bossiness logic are mixed and tightly coupled which makes testability, maintainability and sustainability much more harder then they should be. In case you’ve had to work in the past with web pages containing couple of thousands lines in code behind you will know exactly what problems I am referring to here. In case not, please let me know what is the name of the place where you work :)
One way to tackle that is using the Model View Presenter UI design pattern which provides clean separation between UI and domain logic and as a result of that come testability of the “UI code”, SRP and SOC principles appliance, clean domain model etc…
To check out rest of my MVP (Model View Presenter) blog post please visit my blog page (thanks to feedburner limit of 500K per feed)
-
I have blogged already in the past about MVP basics , MVP vs MVC , MVP Passive View and MVP Supervising Controller but recently I had some interesting experiences in applying MVP into real world applications and from that endeavor I learned couple of...
-
For a few of you reading my blog, this blog post would most definitely come as a big surprise knowing how passionate I am about SIlverlight and all related stuff. Well, although I believe that the real thing is Silverlight, I wanted to check out how the...
-
On my quest to design for testability, I've already covered: Part 1 - Separation of concerns (SOC) by encapsulating DAL code in internal provider class Part 2 - Decoupling manager and provider class (introducing the IProvider) Part 3 - Decoupling...