Re: Category-Proposal: Patterns

From: Date: Fri, 21 Feb 2003 20:25:24 +0000
Subject: Re: Category-Proposal: Patterns
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13600@lists.php.net to get a copy of this message
On Fri, 21 Feb 2003, Xavier Noguer wrote: > Don't worry I try not to take it personal :) > > My previous statement was wrong. What I was trying to say is, the actual > implementations of MVC (*) are a good fit for java, but they don't add much > value to php. Again I disagree here. The benefits of the pattern, as describe by the Gang of Four, can all be realized in any OO langauge. > The templating part is more than covered already by several different > packages (Smarty and the pear templating engines). I'm not even considering templating as part of the MVC. You can still have an sound MVC implementation and use any PEAR template system. > Forcing all actions to be handled by Action objects seems to me like Sun is > trying to shove servlets down my throat all over again so that JSP remains > just as a "templating technology" ("scripting considered harmful"?) Ah I detect a relative hatred for sun...which is OK. However, the MVC pattern is not the brainchild of Sun. And, to be clear, MVC as a concept has no direct ties to servlets. That's just how the Java implementation of MVC works. The PHP version would be a bit different. > If pages are dangerous because they don't have the strict (?) interfaces that > object methods have, then I don't think dismissing the power of scripting is > the solution. Having a framework to specify interfaces (proper input) for all > pages seems like a much better solution to me (In fact, I have some > experimental code which does just that). I'm not following you here. What do you meant by 'scripting'? We are talking PHP here so any MVC implementation you think of would be still be 'scripted'. > > This opinions come from my limited experience with JSP/Struts/servlets, and > are probably tainted by my visceral hate for all things java, so feel free to > correct me. Well, all gripes wtih Java aside, MVC as a pattern still has merit regardless of implementation langauge. Implying MVC is a product of Java is invalid. The only tie to Java was it was one of the first languages to bring the MVC pattern into maturity. > > > * Phrame is "based on the design of Jakarta Struts", so I'm not considering it > (this is not a statement on the merits of Phrame). To be clear, Phrame isn't trying to be a complete implementation of struts. There is a lot of crap in struts that is not relevant to this conversation. The biggest thing Phrame brings to the table is a PHP implementation of the MVC. -- Tony Bibbs "I guess you have to remember that those who don't tony@tonybibbs.com 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

« previous php.pear.dev (#13600) next »