Re: [fw-general] Using just Zend_Form

2008-07-10 Thread Matthew Weier O'Phinney
-- Stefan Sturm <[EMAIL PROTECTED]> wrote
(on Thursday, 10 July 2008, 07:23 AM +0200):
> I want to use some of the ZendFramework Components in a new project.
> This is no problem with Zend_Cache or Zend_Db, but with Zend_Form...
> I there a way to use Zend_Form withot using Zend_View?

I've answered this a couple times in the past month. Yes, you _can_ use
Zend_Form without Zend_View -- but to do so, you will need to provide
either your own decorators or use the Callback decorator to delegate to
your own methods for rendering the form. This will require more work on
your part.

Personally, I feel Zend_View in itself is a pretty trivial dependency,
You can pass in a completely unconfigured instance at rendering time:

echo $form->render(new Zend_View);

and get all the benefits of our various view helpers without needing to
do a thing. Zend_View itself has no other dependencies (although in 1.6,
it will be utilizing the PluginLoader to load the helpers). Contrary to
what many think, it is not necessary to use the entire MVC to use
Zend_View.

Why is the design like this? Because I like to adhere to the DRY
principle -- and we already had functionality in the various Zend_View
helpers for generating the necessary (X)HTML.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Using just Zend_Form

2008-07-10 Thread Julian Davchev
Is the problem that you don't want the extra code of Zend_View or this 
is actually a problem in using it.
Cause all Zend_View will be used for is... rendering the form... witch 
shouldn't interfere with your other stuff.

Not sure how much overload but doubt is that big.


Stefan Sturm wrote:

Hello,

I want to use some of the ZendFramework Components in a new project.
This is no problem with Zend_Cache or Zend_Db, but with Zend_Form...
I there a way to use Zend_Form withot using Zend_View?

Thanks for your Help,
Stefan Sturm