Exforsys

Online Training

How well observer behave in a deep domain model

This is a discussion on How well observer behave in a deep domain model within the Software Patterns forums, part of the Testing category; Hi, My server compose from server objects which some of them only required to derived from specific interface In general ...


Go Back   Exforsys > Testing > Software Patterns

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-05-2004, 08:15 AM
Julia
Guest
 
Posts: n/a
How well observer behave in a deep domain model


Hi,

My server compose from server objects which some of them only required to
derived from specific interface
In general my server know how to process a Command object

The following is a simple description of my server


The Server HAS a MessagingService
The MessagingService HAS a Channle
a Channel HAS a Processor
a Processor HAS a Persister


each channel know how to execute a Command of a specific type
in general a channel process the command using a Processor
and persist it using a Persister

The problem which I faced is the need to pass information (for example the
connection string of the data base)
from the Server(the higher object in the hierarchy) to the persisted(the
lowest in the hierarchy)

currently I am passing IApplicationContext derived to each layer so each
layer can pass it over to sub component
which is create

I am reluctant to do so cause I am feeling that though this is an interface
it make my system somewhat
less flexible cause all object s MUST know something about the Server
(that is derived from IApplicatioContext)

maybe a better wasy is to define an ILayerContext which each layer pass it
to sub components?


another problem that I have is that every type of Channel require a
different set of properties
hence the IApplicatioContext contains a collection of properties which can
be accessed by
each component(the component know the name of properties it needs)
the collection is not type safe it is just a hash table contains information
from the data base


maybe a better way is to add factory method to the IApplicatioContext which
create a concrete class
and set it properties?!
doing so how would I notify to the component that his properties were
changed?

My main aim is to be able to espcially replace the channel at run time.

Thanks in advance









Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 03:37 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0
Copyright 2004 - 2007 Exforsys Inc. All rights reserved.