Re: [fw-general] ZF and AJAX toolkit

2008-04-08 Thread Csányi András
Mon, 7 Apr 2008 22:43:07 +0200 -n
reto [EMAIL PROTECTED] írta:

 I'm just at the point where I'm going to implement some ajax-features
 in a somewhat bigger ZF based project.

Hi!

The next year (in januar, 2009) i will graduate on the University and
my thesis is build an application from open source tools. The tools are
php (Zend Framework), PostgreSQL and AJAX (jQuery). The first problem
was the php-AJAX co-operation. I think Zend Framework in this time not
so realy support the AJAX. This is my opinion, but I know this problem
is realy difficult. I haven't got time waiting the solution so I make
one.

The basic thing about me:
- I don't like write html
- I don't like write javascript

I wrote 2 class. The first make a html elements.
class HTML_Factory {
//there are the html factory methods
}

The View_Helpers is extends the HTML_Factory class

class CreateBody extends HTML_Factory{
public function CreateBody() {
return $body;
}
}

The second class is the AJAX_Factory. This class make the jQuery source
code.

This way is working me and I can - relative - fast building
applications. But I know this isn't the best way. Sometime I have to
refactor the AJAX_Factory class and this will be better day after
day. :)

In the next few days I will rebuild my blog and I will put the all
sourcecode there.

Sorry my English.

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Question about pagination

2008-04-07 Thread Csányi András
On Sun, Apr 06, 2008 at 05:36:32PM +0530, Sudheer wrote:
 Csányi András wrote:
 On Sun, Apr 06, 2008 at 11:41:18AM +0200, Csányi András wrote:
   
 On Sun, Mar 30, 2008 at 10:28:37PM -0700, thurting wrote:
 
 I've set up my model to handle pagination and had a question about how I
 should handle bad input.  Suppose my url is constructed as
 controller/action/key/value and I am passing the user param 'page' to my
   
   ^^^

 I was finding in the documentation in a last 2 hours! I remember this
 function but I dont know where is it and how work is it - I need some
 examples or something. Please somebody tell me where is it in the
 documentation :)

 Thank you!

 András
 

 I have find it. :)

   
 Could you post the link?

Sure!

The Zend_Controller part of ZF documentation. The keyword: getRequest();
In this time I'm playing with this. I search the god solution.

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Question about pagination

2008-04-07 Thread Csányi András
On Mon, Apr 07, 2008 at 10:57:44AM +0200, Csányi András wrote:
 On Sun, Apr 06, 2008 at 05:36:32PM +0530, Sudheer wrote:
  Csányi András wrote:
  On Sun, Apr 06, 2008 at 11:41:18AM +0200, Csányi András wrote:

  On Sun, Mar 30, 2008 at 10:28:37PM -0700, thurting wrote:
  
  I've set up my model to handle pagination and had a question about how I
  should handle bad input.  Suppose my url is constructed as
  controller/action/key/value and I am passing the user param 'page' to my

^^^
 
  I was finding in the documentation in a last 2 hours! I remember this
  function but I dont know where is it and how work is it - I need some
  examples or something. Please somebody tell me where is it in the
  documentation :)
 
  Thank you!
 
  András
  
 
  I have find it. :)
 

  Could you post the link?
 
 Sure!
 
 The Zend_Controller part of ZF documentation. The keyword: getRequest();
 In this time I'm playing with this. I search the god solution.

Once again: Zend_Controller_Request

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Question about pagination

2008-04-06 Thread Csányi András
On Sun, Mar 30, 2008 at 10:28:37PM -0700, thurting wrote:
 
 I've set up my model to handle pagination and had a question about how I
 should handle bad input.  Suppose my url is constructed as
 controller/action/key/value and I am passing the user param 'page' to my
  ^^^

I was finding in the documentation in a last 2 hours! I remember this
function but I dont know where is it and how work is it - I need some
examples or something. Please somebody tell me where is it in the
documentation :)

Thank you!

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Question about pagination

2008-04-06 Thread Csányi András
On Sun, Apr 06, 2008 at 11:41:18AM +0200, Csányi András wrote:
 On Sun, Mar 30, 2008 at 10:28:37PM -0700, thurting wrote:
  
  I've set up my model to handle pagination and had a question about how I
  should handle bad input.  Suppose my url is constructed as
  controller/action/key/value and I am passing the user param 'page' to my
   ^^^
 
 I was finding in the documentation in a last 2 hours! I remember this
 function but I dont know where is it and how work is it - I need some
 examples or something. Please somebody tell me where is it in the
 documentation :)
 
 Thank you!
 
 András

I have find it. :)

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] 1.5 and Ajax Forms

2008-03-18 Thread Csányi András
On Tue, Mar 18, 2008 at 08:59:14AM -0400, Matthew Weier O'Phinney wrote:
 -- Csányi András [EMAIL PROTECTED] wrote
 (on Monday, 17 March 2008, 10:59 PM +0100):
  On Mon, Mar 17, 2008 at 08:31:56AM -0700, Andi Gutmans wrote:
  Here's an example with Dojo:
   
  
   http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.autocomplete.dojo
   
   
   
  Not sure if that's what you meant or you're looking for something 
   broader.
   
  Andi
  
  Hi Andi!
  
  I read in the documentation i can use Zend Framework with sciptacoulous and 
  dojo. I can use
  the Framework only with these AJAX tools?
  
  I use jQuery and the dojo and scriptacoulous are strange for me.
 
 You can use *any* JS library you want with ZF; ZF acts serverside and is
 basically agnostic when it comes to the queries sent to it. 

Hi!

It's great! :)
I'm at home and going to try it. I write my thesis about a special
libraryan CMS what is built from jQuery, Zend Framework, and PostgreSQL.
And i won't invent the wheel. So thanks the help!

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Simple menu on every page

2008-03-18 Thread Csányi András
On Tue, Mar 18, 2008 at 07:25:02AM -0700, Malfojan wrote:
 
 Hi,
 
 I've got a very simple page, header, left menu, right content, footer.
 Menu items are generated from the database.
 
 What is the easiest way of adding menu into the every page?

Hi!

My opinion is the next: the best way is AJAX.
The header, left menu, right content, footer are different divs.
At first load you generate all of divs include the menu.
The user click the menu item and this call through AJAX controller
methods and load results in the divs.
for example:

The user clicked the products menu item. This call the 
getProductsMenu() (this will be loaded in the div id=menu/div 
getProductsMainPage() (this will be loaded in the div
id=content/div

This is my way. I think this is not the best :D

András


-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


[fw-general] Little errors in documentation

2008-03-18 Thread Csányi András
Hi!

I have been reading the documentation for half an hours and i found
little errors in the part of Zend_Form:

- 15.2.1. Create a form object
missing brackets
$form = new Zend_Form;

- 15.2.6. Putting it together
has brackets
$form = new Zend_Form();
but/and - i don't know :) :
  - $username-addValidator('stringLength'...
  and
  - $password-addValidator('StringLength'...
  are different.

I think this is disturb.

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Little errors in documentation

2008-03-18 Thread Csányi András
On Tue, Mar 18, 2008 at 05:01:12PM -0400, Matthew Weier O'Phinney wrote:
  - 15.2.6. Putting it together
  has brackets
  $form = new Zend_Form();
  but/and - i don't know :) :
- $username-addValidator('stringLength'...
and
- $password-addValidator('StringLength'...
are different.
 
 I actually purposely showed both as both are valid -- internally, we
 ucfirst the string provided, so you can specify it either as
 StringLength or stringLength.

Ohh, i understand!
I didn't know what is the purpose. Thanks the information.

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] Zend Framework 1.5 has landed!

2008-03-17 Thread Csányi András
On Mon, Mar 17, 2008 at 06:51:12AM -0700, Wil Sinclair wrote:
 Well, folks, we made it. Zend Framework 1.5 GA is now released and
 available at the framework site:

Hi Volks!

Great job and nice webpage!

András

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] 1.5 and Ajax Forms

2008-03-17 Thread Csányi András
On Mon, Mar 17, 2008 at 08:31:56AM -0700, Andi Gutmans wrote:
Here's an example with Dojo:
 

 http://framework.zend.com/manual/en/zend.controller.actionhelpers.html#zend.controller.actionhelpers.autocomplete.dojo
 
 
 
Not sure if that's what you meant or you're looking for something broader.
 
Andi

Hi Andi!

I read in the documentation i can use Zend Framework with sciptacoulous and 
dojo. I can use
the Framework only with these AJAX tools?

I use jQuery and the dojo and scriptacoulous are strange for me.

Thanks your answer!

András
-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] ZF1.5 and Zend_Form

2008-02-03 Thread Csányi András
Ezzel a dátummal: Tuesday 29 January 2008 10.38.08 Xavier Vidal Piera ezt 
írta:
 Great work with ZF 1.5 !!

 By the way, i've started to experiment with Zend_Form and I find it more
 intuitive than his counterpart (Pear Quickform) to me. But one thing i
 would like to have in a near future, is the ability to implement the
 Post-Redirect-Get pattern with Zend_Form.

 Now, with Zend_Form you can POST to the same action or to another one, but
 the problem arises when someone hits the reload button in his browser,
 showing the nasty Caution: you are about to send a form again...bla
 bla... message.

 May be could be a good idea to implement a Session container and save the
 form data into, using a special ID for each form. So, if the action
 processing the form sees is not valid can make a 'redirect' and the Form
 Component can redraw the form with session data, validation errors, etc

 Yes, i know it's not a major issue, but i hate the 'double submit' message.
 Now i'm working with Ajax and encrypted tokens to avoid double submits
 (accidental or not), but i don't want to rely always on javascript.

Hi!

My staff solved this problem few years ago in PHP4. In this time is an upgrade 
time to PHP5.
The resolve is what you wrote - session container, and really fullscreen 
browsers without Forward, Back and Reload buttons.
The users can use only the application links.
This application is a local government ERP with ~2000 users and my experience 
is the next (i'm the support leader): the users not use hotkeys (CTRL-R), 
they don't know what is the hotkeys :)

András

ps: sorry my english

-- 
-- Sayusi Ando - http://sayusi.hu - Csányi András --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --


Re: [fw-general] email error message from Zend Framework Application

2007-10-10 Thread Csányi András
On Wed, Oct 10, 2007 at 07:54:03AM -0700, Kexiao Liao wrote:
 
 In our Zend Framework Application, if we like to email the run time error
 message to some developer's email accounts, Is there any easy way to
 implement by using Zend Frame work?

Hi!

My opinion is:
1, the error handler know (exceptios and level of errors) know sending
email. You must work...
Good error handler, use Zend_Mail, etc.

2, forget it ZF and use assert.

Andras

-- 
-- Csanyi Andras - http://sayusi.hu - Sayusi Ando --
-- Bízzál Istenben és tartsd szárazon a puskaport! - Cromwell --