[CLOSED] Serialize and Deserialize a complex FormPanel

  1. #1

    [CLOSED] Serialize and Deserialize a complex FormPanel

    I have tried to use myFormPanel.ToConfig() to serialize a complex FormPanel.

    What I would like to do is deserialize that so that a Component Loader can recreate the form later.

    ComponentLoader.ToConfig(JSON.Deserialize<FormPane l>(myserializedpanelstring)) fails to deserialize (not got to the loader part yet).

    Is there any way to save and restore panel content through binary or string formats?
    Last edited by Daniil; Feb 28, 2014 at 4:26 AM. Reason: [CLOSED]
  2. #2
    Hi @Arbee,

    I would not serialize/deserialize an entire control. I doubt it is going to work.

    Please clarify do you need to save/restore a FormPanel's data only or the whole configuration?
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @Arbee,

    I would not serialize/deserialize an entire control. I doubt it is going to work.

    Please clarify do you need to save/restore a FormPanel's data only or the whole configuration?
    No data just the controls, sub panels etc. We are currently dynamically generating the forms (and they're big) on the fly. We hope to save load time by saving the control definitions and reloading on demand.
  4. #4
    Controls don't support serializing/deserializing to JSON.
    Do you have any performance problems with control rendering on the server side?
  5. #5
    Quote Originally Posted by Vladimir View Post
    Controls don't support serializing/deserializing to JSON.
    Do you have any performance problems with control rendering on the server side?
    We load about 12 sections (panels) that each have forms and data views with pictures. Only one is visible at a time and we are using a card layout to hold all the sections. We haven't found a way to load the hidden panels in the background so that when we switch they come up quickly. Current load time is down to 6 seconds and we're trying for sub 2 seconds.

    We may try to load each section on demand to reduce the DOM and initial load but I thought it worth asking if we could "save" the forms. We have 400 forms, each with 12+ sections & a total of 35K questions.

    Any other suggestions would be welcome.
  6. #6
    Current load time is down to 6 seconds and we're trying for sub 2 seconds.
    What you mean about 'load time'? Possible serialization can reduce server time only and will not help you to improve client side rendering (please note that client side rendering time is much more if compare with server side time because all ui elements are generated on the client side, on the server side we generate script only).

    We may try to load each section on demand to reduce the DOM and initial load
    I guess that it is best solution.

    Also I recommend to try the following approach if you don't want to use loading on demand
    https://examples2.ext.net/#/Miscella...dget/Overview/
    https://examples2.ext.net/#/Miscella...get/Rendering/
    https://examples2.ext.net/#/Miscella..._Widget/Cache/

    TemplateWidget just renders script but do not execute it until you call its method. So, no dom elements, no performace issues for widgets are not shown initialy
  7. #7
    Thanks Vladimir, that helps a lot. We can focus on those ideas now.

Similar Threads

  1. [CLOSED] Get Store and Deserialize
    By osef in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Nov 25, 2013, 10:46 PM
  2. [CLOSED] Using JSON.Serialize() and JSON.Deserialize()
    By vadym.f in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: Apr 30, 2013, 2:37 PM
  3. [CLOSED] Deserialize problem
    By bayoglu in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Mar 11, 2013, 3:54 PM
  4. JSON.Serialize issue
    By fragrance22 in forum 1.x Help
    Replies: 0
    Last Post: Jan 22, 2013, 12:58 PM
  5. Replies: 2
    Last Post: Apr 30, 2012, 10:04 AM

Posting Permissions