Re: Category-Proposal: Patterns
| From: | Alan Knowles | Date: | Sat, 22 Feb 2003 02:36:02 +0000 |
| Subject: | Re: Category-Proposal: Patterns | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-13616@lists.php.net to get a copy of this message | ||
Interesting link - I actually have attempted reading the Patterns book, but never got to the end as I kept falling asleep.. - So the phrame stuff was an interesting read..
Probably like alot of the readers of the list i've got my own little ActionMapping + Action classes - And considering I dont think I understood (or didnt get to that bit in the book) - they are amazingly similar to that design.
Although It's called a framework it's really just an ActionMapping Class (HTML_FlexyFramework, and a few example Base Action Classes for common tasks.. HTML_FlexyFramework_(Page|DatabaseBrowse|DatabaseEdit|LDAPBrowse|LDAPEdit|Webdav)
ActionMapping
http://docs.akbkhome.com/akpear/HTML_FlexyFramework.html
(basically maps http://somehost.com/index.php/Some/Class/Name.php into Class {ConfiguredSitename}_Some_Class_Name
Action - pulls together HTML_Template_Flexy and illustrates the standard page hooks that are called from the framework class
http://docs.akbkhome.com/akpear/HTML_FlexyFramework_Page.html
(in theory the base class could be modified to use IT/Smarty , LiveUser or whatever.. )
(I still havent decided if it's worth submitting to PEAR as it's still under heavy development)
I think you've got a rats chance in hell though of getting a 'standard MVC' in PEAR, - It's a bit like saying there should only be one templating engine.. :) - but it would be nice to see a few in PEAR, and let survival of the fittest take place...
Regards
Alan
Tony Bibbs wrote:
In the Java world they have struts, http://jakarta.apache.org/struts/. Of course struts does a lot more than just MVC stuff but it is the MVC stuff I am talking about. Having some sort of standard for MVC would be nice for consistency sake. Phrame, the PHP package I posted the URL for earlier, has a number of base classes that I think could fit into PEAR. Again, what I am proposing would be a framework provided by PEAR thus all objects in that framework would be abstract classes. Specifically I see a Controller, ActionMapping, Action and ActionForm being object of value. See this for the definition of these objects: http://phrame.itsd.ttu.edu/docs/phpdoc/ NOTE: I do see some implementation issues with what is there, namely, all actions are loaded into memory when only one is needed but that is easy to fix. Also, I am in no way affiliated with Phrame, I just think these guys are on the right track. Please give it an honest look and let me know if what I am saying is making more sense. ---- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.comTony 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