DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

4
kicks
submitted by Julion 5 months, 22 days ago

thedotnetfrog.com — An article explaining why you should use composition over inheritance and how you can implement it.

Add a comment 1 comment | category: | Views: 23 | Get KickIt image code
tags: | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
The author makes a good point, but the example code was a little terse. The basic idea is to follow common sense and not reimplement the same tedious code every time you subclass. Instead, find a common point where you can implement a hook in a subclass that performs the critical change.

Usually, I prefer the Action delegate pattern, or whatever it's called. For example, I would instead give the calculation routine an Action delegate that performs the critical calcuation. So, instead of making a whole new subclass, I'd have individual delegates premade for the different calculations I'd need, or roll my own if I had to.
posted by spoulson 5 months, 22 days ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge