January 2003 | ||||||
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 | |
Dec Feb |
Good Spam Assassin Stuff
Although Spam Assassin is not a perfect server side anti-spam engine (I'm biased but I think my stuff is better), it's still damn good. If you are using Spam Assassin (SA) then check out Jeremy's News site for it. There is even a good article on how to integrate SA and Qmail. [_Go_]
7:05:41 PM Google It! comment [] IM Me About This
Catching the Pattern Wave
Like Jeremy I'm starting to get the whole pattern gig (starting). All it took was using Harry's wonderful strategy pattern for validation (which I've extended a bunch of ways already). Now Harry has another one: Observers.
The Observer Pattern is designed to help cope with one to many relationships between objects, allowing changes in an object to update many associated objects. It provides a powerful mechanism to extend our applications, in terms of how they respond to events, without needing alter existing (and working) code.
We'll take a simplified look at how the observer pattern might be used in a typical PHP forum application then suggest other uses for the observer pattern...
The Observer pattern is defined by the Gang of Four in Design Patterns as behavioural pattern - that is one we can use to modify the behaviour of our applications. It's regarded as being so useful, that Sun bothered to implement it in the Java API (see Observable and Observer).
The basic principle behind the observer pattern is if you have some object, such as a Post object for a forum system, you can have other objects, such as a Mailer object, act as an observer and respond to any changes in the Post object, such as emailing relevant forums users that a new post has been added to the thread they were subscribed to.
Conceptually, the Observer pattern in something like a trigger in a database, which runs a stored procedure when a table row is modified for example (we won't go too far with this analogy though).
Normally we might implement the mailing functionality in the Post object itself but what if later we want add further "events" to Post, when a new post is made, such as adding an entry to our forums RSS feed for example? And how many more things might we want to add in future?
The observer pattern provides us the mechanism to add such functionality without needing to alter the Post object. [_Go_]
Have I fully read this through, tried it out, etc? No. Will I? Almost certainly.
7:00:54 PM Google It! comment [] IM Me About This
Steve Case Steps Down from AOL
Not many details in the press release. Look for more content protection from Time Warner now since Steve is the only real "technologist" there (if he's even that). Sigh. [_Go_]
7:33:32 AM Google It! comment [] IM Me About This
Qmail and Squirrel Mail
I just had to get QMail and SquirrelMail running for a client. Here's a good QMail / Squirrel Mail page. [_Go_]
Note: And since I'm way, way, way under the gun today there will only be small tidbits like this today. Sorry.
6:58:13 AM Google It! comment [] IM Me About This
Blogging Utility: Source Code Formatting for Bloggers
I just found a cool trick -- if you need to blog source code you can use Everything2's source code formatter to replace things like > and < w/ the correct HTML entities. Small but useful. [_Go_]
5:40:10 AM Google It! comment [] IM Me About This