GithubHelp home page GithubHelp logo

dalalsunil1986 / angular2andjavaee Goto Github PK

View Code? Open in Web Editor NEW

This project forked from angular2guy/angular2andjavaee

0.0 0.0 0.0 21.27 MB

This project should provide a starting point for people interested in using Angular 10 with Ivy in a Java EE environment.

Home Page: https://angular2guy.wordpress.com/

License: Apache License 2.0

Java 48.63% TypeScript 38.33% JavaScript 1.14% HTML 10.12% CSS 1.47% Shell 0.24% Dockerfile 0.06%

angular2andjavaee's Introduction

Carrental: Example Using Angular with Angular Cli and Java EE 6 Deployed as an EAR

Author: Sven Loesekann

Build Status

Technologies: EAR, Rest, Angular, Angular Cli

Summary: Example Project for the integration of Maven, Angular, Java EE 6

Target Project: Java EE 6

What is it?

The project shows the integration of Angular with Angular Cli as UI. The Rest services are provided by JavaEE 6, in this example is with WildFly. The build is done in Maven.

The development setup is Eclipse with Typescript Plugin or Webstorm. JBoss is integrated with the JBoss Plugin to provide re-deployments. Angular Cli provides the UI, redeploys the UI on change and optimizes production build.

The Ear that is build can be tested in a Docker Image that Maven builds.

Development Requirements

Java 8 JDK or newer.

Eclipse Oxygen JEE or newer.

WildFly 10 or newer. (Any JavaEE 6 Appserver will do)

JBoss Plugin JBoss AS, WildFly & EAP Server Tools 4.5.0 or newer.

Install Eclipse Plugin Eclipse Wild Web Developer of the Eclipse Marketplace.

Maven 3.3.3 or newer.

Nodejs 12.16.x or newer

Npm 6.13.4 or newer

Angular Cli 9 or newer.

Build Server Requirements

Java 8 JDK or newer.

Maven 3.3.3 or newer.

Nodejs 12.16.x

Npm 12.16.x

Setup

JDK 8, Wildfly 10(or an other Java EE6 server), Nodejs, Eclipse, Maven must be installed.

Install Angular Cli "npm install -g angular-cli@latest".

Install Eclipse JBoss Plugin "http://download.jboss.org/jbosstools/oxygen/stable/updates/"

Add the server runtime environment for Wildfly and connect it to the WildFly installation.

Install Eclipse Plugin Eclipse Wild Web Developer of the Eclipse Marketplace.

Optionally install Webstorm for the UI.

Development Setup

Check out the carrental project.

Open a shell and cd into the directory carrental-web/src/main/angular2/carrental

Execute npm install for dependency resolution.

Execute npm start to start the UI.

Start Wildfly in Eclipse.

Build Setup

The project is a multi-module project. The ear project configures the Ear. The ejb project builds the ejbs to provide the data for the rest service. The war project builds the war. Jax-Rs provides the rest services to serve the data of the ejbs. Npm install provides the dependency resolution for Angular Cli. Angular Cli builds a tree shaken, uglified bundle. Angular Cli runs the tests with Karma on Chrome and breaks the build if they fail. The ear is built.

Project Goals

To provide a maven project that can be build on continous build server and provide an optimized ui bundle. To provide a development setup that provides fast feedback on the java ee server and on the UI. The fast feedback on the rest service is provided by the wildfly integration in eclipse. The fast feedback on the ui is provided by the angular cli integration. Angular Cli is used to provide the ui with fast feedback on change. Angular Cli can generate components, pipes and more. It builds Typescript into Javascript. It provides test wrappers and can execute them.

With such a setup Angular can be used on Java EE environment.

Testing the Ear

To provide a method to test the Ear of the Build a Docker Image can be build. The image uses Wildfly and deploys the Ear in the server. The server can then be started and the optimized build can be tested. That enables testing the Ear without changing the setup of the development environment. Docker Images of other Application Servers are availiable and provide the opportunity to test the Ear on different platforms. Images for Wildfly and Websphere Liberty can be build.

angular2andjavaee's People

Contributors

angular2guy avatar dependabot[bot] avatar martinxj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.