-
Hi, I am pretty new to CSLA and I am trying to introduce a BL on top of the already built DL. The DL is build using EF4.3 and the DBContext. I am starting to face some challenges but I am not sure whether it's due to a bad implmementation or an inherent incompatibility between the tools I am using...
-
The challenge here is to implement a solution that doesn't cause a memory leak. In concept , you can have some global reference to the PersonInfoList, and in the Saved event handler of the PersonEdit object you can just update the PersonInfo object with the new data. Or variations on that theme....
-
I frequently struggle with determing which object should be the root object in a group of related objects. As a result, I feel my object graphs and relationships end up being too large and complex and consequently not very performant. By the end of setting the class realtionships up in an application...
-
Do you want the validation error to appear as part of the parent object that contains the collection, or the child object(s) in the collection? Either way, you should consider overriding OnChildChanged in the parent object that contains the collection, and that's where you should either trigger the...
-
Hi, Is there any possibility to know when the code is being executed in the nearest tier to Database Server??? I mean, in the same tier where Dataportal_Execute is being called... There is some process in my application that needs to do several data operations over multiple objects and I'm trying...
-
First, if you want your client and server to be loosely coupled, you should be looking at the creation of a service-oriented system that is composed of 2+ applications. None of these applications should share any code - they must be independent in order to achieve independent versioning and remain loosely...
-
In the relatively short time using CSLA I found that the individual business objects can be designed clear, stable, and almost identical across the different user stories. What really differs is the object graph. They are smaller or broader, from A to D or from C to F. With a user story specific graph...
-
(disclaimer: I'm on heavy-duty pain killers due to having hernia surgery yesterday - so this could be rambling and might use metaphors that are overly florid) One area where my view has changed over my career is "reuse of code". Like most people, I used to think that reuse was a primary...
-
They might be "presentation oriented". But I suggest that any object model that is properly designed to meet a use case or user story will, almost by definition, fit smoothly into the presentation. This is because the presentation is also designed to meet the same use case , or story. It is...
-
I know, there have been very similar posts some years ago, but I think at least two things have changed: The unit-of-work principle has beome prominent, and we now have an object factory option. The scenario is basically that of post " Multiple modules with each there own businessobjects "...
-
On my WPF interface I have, amongst other things, a checkbox, and two textboxes. When the checkbox isn't checked then I would like the two checkboxes to be blank and disabled. Then if the user checks the checkbox, the two checkboxes will become editable. My question is, where do I put the logic for...
-
I recommend designing (not necessarily implementing) each user scenario (use case, user story, etc) independently. So you apparently have an edit a policy user scenario, and your PolicyEdit (that's what I'd name it anyway) class supports that scenario - that's good. You probably also have...
-
The philosphy of the CSLA rules engine is that rules are first-class citizens. They are objects (and therefore can be tested, reused, etc). Rules are then attached to properties of editable objects. Unless your class defines a property, the class can't do anything with rules, because it won't...
-
Please understand that CSLA is not an ORM, and I don't intentionally support object models where the objects look like tables. Instead, I intentionally support object models where the objects meet the needs of specific user scenarios. ProjectTracker (current version is in svn or with the Using CSLA...
-
What a passionate way to ressurect an ancient thread :) In some ways having things like UndoableBase be in the inheritance chain is a total PITA, and in retrospect it would have been better implemented through composition. Other things, like a lot of the data binding support, has to be done through inheritance...
-
That's a little tricky with the existing object stereotypes. Primarily because the editable list stereotype assumes that removing an item from the list means you want to delete the item. In your case, removing an item from the list might mean deleting the item, or it might mean that it moved. So...
-
You didn't describe your user scenario, only the data model. Although you can sometimes use CSLA to create data-centric objects, I recommend against that. In many cases, the reason for a treeview is to display a subset of data in the treeview itself, and when the user selects an item in the treeview...
-
Hi Jack, Usually the object graph is designed around the user scenario, not the data, so it has the shape required to perform the task. In most cases that means the shape of the object matches the need of the UI, because they are both designed around the same user scenario. In the rare case that you...
-
I should also clarify terminology. I make a distinction between "domain" and "entity" objects that not everyone agrees with. All objects are (or should be) defined by their behavior or responsibility. Some objects have one responsibility: to contain data. Of those data container objects...
-
Some rules of thumb, in my view anyway: Remember that business objects are not entities - entity objects are data containers, business objects are behavior containers Design each use case independently - don't worry about reuse during design Once you have the use cases designed, look for common types...