Maintaining Layer Separation with Push and Pull
- From: timeisfire8@xxxxxxxxxxx
- Date: Fri, 10 Aug 2007 13:44:34 -0700
Any help with this would be appreciated:
Environment summary:
- CRUD / USER warehouse management system
- Multiple GUI's (web, WinForms etc.)
- Synchronous access via mobile devices (warehouse based wireless data
capture units)
The system is currently layered as follows:
GUIs
---------------------------------------------
Domain (Business Logic)
---------------------------------------------
Persistence Subsystem
---------------------------------------------
Foundation Layer (Utilities etc.)
All pretty standard stuff so far but now I need to implement the
mobile device element and can't seem to come up with an architecture
that maintains clean separation of layers. I have decided to create a
service that sits above the domain layer and is tasked with managing
the connections of the devices as well as routing messages between
them and the domain layer. Thus devices do not send messages directly
to the domain layer.
This solution is restrictive because good design discourages messages
being sent to 'higher' layers and I need the application to 'push'
picking lists to the mobile devices when the system receives them. I
know that I can poll the domain layer from the service to check for
the availability of picking lists but I try to avoid this whenever
possible as it doesn't seem very efficient.
As the assignment and management of picking lists requires a great
deal of logic I have modelled this element in the domain layer using
the classes:
DeviceManager
| 1
|
| Manages
|
| *
MobileDevice
My questions are therefore:
1) Is it acceptable to have an abstract representation of these
devices sitting in the domain layer? Please note that they do not
handle responsibilities such as socket connections etc. For example,
DeviceManager maintains a List<string> of connected devices after the
service has made the connection and passed a deviceID into the domain
layer.
2) How can I maintain the encapsulation of the domain layer as well as
keeping it unaware of higher layers (the service) and still notify the
service immediately of the availability of new picking lists without
resorting to polling? Observer pattern???
Thanks for reading
.
- Prev by Date: Re: Everything
- Next by Date: Direct client rek for Testing Engineers - Austin, TX
- Previous by thread: Mountains or Molehills
- Next by thread: Direct client rek for Testing Engineers - Austin, TX
- Index(es):