0

I am developing an e-commerce application using Spring and AngularJS with handful experience in Spring while I am new to this AngularJS world. This application will have only web version but there will be mobile version after the deployment of web app.

Currently, I am designing my system and during my research I found some of sites including Spring Blog are suggesting to create separate client side and server side application for AngularJS and Spring respectively. As server side deployment takes time it will be advantage but the disadvantage is, it requires extra effort and time while maintaining both the project for the same application.

  • Is it good idea to have separate project for client side and server side for the same application?
  • Also, there will be no JSP page if we separate the project, is it good idea to replace the JSP by html and connect to server via http (Spring Rest)?
  • Can we take advantages of spring features like spring security if we separate the project?

EDIT

  • Is is good idea to consider Angular 2 instead of AngularJS for this application?
7
  • It is not advisable to start a new angularjs application. Instead, use the latest angularX. (thoughtworks.com/radar/languages-and-frameworks) Commented May 19, 2017 at 9:06
  • @NicoVanBelle What a crappy advice. Why should not he use AngularJS? Commented May 19, 2017 at 9:13
  • @Mistalis Why is it a crappy advice to say he's better off with the latest version of angular for some greenfield application? I know they are considered to be completely different frameworks but he does not know any of the two, standard es6 support, much more future-proof in general, etc.. etc.. Commented May 19, 2017 at 9:31
  • @NicoVanBelle AngularJS and Angular are 2 different frameworks. They both have advantages, and disavantages. It is not because Angular is more recent, that it is necessarily the best solution, do not make this confusion. Commented May 19, 2017 at 9:45
  • @Mistalis Which is stated in my 2nd comment. Point remains; future-proof, typescript support, es6, aot compilation, performance, ... At least my comment made the OP think about the fact angular 2 is an option, which was my intent in the first place. Period. Commented May 19, 2017 at 9:58

1 Answer 1

3

Probably best way will be to separate backend and frontend applications. Backend should be exposed via REST service. That way you can connect various clients to your backend - frontend application, mobile application etc. Spring has a nice support for developing RESTful services. Of course you can use Spring Security.

Sign up to request clarification or add additional context in comments.

1 Comment

Also having them as separate applications means you can scale more easily e.g. if the backend is getting hammered but the front end is fine, spin up another clustered back end instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.