Yii Framework Forum: Whatever happened to..... - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

Whatever happened to..... Rate Topic: -----

#1 User is offline   ShabbyRobe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 13-October 08

Posted 14 October 2008 - 03:41 AM

Some of the validation functionality from PRADO?

  • Client-side validation? Yii makes round trips to the server to correct validation errors Prado used to catch client side, saving a post back.
  • Data type validator? I tried to validate a boolean field and couldn't find one to do it. I don't want to assume that the input from my checkbox will always be a boolean. I think I remember something about an old rule about trust....? ;)
  • Validation groups? Is this largely redundant now thanks to the multiple form model?


Will this stuff be coming back at some point?
0

#2 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,876
  • Joined: 04-October 08
  • Location:DC, USA

Posted 14 October 2008 - 05:41 AM

Client-side validation: no, we won't provide it anymore. This could be done using AJAX. And since Yii pages are also much faster, a whole page post back should still be tolerable. Most importantly, it is difficult to maintain consistency between server and client-side validation.

Data type validator: will add it. Could you create a ticket for this?

Validation groups: it is not needed any more.
0

#3 User is offline   ShabbyRobe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 13-October 08

Posted 15 October 2008 - 08:07 AM

hi qiang

thanks heaps for the quick reply! do i need to post 5 times to create a ticket?

client-side validation was one of the things i really really liked about prado. it's a shame to see it go, but i can understand the motivation to cut as much bloat as possible.

with validation groups, is it no longer needed because of the multiple form support?
0

#4 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,876
  • Joined: 04-October 08
  • Location:DC, USA

Posted 15 October 2008 - 08:12 AM

As long as you have a gmail account, you can create a ticket at: http://code.google.c...yii/issues/list

Indeed, client-side validation was one of the original reasons that inspired me to write Prado. Actually, I should say we may or may not provide it in Yii. But definitely it is not in the top priorities.

Yes, validation group is not needed because we can use multiple forms. Form is the way to partition inputs in Yii.
0

#5 User is offline   ShabbyRobe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 13-October 08

Posted 15 October 2008 - 08:29 AM

Thanks again for the speed of the reply! I had been missing that trademark qiang turbo-response on the prado forums :)

I can understand that client-side validation would not be at the top of the priority list at this stage. I hope to see it again some day, but I'd rather see Yii reach v1 first. I'm certainly enjoying playing around with it.

As an aside, I've kept a memory_get_peak_usage() statement at the bottom of my entry script as I've been playing and Yii consistently has a memory footprint of no more than 1.2 to 1.8 mb, compared to PRADO which was regularly above the 10 mb mark. Good work!!
0

#6 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,876
  • Joined: 04-October 08
  • Location:DC, USA

Posted 15 October 2008 - 08:36 AM

Thanks for your support!

Yes, Yii should be much lighter than Prado because Prado needs to reconstruct the big viewstate tree and control tree for each request.

0

#7 User is offline   ShabbyRobe 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 42
  • Joined: 13-October 08

Posted 15 October 2008 - 07:04 PM

...TTextBox::SafeText?

I know PRADO used a 3rd party library for this, and I would assume you want to keep Yii's footprint to an absolute minimum, but I can't help but feel that this is a pretty important security feature. Is there any chance it will make a return in Yii, or will it need to be implemented as an extension somehow?
0

#8 User is offline   qiang 

  • Yii Project Lead
  • Yii
  • Group: Yii Dev Team
  • Posts: 5,876
  • Joined: 04-October 08
  • Location:DC, USA

Posted 15 October 2008 - 08:18 PM

Yeah, such kind of security measures will be definitely added to the framework. I haven't decided in which form they should be added. They could be controller filters, helpers, or something else. I'd like to see some use cases first.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users