title: Switching between readonly view and edit view in backbone js
body: <p>I am looking for pattern in Backbone js to switch between readonly and edit view. If the trigger for the view is external to the view then no problem I can create the appropriate view ( readonly or edit ) and render it, but in my case the trigger for the edit view will be inside the readonly view.</p>
  
  <p>For example lets say I am displaying a Prescription and by default it is in readonly mode and on hovering a edit icon gets displayed. Onclick of this edit icon the readonly view should now be replaced with edit view. What would be a best approach to achieve this. Below are few options I am considering</p>
  
  <ol>
  <li>Have a single PrescriptionView with the edit icon and all the form fields required for the edit mode in it. It will also have the logic to change the view from readonly mode to edit mode based on edit trigger. </li>
  <li>Have two views PrescriptionReadView and PrescriptionEditView. The ReadView will have the edit icon and onclick replace the readview with editview.</li>
  </ol>
  
  <p>I am inclined towards #2 but not sure how to implement it in a elegant way. Any thoughts on this will be helpful.</p>
  
  <p>Thanks
  Zafer </p>