graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · introduction •...

36
Graduation @ @ Sogeti Java Sogeti Java

Upload: others

Post on 05-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Graduation

@@

Sogeti JavaSogeti Java

Page 2: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Java EE, REST,

AngularJS, Code

generation,

Erwin de Gier

generation,

Websockets, NoSQL

Erwin de Gier

Sogeti Java CoEAmsterdam, September 2015

Page 3: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

WhoAmI

• Erwin de Gier

• Software Architect • Software Architect

• Coach Young Professionals

• Technical coach graduation

assignments

3

Page 4: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Introduction

• Graduation assignments, the technical

sideside

• Product owner / Technical coach

• Research topic (technology selection)

• Development of an application

4

Page 5: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Projects

• NLJUG Registration system

• Code generation• Code generation

• Remote Presentation environment

• Websockets, Javascript

• Knowledge Map (Roy Straub)

•Java EE, Angular JS

5

•Java EE, Angular JS

Page 6: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

NLJUG Registration system

6

Page 7: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Design

7

Page 8: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Generating HTML

public class Employee {

private String firstname;private String firstname;

private String lastname;

private Date birthday;

}

8

Page 9: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Java Reflection APIfor(Field field : employee.getClass().getDeclaredFields()){

Element div = new Element(Tag.valueOf("div"), "");

//Generate Label//Generate LabelElement label = createLabel(field.getName());div.appendChild(label);//Check type of field (String, Date, Number, etc.Class<?> type = field.getType();//Generate input fieldElement input = createInput(type);div.appendChild(input);

}

9

Page 10: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

JSoup and Servlets

protected void doGet(HttpServletRequest request,

HttpServletResponse response){

Element page = generateHTML(request,response);Element page = generateHTML(request,response);String html = page.html();request.setAttribute("html",html);

}

<h:outputText value="${html}" />

10

Page 11: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

JSR 303 Bean validationpublic class Employee {

@NotNull@Size(Max=25)@Size(Max=25)@CustomMessage(message="Use at most 25 characters")private String firstname;

@Temporal(javax.persistence.TemporalType.DATE)private Date birthday;

@Hiddenprivate long id;

}

11

}

Page 12: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Pros / Cons

• Pros:• No manual HTML work (Costs / Time)

• Consistent look and feel, use of • Consistent look and feel, use of

components

• Validation on client and server

• Cons: • Investment

• Only suits CRUD-like operations

12

• Only suits CRUD-like operations

• Pages must use standard structure

Page 13: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

In summary

• Java EE

• JPA, EJB, Servlets, JSF • JPA, EJB, Servlets, JSF

• Custom HTML Generator

• Jsoup

• Bean validation

• Java Reflection API

13

• Java Reflection API

Page 14: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Remote presentations

14

Page 15: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Design

15

Page 16: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Technology

• Websockets

• Javascript• Javascript

• Protocol selection

16

Page 17: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Websockets

17

Page 18: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Problem with websockets

• Low level protocol

• No receipt conformation• No receipt conformation

• No messages types

• No standard headers

• No heartbeat

• Every project implements own

18

• Every project implements own

messaging system

Page 19: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Available protocols

• Stomp https://stomp.github.io/

• WAMP http://wamp.ws/• WAMP http://wamp.ws/

• JSON - RPC

http://www.jsonrpc.org/specification

• MSG-RPC

https://github.com/rooseve/msg-rpc

•Swagger Socket (REST over websockets)

19

•Swagger Socket (REST over websockets)

https://github.com/swagger-

api/swagger-socket

Page 20: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Protocol functions

• RPC (WAMP,JSON-RPC, MSG-RPC)

getUserProfile() -> {'user':'bob','id':'1'}

• PUB/SUB (WAMP, Stomp)

20

Page 21: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Protocol functions

• Headers / Body (Stomp, Swagger)<StompCommand><StompCommand><HeaderName_1>:<HeaderValue_1><HeaderName_2>:<HeaderValue_1><FrameBody>

• Message types (WAMP, Stomp, JSON-

RPC)

[WELCOME, Session|id, Details|dict]

21

[WELCOME, Session|id, Details|dict]

CONNECTaccept-version:1.2host:stomp.github.org

Page 22: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Protocol functions

• REST (Swagger Socket)GET /product/123GET /product/123DELETE /product/123

22

Page 23: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Example - RPC

23

Page 24: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Summary

• Protocol functions

• Available client and server libraries• Available client and server libraries

• Standards / community support

• Maturity

• After the protocol selection is made

the client and server technology can be

24

the client and server technology can be

selected

Page 25: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Knowledge Map

• Project management

• Skill insufficiencies • Skill insufficiencies

• Quality control

• Currently Excel

25

Page 26: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Design

26

Page 27: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Technology

27

Page 28: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

REST API

DELETE /knowlegdemap/<id>

28

Page 29: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Angular JS

• SPA (Single Page Applications)• Data binding• Data binding• Reusability (Components)

29source: https://docs.angularjs.org/guide/databinding

Page 30: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Result

30

Page 31: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

In Summary

• Project management

• Excel• Excel

• Web application

•Angular

•REST

• More possibilities!

31

• More possibilities!

Page 32: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Modern

TechnologyTechnology

SogetiSogeti

Page 33: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Sneak peaks

• Enterprise Stack of the Future: Reactive

ReadyReady

• Data analysis with Open Source Big

Data solutions

33

Page 34: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Reactive Ready

• Reactive JVM Applications

• Distributed Eventbus and Shared cluster • Distributed Eventbus and Shared cluster

data

• NoSQL Datastore

34

Page 35: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Reactive Ready

package examples;

public class MyVerticle extends AbstractVerticle {public void start() throws Exception {

vertx.setPeriodic(1000, arg -> {vertx.eventBus().publish("event", new JsonObject().put("eventmessage", "hello"));

});}

}

35

Page 36: Graduationedegier.nl/presentations/afstuderen-sogeti-java.pdf · 2019. 12. 2. · Introduction • Graduation assignments, the technical side • Product owner / Technical coach •

Open Source Big Data

• Apache Spark

• Apache Hadoop• Apache Hadoop

• MongoDB

• Spring XD

36