<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7968213292399692465</id><updated>2024-09-01T00:07:08.664-07:00</updated><title type='text'>Zend Framework</title><subtitle type='html'>This blog is all about Zend Framework...</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-3686791727896325054</id><published>2011-08-25T02:38:00.000-07:00</published><updated>2011-08-25T02:58:31.583-07:00</updated><title type='text'>How to use Zend ACL</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;style type=&quot;text/css&quot;&gt;
	&lt;!--
		@page { margin: 2cm }
		P { margin-bottom: 0.21cm }
	--&gt;
	
&lt;/style&gt;  &lt;br /&gt;
This feature will be useful for the one who actually wants to control the user roles &amp;amp; privileges to access modules/action in the Zend Framework projects.&lt;br /&gt;
&lt;br /&gt;
First create a class and define your roles and resources to be used.  &lt;br /&gt;
&lt;br /&gt;
Eg:&lt;br /&gt;
&lt;br /&gt;
Roles:   Admin, user, Guest&lt;br /&gt;
Resources: default, admin (in this eg resources are modules)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;&lt;u&gt;&lt;b&gt;CLASS:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;pre&gt;&amp;lt;?php

class MyAcl extends Zend_Acl
{
    	public function __construct()
    	{
        	// Resources
        	/* Default module */
	$this-&gt;add(new Zend_Acl_Resource(&#39;default&#39;));
	/* Admin module */
	$this-&gt;add(new Zend_Acl_Resource(&#39;admin&#39;));

	// Roles
	$this-&gt;addRole(new Zend_Acl_Role(&#39;Admin&#39;))
	-&gt;addRole(new Zend_Acl_Role(&#39;User&#39;), &#39;Admin&#39;)
	-&gt;addRole(new Zend_Acl_Role(&#39;Guest&#39;));

	// Authorization
	$this-&gt;deny(&#39;Guest&#39;, &#39;admin&#39;);
	-&gt;allow(array(&#39;Admin&#39;, &#39;User&#39;, &#39;Guest&#39;), array(&#39;default&#39;))
	-&gt;allow(array(&#39;Admin&#39;, &#39;User&#39;), array(&#39;admin&#39;));
	}
}
?&amp;gt;

&lt;/pre&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;Next you need a plugin to check the routes and to autorize based on the roles &amp;amp; resources. If the  route is not autorized it&#39;ll go to $_noauth at the same time if the role is not having access to resource it&#39;ll go to $_noacl. By default the role will be “Guest”.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0cm;&quot;&gt;&lt;u&gt;&lt;b&gt;PLUG-IN:&lt;/b&gt;&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
&lt;pre&gt;&amp;lt;?php

class Plugin_Auth extends Zend_Controller_Plugin_Abstract{

    
    private $_auth;
    private $_acl;

    private $_noauth = array (&#39;module&#39; =&gt; &#39;login&#39;, &#39;controller&#39; =&gt; &#39;index&#39;, &#39;action&#39; =&gt; &#39;index&#39;);   
    private $_noacl = array (&#39;module&#39; =&gt; &#39;default&#39;, &#39;controller&#39; =&gt; &#39;error&#39;, &#39;action&#39; =&gt; &#39;denied&#39;);
   
    public function __construct ()
    {
        $this-&gt;_auth = Zend_Auth::getInstance();      
        $this-&gt;_acl = new MyAcl();
    }

    public function preDispatch(Zend_Controller_Request_Abstract $request)
    {
              
            $role = &#39;Guest&#39;;
            if($this-&gt;_auth-&gt;hasIdentity())
            {
                $role = $this-&gt;_auth-&gt;getIdentity()-&gt;role;               
            }
            $controller = $request-&gt;controller;
            $action = $request-&gt;action;
            $module = $request-&gt;module;
	
	// Assign resource based on your requirements
            $resource = $module;

            if (!$this-&gt;_acl-&gt;has($resource))
            {
                $resource = null;
            }

            if (!$this-&gt;_acl-&gt;isAllowed($role, $resource, $action)) //$role, $resource, $action
            {
                if(!$this-&gt;_auth-&gt;hasIdentity())
                {
                    $module = $this-&gt;_noauth[&#39;module&#39;];
                    $controller = $this-&gt;_noauth[&#39;controller&#39;];
                    $action = $this-&gt;_noauth[&#39;action&#39;];
                }
                else
                {
                    $module = $this-&gt;_noacl[&#39;module&#39;];
                    $controller = $this-&gt;_noacl[&#39;controller&#39;];
                    $action = $this-&gt;_noacl[&#39;action&#39;];
                }
            }

            $request-&gt;setModuleName($module);
            $request-&gt;setControllerName($controller);
            $request-&gt;setActionName($action);
        }

    }
?&amp;gt;  
&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/3686791727896325054/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2011/08/how-to-use-zend-acl.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/3686791727896325054'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/3686791727896325054'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2011/08/how-to-use-zend-acl.html' title='How to use Zend ACL'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-3569455333713371415</id><published>2011-04-18T10:06:00.000-07:00</published><updated>2011-04-25T11:10:20.325-07:00</updated><title type='text'>Bootstrapping in Zend Framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In Zend Framework basically request is handled as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 1. Application bootstrapping&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 2. Routing&lt;br /&gt;
&amp;nbsp;&amp;nbsp; 3. Dispatch&lt;br /&gt;
&lt;br /&gt;
&quot;Bootstrapping&quot; was handled by Zend_Application after that the route(module, controller, and action were requested) was identified in &quot;Routing&quot;.&amp;nbsp; .&lt;br /&gt;
&lt;br /&gt;
In general bootstrapping creates a single entry point for our whole application so it makes our application at the start itself &quot;getting it ready to execute&quot;. It&#39;ll load all our necessary files as soon as the routing &amp;amp; dispatch is done.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For modules, before routing and dispatch we need some things set up:&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Autoloading support for module resources( view helpers, access to models, access to forms, etc. ) and it&#39;ll be enabled by default.&lt;/li&gt;
&lt;li&gt;Setting up module-specific routes. During bootstrapping and before routing occurs this will be specified.&lt;/li&gt;
&lt;li&gt;Module-specific navigation elements. This usually goes hand-in-hand with your routes (most Zend_Navigation pages utilize named routes).&lt;/li&gt;
&lt;li&gt;Setting up module-specific plugins. If there is functionality your module may be needing to enable as part of the routing/dispatch cycle, set this up in plugins and attach them to the front controller.&lt;/li&gt;
&lt;/ul&gt;In the modular structure we can even specify separate bootstrap file for each module. So that we can do things specific to each modules and also we have a master bootstrap file to get full control.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
FYI: I have come across one good PDF which explains all about ZF dispatch process - &lt;a href=&quot;http://nethands.de/download/zenddispatch_en.pdf&quot;&gt;zenddispatch_en.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is the exaple for config.ini file.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;[production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
includePaths.library = APPLICATION_PATH &quot;/../library&quot;
bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot;
bootstrap.class = &quot;Bootstrap&quot;

autoloaderNamespaces[] = &quot;Plugin&quot;
autoloaderNamespaces[] = &quot;Helpers&quot;
autoloaderNamespaces[] = &quot;Validator&quot;

resources.frontController.moduleDirectory = APPLICATION_PATH &quot;/modules&quot;
resources.frontController.params.displayExceptions = 1
resources.frontController.params.prefixDefaultModule = &quot;1&quot;

resources.frontController.actionhelperpaths.Helper_Action = APPLICATION_PATH&amp;nbsp; &quot;/../library/Helpers/Action&quot;


resources.modules[] =
resources.view[] =
resources.view.helperPath.Helper_View = APPLICATION_PATH &quot;/../library/Helpers/View&quot;

resources.db.adapter = &quot;pdo_mysql&quot;
resources.db.params.host = &quot;localhost&quot;
resources.db.params.username = &quot;username&quot;
resources.db.params.password = &quot;password&quot;
resources.db.params.dbname = &quot;database_name&quot;
resources.db.params.charset = &quot;utf8&quot;
resources.db.params.driver_options.1002 = &quot;SET NAMES utf8&quot;
resources.db.isDefaultTableAdapter = true


resources.layout.layout = &quot;layout&quot;
resources.layout.layoutPath = APPLICATION_PATH &quot;/layouts&quot;


[staging : production]

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

[development : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1

&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/3569455333713371415/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2011/04/bootstrapping-in-zend-framework.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/3569455333713371415'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/3569455333713371415'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2011/04/bootstrapping-in-zend-framework.html' title='Bootstrapping in Zend Framework'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-4023947351468570419</id><published>2011-04-15T10:23:00.000-07:00</published><updated>2011-04-15T10:33:41.981-07:00</updated><title type='text'>How to configure Zend Framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In Zend Framework you have four ways to use configuration file.&lt;br /&gt;
&lt;ul class=&quot;chunklist chunklist_title&quot;&gt;&lt;li&gt;&lt;b&gt;Zend_Config_Ini&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;Zend_Config_Json&lt;/li&gt;
&lt;li&gt;Zend_Config_Xml&lt;/li&gt;
&lt;li&gt;Zend_Config_Yaml&lt;/li&gt;
&lt;/ul&gt;In most of the case everyone will use Zend_Config_In,&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;classname&quot;&gt;Using Zend_Config_Ini&lt;/span&gt; you can store configuration information&#39;s in the well known &lt;acronym class=&quot;acronym&quot;&gt;INI&lt;/acronym&gt; format and also you can get them in the application by using nested         object property syntax. In this INI format we have some hierarchy of configuration data keys and also its possible to inherit between sections. You can use dot or period character (&quot;&lt;i class=&quot;emphasis&quot;&gt;.&lt;/i&gt;&quot;) to follow hierarchy. A section may extend or         inherit from another section by following the section name with a colon character         (&lt;i class=&quot;emphasis&quot;&gt;&quot;:&quot;&lt;/i&gt;) and the name of the section from which data are to be inherited.&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;b&gt;[production]&lt;/b&gt;
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
includePaths.library = APPLICATION_PATH &quot;/../library&quot;
bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot;
bootstrap.class = &quot;Bootstrap&quot;
appnamespace = &quot;Application&quot;
resources.frontController.controllerDirectory = APPLICATION_PATH &quot;/controllers&quot;
resources.frontController.params.displayExceptions = 0
resources.layout.layoutPath = APPLICATION_PATH &quot;/layouts/scripts/&quot;
resources.view[] =
resources.db.adapter&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = pdo_mysql
resources.db.params.host&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = localhost 
resources.db.params.username = user_name
resources.db.params.password = user_password
resources.db.params.dbname&amp;nbsp;&amp;nbsp; = database_name

&lt;b&gt;[staging : production]&lt;/b&gt;

[testing : production]
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1

&lt;b&gt;[development : production]&lt;/b&gt;
phpSettings.display_startup_errors = 1
phpSettings.display_errors = 1
resources.frontController.params.displayExceptions = 1 
&lt;/pre&gt;In the above example, The DB was configured using a hierarchy of keys &quot;resources.db.adapter&quot; also the &quot;Staging&quot; was inherited( [staging : production] ) from &quot;Production&quot;. Like this we can define configurations for different environment of our project. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/4023947351468570419/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2011/04/how-to-configure-zend-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/4023947351468570419'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/4023947351468570419'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2011/04/how-to-configure-zend-framework.html' title='How to configure Zend Framework'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-861973941281331299</id><published>2011-04-14T12:07:00.000-07:00</published><updated>2011-04-15T10:51:46.051-07:00</updated><title type='text'>Directory structure in Zend Framework</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Using ZF you can create your project as you wish but as its of MVC Architecture we need to follow simple rules like separating model, view &amp;amp; controller. So in order to achieve this you can use any of the two major classification in ZF,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Conventional Directory Structure:&lt;/span&gt; You have single MVC to cover your entire project.&lt;br /&gt;
&lt;pre&gt;index.php
.htaccess
library/
application/
&lt;div style=&quot;text-align: left;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bootstrap.php&lt;/div&gt;configs/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; application.ini
layouts/&amp;nbsp;&amp;nbsp;
     scripts/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     layout.phtml
controllers/                     
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; IndexController.php 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestController.php
models/
forms/
views/
scripts/   
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index.phtml            
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test.phtml            
helpers/
filters/&lt;/pre&gt;If your project is big enough to have more modules the basic structure won&#39;t fit you so i recommend you guys to follow,&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Modular Directory Structure:&lt;/span&gt; Its the reliable and very useful directory structure as far as i know, You can use this way to manage projects of any size. And more importantly in this style your entire project can be split up into several modules and it&#39;ll be very easy to manage &amp;amp; update individually.&lt;br /&gt;
&lt;pre&gt;index.php
.htaccess
library/
application/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bootstrap.php
configs/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; application.ini
layouts/&amp;nbsp;
     scripts/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;     layout.phtml
modules/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; default/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controllers/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IndexController.php
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TestController.php
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; models/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; forms/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; views/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index.phtml
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; test.phtml
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; helpers/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filters/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; blog/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; controllers/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IndexController.php
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  models/
&amp;nbsp; &amp;nbsp; &amp;nbsp;  forms/ 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; views/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scripts/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; index.phtml
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; helpers/
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filters/
&lt;/pre&gt;Please remind that either you need to specify &quot;Default&quot; module in configs file else you can create a module &quot;default&quot;. With this you can decide about your directory structure in ZF.&lt;br /&gt;
&lt;br /&gt;
In &lt;span style=&quot;font-weight: bold;&quot;&gt;Htaccess &lt;/span&gt;file you need to give the following to rewrite all request to index.php by this single entry pont we achieve bootstrapping in ZF.&lt;br /&gt;
&lt;pre&gt;RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$&lt;span style=&quot;font-weight: bold;&quot;&gt; index.php&lt;/span&gt; [NC,L]&lt;/pre&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/861973941281331299/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2011/04/directory-structure-in-zend-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/861973941281331299'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/861973941281331299'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2011/04/directory-structure-in-zend-framework.html' title='Directory structure in Zend Framework'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-5767257512770897978</id><published>2011-02-20T08:34:00.000-08:00</published><updated>2011-02-20T08:47:14.952-08:00</updated><title type='text'>Installation of Zend Framework</title><content type='html'>To install ZF you just need a LAMP platform and if you are done with this platform you can go for the step to install.  For a beginner its better to download Quickstart(http://framework.zend.com/manual/en/learning.quickstart.create-project.html)  and make use of the default directory structure of ZF.&lt;br /&gt;&lt;br /&gt;Basically there are two ways to create modules, controllers like stuff in ZF.&lt;br /&gt;1. Manually by knowing the exact directory structure &amp;amp; naming convention.  &lt;br /&gt;2. Using Zend Tool- http://framework.zend.com/manual/en/zend.tool.usage.cli.html&lt;br /&gt;&lt;br /&gt;Using the above two ways you can create MVC structured ZF project.</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/5767257512770897978/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2011/02/installation-of-zend-framework.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/5767257512770897978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/5767257512770897978'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2011/02/installation-of-zend-framework.html' title='Installation of Zend Framework'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7968213292399692465.post-239476261719808039</id><published>2010-12-27T10:17:00.000-08:00</published><updated>2010-12-27T10:18:30.060-08:00</updated><title type='text'>Intro to Zend Framework</title><content type='html'>As far as i know worked in ZF, it was really good. The good thing about this Framework is, its the based on MVC and also it was the base for few open sources. It has a library like all other frameworks .&lt;br /&gt;&lt;br /&gt;http://framework.zend.com/manual/en/learning.quickstart.intro.html&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;info&quot;&gt;&lt;h1 class=&quot;title&quot;&gt;Model-View-Controller&lt;/h1&gt;&lt;/div&gt;                   &lt;p class=&quot;para&quot;&gt;             So what exactly is this &lt;acronym class=&quot;acronym&quot;&gt;MVC&lt;/acronym&gt; pattern everyone keeps talking about, and             why should you care? &lt;acronym class=&quot;acronym&quot;&gt;MVC&lt;/acronym&gt; is much more than just a three-letter             acronym (&lt;acronym class=&quot;acronym&quot;&gt;TLA&lt;/acronym&gt;) that you can whip out anytime you want to sound smart;             it has become something of a standard in the design of modern web applications. And for             good reason. Most web application code falls under one of the following three             categories: presentation, business logic, and data access. The &lt;acronym class=&quot;acronym&quot;&gt;MVC&lt;/acronym&gt;             pattern models this separation of concerns well. The end result is that your             presentation code can be consolidated in one part of your application with your business             logic in another and your data access code in yet another. Many developers have found             this well-defined separation indispensable for keeping their code organized, especially             when more than one developer is working on the same application.         &lt;/p&gt;          &lt;p&gt;&lt;b class=&quot;note&quot;&gt;Note&lt;/b&gt;: &lt;span class=&quot;info&quot;&gt;&lt;b&gt;More Information&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;                                            Let&#39;s break down the pattern and take a look at the individual pieces:         &lt;br /&gt;                           &lt;/p&gt;&lt;div class=&quot;inlinemediaobject&quot;&gt;&lt;div class=&quot;imageobject&quot;&gt;&lt;a href=&quot;http://framework.zend.com/images/manual/d481d625821a97b9a5eb2cec99dca50e-learning.quickstart.intro.mvc.png&quot;&gt;&lt;img src=&quot;http://framework.zend.com/images/manual/d481d625821a97b9a5eb2cec99dca50e-learning.quickstart.intro.mvc.png&quot; alt=&quot;learning.quickstart.intro.mvc.png&quot; width=&quot;450&quot; height=&quot;315&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;         &lt;br /&gt;          &lt;ul class=&quot;itemizedlist&quot;&gt;&lt;li class=&quot;listitem&quot;&gt;                     &lt;p class=&quot;para&quot;&gt;                         &lt;em class=&quot;emphasis&quot;&gt;Model&lt;/em&gt; - This is the part of your                         application that defines its basic functionality behind a set of                         abstractions. Data access routines and some business logic can be defined in                         the model.                     &lt;/p&gt;                 &lt;/li&gt;&lt;li class=&quot;listitem&quot;&gt;                     &lt;p class=&quot;para&quot;&gt;                         &lt;em class=&quot;emphasis&quot;&gt;View&lt;/em&gt; - Views define exactly what is                         presented to the user. Usually controllers pass data to each view to render                         in some format. Views will often collect data from the user, as well. This                         is where you&#39;re likely to find &lt;acronym class=&quot;acronym&quot;&gt;HTML&lt;/acronym&gt; markup in your                         &lt;acronym class=&quot;acronym&quot;&gt;MVC&lt;/acronym&gt; applications.                     &lt;/p&gt;                 &lt;/li&gt;&lt;li class=&quot;listitem&quot;&gt;                     &lt;p class=&quot;para&quot;&gt;                         &lt;em class=&quot;emphasis&quot;&gt;Controller&lt;/em&gt; - Controllers bind the whole                         pattern together. They manipulate models, decide which view to display based                         on the user&#39;s request and other factors, pass along the data that each view                         will need, or hand off control to another controller entirely. &lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://walkonweb.blogspot.com/feeds/239476261719808039/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://walkonweb.blogspot.com/2010/12/as-far-as-i-know-worked-in-zf-it-was.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/239476261719808039'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7968213292399692465/posts/default/239476261719808039'/><link rel='alternate' type='text/html' href='http://walkonweb.blogspot.com/2010/12/as-far-as-i-know-worked-in-zf-it-was.html' title='Intro to Zend Framework'/><author><name>Balaji</name><uri>http://www.blogger.com/profile/04904597256551580922</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='22' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgf3H4elvYoBVebvJ0Jkgmd4t-nj9s8LNP-dmvwbPt55JBby2yDAgIk5NSmT_Xp5eDWJOGDVTeBGgR0pjwI9ITkk7MOE3cZL304_imBRP9dz1cspRCrb_CMHrvDkRde3xM/s220/mine_red.jpg'/></author><thr:total>0</thr:total></entry></feed>