[fw-general] ZF vs Yii/CodeIgniter Framework

2012-03-25 Thread AmirBehzad Eslami
Dear List, I've used Zend Framework for almost 2 years in several projects. Now I'm entering a new company where the developers are asked to choose a web framework. We're 3 developers: One knows zf One knows CodeIgniter The other one knows Yii Framework I believe in ZF, but the other developers

Re: [fw-general] Zend_Session_SaveHandler_Redis (potential proposal)

2012-01-27 Thread AmirBehzad Eslami
...@gmail.com wrote: Hi there, I don't think this will make it into ZF1.x. You should probably suggest this for 2.0 Marco Pivetta http://twitter.com/Ocramius http://marco-pivetta.com On 26 January 2012 17:58, AmirBehzad Eslami behzad.esl...@gmail.com wrote: Hi, I'm thinking

[fw-general] Zend_Session_SaveHandler_Redis (potential proposal)

2012-01-26 Thread AmirBehzad Eslami
Hi, I'm thinking that one of the use cases for Redis is to store session data. As you know, reading and writing session data is a very common task in PHP, it happens per page! We can use Redis as our backend to decrease disk I/O when using sessions in PHP. I would like to create a proposal for

[fw-general] Where to put messages and dialogs for translation?

2011-02-17 Thread AmirBehzad Eslami
Hi list, I'm wondering what is the right place to store application messages and dialogs to be translated later by Zend_Translate? In Views? In Controllers? Is there any specific rule around? I'm using poedit to retrieve list of messages in my application. The common keywords I use in poedit

[fw-general] Sharing the session among different Controllers

2011-01-29 Thread AmirBehzad Eslami
Hi, I'm looking for a ZF-way to share the session among different Controllers. Before ZF, the famous global $_SESSION was available everywhere, and still is. But I'm trying to access the session data from ZF's API. In My bootstrap, I have: class Bootstrap extends

[fw-general] Counting Online users, but not using a Session Table in MySQL

2011-01-28 Thread AmirBehzad Eslami
Dear list, The common solution for counting online users is to store sessions in a Table. I've created a Table in MySQL to acheive the result, but it seems this solution is a little heavy for such a simple task. Is there a better alternative? Can I use SqlLite to make COUNT(*) queries based on a

[fw-general] How to detect whether the Request is triggered via an Action Helper

2011-01-25 Thread AmirBehzad Eslami
Hi List, I have extended the Zend_Controller_Action to My_Controller_Action, where I have a preDispatch() method which runs a few SQL queries. The preDispatch() is invoked on every request, incuding pure http requests and internal requests triggered via action helpers. Is there any way to

[fw-general] Zend_Registry, how to unset a single variable in the registry

2011-01-25 Thread AmirBehzad Eslami
Hi list, Is it possible to unset a single variable in Zend_Registry? For example, I insert an authenticated user's details in Registry, using: Zend_Registry::set('authenticated_user', array()); When user logouts, I want to unset this index somehow. But there is no any method

Re: [fw-general] Zend_Form, and Translation of Zend_Validator messages

2010-10-29 Thread AmirBehzad Eslami
Very nice, Thanks Christian. How can I participate to add my own languages (Persian, ir) to the resources? Kind regards, -behzad

[fw-general] Zend_Form, and Translation of Zend_Validator messages

2010-10-28 Thread AmirBehzad Eslami
Hi, The error-messages of Zend_Validator_*** classes are located in different files, making it difficult to localize them at once. Are you aware of any .po file, containing a list of error messages, to ease the l10n? Please let me know. Thank you in advance, -b

[fw-general] Implementation of non-linear business processes in Zend Framework

2010-01-17 Thread AmirBehzad Eslami
Dear List, Helllo!!! I'm trying to write a web application for my own ISP, to simplify the processing of orders for Internet Accounts, creating reports of their users, and keeping track of their sales. A brief history: This ISP provides ADSL connections over ordinary telephone lines for home

Re: [fw-general] Zend Framework 1.6 Release Candidate 1 now available!

2008-07-25 Thread AmirBehzad Eslami
There is one minor issue which still affects ZF1.6: #ZF-3596 I mailed about this issue off-list some days ago, but I did not receive any response. Please take a brief moment of your time and review the issue and confirm it: http://framework.zend.com/issues/browse/ZF-3596 Thanks! -- Kind

Re: [fw-general] Smarty?

2008-07-18 Thread AmirBehzad Eslami
A Template Engine, such as Smarty, is useful when you're about to share your templates among people. For example, suppose that you're creating a new Blog-Provider system, where users can edit their blog templates. You can't allow these people to insert php codes directly into their templates. How

Re: [fw-general] Smarty?

2008-07-18 Thread AmirBehzad Eslami
What's Smarty provides over the following lines? index.php === *$tpl = array( // .. some data to be displayed in template ); include_once template.phtml*; template.phtml === *html img src=asdasd ?= $tpl ? br / /html * As you see, I separated programmers' and designers'

Re: [fw-general] Re: Design principles for a modular website architecture

2008-07-14 Thread AmirBehzad Eslami
users module and create a new videos module. It wouldn't make any sense to have photo related code in the users module. AmirBehzad Eslami wrote: Any ideas? Any suggestions? On Sat, Jul 12, 2008 at 9:11 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: -- Kind regards, -behzad -- Jack

[fw-general] Re: Design principles for a modular website architecture

2008-07-13 Thread AmirBehzad Eslami
Any ideas? Any suggestions? On Sat, Jul 12, 2008 at 9:11 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: Hi, Suppose that you're designing a simple website to allow people to upload photos. There are two major entities here: Users and Photos. Each user has 0 to n photos. From a modular

[fw-general] Design principles for a modular website architecture

2008-07-12 Thread AmirBehzad Eslami
Hi, Suppose that you're designing a simple website to allow people to upload photos. There are two major entities here: Users and Photos. Each user has 0 to n photos. From a modular perspective, you can develop two modules: Users, and Photos. The module Users contains some Action-Controllers

Re: [fw-general] Zend_Registry::setFromArray()

2008-07-11 Thread AmirBehzad Eslami
I see. I'll follow the approach which you recommended. Thank you both Matthews! On Thu, Jul 10, 2008 at 5:47 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- AmirBehzad Eslami [EMAIL PROTECTED] wrote (on Thursday, 10 July 2008, 04:54 PM +0330): why don't you just store the config

[fw-general] Zend_Registry::setFromArray()

2008-07-10 Thread AmirBehzad Eslami
Hi list, I'm trying to store values from a Zend_Config object into Zend_Registry. $config = new Zend_Config_Xml(APP_DIR . '/config.xml', $curr_env); foreach ($config as $key = $value) { Zend_Registry::set($key, $value); } As you see, I'm iterating over $config object to store the values into

Re: [fw-general] Zend_Registry::setFromArray()

2008-07-10 Thread AmirBehzad Eslami
. Would you please explain a little more. Maybe I'm missing something. Thanks you, AmirBehzad On Thu, Jul 10, 2008 at 4:20 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- AmirBehzad Eslami [EMAIL PROTECTED] wrote (on Thursday, 10 July 2008, 02:03 PM +0330): Hi list, I'm trying

Re: [fw-general] Adding styles to labels using Zend_Form

2008-06-09 Thread AmirBehzad Eslami
Use Unobtrusive JavaScript.[1] I recommend jQuery.[2] [1] http://en.wikipedia.org/wiki/Unobtrusive_JavaScript [2] http://www.jquery.com/ On Mon, Jun 9, 2008 at 5:40 PM, Vincent [EMAIL PROTECTED] wrote: Hi, I want to hide a form element using inline CSS. Now, I can add a style attribute to

Re: [fw-general] Decorators in the Form

2008-06-09 Thread AmirBehzad Eslami
Try this: $element-setAttrib('class', 'textbox'); where $element represents a form element created by Zend_Form. On Mon, Jun 9, 2008 at 5:24 PM, Rohit83 [EMAIL PROTECTED] wrote: Hello All, I have developed one form that contains textboxes and textarea i want to assign common

[fw-general] Clearning rendered content after calling an Action-View-Helper

2008-06-07 Thread AmirBehzad Eslami
Dear List, Is it possible to clear the rendered content after calling an Action-view-helper? I have a view-script that executes a action-view-helper. This action-view-helper calls another action in a different controller. Under common HTTP-requests, everything is fine. But for AJAX-requests, I

[fw-general] Re: [fw-mvc] Re: [fw-general] Zend_Form | Redirect to a different URL if the form is invalid

2008-04-01 Thread AmirBehzad Eslami
I see. Thank you. On Tue, Apr 1, 2008 at 2:34 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- AmirBehzad Eslami [EMAIL PROTECTED] wrote (on Tuesday, 01 April 2008, 09:09 AM +0330): Dear list, Is it possible to redirect to a different URL if the form is invalid? The new URL

[fw-general] Zend_Form | Redirect to a different URL if the form is invalid

2008-03-31 Thread AmirBehzad Eslami
Dear list, Is it possible to redirect to a different URL if the form is invalid? The new URL should contain the submitted form with the user-provided values and error-messages. I tried the following code, but it failed; the displayed form is fresh. if

Re: [fw-general] Zend Framework performance for real application?

2008-02-02 Thread AmirBehzad Eslami
Hi, Does anyone know a Canadian-based web hosting service with APC enabled?

[fw-general] Request to correct a sample code in ZF Manual

2008-02-01 Thread AmirBehzad Eslami
@see: 7.8.4.3.2. Basic Usage Examples ... $this-_redirector-setCode('303') should become: $this-_redirector-setCode(303)

Re: [fw-general] Request to correct a sample code in ZF Manual

2008-02-01 Thread AmirBehzad Eslami
My understanding is that PHP will convert it to an integer before sending it anyways. No. In my experience an exception thrown @see: Controller/Response/Abstract.php , Line 230 if (!is_int($code) || (100 $code) || (599 $code)) { require_once

Re: [fw-general] Request to correct a sample code in ZF Manual

2008-02-01 Thread AmirBehzad Eslami
. ')'); } On Feb 1, 2008 5:47 PM, AmirBehzad Eslami [EMAIL PROTECTED] wrote: My understanding is that PHP will convert it to an integer before sending it anyways. No. In my experience an exception thrown @see: Controller/Response/Abstract.php , Line 230 if (!is_int($code) || (100

Re: [fw-general] Request to correct a sample code in ZF Manual

2008-02-01 Thread AmirBehzad Eslami
attention. On Feb 1, 2008 6:18 PM, Matthew Weier O'Phinney [EMAIL PROTECTED] wrote: -- AmirBehzad Eslami [EMAIL PROTECTED] wrote (on Friday, 01 February 2008, 05:47 PM +0330): My understanding is that PHP will convert it to an integer before sending it anyways. No. In my experience

Re: [fw-general] New Site Powered By Zend Framework

2008-01-23 Thread AmirBehzad Eslami
You need to correct this: http://www.redbullindianapolisgp.com/default/news/ On Jan 23, 2008 5:32 PM, Whitcraft, Jon [EMAIL PROTECTED] wrote: Dennis, I think that is a problem with Linux flash. I have the wmode=transparent as a param on the object tag set to allow html to float over

Re: [fw-general] Module-Contoller Naming Conflict

2007-11-18 Thread AmirBehzad Eslami
Thanks Jack. I'm impressed with your forcing method. On 11/18/07, Jack Sleight [EMAIL PROTECTED] wrote: Oops, that should be: $router = Zend_Controller_Front::getInstance()-getRouter(); AmirBehzad Eslami wrote: Hi everyone, I've faced with a Module-Controller naming conflict. Suppose

[fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread AmirBehzad Eslami
Hi, Suppose we have an XML file like the following one: ?xml version=1.0 encoding=UTF-8? config production database type=mysqli hostlocalhost/host port3306/port usernameroot/username password/password dbname/dbname

[fw-general] [ZF-General] Reading from XML file using ConfigXML (OOPS)

2007-07-19 Thread AmirBehzad Eslami
Sorry, the code should be like this: $config = new Zend_Config_Xml('./application/config.xml', 'production', FALSE); echo($config-database-type-value); echo($config-database-type); These still return NULL.

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread AmirBehzad Eslami
Thanks a lot Simon! I'm afraid to hear that Zend_Config ignores any element attribute. Perhaps this is because of its SimpleXML origin. I'm not certain on this. Anyway, I come up with: Config.xml ~~ ?xml version=1.0 encoding=UTF-8? config production

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread AmirBehzad Eslami
dbname/dbname /params /database debugTRUE/debug /production /config Then it's easy to use like this: $db = Zend_Db::factory($config-database-type, $config-database-params); Regards, Bill Karwin -- *From:* AmirBehzad Eslami [mailto:[EMAIL