Dismiss
Announcing Stack Overflow Documentation

We started with Q&A. Technical documentation is next, and we need your help.

Whether you're a beginner or an experienced developer, you can contribute.

Sign up and start helping → Learn more about Documentation →

I am now developing a Spring + Hibernate + Spring Security + REST API based Web Application for my Final Year Project.

When I started Dynamic front End then I noticed Angular2 is changed their Technology significantly. Angular2 is much easier than Angular1 and also it's too much faster than Angular1. So I did not much interested to learn much about AngularJS1.

Now I am trying to Learn Angular2. I notice there is much JavaScript and TypeScript technology for deploying an Angular2 project. Like gulpjs, nodejs, Systemjs, babelJS etc. But it is too much for me to learn so much Front End technology at this time. I don't want to learn NodeJS now.

  1. I need to know is there any way to Deploy Angular2 Application by Maven or gradle build tool and Tomcat Server?

  2. I already know some jQuery and Angular1. So, should I go for those now?

share|improve this question

Angular2 is developed in TypeScript and most resources you'll find will be in TypeScript. So, generally speaking, it would be better if you could develop using TypeScript.

That being said, you can also write Angular2 code in ECMAScript5 (aka regular JavaScript).

If you develop in ES5, does not matter what your backend is. All you have to do is include the necessary <script> tags in the HTML page sent to the user and you're good to use Angular2. The backend usually provides REST services which can be created in many languages/environments, including Java/Spring.

As you can notice, in the setup above, you don't need Node at all. You can even run Jasmine tests using Maven or similar tools.

If you choose to write your code in TypeScript, though, you'll have to at least take care of the transpilation step. If could happen in the browser (like angular.io's plunker does), but there is a performance penalty, big enough to render this approach impractical for large enough projects.

On the other hand, I don't know any (haven't searched, though), but there probably are TypeScript plugins for Maven.

To sum up, you can develop Angular2 without Node, but you'll have to take care yourself of some tasks that Node's tools would give you. Tasks such as testing, minification, uglification, and such. Using Node, all of that is handed to you (with Karma and WebPack, for instance) and there are plenty of tutorials around. Without Node, you're on your own to glue them all together. It is definitely doable, but it does have its caveats.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.