Develop: Recreating doctype object at server side everytime I change creating form doctype at client side

Hi everybody,
I’m new develop on Frappe framework and adding some features for ERPnext but Im realize that the server will recreating doctype object every time. Im trying to add some attributes to self as temp variables . So someone can explain for me about

  • Relationship between frm.doc on client side and doctype object at server side and the synchronization
  • why they have to recreate object all the time?
    +what happen when call refresh_field() does it call sync data from server side and then refresh page?
    Thank everybody for helping. :slight_smile: