[html-formfu] RFC: Catalyst::Model::FormFu
Peter Shangov
pshangov at yahoo.com
Fri Aug 26 14:42:31 GMT 2011
Hi Matthias,
(I am forwarding this discussion back to the mailing list, I think its' better if it is archived there)
This is basically the conclusion that I came to after doing some fiddling with H::FF. I initially planned to do a separate module (Catalyst::Model::FormFu::Deferred) that will allow the cache to be built at some later point (e.g. in 'after setup_components => sub {...}' or in the first request), and while that will work for the 'config_callback' hook, it will not quite work for localization.
Unfortunately I have used neither Catalyst's nor FormFu's localization features and am not quite sure what is a good way to resolve this. I could re-populate the form upon each request, but that will certainly wipe out a lot of the performance gains of C::M::FF.
Cheers,
--
Peter
----- Original Message -----
> From: Matthias Dietrich <perl at rainboxx.de>
> To: Peter Shangov <pshangov at yahoo.com>
> Cc:
> Sent: Friday, 26 August 2011, 16:34
> Subject: Re: [html-formfu] RFC: Catalyst::Model::FormFu
>
> Hi Peter,
>
> it seems there is some work needed within FormFu itself for this to work
> properly. The four lines I sent to you two days ago work in that way that the
> cache isn't built on each request. But it's not working if you're
> using several languages, because the forms are localized with the first context
> object which may have a different language set than the current one.
>
> I just tested some things with your new module version and FormFu. It seems
> FormFu localizes almost every I18N key right after loading the file, some later
> with the correct settings. So I end up with a form that is partly localized.
> Not good ;-).
>
> I don't know all internals of FormFu but from my perspective it would be an
> option to cache the config hash read from the file and let FormFu load it
> again. What were the biggest culprits with FormFu itself? Searching for the
> file, reading it or loading the config? Would it be an option to load the
> config each time the form is accessed again? This could be implemented so the
> config is only loaded again when there's a config_callback or localize
> settings.
>
> Thanks,
> Matthias
>
>
> --
> rainboxx Software Engineering
> Matthias Dietrich
>
> rainboxx Matthias Dietrich | Phone: +49 7141 / 2 39 14 71
> Königsallee 43 | Fax : +49 3222 / 1 47 63 00
> 71638 Ludwigsburg | Mobil: +49 151 / 50 60 78 64
> | WWW : http://www.rainboxx.de
>
> CPAN: http://search.cpan.org/~mdietrich/
> XING: https://www.xing.com/profile/Matthias_Dietrich18
> GULP: http://www.gulp.de/profil/rainboxx.html
>
More information about the HTML-FormFu
mailing list