title: Understanding the flow of spring framework & MVC
body: <p>I am having some trouble understanding this. Can someone help me better understand this?</p>
  
  <pre><code>MVC 
  Model --&gt; Java- Spring Framework
  View ---&gt; templating language(JSP velocity) &amp; Javascript 
  DB --&gt; SQL 
  </code></pre>
  
  <p>Q-1)
  Now, When I open a particular page, I can't visualize the flow. I've read about DAO, controller , service etc and I understand them individually but I am really confused when I club all together what's the order of execution? Whats the flow exactly ? Is it that  first the view is loaded then it sends JS request to fetch the necessary data from backend and then the controller and service are invoked and the DAO queries the db? Then how does the API come into picture? DAO deals with the API? </p>
  
  <p>Q-2)
  Why do we need xyz.properties? I have removed a module from my page. If I remove a particular js file(related to that module) from the scripts.properties, then ideally that js should not get executed at all right? Then still why would I see the api call to fetch the data related to that module? I don't see the module but I sure see the api call. Why is that? </p>