Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

33
BUILDING ENTERPRISE APPLICATIONS WITH ANGULARJS Christian Janz ( ) @c_janz [email protected]

Transcript of Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Page 2: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Christian JanzConsultant im Bereich SoftwareentwicklungJava/JEE, Web bei in MannheimBridging IT

Twitter: | E-Mail: | Slides: | Code:

@c_janz [email protected] http://de.slideshare.net/cjanzhttps://github.com/bridgingIT/angular-seed

Page 3: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

AgendaEnterprise ApplicationsEnterprise + JavaScript?AngularJSJavaScript ÖkosystemContinuous IntegrationFazit

Page 4: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

EnterpriseApplications

Was ist besonders daran?

Page 5: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Enterprise Applicationsunterstützen kritische

Geschäftsprozesse

Page 6: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Hohe Komplexität

Page 7: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Hohe Qualitätsanforderungen

Page 8: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)
Page 9: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Deadlines

Page 10: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Enterprise +JavaScript?

Page 11: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

“JavaScript ist doch für Animationen aufWebseiten. Damit kann man keine

professionellen Geschäftsanwendungenentwickeln.”

Page 12: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

“Der JavaScript-Code hat keine Unit-Tests, dasgeht nicht so einfach.”

Page 13: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Enterprise +JavaScript!

Page 14: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

AngularJSHTML enhanced for web apps!

JavaScript-Framework von GoogleOpen Source (MIT)MVW (Model-View-Whatever)

Page 15: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

FeaturesModuleDependency InjectionTrennung von View und LogikData BindingErweiterung von HTMLTestability

Page 16: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Building BlocksModuleViewRoute DefinitionControllerServiceDirectiveFilter

Page 17: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

DemoInterpolateFilter + Unit Test

'use strict';

angular.module('myApp.version.interpolate-filter', [])

.filter('interpolate', ['version', function(version) { return function(text) { return String(text).replace(/\%VERSION\%/mg, version); };

}]);

Page 18: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

JavaScriptÖkosystem

Page 19: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Testing

Page 20: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Code Analysis

Page 21: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Package Management

Page 22: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Bower: Beispiel { "name": "angular-seed", "description": "A starter project for AngularJS", "version": "0.0.0", "homepage": "https://github.com/angular/angular-seed", "license": "MIT", "private": true, "dependencies": { "angular": "1.2.x", "angular-route": "1.2.x", "angular-loader": "1.2.x", "angular-mocks": "~1.2.x", "html5-boilerplate": "~4.3.0" } }

Page 23: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Task Runner

Page 24: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Demo: Gulp [22:53:53] Using gulpfile ./angular-seed/gulpfile.js [22:53:53] Starting 'test'... INFO [karma]: Karma v0.12.24 server started at http://localhost:9876/ INFO [launcher]: Starting browser Chrome INFO [Chrome 38.0.2125 (Linux)]: Connected on socket P7CU4ehH9G-nJyq-796g with id 53690621 ...... Chrome 38.0.2125 (Linux): Executed 6 of 6 SUCCESS (0.052 secs / 0.049 secs) [22:53:55] Finished 'test' after 2.27 s [22:53:55] Starting 'build'... ./angular-seed/app/view2/view2.js: line 4, col 3, Missing "use strict" statement.

1 error

events.js:72 throw er; // Unhandled 'error' event ̂ Error: JSHint failed for: ./angular-seed/app/view2/view2.js

Page 25: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

ContinuousIntegration

Bringing it all together

Page 26: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Demo: Jenkins Job

Page 27: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Demo: Code-Analyse mitSonarQube

Page 28: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Fazit

Page 29: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Mit AngularJS könnenprofessionelle

Geschäftsanwendungenentwickelt werden

Page 30: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Es gibt sehr gute Werkzeuge

Page 31: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Bewährte Methoden lassensich übertragen

Page 32: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Fragen?

Page 33: Building Enterprise Applications with AngularJS (GDG DevFest Karlsruhe 2014)

Bildnachweisehttps://www.flickr.com/photos/dominik99/384027019/http://cdn.playbuzz.com/cdn/8ba53e3b-5c1b-4fe0-8d93-f9586b7f4a97/73917b9f-1ced-41fd-8e97-986c8754a01c.jpghttp://commons.wikimedia.org/wiki/File:Neon_sign,_%22CHANGE%22.jpghttps://www.blossom.io/static/img/site/product-mgmt-anti-patterns/office_space.jpghttp://commons.wikimedia.org/wiki/File:Space_Shuttle_Discovery_Transport.jpghttp://blog.shoeboxed.com/4-lessons-we-can-learn-from-the-movie-office-space/