wiki:rfc/jforms-storage is not used any more and exists only for history. Post new tickets on the Github account. n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Version 2 (modified by laurentj, 10 years ago) (diff)


Efficient storage for instances of forms


Instances of forms are stored in session. With the time, a user can have dozen instances, so the session contains too many data. In term of performance, this is not a good way, since, most of time in a controller, we only work on a single form.

Furthermore, we can have issue when retrieving a form, for example when a session was timeout (we loose all instances...). We have issue also with ref counting (1071 for example)


During the creation of an instance, generate a unique ID (how?). And the instance is stored in a database (NoSQL -> jKvDb ?), with the ID as the key. So session will not contain anymore forms data and will be "light".

This ID will be included in an hidden field in the html form. When we will call jForms::get() or jForms::fill(), it will use the value of the hidden field to retrieve the instance.

To study: What about security? performance? the debugbar?

Corresponding tickets: 272, 1071