I recently came across AngularJS. I am a java web developer. I want to use AngularJS along with Spring-MVC framework. But I need some basic foundation (tutorial) to start with.
I know about the basic stuff of AngularJS, but how to integrate it with Spring-MVC. As most of the time spring it self return partial jsp(s), and we add them using jsp-include, while AngularJS expects JSON data most of the time.
Your architecture is full client-side: In this case the integration is very natural. Spring MVC exposes your service as a REST (JSON/XML) and your client application with AngularJS consumes your JSON. Here the .war application (Spring MVC) must be deployed in a servlet container (e.g. Tomcat) and your client application can be deployed in the same server or in a HTTP server like Nginx or Apache.
You want to keep page generation in the server-side and only use AngularJS for some DOM manipulation so your code must be deployed in the same .war (inside the WEB-INF/ folder).
Mixing the two approaches in not always a good idea. You can try Thymeleaf to stay in server-side page generation and at the same time have templating, testability and clean View code.
Thank you for the insight. As far as war (Spring-MVC) is concerned I have the application ready with REST service. It was just should directly have .html pages in my views or I should use as usual .jsp page with AngularJS because finally when they are rendered on client side they are html.
If your application is full REST , you don't need to go with JSP . It will introduce complexity , use only HTML files . Pay attention about you Model of Security and authorization , Backend generation(JSP) and the use of spring security make things very easy with the JSP tag lib of spring security , you will need to handle this manually in the client side . This nice directive can help you github.com/witoldsz/angular-http-auth
Thanks Nabil. I will try that. At present I have kept my shell as jsp page. All the partials are .html, but I will definitely look into the github link you gave. With HTML I was worried about security
You are right to be worried about security , not about the reliability but about the effort of implementing functionality that spring-security do for you in one line of code . Good Luck