In previous posts (here and here) I’ve started describing XMPP subsystem and analyzing requirements. Before we proceed with the analysis of requirements (8)+ it’s time to create overview of current structure
Some time ago I’ve faced an interesting challenge. I needed to create library that provided clients with my own types (let’s call them built-in ones). On the other side I needed to allow third-parties to extend my library using their own types.
In this article I’d like do talk about refactoring of construction of hierarchy and high cohesion pattern.
Today I’m going to talk about factory method pattern and it’s very interesting appliance. Read the rest of this entry »
In this post I’d like to talk about composition and inheritance on practical example.
Read the rest of this entry »
Today let’s talk about User Management use-cases more closely. We need several database mappers, several services and facade pattern.
Let’s try to apply Query Object pattern to Syslog in order to allow client to retrieve syslog messages from database in natural, flexible way.
Now when SyslogSessionMapper has been implemented, it time to finish SyslogMessageMapper. But before let’s remind us syslog use-case .
One thing that we will have to implement is retrieving syslog messages using different conditions. Here is preliminary list of conditions:
The list can be continued…
This is the best place to use Query Object pattern. For futher reading please refer to:
http://codebetter.com/blogs/gregyoung/archive/2009/01/20/ddd-specification-or-query-object.aspx
http://www.theserverside.com/patterns/thread.tss?thread_id=29319
http://www.lostechies.com/blogs/chad_myers/archive/2008/08/01/query-objects-with-the-repository-pattern.aspx
http://martinfowler.com/eaaCatalog/queryObject.html
I’d like to take some time about base classes implementation, since we will use query object pattern in groupchat logger plugin. This plugin will store log of xmpp groupchat (conference) and we need to provide flexible OO mechanism for retrieving chat messages from log. So it would be nice to implement base classes for SyslogMessageMapper and reuse them later :)