Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
To Control or not to Control... that is the question!!!
Message
General information
Forum:
ASP.NET
Category:
Object Oriented Programming
Environment versions
Environment:
C# 1.1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01052626
Message ID:
01052909
Views:
7
Thanks, guys... and gals :)

So, I understand the concept but I have another question.

Take the same scenarios and say we want to delete the customer and all it's associated records. Normally you would call the delete method in the controller object, pass in the customer object and the controller would then call the delete stored procedure.

Now, to call the delete on a customer is a pretty heavy hammer and it doesn't really make sense to delete the customer and leave all its orders behind. We can iterate through all the associated controller object and traversly call the delete for each. Since we are already bringing out the hammer would it make sense to call the delete store proc which would delete the customer and its associated records (meaning Order and Order Detail in this case)? Or would the MVC require that I make the individual calls to the each controller? Obviously this is setting rules aside - assuming the customer can be deleted.

The struggle here is whether to remain as pure as possible for the sake of OOP or bend the rules for the sake of performance. If it's absolutely wrong to bend the rules in a MVC environment because down the line we'll regret it or it'll break something in the future we're fine with keeping its purest form. If it's safe to bend the rules without any unforseen repercussion then we'd like to bend the rules.

Again, you're responses are greatly appreciated.
Previous
Reply
Map
View

Click here to load this message in the networking platform