Re: Transfering data between objects
From: H. S. Lahman (h.lahman_at_verizon.net)
Date: 12/09/04
- Next message: Mark Nicholls: "Re: Software design patterns: encapsulation & object identity"
- Previous message: H. S. Lahman: "Re: Software design patterns: encapsulation & object identity"
- In reply to: Cobus Kruger: "Re: Transfering data between objects"
- Next in thread: Robert C. Martin: "Re: Transfering data between objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 09 Dec 2004 15:45:40 GMT
Responding to Kruger...
>>>Screens know bits and pieces of the business objects they
>
> represent,
>
>>>but mostly the screens and business objects are associated
>
> dynamically.
>
>>The last sentence is a problem. In a display paradigm there should
>
> be
>
>>no business semantics.
>
>
> When I say bits, I mean essentially that the screen is aware of the
> data that it is required to provide. Hitherto, no validation has
> occurred from the screen, and the only real interaction has been load
> and post - most of which was done dynamically by using field mappings.
> Unfortunately, the screen layout has been specified for me (way too
> many UI elements on one screen IMO). The exact problem is this:
Right. One of the common reasons that UI objects and business of RDB
objects tend not to line up 1:1 for complex problems.
>
> The screen is used to capture a contract. At the very top, a contract
> type must be specified, and depending on the contract type,
> beneficiaries and life insurance may be forbidden/allowed/required.
> Unfortuantely, I wasn't allowed to create a wizard-like interface, and
> all three sets of data must be visible at the same time.
The UI shouldn't do that sort of validation because it requires
understanding the semantics of things like 'beneficiary'. One solution
is to make the user's Save a two-step process: (1) send the questionable
data to the business subsystem for validation and, it responds OK, (2)
send all the data to the business subsystem to be processed.
There is an alternative, but it has some drawbacks. As soon as the user
fills in the contract type in a control, send that to the business layer
to get a list of viable beneficiaries for that contract type. Generally
that can be done long before the user has finished providing data for
the next form field. Then the UI can validate via a value-to-value
compare without understanding the semantics of the values. The drawback
here is that the user must fill in the form in a predefined order.
[Note this is basically the same thing that one would do to dynamically
populate pick lists in the UI.]
>
> The frame that allows you to add a beneficiary, must know whether a
> beneficiary may be added/edited/deleted. Typically I would place this
> validation on the benefiary list, but courtesy of the specified layout,
> the screen containing static contract info (including the type) only
> posts to its business object behind the same button that adds the
> beneficiary changes.
>
> Therefore, I need to either know what is on the screen (via somthing
> like the datapacket), commit prematurely, or allow the user to modify
> the beneficiaries and fail the validation when they click OK. The last
> option hardly seems reasonable from a usability point of view, and the
> second option has its own obvious issues.
One is not limited to one activity just because there is one button.
One can make it a two-step process for validating added data and
committing all the data, as above. So far that sounds like it will
resolve the issues here.
*************
There is nothing wrong with me that could
not be cured by a capful of Drano.
H. S. Lahman
hsl@pathfindermda.com
Pathfinder Solutions -- Put MDA to Work
http://www.pathfindermda.com
blog (under constr): http://pathfinderpeople.blogs.com/hslahman
(888)-OOA-PATH
- Next message: Mark Nicholls: "Re: Software design patterns: encapsulation & object identity"
- Previous message: H. S. Lahman: "Re: Software design patterns: encapsulation & object identity"
- In reply to: Cobus Kruger: "Re: Transfering data between objects"
- Next in thread: Robert C. Martin: "Re: Transfering data between objects"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|