title: Data Model for web-based video editing
body: <p>I'm developing a web video editor that 
  users can edit videos through a timeline interface that's similar to the red rectangle part in the following picture.</p>
  
  <p><a href="https://i.stack.imgur.com/1FruW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1FruW.png" alt="enter image description here"></a></p>
  
  <p>To achieve this I think there should be a tree-structured data model in the server side to maintain all the data used for editing operations, as shown in the following diagram. </p>
  
  <p><a href="https://i.stack.imgur.com/uARCb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uARCb.png" alt="enter image description here"></a>
  Taking the timeline in the interface picture as an example, there is one <code>TimeLine</code> object that has one <code>VideoGroup</code> sub-object and one <code>AudioGroup</code> sub-object. The <code>VideoGroup</code> object has a collection of 2 Track objects, namely <code>Video 1</code> and <code>Video 2</code>. <code>The AudioGroup</code> object has 1 Track objects named <code>Audio 1</code>. <code>Video 1</code>, the first Track object of the <code>VideoGroup</code> object has a collection of 4 Media objects, the second Track object <code>Video 2</code> has 6. While <code>Audio 1</code>, the only one Track object of the <code>AudioGroup</code> object doesn't have any.</p>
  
  <p>When it comes to my application, in the back end the data model is used for the application to perform the actual editing operations. In the front end, it should be displayed on the web page in a graphical way like what's shown in the interface picture. In order to achieve this goal, I'm wondering that since there is already a data model in the server end, do I need to create a correspond JavaScript data model in the client side? If not, the front web page need to reload the data model from the back-end every time the user has done the editing operation that modifies it, in order to display its updated version to the end user. Is it OK to go that way?</p>