views:

30

answers:

1

I am migrating an old project to Zend Framework. I have a drop down list that changes filter context. In the old project the onClick event of the <select> list ran a function that made a jQuery ajax call to a php script that essentially updated the $_SESSION variable and then the JavaScript reloaded the page when the response came back. I have a couple of questions:

  1. Is this an okay practice?
  2. Should I send the request to a Controller instead of a servlet? One of the issues with this is that the drop down list is built in a view helper and is available across all Controllers, but I understand I could put the necessary code in and have them all inherit it.
  3. If I DO go the stand-alone servlet type route, where do I put the php file in the hierarchy? I'm assuming the public folder- so pardon me if it is a dumb question.
  4. I'm not familiar with Zend_Session, are there any gotchas to watch out for?

--EDIT--
After some initial code testing I have run into an issue with my servlet php file (let's call it registrar.php) is not able to get the Zend_Session_Namespace from the Zend_Registry when it is standalone (I'm not sure if I'm not doing it right, but since it's not being sent through index.php it makes sense to me that it can't access the registry). Instead of registrar.php I'm going to create a RegistrarController

A: 

I have created a RegistrarController, disabled the standard layout and view and put my logic in there

manyxcxi