Re: Category-Proposal: Patterns

From: Date: Fri, 21 Feb 2003 21:41:56 +0000
Subject: Re: Category-Proposal: Patterns
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-13602@lists.php.net to get a copy of this message
El Vie 21 Feb 2003 17:25, Tony Bibbs escribió: > On Fri, 21 Feb 2003, Xavier Noguer wrote: > > 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. Just saw the Phrame site and you are right. But then templating capabilities don't add any value to php. > > 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. What I meant by that was forcing the mapping of requests to actions implemented as objects. I think there is nothing to be gained by using that approach instead of mapping requests to actions implemented as scripts. > > 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'. see above. Action objects don't help me with validating input, authenticating, authorizing, etc... At least they don't make it easier than scripts. > > 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. That doesn't justify cloning java's implementation into other languages without any regard for their "nature" (**). > > * 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. Point taken. I should take a closer look at Phrame... ** Sorry if that sounds corny... I'm refering to what a language is good at, because it's been desgined/has evolved with certain objectives in mind. Java was designed with "OO purity" in mind, which explains why it sucks in everything that can't be easily mapped into objects. PS: I took the liberty of erasing everybody else from the cc list, so that we don't fill their mail boxes with my rants.

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