From: Tony B. <to...@to...> - 2003-03-27 19:00:23
|
I am going back and rethinking what was said about actions and I have a few questions. In my scenario, actions (views or commands), work independent of the controller. In fact the controller marshalls the creation and execution. So why in Phrame does the action have a reference to the controller? To me that breaks the basic OO rule of encapsulation. Now for the forms. Why is validation done at a 'form' level? My problem with this is say you have a 'article' object. Articles can be submitted by normal users and also by administrators but the access they have to specific properties may differ. Thus you may have two different forms, one for the user view, one for the admin view. In the Phrame model, you would have to code similar validation logic into both forms, right? In the code I built validation is just another command which is completely reusable. You know, the more I think about it, the more I see remakable similarities in the two code bases and while you guys where questioning fundamental differences in the designs, the more I think about it I don't see how they differ that other than in the names of some of the classes (i.e. semantics). Don't read into this too much, I'm still committed to reworkign some of the code per your suggestions but the action object in particular is one I don't see a huge value in as that is covered by my command object (similar methods). Also, have you thought about modifying the actions so it separates post requests form get requests? I ask because it is quite feasible that an app would not want to process an get requests and in both packages there is no distinction since the $_REQUEST superglobal is used. -- Tony Bibbs "I guess you have to remember that those who don't to...@to... hunt or fish often see those of us who do as harmlessly strange and sort of amusing. When you think about it, that might be a fair assessment." --Unknown |