id
type
5 (blog/news article)
status
21 (imported old-v2, waiting for another import)
review version
0
cleanup version
0
pending deletion
0 (-)
created at
2025-12-04 05:45:36
updated at
2025-12-04 05:45:37
url
https://matt.berther.io/2004/07/10/design-patterns-template-method/
url length
67
url crc
54376
url crc32
4273722472
location type
1 (url matches target location, page_location is empty)
canonical status
10 (verified canonical url)
canonical page id
domain id
domain tld
86
domain parts
0
originating warc id
-
originating url
https://data.commoncrawl.org/crawl-data/CC-MAIN-2025-33/segments/1754151279901.12/warc/CC-MAIN-20250806074443-20250806104443-00690.warc.gz
source type
11 (CommonCrawl)
server ip
Publication date
2025-08-06 09:39:36
Fetch attempts
0
Original html size
18768
Normalized and saved size
16106
title
Design Patterns: Template Method
excerpt
content
Let’s take a look at how we can refactor an existing chunk of code to take advantage of the Template Method design pattern. This pattern’s intent is to provide a skeleton of an algorithm in a method, deferring some steps to subclasses. Our original chunk of code will come from Michael Schwarz’s post about using IHttpHandlers without IIS settings. Just to be clear, this article intends no disrespect to Mr. Schwarz’s post or code quality. He has a perfectly acceptable solution to the problem. I just want to show how design patterns can be used to simplify the solution. As you look through the code, you can see that the base class exposes a Render event that subclasses need to use to inject their own painting prior to being written to the output stream. Every subclass needs to remember to wire this event up if they wish to use it. Picking out the template method is fairly simple in this case. Since we want our subclasses to be able to paint onto the graphics object, our base c...
author
updated
2025-12-26 09:50:48
block type
0
extracted fields
233
extracted bits
featured image
title
full content
content was extracted heuristically
OpenGraph suggests this is an article
detected location
0
detected language
1 (English)
category id
Other [en] (231)
index version
2025123101
paywall score
0
spam phrases
0
text nonlatin
0
text cyrillic
0
text characters
2214
text words
449
text unique words
224
text lines
1
text sentences
20
text paragraphs
1
text words per sentence
22
text matched phrases
0
text matched dictionaries
0
links self subdomains
0
links other subdomains
1 - weblogs.asp.net
links other domains
links spam adult
0
links spam random
0
links spam expired
0
links ext activities
0
links ext ecommerce
1 - amazon.com
links ext finance
0
links ext crypto
0
links ext booking
0
links ext news
0
links ext leaks
0
links ext ugc
0
links ext klim
0
links ext generic
0
status
0
updated
2025-12-26 09:50:48
image author
featured image