dimanche 8 mars 2015

Should I use ServletDispatcher when trying to make an angular webapp, with no jsp pages?

I have medium knowledge on how to make java webapps, and jsp pages. I am trying to extend my expertise, by learning how to use Spring MVC, AngularJS and RESTful api's.


I am having trouble drawing the lines between the dots. First of all, from what I have read, there should be no real need for jsp pages, when trying to do pure angularJS. So I'm trying to not use jsp's this time.


I am pretty much trying to make two html-pages, each with a link to the other. Now in a completely basic Spring MVC setup, this would be done with the help of two controllers, and the ServletDispatcher. In the servlet-context.xml (default name) I could probably change the default suffix from .jsp to .html, but I have read that I should treat static html pages as resources, instead of views, as they do not need the powers of a servlet.


The thing is, I have never made any kind of web page which didn't utilize a dispatcher, or front controller servlet, and although it might be completely obvious to most, I do not know what the alternative is. I am very in doubt if I am supposed to use the ServletDispatcher at all, and what the alternative is. I kinda thought the ServletDispatcher, and front controller pattern implementation was one of the most central parts of Spring...


So should I use the ServletDispatcher for an Angular web application, or should I just use Spring to make the RESTful api?


Aucun commentaire:

Enregistrer un commentaire