I definitely missed the cleverness ;-) This will work fine, as long as you trust the client not to cast anything and access methods on the implementing class!...
The domain that I'm modeling requires complete object revision history and recall. This in itself isn't too difficult and many patterns exist for doing this...
Do you actually need to store the data in this way? Would storing original objects + deltas be acceptable? Using this model you would store an original version...
For simpler situations than yours I'd suggest looking at the command pattern. For example you could treat changing the number of required check tasks as a...
... In regard to versioning, I'm using a database design that mimics the behavior of Subversion. Essentially each table has a revision FK except for the...
There's yet another way -- forgive me if the following has already been discussed. The Temporal Object pattern: http://martinfowler.com/ap2/timeNarrative.html ...
Thanks to all of you for your help. I hadn't read teh TemporalObject patterns yet, and I think that they might help. I'd already figured out something similar,...
Hi, I'm currently designing part of a system that needs is responsible for summarizing information on commission earnings and adjustments from sales and...
You could pull this functionality into a service class that would be implemented with NHibernate or whatever. Your domain objects wouldn't know they were...
As Ben briefly alluded to, the trouble with having the domain object talk to a service object is largely the same as having a domain object talk to a...
Thanks for the folks at domaindrivendesign.org for putting this document out there http://domaindrivendesign.org/practitioner_reports/hu_ying_2007_01.html# ...
I would expect that a repository (could be an Account repository) to have a method that would perform the balance calculation directly in the database. The...
Hi Eric, I don't know your application, domain or requirements, but I am quick to raise an eyebrow when I hear phrases like "for my project I plan to implement...
First of all, I would like to say that I agree that it is better to use an existing implementation, if it satisfies your requirements and/or saves time. ...
Got it, and thanks for the response RE: As the communication is always one-way from SPOT to TBS (the legacy system), we never had a GetOrders method ... Let's...
What about entity access control? The role-based security model is a clear fit for a separate security module with AOP, but what about when you want to say...
In this case you don't need to use Windsor. I usually rely on pure .Net security infrastructure using the PrincipalPermissionAttribute For instance, on the...
... I am aware of that, but i have a problem with it: in my domain, security is modeled as user -> roles -> permissions, and actions are authorized per...
Thank you for all informative replies. I am currently using .NET, so I will try to use .NET security infrastructure or one of the available AOP tools such as...
You should be able to have a generic security solution that your repositories hide, either through AOP, or elsewhere. Why clutter the Repository interface...
... Agreed. Again, I suggest the service layer when security becomes something related to business rules. Also, don't use Aspect#. 'nuff said. -- Cheers, ...
Events can still be a good option for the two-way communication case. Suppose legacy system TBS needs to send a message back to SPOT for a status change (e.g....
... The problem I see with this is that declarative permissions don't always fit, and the other option is to use imperative calls, which takes it back to...
Yes, but if your service layer defines the security rules, you are either bypassing the Repository as the one access point for your entities or you are passing...