Search code examples
jspbackbone.jssingle-page-application

Would angular js replace Jsp?


I'm new to Angular JS and SPA (Single page application). Are these technologies extension to JavaScript? They dynamically generate a DOM and need no refresh or submit etc. Would these JS technologies replace the traditional way of writing code in JSPs.


Solution

  • The main conceptual difference between JSP's and an SPA framework like Angular is whether the page is being dynamically generated in the browser (client-side) or on the server. The idea of an SPA is that you don't often (or ever) have to retrieve the entire page from the server once it's loaded once. You merely update parts of the page that have changed on the client (though this is often in response to data retrieved from the server).

    Angular is a JavaScript framework, so yes, it is an extension to the JavaScript language. It's probably a more mature way of doing the type of dynamic page interactions you're used to with JavaScript.

    Whether or not Angular should "replace" JSP's is a very opinionated question, and you can actually use the two side-by-side (though they compete a bit).