Re: Re: Your opinion about QuickForm2 API
| From: | Antti Holvikari | Date: | Wed, 18 Apr 2007 16:29:15 +0000 |
| Subject: | Re: Re: Your opinion about QuickForm2 API | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-46280@lists.php.net to get a copy of this message | ||
On 4/18/07, Bertrand Mansion <golgote@mamasam.com> wrote:
Le 18 avr. 07 à 13:39, Antti Holvikari a écrit : On 4/16/07, Gregory Beaver <greg@chiaraquartet.net> wrote:Yes, you're right. Maybe "cache" is the wrong word for it. I got mislead by Greg's words: "only need to be created programmatically once". What I mean is that you can "cache" the form creation logic, which makes a lot more sense to me than caching the form output, if that is what you mean. You can cache your HTML however you want anyways... The key point is separating your logic from the actual view. Does this make any sense to you? :-) -- Antti HolvikariThis is *exactly* what Solar[1] does. You can load[2] forms (or rather, form "hints", which are just AAs) from SQL table objects and from XML files and hand them to your "view". This is *made* for MVC. If what you describe is exactly how Solar works, then it's not a cache... You will have to create the form from the ground up. There will be no speed benefits, quite the opposite.Another feature request I've had that may be possible is to integrate some kind of forms creation cache, so that the form need only be created programmatically once, and then it can on subsequent requests be quickly recreated from a disk or database cache, skipping all the expensive method calls, but this is a separate question than the one you asked, let me know if you'd like a feature request opened on this.