SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    May 2003
    Location
    Laval
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Zend framework and Quickform

    Hi,
    I'm in the initial phase of a project that will have to be built on PHP and Oracle. I'm still in the inception phase but I'm starting to look at frameworks for the project.

    I am almost settled on Propel as the ORM but I'm not sure about the MVC framework. I just need a simple framework that will provide me with a simple controller. Zend looks like the perfect match and Quickform could be of great use. The problem is that in Quickform you have to execute the submit (controller) after having defined the form (view). Is Quickform just not compatible with an MVC approach ?

  2. #2
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    Worcester
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are going down the Propel route, have you looked at Symfony (http://www.symfony-project.com)?
    Last edited by akrabat; Apr 8, 2006 at 04:04.

  3. #3
    SitePoint Member
    Join Date
    May 2003
    Location
    Laval
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, I have looked at Symfony but I think it might me too complex. Do you have first hand experience with symphony with a data model that as a LOT of many-to-many associations ? Does it work good ?

  4. #4
    SitePoint Zealot crashmakerMX's Avatar
    Join Date
    Jun 2005
    Location
    Germany
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1. Had the same problems with QuickForm once ago. What about encapsulating the complete form things?

    (I don't know QuickForm very good anymore, just example code)
    PHP Code:
    interface Form
    {
        public function 
    validate();
        public function 
    render();
    }

    class 
    MyForm implements Form
    {

        private 
    $form;    

        public function 
    __construct()
        {
            
    $this->form = new HTML_QuickForm;
            
    $this->form->addField('...');
        }

        public function 
    validate()
        {
            
    $this->form->submit();
        }

        public function 
    render()
        {
            
    $this->form->render();
        }



    Then you call MyForm::validate() from the controller and MyForm::render() from the view.

    2. Propel with many many-to-many relations?

    3. akrabat, your Symfony link is broken.

  5. #5
    SitePoint Member
    Join Date
    May 2003
    Location
    Laval
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for your reply.

    It looks like a quite acceptable solution.

    2. Propel with many many-to-many relations?
    Doesn't propel support many-to-many ?

  6. #6
    SitePoint Zealot crashmakerMX's Avatar
    Join Date
    Jun 2005
    Location
    Germany
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by illogix
    Doesn't propel support many-to-many ?
    It does, but with extra work and more overhead.

  7. #7
    SitePoint Zealot
    Join Date
    Oct 2004
    Location
    Worcester
    Posts
    138
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by illogix
    Yes, I have looked at Symfony but I think it might me too complex. Do you have first hand experience with symphony with a data model that as a LOT of many-to-many associations ? Does it work good ?
    Nope, not used it first hand as I considered the Propel bit to be overkill for what I needed.

    The rest of it is simple enough and there are reams of documentation on their site.

  8. #8
    SitePoint Member
    Join Date
    May 2003
    Location
    Laval
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by crashmakerMX
    It does, but with extra work and more overhead.
    I was aware of the overhead but it is still better than working with those many-to-many's in SQL. Also, Propel looks like the only PHP ORM to support Oracle.

    My worries about the many-to-many's are more directed to Symfony. I don't think it can generate forms to manage those associations ?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •