2010年12月10日星期五

Re: [fw-mvc] Zend Form in two columns

Hmm, I don't think so actually. I'd question the popularity of the ming
approach to swf creation. When it comes to using flash, we have
Zend_Amf and Zend_Json. Between these two technologies, there should be
sufficient enough pathways to get data off a server and into flash. This
route basically means you'll have to do a little more ActionScripting to
gather the data, parse it and visually do something interesting, but
it's probably the "cleanest" way to go. Also, that means someone has to
stay on top of the swf spec and keep the protocol/format updated between
player releases.

On the PHP side of things, ming is now an optional PECL extension (no
longer bundled), which I think means that it has lost some popularity
and/or support.

Ultimately, the trend I see is focused more on SVG, HTML, Javascript
when it comes to doing any web visualization. I think that is the next
emerging field when it comes to web visualizations and probably the one
that has the fewest or at least the "youngest" technologies. That said,
it's probably the route that needs the most effort currently.

Do you see things differently? What are you currently using ming for?

-ralph


On 12/9/10 12:15 PM, Jimmy Sole wrote:
> Has the Zend Framework team ever thought of writing a ming component to add
> to the library? Just wondering.
>
> Thanks
>
> Jimmy Sole
>
> -----Original Message-----
> From: Matthew Weier O'Phinney [mailto:matthew@zend.com]
> Sent: Thursday, December 09, 2010 12:25 PM
> To: fw-mvc@lists.zend.com
> Subject: Re: [fw-mvc] Zend Form in two columns
>
> -- Thomas List<thomaslist@hotmail.com> wrote
> (on Thursday, 09 December 2010, 12:13 PM -0500):
>> I am trying to figure out how to develop a form with the form elements
>> arranged in two columns.
>
> Use sub forms and/or display groups. Both options allow you to group
> elements -- you can then group the elements you want in each column in
> separate sub forms or display groups, and use either decorators or CSS
> to arrange them visually.
>
>> I call the form from my the controller and I
>> created the form class as follows:
>>
>> class Application_Form_Housing extends Zend_Form
>> {
>> public function init()
>> {
>> // Set the method for the display form to POST
>> $this->setMethod('post');
>>
>> $id = new Zend_Form_Element_Hidden('id');
>> $id->addFilter('Int');
>> $this->addElement($id);
>>
>> $this->addElementPrefixPath('App_Validate',
> 'App/Validate/','validate');
>>
>>
>> $this -> addElement( 'select', 'types', array(
>> 'label' => '<h1>What type of home do you live in:</h1><br />',
>> 'escape' => false,
>> 'required' => true,
>> 'multiOptions' => array('Existing Home' => 'Existing Home','New
> Construction' => 'New Construction','Condominium' => 'Condominium',
>> 'Apartment' => 'Apartment'),
>> 'decorators' => array(
>> 'ViewHelper',
>> 'Errors',
>> array( 'HtmlTag', array( 'tag' => 'dd' ) ),
>> array( 'Label', array( 'tag' => 'dt', 'escape' => false) )
>> )
>> ));
>>
>> $this -> addElement( 'text', 'zip', array(
>> 'label' => '<h1>What is your zipcode:</h1>',
>> 'escape' => false,
>> 'required' => true,
>> 'validators' => array(
>> array('validator'=>'ZipCodeExists'),
>> array('validator' => 'StringLength', 'options' => array(
>> 'min' => 5,
>> 'max' => 5,
>> 'messages' => array(
>> Zend_Validate_StringLength::INVALID => 'Invalid Zip
> code entered',
>> Zend_Validate_StringLength::TOO_SHORT => 'Zip code
> must be at least 5 characters',
>> Zend_Validate_StringLength::TOO_LONG => 'Zip code
> must not be more than 5 characters'
>> )
>> ))),
>> 'decorators' => array(
>> 'ViewHelper',
>> 'Errors',
>> array( 'HtmlTag', array( 'tag' => 'dd' ) ),
>> array( 'Label', array( 'tag' => 'dt', 'escape' => false) )
>> )
>> ));
>>
>>
>>
>> // Add the submit button
>> $this->addElement('submit', 'submit', array(
>> 'ignore' => true,
>> 'label' => 'submit',
>> ));
>>
>> What would I need to do in the Form, or in the addElement fields to get
> them to show up in two columns, rather than one long column? In order for
> the submit button to recognize both fields, would that also require a
> decorator or viewHelper? Any pointers to get me started out in the right
> direction would be very helpful.
>>
>> Regards,
>> Thomas
>>
>

没有评论: