Re: UML Question (Object <-> ObjectFinder?)



Responding to Deus...

uh... why would there be hierarchical dependencies in my design?? The
[UserFinder] just delegates all method calls to the proxy, and nothing
more. I could even use an interface here.

Then why not talk directly to Proxy?

Let's assume a simple persistence access mechanism via a high-level
interoperability interface driven by command strings.  In the
persistence access subsystem we have a subsystem interface method
findUserByName.  It dispatches to UserFinder.findUserByName, which, in
turn, creates the right command string and invokes Proxy.doIt(string).
Why do you need UserFinder to do that?  The findUserByName subsystem
interface method could form the command string and invoke Proxy.doIt
directly.


Uh, as I previously showed, there is no command string in the Proxy or
anything similiar to it. Instead, the findUserByName is directly mapped
to UserProxy.findUserByName, which invokes the FindUserByName procedure
in external system. And entities like Order and Computer would have
completely different procedures to call in the external system (i.e.
there is no general method like FindObjectById or DoIt)

It was just an example of the point. Since I don't use CORBA or Java and I don't know what level of abstraction your local infrastructure handles interoperability, I can't use a specific example.


The issue I have is with who calls UserProxy.findByName. I am arguing that it should not be an object like [UserFinder]. That is, the client should not invoke a UserFinder.findByName method that, in turn, invokes UserProxy.findByName. Instead the client should invoke UserProxy.findByName directly.

[I am also arguing that [UserProxy] should be encapsulated in a subsystem whose interface has a findUserByName method that hides UserProxy. That interface method would understand users vs. orders and would dispatch to UserProxy.findByName. Since UserProxy is already dedicated to users it just needs a findByName method, which underscores the mapping in semantics between the client in the main solution and the actual access implementation within the subsystem.]

The justification for [UserFinder] is one of two things.  One
possibility is that it does a lot more than just form a string and
invoke Proxy.doIt with the string.  That is, it coordinates activities
like selecting the right external system, opening a socket for the
proxy, etc.  In that case it is a high level node in a hierarchical
functional decomposition tree because it is synchronizing other
activities in other objects.  This was my concern; it sounded like
UserFinder was a god object managing the entire process of accessing the
external systems.

The second possibility is that UserFinder is a convenient catch-all for
a bunch of variants (findUserByName, findUserBySSN, ...) on a single
theme, finding a user based on identity of one sort or another.  While
that isn't hierarchical, it is essentially making a function a first
class object.  So one would be better off allocating the function to a
problem space entity that would logically have that responsibility
(e.g., User or Proxy).


For [User], it's the second. But one of my main concerns is to ensure a
consistent interface for frontend objects to access the system core
([object] & [objectFinder]). If I let them use the Proxy directly, the
consistence will probably be broken in the future, as there will be
different kinds of entities.

Then the frontend objects should access a subsystem interface that hides the actual access mechanisms, like Proxy. IOW, the last paragraph of my point above.



************* There is nothing wrong with me that could not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions  -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH



.



Relevant Pages

  • Re: UML Question (Object <-> ObjectFinder?)
    ... >>>Then why not talk directly to Proxy? ... >>>interoperability interface driven by command strings. ... creates the right command string and invokes Proxy.doIt. ... >>>interface method could form the command string and invoke Proxy.doIt ...
    (comp.object)
  • Re: Internet Access problems in Fedora Core 4
    ... using the raw ip was to factor out DNS from the troubleshooting. ... set right or your card's interface isn't setup right. ... nameserver <proxy if proxy does dns to you or isp's dns> ... PING 64.233.179.99 56bytes of data. ...
    (comp.os.linux.misc)
  • Re: Should proxy have one interface or two
    ... Dual firewall will help you grant access to public resource/client and limit ... Vérificateur interne en sécurité de l'information ... A Proxy is a device that takes a connexion, filters it and sends it to the ... That's why you have 2 interface, to prevent the bypassing of the proxy, to ...
    (Security-Basics)
  • Re: How to do non dependence on database vendor?
    ... >>> You could actually get away with only a single proxy if you use ... >> The interface approach seems more scalable and contained. ... >>> layer, focusing on storing and retrieval of the explicit data, but free ... >>> the future want to make use of another DB than those supporting SQL. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: UML Question (Object <-> ObjectFinder?)
    ... I could even use an interface here. ... creates the right command string and invokes Proxy.doIt. ... The findUserByName subsystem ... completely different procedures to call in the external system (i.e. ...
    (comp.object)