On of the nice aspects of a business object and localizing all the logic for
validation / updates in a single object is that it lightens the load for the
UI deveoper not to have to worry about such issues.
So, for example, lets say that an Order that isn't an odd lot can't be
submitted to the BE. Ideally I would want to bind the Size property to a
sizeTextBox and an IsValid property to the submitButton. This way, if any
rules are broken (and the size is not % 100) the send button won't enable.
This provides real nice encapsulation. But on the flip side, setting the
Size in the object will ALSO notify all the bound controls of the new size.
That is undesirable. Becasue, for example, if there was an order blotter, I
wouldn't want it to update also.
The problem becomes more difficult when you think about the following
situation ... an order with a size of 100,000. I open the order entry screen
and change the size to 50,000. Then, while I am editing the object, the
order size (lets say from a different trader) is changed to 200,000. If I
had the order blotter open, I should see that change (and prob be notified
in the order entry screen that the size chagned, but that is a different
story.)
So while I agree that the buiness object approach is a great way to go, I am
having difficulty resolving issues like the one mentioned above.
So ... was wondering if anyone else has worked on such problems ... 1 1222
msnews.microsoft.com wrote: On of the nice aspects of a business object and localizing all the logic for validation / updates in a single object is that it lightens the load for the UI deveoper not to have to worry about such issues.
So, for example, lets say that an Order that isn't an odd lot can't be submitted to the BE. Ideally I would want to bind the Size property to a sizeTextBox and an IsValid property to the submitButton. This way, if any rules are broken (and the size is not % 100) the send button won't enable.
This provides real nice encapsulation. But on the flip side, setting the Size in the object will ALSO notify all the bound controls of the new size. That is undesirable. Becasue, for example, if there was an order blotter, I wouldn't want it to update also.
The problem becomes more difficult when you think about the following situation ... an order with a size of 100,000. I open the order entry screen and change the size to 50,000. Then, while I am editing the object, the order size (lets say from a different trader) is changed to 200,000. If I had the order blotter open, I should see that change (and prob be notified in the order entry screen that the size chagned, but that is a different story.)
So while I agree that the buiness object approach is a great way to go, I am having difficulty resolving issues like the one mentioned above.
So ... was wondering if anyone else has worked on such problems ...
Seems to me that if 'something' has two separate rules, then that something
is realy two different entities. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Kevin C |
last post by:
When designing an asynchronous service-based system, generally speaking
whose responsibility is it to determine when a duplicate request is sent -
the system hosting the service or the feeding...
|
by: msnews.microsoft.com |
last post by:
I am new to C# (coming from java) and I am confused about how to properly
work with datagrids.
The application I am working on is a message based system where properties
aren't changed in direct...
|
by: Shibu |
last post by:
Hi,
I have a situation where I need to convert business objects to a flat table.
The reverse is also required. I am using c# and
Oracle ODP. I am looking for an easier method to do the below...
|
by: headware |
last post by:
I am new to 3-tiered design and am in the process of designing an
application that will work with ASP.NET as well as Windows Forms (and
possibly with a PDA of some sort down the road). My question...
|
by: Vendell |
last post by:
Join one of Canada's finest business men...
Dear entrepreneur colleague:
Here is a message from the founder....
Let me introduce myself. My name is Ariel Topf. I am 42 years old and I have...
|
by: Bob Badger |
last post by:
Hi,
Simple question (although I guess with a complicated answer). Is HTTP
an async protocol? For instance, if I send a message to a c#
webservice via http what is the protocol actually doing?
...
|
by: pratham |
last post by:
Hi!
I'm making a database application and i heard from a friend that it is
more
proffecional and easy to do this with bussines objects. Can anyone tell
me
where i can find more info on bussines...
|
by: Penelope Dramas |
last post by:
Hello,
I'm in a front of very serious .net redesign/rewrite of an old VB6
application.
I had been asked to make it .NET 2.0 and would like to ask couple of
questions regarding data access as...
|
by: BillE |
last post by:
I'm trying to decide if it is better to use typed datasets or business
objects, so I would appreciate any thoughts from someone with more
experience.
When I use a business object to populate a...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |