Sunday, September 21, 2003

[WARNING: LONG AND TECHNICAL]

I recently got a book on design patterns in software.  It basically takes a well-known theory on patterns in home and building architecture and applies it to programming.  The result is creating software that is incredibly flexible, portable, extensible, and easy to manage.  In reading it, I've been identifying ways I can improve the code I've written at Motorola.

One of these improvements lies with IHttpHandler, an interface that defines how an http request from a client is handled and the resulting content delivered.  Visual Studio and the standard ASP.NET programming model steer you away from using IHttpHandler directly in favor of the "simpler" technique of subclassing the Page class to create...pages.  I put quotation marks around simpler because this technique is only simpler in small, non-complex applications.

When the application reaches a certain complexity, this PageController pattern becomes very cumbersome.  This is when you need to create an entity that can make alot of decisions outside the context of a page, delegate data retreival and manipulation to other entities, and let the Page be a very passive participant. This concept is realized in the FrontController pattern, which is easily implemented via the IHttpHandler interface.

It is encouraging to see the concept of Patterns being embraced and documented so well at Microsoft.  I'll be implementing some ideas this week, and I'll update you on the progress.

posted on Sunday, September 21, 2003 2:23:43 PM (Pacific Standard Time, UTC-08:00)  #    Comments [3]
Related posts:
Silverlight limitations and Constrained Callvirt in IL
What is System.__Canon and why is it on my stack?
Adding support for .ashx-based views in ASP.net MVC
Expression Tree Pruning, Value Types, and the one true Object
Delegate Properties
Open-instance delegates for value types?
Tracked by:
http://marklio.dnsalias.com/marklio/PermaLink.aspx?guid=9f1a1f6c-b327-484c-9f27-... [Pingback]
"When to stray from the standard ASP.NET coding model" (marklio) [Trackback]
"order diet pills online" (order diet pills online) [Trackback]
"blue diet phentermine pill" (blue diet phentermine pill) [Trackback]
"Maytag Washers" (Maytag Washers) [Trackback]
"instant access" (instant access) [Trackback]
"tropical costa rica" (tropical costa rica) [Trackback]
"san francisco professional carpet cleaners" (san francisco professional carpet ... [Trackback]
"sun chlorella" (sun chlorella) [Trackback]
"cantilever umbrella" (cantilever umbrella) [Trackback]
"authentic eqyptian hookah" (authentic eqyptian hookah) [Trackback]
"buy veterinary flagyl no prescription" (buy veterinary flagyl no prescription) [Trackback]
"Fender 50th anniversary stratocaster" (Fender 50th anniversary stratocaster) [Trackback]
"tight pants gallery" (tight pants gallery) [Trackback]
"BASIC Kite Making" (BASIC Kite Making) [Trackback]
"orange county airport" (orange county airport) [Trackback]
"Nazi meth" (Nazi meth) [Trackback]
"eureka vacuum belts" (eureka vacuum belts) [Trackback]
"import of perfume" (import of perfume) [Trackback]
"how to construct a respirator" (how to construct a respirator) [Trackback]
"zyrtec and conception" (zyrtec and conception) [Trackback]
"September Holidays" (September Holidays) [Trackback]
"audition movie spoiler" (audition movie spoiler) [Trackback]
"vicks humidifier" (vicks humidifier) [Trackback]
"phat farm sneakers" (phat farm sneakers) [Trackback]
"mexico pharmacies" (mexico pharmacies) [Trackback]
"computer restarts for no reason" (computer restarts for no reason) [Trackback]
"gameboy advance sp" (gameboy advance sp) [Trackback]
"precut mats" (precut mats) [Trackback]
"technical defenition of SSL" (technical defenition of SSL) [Trackback]
"DEWALT ROUTER" (DEWALT ROUTER) [Trackback]
"Effects of Nagasaki Hiroshima Bombing" (Effects of Nagasaki Hiroshima Bombing) [Trackback]
"8X 4X AGP INTERFACE" (8X 4X AGP INTERFACE) [Trackback]
"Cabinet Knobs" (Cabinet Knobs) [Trackback]
"Apply for a HUD" (Apply for a HUD) [Trackback]
"notetaking from a textbook" (notetaking from a textbook) [Trackback]