angularjs practical project experiences with javascript development in a bank

111
Practical Experiences 1 + + Link to presentation

Upload: david-amend

Post on 15-Jul-2015

558 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Angularjs practical project experiences with javascript development in a bank

Practical Experiences

1

http://www.google.com/trends/explore#q=angularjs%2C%20JSF%2C%20GWT%2C%20Backbone%2C%20spring%20mvc&cmpt=q&tz=, Februar, 2015

+ +Link to presentation

Page 2: Angularjs practical project experiences with javascript development in a bank

David Amend

GXT

[email protected]

Page 3: Angularjs practical project experiences with javascript development in a bank

David Amend

GXTREST

[email protected]

Page 4: Angularjs practical project experiences with javascript development in a bank

Agenda

1. Angular.js: story at DAB-Bank2. Additional slides

a. Angular 2.0b. TypeScriptc. Techstackd. SEO with JavaScripte. JavaScript on Serverf. Security

g. Build processh. Component responsibility 4

Page 5: Angularjs practical project experiences with javascript development in a bank

DAB Bank- Depotführung & Wertpapierhandel: B2B & B2C - 600.000 Kunden

19971994 2002

erster Discount-Broker Deutschlands

5

DAB Bank AG

Page 6: Angularjs practical project experiences with javascript development in a bank

DAB Bank- Depotführung & Wertpapierhandel: B2B & B2C - 600.000 Kunden

19971994 2002 2005

erster Discount-Broker Deutschlands

2014

6

DAB Bank AG

Page 7: Angularjs practical project experiences with javascript development in a bank

Innovation

7

Banking

Page 8: Angularjs practical project experiences with javascript development in a bank

Innovation

8

Banking Numbrs

Personal Finance Manager

Page 10: Angularjs practical project experiences with javascript development in a bank

10

?Spring MVC JSF

JSPjQuery

The Setup

Technology Background

New Portal 3.0

Struts

PFM

Page 11: Angularjs practical project experiences with javascript development in a bank

11

The Setup

JavaScriptTechnology Background

Spring MVC JSF

JSPjQuery

Struts

Page 12: Angularjs practical project experiences with javascript development in a bank

12

Problems we hadwith web development

- AJAX & Web 2.0

- Customization

- JavaScript hacks

- monolith

- Future proof

Page 13: Angularjs practical project experiences with javascript development in a bank

Choose By Level Of Web Abstraction

Decision Matrixhttp://readwrite.com/2014/02/06/angular-backbone-ember-best-javascript-framework-for-you

Hacking web expert

13

Page 14: Angularjs practical project experiences with javascript development in a bank

Choose By Level Of Web Abstraction

Decision Matrixhttp://readwrite.com/2014/02/06/angular-backbone-ember-best-javascript-framework-for-you

Who needs web knownledge !?Hacking web expert

14

Page 15: Angularjs practical project experiences with javascript development in a bank

Choose By Level Of Web Abstraction

Decision Matrixhttp://readwrite.com/2014/02/06/angular-backbone-ember-best-javascript-framework-for-you

Getting things done right & efficient

Who needs web knownledge !?Hacking web expert

15

Page 16: Angularjs practical project experiences with javascript development in a bank

Once upon a time ...

16

2009

24 weeks

3 developer

17.000

Lines of code

Page 17: Angularjs practical project experiences with javascript development in a bank

Once upon a time ...

https://octoverse.github.com/17

2009

24 weeks

3 weeks

3 developer

1 Misko Hevery1000

17.000

Lines of code

Page 18: Angularjs practical project experiences with javascript development in a bank

We switched to another web framework called

18

Page 19: Angularjs practical project experiences with javascript development in a bank

19

Lets get ready !

Our DAB Story with

Page 20: Angularjs practical project experiences with javascript development in a bank

Innovative Environment With Experts

20

Page 21: Angularjs practical project experiences with javascript development in a bank

21

Too optimistic!

Page 22: Angularjs practical project experiences with javascript development in a bank

Reasons we had beforeto stay with Server-web-frameworks

JavaScript is ...- not for large scale

- only for web 2.0 apps

- less efficient & performant

- no SEO, security, stability, …

22

Page 23: Angularjs practical project experiences with javascript development in a bank

23

How to use angular.js, correct ?

Concepts &Best Practices

? 1. MVC ? MVVM ? M* ? *?

2. <button ng-click=”validate(!required && filled)”>

3. Asynchronism

Page 24: Angularjs practical project experiences with javascript development in a bank

24

How To Use Angular.js, Correct ?

AngularCommunity

Java/jQueryExisting Knownledge

Understanding Angular.js magic data-bindinghttps://www.youtube.com/watch?v=Mk2WwSxK218

Concepts &Best Practices

?

Angular.js styleguidehttps://github.com/johnpapa/angularjs-styleguide

+

Page 25: Angularjs practical project experiences with javascript development in a bank

25

Brilliant !

Page 26: Angularjs practical project experiences with javascript development in a bank

Backend

Angular.js: The web application framework

26

Frontend

Page 27: Angularjs practical project experiences with javascript development in a bank

Backend

Angular.js: The web application framework

Fits Agile development→ Frontend - Backend separation: mocking, testing, security

→ prototype to real product

→ step by step

27

Frontend

Page 28: Angularjs practical project experiences with javascript development in a bank

Backend

Angular.js: The web application framework

Very fast start→ starter code template

→ no workshop

→ coexistent technology integration

→ little JavaScript knownledge

28

Frontend

Page 29: Angularjs practical project experiences with javascript development in a bank

Backend

Angular.js: The web application framework

Angular = omnipresent→ media agency

→ web consulants

→ tons of existing widgets/tools

29

Frontend

Page 30: Angularjs practical project experiences with javascript development in a bank

30

- HTML- JavaScript- stateless Server- CSS: SMACSS/BEM

Web Development != Web Development

Page 31: Angularjs practical project experiences with javascript development in a bank

31

- HTML- JavaScript- stateless Server- CSS: SMACSS/BEM

→ high reuse→ smooth integration

Web Development != Web Development

Page 32: Angularjs practical project experiences with javascript development in a bank

32

- HTML- JavaScript- stateless Server- CSS: SMACSS/BEM

→ high reuse→ smooth integration

Web Development != Web Development

Page 33: Angularjs practical project experiences with javascript development in a bank

33

too much new stuff!

Page 34: Angularjs practical project experiences with javascript development in a bank

34

?The Almighty Web Ecosystem

Page 35: Angularjs practical project experiences with javascript development in a bank

Iterative IntroductionOf New Topics

Simplicity is not a crime !

- Angular.js- Bootstrap- Quality JS

King of the hill

35Build Process

advanced techniques

Page 36: Angularjs practical project experiences with javascript development in a bank

Iterative IntroductionOf New Topics

Simplicity is not a crime !

- Angular.js- Bootstrap- Quality JS

King of the hill

36

advanced techniques

adapt

Page 37: Angularjs practical project experiences with javascript development in a bank

Simplicity is not a crime !

- Angular.js- Bootstrap- Quality JS

King of the hill

37

- have web experts in team

- node.js: must have for build process

- prevent AMD - postpone CommonJS

- use NPM & Bower for modules

Topics To Consider

Page 38: Angularjs practical project experiences with javascript development in a bank

Simplicity is not a crime !

- Angular.js- Bootstrap- Quality JS

King of the hill

38

- TypeScript: introduce a level

- consider Webstorm/IntelliJ IDE

- total separation of client & server

- use existing solutions & adapt

Topics To Consider

Page 39: Angularjs practical project experiences with javascript development in a bank

Innovative vs Traditional

IE8

39

Existing portal server state& design

CMS

CSS resolution &collaboration with external media agency

Page 40: Angularjs practical project experiences with javascript development in a bank

40

Change is happening→ people matter most

Page 41: Angularjs practical project experiences with javascript development in a bank

41

Change is happening→ people matter most

→ techtalks→ shared knownledge→ web experts→ babysteps

Page 42: Angularjs practical project experiences with javascript development in a bank

42

Yes, we did it !

Personal Finance Manager

Page 43: Angularjs practical project experiences with javascript development in a bank

Personal Finance Manager, Results

Page 44: Angularjs practical project experiences with javascript development in a bank

Personal Finance Manager, Results

44

Page 45: Angularjs practical project experiences with javascript development in a bank

Following

Personal Finance Manager

Angular.js Today ?Camunda BPMN

web3 best of breedsTemplate-setup

IMA-Portal

Web-Portal

45

Multi-Project-Enterprise Module Strategy

Page 46: Angularjs practical project experiences with javascript development in a bank

We just switched to another web framework

46

?

Page 47: Angularjs practical project experiences with javascript development in a bank

We just switched to another web framework

47

Page 48: Angularjs practical project experiences with javascript development in a bank

Identified Vision & IT Long Term Strategy

UI

stable

agile

Architectural Character

48

→ easy extendable > reusable

Page 49: Angularjs practical project experiences with javascript development in a bank

Identified Vision & IT Long Term Strategy

UI

Business Logic

Databasestable

agile

Architectural Character

49

results

Page 50: Angularjs practical project experiences with javascript development in a bank

Identified Vision & IT Long Term Strategy

50

Mobile

REST

Desktop

VendorSevices

→ flexible SOA modules→ Continuous Delivery

TV

stateless service

stateless service

stateless service

Page 51: Angularjs practical project experiences with javascript development in a bank

- Facebook

- Twitter

- Yahoo

- Google

- Ebay

- LinkedIn

- Airbnb

- Paypal

Closure Templates

2013

2013

2012

2009

2012

2012

2012

2013

JavaScript driven developmlent: on client & server

51

Page 52: Angularjs practical project experiences with javascript development in a bank

Open Todos

- Responsive Webdesign/ Mobile

- CSS components

- lighten CMS bounds

- JavaScript on Server

- SEO with Phantom.js

52

Page 53: Angularjs practical project experiences with javascript development in a bank

53

Page 54: Angularjs practical project experiences with javascript development in a bank

Being part of the elite

54

→ got it ?

Page 55: Angularjs practical project experiences with javascript development in a bank

We successfully switched to long term web development with the help of

55

… and how about You ?

Page 56: Angularjs practical project experiences with javascript development in a bank

+1 Customer

[email protected] 56

Additional Slides- SEO- JavaScript on server- Security- Angular 2.0- TypeScript- Techstack- Build process- Component responsibility

“ Hallo David! Die Präsentation war super! Ich überlege mir mein Depot zur DAB zu verlagern, - kein Scherz ! Es freut mich Innovationen bei einer Bank zu sehen. Normalerweise ist diese Branche sehr konservativ. Bis zum nächsten Mal !

Victor C., JS Meetup Munich 9.2014

Link to presentation

Page 57: Angularjs practical project experiences with javascript development in a bank

[email protected] 57Link to presentation

Page 58: Angularjs practical project experiences with javascript development in a bank

Additional Slides

58

Page 59: Angularjs practical project experiences with javascript development in a bank

IT enabler : competitive in eBusiness

web-knownledge

Time

Advantage

your company

competitor

Hap

py u

ser!

Page 60: Angularjs practical project experiences with javascript development in a bank

Our reasons to stay with Browser-based web-development frameworks

JavaScript & HTML is ...- especially for large scale

- for simple-pages & web 2.0 apps

- efficient, performant & target oriented

- best for SEO, security, stability

60

Page 61: Angularjs practical project experiences with javascript development in a bank

SEO

Should you use Angular for SEO pages ?→ made for applications

61

Page 62: Angularjs practical project experiences with javascript development in a bank

SEO strategies

- for SEO documents, app concept does not fit- unobstrusive JavaScript- duplication: client - server content rendering- client SEO pre-rendering on server

62

Page 63: Angularjs practical project experiences with javascript development in a bank

SEO

http://de.slideshare.net/Battlefy/seofriendly-single-page-applications-angularjs-prerenderio-by-battlefy-jaime-bueza 63

Page 64: Angularjs practical project experiences with javascript development in a bank

JavaScript Sharing Code with Server

64

Page 65: Angularjs practical project experiences with javascript development in a bank

JavaScript on the server?

- Shared Validationshttp://gglwebtoolkit.blogspot.de/2011/12/client-side-bean-validation-with-gwt.htmlhttp://www.oracle.com/technetwork/articles/java/jf14-nashorn-2126515.html

- JSON Schema Editorhttp://jsonschema.net/#/

- JSON Form Testerhttps://github.com/jdorn/json-editor

- Java to JSON/Schema …http://www.jsonschema2pojo.org/

- Java to TypeScript interfaceshttps://github.com/raphaeljolivet/java2typescript

65

Page 66: Angularjs practical project experiences with javascript development in a bank

Security

- client | server- ng-csp- ng-sanitize- $http: CSFR- Security issues

https://code.google.com/p/mustache-security/wiki/AngularJS

66

Page 67: Angularjs practical project experiences with javascript development in a bank

Angular 2.0

67

Page 68: Angularjs practical project experiences with javascript development in a bank

Angular 2.0

- Angular.js 2.0 is best practices + perf

- Can I already use it? → NO

- Should I wait then? → NO

- Is my 1.x code obsolete as soon as 2.0 arrives? → NO

- Is there a migration strategy? → NO

- Angular 2.0 arrives EARLIEST in one year

- Angular 1.x support AT LEAST 1.5-2 years after 2.0 GA

→ Puzzle architecture: long term strategyFranziskus Domighttp://de.slideshare.net/rangle_io/futore-proofangularjsarchitecture?qid=79fdb959-469a-44ec-9560-33a1ff5e0249&v=default&b=&from_search=1 68

Page 69: Angularjs practical project experiences with javascript development in a bank

Typescriptifying

69

Page 70: Angularjs practical project experiences with javascript development in a bank

Why TypeScript?

Compilation Imposed by GoogleSweet Home Java/.Net-DeveloperRefactoring Made EasyModels ManagementFuture-Proof Syntax, Angular 2.0, ES6 …

Level of TypeScriptifying ?70

Page 71: Angularjs practical project experiences with javascript development in a bank

71

Page 72: Angularjs practical project experiences with javascript development in a bank

72

Page 73: Angularjs practical project experiences with javascript development in a bank

73

Page 74: Angularjs practical project experiences with javascript development in a bank

74

Page 75: Angularjs practical project experiences with javascript development in a bank

75

Page 76: Angularjs practical project experiences with javascript development in a bank

76

Page 77: Angularjs practical project experiences with javascript development in a bank

77

Techstack

Page 78: Angularjs practical project experiences with javascript development in a bank

Full Transitionto Modern Techstack

Sonar/ Findbugs

- Plato- Istanbul- Phantomas- TSLint- JsDoc3

Beginner Advanced Expert

78

Page 79: Angularjs practical project experiences with javascript development in a bank

Full Transitionto Modern Techstack

Sonar/ Findbugs

- Plato- Istanbul- Phantomas- TSLint- JsDoc3

MVN-Repository

- Bower- NPM

Beginner Advanced Expert

79

Page 80: Angularjs practical project experiences with javascript development in a bank

Full Transitionto Modern Techstack

Maven/AntSonar/ Findbugs

- Node.js- Gulp

- Plato- Istanbul- Phantomas- TSLint- JsDoc3

MVN-Repository

- Bower- NPM

Beginner Advanced Expert

80

Page 81: Angularjs practical project experiences with javascript development in a bank

Full Transitionto Modern Techstack

Maven/AntSonar/ Findbugs

- Node.js- Gulp

- Plato- Istanbul- Phantomas- TSLint- JsDoc3

MVN-Repository

- Bower- NPM

- Webstorm- BrowserSync- Remote debugging- Spy.js

Gadgets

Beginner Advanced Expert

81

Page 82: Angularjs practical project experiences with javascript development in a bank

Modern Techstack : Frameworks

Java language

- TypeScript- SourceMaps- CSS- HTML

82

Page 83: Angularjs practical project experiences with javascript development in a bank

Modern Techstack : Frameworks

Java language

- TypeScript- SourceMaps- CSS- HTML

JSF/Vaadin/Spring MVC

83

Page 84: Angularjs practical project experiences with javascript development in a bank

Modern Techstack : Frameworks

Java language

- TypeScript- SourceMaps- CSS- HTML

JUnit/Selenium

- Unit TestingKarma with Jasmine

- Integration UI TestingProtractor

- Acceptance Testing cucumber.js

JSF/Vaadin/Spring MVC

- Jersey → Java- Angular- Bootstrap- ...

84

Page 85: Angularjs practical project experiences with javascript development in a bank

Modern Techstack : Frameworks

Java language

- TypeScript- SourceMaps- CSS- HTML

JUnit/Selenium

- Unit TestingKarma with Jasmine

- Integration UI TestingProtractor

- Acceptance Testing cucumber.js

Component based / OO

JSF/Vaadin/Spring MVC

- Jersey → Java- Angular- Bootstrap- ...

- declarative- Composite Pattern- project structure: web optimized

85

Page 86: Angularjs practical project experiences with javascript development in a bank

Multi Web Project Open Source Template

86

Page 87: Angularjs practical project experiences with javascript development in a bank

Modularization

Web modularization: Maven, None, AMD, CommonJS, ES6, TypeScript87

angular 2.0

Page 89: Angularjs practical project experiences with javascript development in a bank

Component Responsibility

89

Page 90: Angularjs practical project experiences with javascript development in a bank

Think MVC

Angular Service = model & communicator

Page 91: Angularjs practical project experiences with javascript development in a bank
Page 92: Angularjs practical project experiences with javascript development in a bank
Page 93: Angularjs practical project experiences with javascript development in a bank
Page 94: Angularjs practical project experiences with javascript development in a bank
Page 95: Angularjs practical project experiences with javascript development in a bank
Page 96: Angularjs practical project experiences with javascript development in a bank
Page 97: Angularjs practical project experiences with javascript development in a bank
Page 98: Angularjs practical project experiences with javascript development in a bank
Page 99: Angularjs practical project experiences with javascript development in a bank

99

PFM Demo Fallback

Page 100: Angularjs practical project experiences with javascript development in a bank

100

Page 101: Angularjs practical project experiences with javascript development in a bank

101

Page 102: Angularjs practical project experiences with javascript development in a bank

102

Page 103: Angularjs practical project experiences with javascript development in a bank

103

Page 104: Angularjs practical project experiences with javascript development in a bank

104

Page 105: Angularjs practical project experiences with javascript development in a bank

Imageshttp://www.freeimages.com/photo/1428661

http://www.freeimages.com/browse.phtml?f=download&id=1428650

https://openclipart.org/detail/174369/wall-2-by-jarda-174369http://lewisblayse.files.wordpress.com/2013/04/know_your_enemy.gif

http://www.startplatz.de/event/need-for-speed-performante-webseiten-erstellen/

http://kirbymuseum.org/blogs/dynamics/2012/03/page/4/http://www.bildungsxperten.net/bildungschannels/weiterbildung/social-media-und-recht/https://openclipart.org/detail/213183/door-hanger03-by-igor-213183

105

Page 106: Angularjs practical project experiences with javascript development in a bank

106

Page 107: Angularjs practical project experiences with javascript development in a bank

Identified Vision & IT Long Term Strategy

UI

Business Logic

Databasestable

agile

Architectural Character

107easy extendable > reusable

Server

Mobile

statelessREST

Desktop

VendorSevices

→ flexible SOA modules→ Continuous Delivery

results

Throwaway UI

Page 108: Angularjs practical project experiences with javascript development in a bank

108

Innovations happen in the browser

Page 109: Angularjs practical project experiences with javascript development in a bank

109

This is the way to go !

Page 110: Angularjs practical project experiences with javascript development in a bank

110

Unplanned !

Page 111: Angularjs practical project experiences with javascript development in a bank

111

Adaptable Adaptiv