15
OPENSHIFT Workshop PRESENTED BY Shekhar Gulati Developing Modern Java Web Applications with Java EE 7 and AngularJS

Developing modern java web applications with java ee 7 and angular js

Embed Size (px)

Citation preview

Page 1: Developing modern java web applications with java ee 7 and angular js

OPENSHIFT Workshop

PRESENTED BY

Shekhar Gulati

Developing Modern Java Web Applications with Java EE 7 and

AngularJS

Page 2: Developing modern java web applications with java ee 7 and angular js

WHO AM I?

•  Shekhar  Gula+  -­‐-­‐  OpenShi1  Developer  Evangelist    •  Java  /  JavaScript  /  Python  /  NoSQL  /  Cloud  Guy    •  TwiEer  Handle  :  shekhargula*    •  Github  :  h,ps://github.com/shekhargula*  

•  Author  of  30  technologies  in  30  days  blog  series  h,ps://www.openshi9.com/blogs/learning-­‐30-­‐technologies-­‐in-­‐30-­‐days-­‐a-­‐developer-­‐challenge  

Page 3: Developing modern java web applications with java ee 7 and angular js

l  Develop  a  Java  EE  7  app  (Mostly  doing  this)  

AGENDA

http://www.confsays.com/

Page 4: Developing modern java web applications with java ee 7 and angular js

CODE DU JOUR

https://github.com/shekhargulati/conferenceapp

Page 5: Developing modern java web applications with java ee 7 and angular js

5

1.  Download Wildfly latest release 2.  Install Git on your Operating System

3.  Do git clone https://github.com/shekhargulati/conferenceapp.git

4.  Import the application in Eclipse

5.  Show how to create Java EE 7 project using Maven archetype

Step 0 : CLONE PROJECT

Page 6: Developing modern java web applications with java ee 7 and angular js

6

1.  Do git checkout remotes/origin/step1 2.  Show

1.  Maven Archetype

2.  War Plugin Configuration

3.  Start Wildfly 4.  Show first hello world deployment

Step 1 : CREATE JAVA EE7 PROJECT

Page 7: Developing modern java web applications with java ee 7 and angular js

7

1.  Do git checkout remotes/origin/step2 2.  Show

1. REST configuration and REST resource 2.  CDI is enabled by default. 3. Use of transactions in CDI beans. 4. Producers which produce EntityManager and

Logger 5. @Vetoed added to exclude classes from CDI 6. JPA configuration in persistence.xml

STEP 2: CREATE CONFERENCE

Page 8: Developing modern java web applications with java ee 7 and angular js

8

1. Do git checkout remotes/origin/step3 2.  Show

1.  Making ConferenceResource save() method async

2.  Concurrent Utilities

STEP 3 : ASYNC RESOURCES

Page 9: Developing modern java web applications with java ee 7 and angular js

9

1.  Do git checkout remotes/origin/step4 2.  Show

1.  REST Client for GooseExtractor

2.  Parsing the String respone using JSON parsing API

3.  Integrating with ConferenceResource

STEP 4 : WRITE REST CLIENT AND USE JSON PROCESSING

Page 10: Developing modern java web applications with java ee 7 and angular js

10

1.  Do git checkout remotes/origin/step5 2.  Show

1.  Add dependencies in pom.xml

2.  Add twitter streaming related classes

3.  Show Event mechanism 4.  Export Environment variables

STEP 5 : TWITTER STREAMING SUPPORT

Page 11: Developing modern java web applications with java ee 7 and angular js

11

1.  Do git checkout remotes/origin/step6 2.  Show

1.  AngularJS code

2.  Read related resource operations

STEP 6 : ANGULARJS UI

Page 12: Developing modern java web applications with java ee 7 and angular js

12

1.  Do git checkout remotes/origin/step7 2.  Show

1.  QuizWebSocket Endpoint

2.  App.js

STEP 7 : WEBSOCKET SUPPORT

Page 13: Developing modern java web applications with java ee 7 and angular js

13

1.  Create Wildfly OpenShift Application 2.  Clone the application to local machine

3.  Add a remote

4.  Pull the changes

5.  Add MySQL cartridge 6.  Set Environment variables

7.  Git push for deployment

STEP 8: DEPLOY TO OPENSHIFT

Page 14: Developing modern java web applications with java ee 7 and angular js

QUESTIONS?

Page 15: Developing modern java web applications with java ee 7 and angular js

DONE!