DEV Community

Cover image for How do you build Application by Angular, Java and Eclipse?
Ben
Ben

Posted on • Updated on

How do you build Application by Angular, Java and Eclipse?

Please correct me if I go wrong.

Enterprise Application

I am Java Developer which building enterprise application for several years. Backbone technologies may be different for different enterprise application. The frond-end frameworks are almost completely for different application.

In this times, I would like to try to use the following tools or technologies for the new project.

  • Eclipse
  • TypeScript
  • Webpack
  • BabelJs
  • Angular

Front-End Framework

Please correct me if I guess wrong. I think current thread of front end framework would be angular, react, vuejs, ember, etc.

TypeScript, BabelJs, Webpack would be something I think it would be extremely important for my future enterprise application development.

Eclipse

Many people may say Eclipse is not the best IDE. I may say Eclipse is the best for enterprise application as many developer know it well.

Tomcat may be the most common choice for local development server. Eclipse would help compile java to class and hot deploy to tomcat.

JavaScript

I think the source code of angular, react, vuejs, ember may require compile to javascript in order to make them work.

Most of my proof of concept project would use npm, webpack, babeljs to compile and bundle source code. Actually, I used Visual Studio Code for the POC project.

If I would like to do the same way in Eclipse, I know I may able to configure a builder of eclipse to trigger npm build task before the java builder.

Tools

  • TypeScript
  • BabelJs
  • Webpack

Bonus - Maven

Maven is awesome tools for Java which help dependency management for Java Project. You only need to declare what libraries you need to include in the project. I would help you download.

The common problem of Maven in Enterprise context is that the corporate firewall would block your download from maven which make maven become useless.

Dispute - Eclipse Vs Intellij

Many people may argue that Intellij is a better IDE than Eclipse. I admit that there are so many problem when you are using Eclipse.

  • Loading Time
  • No Response sometimes
  • Consume so many resource
  • Poor Integration such as GIT, JavaScript, HTML (I think)

But I still recommend Eclipse. The below is the advantage of Eclipse I think.

  • FREE (Extremely Important)
  • No need for learning for existing team
  • Maybe easy to find people who is good as eclipse

Top comments (4)

Collapse
 
fnh profile image
Fabian Holzer • Edited

One simple variant would be to use Maven with the Frontend Maven Plugin to install the JS dependecies and trigger the Angular CLI (ng build --prod) with it. With the Maven resources plugin it can than copy the folder with the compiled output into WEB-INF folder, and then you should basically be good to deploy. My setup at work is a bit more complex than that, as in I have a multi-module project, with seperate builds for backend, frontend, docker-image and several profiles. But the basic idea is still to have a one-step build with mvn clean install

Collapse
 
imben1109 profile image
Ben

Yes. Maven should be used if the company network allow. Maven is awesome for dependency management. But unfortunately, many company may block the internet or block some port or some other problems which make you cannot use Maven.

Collapse
 
bgadrian profile image
Adrian B.G. • Edited

I would suggest to think of them as 2 different apps, backend API and front-end web app. Even if they are in the same repo, IDE and so on, if you keep t hem separate you will have many benefits along the line, including decoupling, faster iteration, better performance, with the downside of the SEO (which can be solved separately).

As for the IDE, you should play with intelliJ too for a few months, maybe you will change your mind.

And at the enterprise level TypeScript (any strong typed superset) is a good choice.

Collapse
 
imben1109 profile image
Ben • Edited

Yes. Client side and server side application. The three tier architecture. We would include database layer.

I think I would develop the application framework which would include development environment, build, application structure, consist flow and layout and reusable component, etc. Some more components would be included as it is in enterprise context.

I think IDE, build tools and some of these technology may completely influence the project team including productivity, quality and creativity.

Why I don’t choose IntelliJ

  • Eclipse is FREE
  • No need for learning for existing team
  • Maybe easy to find people good as eclipse

I admit I have encounter so many people from eclipse.

  • loading time
  • no response at all sometime
  • consume so many resource
  • git integration have problem (I think)
  • weak support for JavaScript or html (I think)

They are so many problems due to eclipse but I finally choose....

I do not if my setup is good or not.