Re: Business objects, subset of collection



What about payments made from other client computers? Are they
reflected instantly too?

Another note & question on this:
Using business objects, it is very easy to persist any "dirty" objects
to the DB,

As well without business objects:
insert into payment values (4, '2008-01-19', 500)
or
update payment set amount=600 where invoiceid=4 and date='2008-01-19'

but I do have a question on how other users would be
notified of such changes.

Triggers

 In an environment like MS Access, this is
not much of a problem since you are working in a "data-connected"
mode, but when you are working with disconnected datasets or
collections of business objects it raises some questions for me.

Let's assume my app is a multi-user application.  If user A and user B
is viewing payments for the same day and user A adds or changes some
payments for that day - what would be an efficient way for B's grids
to be updated with this new data?

In most applications I have seen, user B has to press the "Refresh",
button in order to see the new payment.

But you could use a trigger, that would send a notification message to
all subscribing clients. After recieving such notification, the
clients would have to refresh the grid.

Ps. Of course you would also have to put some kind of locking
mechanism in place to prevent modification of the same record by two
users at the same time, but that would be a separate issue.

If you use locking, optimistic locking should be preferred.

//frebe
.


Quantcast