php_begins Posted January 31, 2012 Share Posted January 31, 2012 Alright, I have to start writing PHP,jquery,css code using the ZEND framework. The framework is already set up by my supervisor. I do not have any knowledge regarding the ZEND framework. For example ,normally the structure of my code would look something like this: <srcript type="text/javascript src="some_external_jqueryl_ibrary"> //jquery.ajax function() </script> <link rel="stylesheet" type="text/css" href="theme.css" /> <html> <form> <div id="something"> </div> </form> <? //PHP code ?> Is there a tutorial as how to write code and structure them in a ZEND framework? Quote Link to comment https://forums.phpfreaks.com/topic/256149-how-write-code-in-a-zend-framework/ Share on other sites More sharing options...
premiso Posted January 31, 2012 Share Posted January 31, 2012 A good start would be the Zendframework Coding Standards as well as the Zendframework Reference guide There are plenty of screencasts available for ZF as well, you just have to do a bit of googling to find them. Quote Link to comment https://forums.phpfreaks.com/topic/256149-how-write-code-in-a-zend-framework/#findComment-1313132 Share on other sites More sharing options...
php_begins Posted February 1, 2012 Author Share Posted February 1, 2012 Thank you. I had a look at it. Does it mean i can no longer create forms in the normal fashion like this: <form action="test.php" method ="POST"> <!-- Code here --> </form Do i need to use oop like this everytime: class Application_Form_Test extends Zend_Form { public function init() { // Set the method for the display form to POST $this->setMethod('post'); // Add an email element $this->addElement('text', 'email', array( 'label' => 'Your email address:', 'required' => true, 'filters' => array('StringTrim'), 'validators' => array( 'EmailAddress', ) )); // Add the comment element $this->addElement('textarea', 'comment', array( 'label' => 'Please Comment:', 'required' => true, 'validators' => array( array('validator' => 'StringLength', 'options' => array(0, 20)) ) )); // Add the submit button $this->addElement('submit', 'submit', array( 'ignore' => true, 'label' => 'Sign Guestbook', )); Quote Link to comment https://forums.phpfreaks.com/topic/256149-how-write-code-in-a-zend-framework/#findComment-1313172 Share on other sites More sharing options...
trq Posted February 1, 2012 Share Posted February 1, 2012 Does it mean i can no longer create forms in the normal fashion like this: No, you can create form normally if you wish. Quote Link to comment https://forums.phpfreaks.com/topic/256149-how-write-code-in-a-zend-framework/#findComment-1313174 Share on other sites More sharing options...
php_begins Posted February 1, 2012 Author Share Posted February 1, 2012 ok thanks..the whole thing seemed kind of overwhelming to me.like adding external stylesheets,writing jquery code using their view controllers etc.. Quote Link to comment https://forums.phpfreaks.com/topic/256149-how-write-code-in-a-zend-framework/#findComment-1313176 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.