{STATIC} hippo

...on becoming a great developer...
MCTS: .NET Framework 3.5, ASP.NET Applications
posts - 30, comments - 6, trackbacks - 0

My Links

Twitter

Archives

Post Categories

MVC

MVC
Find/Replace on Render

This post is a follow up to to 2 posts: Find/Replace on Render – an MVC alternative to Response Filters and Response.Flush and the crimes against Page Caching. In the first post I explored a way to parse special tags before rendering a page.  I’m working on a CMS that accepts special tags inside content.  Those tags are then replaced on render.  For example, an author might place a tag like: 1: <CustomAmazonBestSellers Count=”5” /> to display the 5 best selling products on Amazon (we don’t support...

posted @ Monday, March 01, 2010 12:10 PM | Feedback (0) | Filed Under [ ASP.NET MVC ]

ASP.NET MVC & State Pattern: Choose your view

Problem I have a model that uses the State pattern.  Some States allow read/write access to the Model’s properties and some are read-only.  I wanted a good way to separate the logic for this from my Views; the View shouldn’t have to decide whether properties are displayed as TextBoxes or inside Divs. First Thought At first I was going to create a custom ViewEngine.  That ViewEngine would be responsible for choosing the right View – that is, if the View was called “Edit” but the model was in a readonly state, it would change the View to...

posted @ Friday, January 08, 2010 2:10 PM | Feedback (0) | Filed Under [ ASP.NET MVC ]

Powered by: