Note that there are some explanatory texts on larger screens.

plurals
  1. POZend and jQuery - Forms composed from many actions
    primarykey
    data
    text
    <p>I am about to set sail on some complex web pages and forms in Zend. Since a lot of this will be new territory for me I am hoping you can give me some feedback on my approach before I start.</p> <p>The information I am working with is typically 1-n, for example "1 organisation has n products". It's the child part of this equation that I am working on. In essence, I want to enable a user to add, view, update and delete children from a single URL such as mydomain/products/index.</p> <p>Note that a user can have either 'member' or 'admin' privileges.</p> <p>The key components I see are:</p> <ul> <li>Zend ACL</li> <li>an extended ActionStack Action Helper</li> <li>the AjaxContext Action Helper</li> <li>jQuery</li> </ul> <p>Here's how I see it working:</p> <ul> <li>The ACL is configured early (as a resource plugin or an early-running front controller plugin)</li> <li>The requested action (e.g. /products/index) uses the extended ActionStack Helper to push actions to the stack</li> <li>The extended ActionStack Helper consults the ACL before adding the action to the stack (calling isAllowed())</li> </ul> <p>This should get the initial page loaded. I am thinking that, for duly privileged users, it will include a table of all products, complete with columns for 'delete' and 'edit' links, plus a 'product add' form at the bottom of the table.</p> <p>When the user click on a link:</p> <ul> <li>jQuery handles the event and sends an XHR request to the specific action (e.g. /products/add)</li> <li>the specific action (with appropriate contexts enabled), returns the appropriate response</li> <li>jQuery needs to manipulate the DOM to incorporate the new content</li> </ul> <p>Does this sound about right? What would you do differently?</p> <p>I have not used the ActionStack or AjaxContext Helpers before and have limited experience with jQuery. It all looks reasonably straightforward though.</p> <p>Your thoughts are much appreciated!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload