SlideShare a Scribd company logo
Karlsruher Entwicklertag 2013
Web Applications with
About Me
Philipp Burgmer
Senior Software Engineer / Consultant
WeigleWilczek GmbH
burgmer@w11k.com
Focus: Frontend, Web Technologies
About Us
WeigleWilczek / W11k
Software Design, Development & Maintenance
Consulting and Coaching
Web Applications
Eclipse RCP
Java / JVM
Web Apps until now
GWT
UI in Java / XML
hard to use JS libs / scatters ui logic
"Java World" instead of "Web World"
JSF
UI on Server
a lot HTTP requests just to update UI
hard to use JS libs / scatters ui logic
Flex
based on Flash
Adobe discontinues developement
MXML and ActionScript instead of HTML and JavaScript
Web Apps from now on
Frontend runs completely in the browser
Stateful UI, stateless server
Server delivers static resources
Server delivers dynamic data
HTML, CSS and JavaScript as UI Toolkit
What is AngularJS?
HTML enhanced for web apps!
angularjs.com
client / browser JS framework
rich browser applications
brings core frontend concepts and features to the browser
extends html instead of abstracting or wrapping it
lets you extend html to fit your needs
Core Concepts
Model View Controller Pattern
Two Way Data-Binding
Dependency Injection
Modules
Services
Directives
Filter
Separation of Concerns
Testable Code
Demo
Two Way Data-Binding (http://jsbin.com/atufut/14/edit?live)
Add Logic with a Controller (http://jsbin.com/igoxuj/15/edit?live)
Format Values with Filters (http://jsbin.com/esavog/13/edit?live)
Dependency Injection
Java with Google Guice
1 // no dependency management
2 public class MyModule extends AbstractModule {
3

protected void configure() {

4

// bind with interface

5

bind(Service.class).to(ServiceImpl.class);

6

// bind with scope

7

bind(OtherService.class).in(Singleton.class);

8

// bind with alias

9

bindConstant().annotatedWith(Names.named("port")).to(8080);

10
11

}
}
Dependency Injection
Java with Google Guice
1 @Singleton
2 public class ServiceImpl {
3

@Inject

4

public ServiceImpl(final OtherService otherService) { }

5 }
1 // manual or by configured framework
2 final Injector injector = Guice.createInjector(new MyModule());
3 final Service service = injector.getInstance(Service.class);
Dependency Injection
JavaScript with AngularJS
1 // dependency management and di configuration
2 angular.module('myModule', ['moduleOfOtherLibrary'])
3 // no scopes, services are singletons by definition
4 .service('usefulService', function($window) {
5

function somethingPrivate() { }

6
7

return function() {

8

somethingPrivate();

9

$window.close();

10
11 };

}
Dependency Injection
JavaScript with AngularJS
1 // dependency management and di configuration
2 angular.module('myModule', ['moduleOfOtherLibrary'])
3 // no scopes, services are singletons by definition
4 .service('usefulService', function(a) {
5

function somethingPrivate() { }

6
7

return function() {

8

somethingPrivate();

9

a.close();

10
11 };

}
Dependency Injection
JavaScript with AngularJS
1 // dependency management and di configuration
2 angular.module('myModule', ['moduleOfOtherLibrary'])
3 // no scopes, services are singletons by definition
4 .service('usefulService', ['$window', function(a) {
5

function somethingPrivate() { }

6
7

return function() {

8

somethingPrivate();

9

a.close();

10
11 };

}]
Dependency Injection
JavaScript with AngularJS
1 var service = function(a) {
2

return function() {

3
4

a.close();
}

5 }
6 service.$inject = ['$window'];
7
8 angular.module('myModule', ['moduleOfOtherLibrary'])
9 .service('usefulService', service);
Dependency Injection
Additional parameters and overridden DI values
1 // get the injector via static call
2 var $injector = angular.injector();
3 // or via injection
4 function($injector) { }
1 var functionA = function(serviceA) { };
2 $inject.invoke(functionA);
3
4 var functionB = function(serviceA, nonDIValue) { };
5 var locals = { nonDIValue: 1 };
6 $inject.invoke(functionB, locals);
Directives
extend HTML
Tags, Attributes, CSS classes
encapsulate DOM manipulations
proceeded by AngularJS compiler
Demo
Blink on Steroids Speed (http://jsbin.com/ekevip/41/edit?live)
New Tags with Directives (http://jsbin.com/onacoh/11/edit?live)
Views & Routes
Deep linking
Partial Views / Templating
1 angular.module('route.something').config(function ($routeProvider) {
2

$routeProvider.when('/something/:id/', {

3

templateUrl : "route/something.tpl.html",

4

controller : 'SomethingCtrl'

5

})

6 });
1 angular.module('myApp').config(function ($routeProvider) {
2

$routeProvider.otherwise({

3

redirectTo: '/home'

4 });
1 <div class="header">...<&div>
2 <div class="content">
3

<div ng-view></div>

4 </div>
5 <div class="footer">...<&div>
Demo
Small crud app (http://jsbin.com/exevex/14/edit?live) -> with own URL bar: local
This Presentation
Animations
new in Version 1.2
easy to use
plain CSS Animations and Transitions
CSS classes for 'enter', 'move' and 'leave'
custom JS functions possible
directives must support ng-animate

ng-repeat
ng-view
ng-include
ng-show
ng-hide
Demo
ng-repeat (http://jsbin.com/upedez/7/edit?live)
ng-view (http://jsbin.com/ixapay/4/edit?live)
Fancy stuff: bouncy balls (http://jsbin.com/uwiyer/21/edit?live)
Built-in Features
Extensibility
Embeddable
Testable Code
Templating
Localization
Validation
REST support
Async Code with Promises
...
Built-in Features
Directives
ng-click
ng-class
ng-show / ng-hide
ng-include
ng-view
ng-pluralize
ng-repeat
ng-submit
...

Filter
currency
date
filter
json
limitTo
lowercase
number
orderBy
uppercase

Services
http
location
log
q
resource
route
timeout
window
...
Eco System

(http://www.gruntjs.com)

Bower (http://www.bower.io)

Bootstrap (http://www.git-scm.com)

Task Runner / Build System

Dependency Management for 3rd
party libs

Front-End Framework
Styling & Layout

(http://www.git-scm.com)

(http://www.nodejs.org)

(http://www.git-scm.com)

CSS Extension Language

Version Control System

Runtime for Dev Tools /
Backend Environment
Conclusion
Clean separation of Frontend and Backend
Features like DI, MVC and DataBinding in the browser
Seamless integration with other frameworks
Lets you use all the cool new Web / JS tools
Easy to learn
Documentation with a lot of runnable examples
Large community and fast growing eco system
powered and used by Google

Try it!
Philipp Burgmer
burgmer@w11k.com
www.w11k.com (http://www.w11k.com)
www.thecodecampus.de (http://www.thecodecampus.de)

More Related Content

PDF
Web Applications with AngularJS
PDF
WJAX 2012 - Web Apps With AngularJS
PDF
AngularJS 101 - Everything you need to know to get started
PPTX
Angular js presentation at Datacom
PPTX
Step by Step - AngularJS
PPTX
Introduction to single page application with angular js
PDF
AngularJS introduction
PPTX
Angular js 1.3 basic tutorial
Web Applications with AngularJS
WJAX 2012 - Web Apps With AngularJS
AngularJS 101 - Everything you need to know to get started
Angular js presentation at Datacom
Step by Step - AngularJS
Introduction to single page application with angular js
AngularJS introduction
Angular js 1.3 basic tutorial

What's hot (20)

PPTX
The AngularJS way
PDF
Modern Web Application Development Workflow - EclipseCon Europe 2014
PPTX
Angular js
PPTX
Angular js
PDF
SpringMVC
PPT
Managing JavaScript Dependencies With RequireJS
PPTX
AngularJS - Architecture decisions in a large project 
PDF
Booting up with polymer
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
PPTX
Introduction to Angularjs
PDF
Introduction of angular js
PPTX
Angular js for beginners
PPTX
5 angularjs features
PPSX
RequireJS
ODP
Design Patterns in ZK: Java MVVM as Model-View-Binder
PPTX
AngularJS intro
PPTX
Introduction to react js
PPTX
Asynchronous Module Definition (AMD) used for Dependency Injection (DI) and MVVM
ODP
Play with Angular JS
PPTX
Building single page applications
The AngularJS way
Modern Web Application Development Workflow - EclipseCon Europe 2014
Angular js
Angular js
SpringMVC
Managing JavaScript Dependencies With RequireJS
AngularJS - Architecture decisions in a large project 
Booting up with polymer
AngularJS - What is it & Why is it awesome ? (with demos)
Introduction to Angularjs
Introduction of angular js
Angular js for beginners
5 angularjs features
RequireJS
Design Patterns in ZK: Java MVVM as Model-View-Binder
AngularJS intro
Introduction to react js
Asynchronous Module Definition (AMD) used for Dependency Injection (DI) and MVVM
Play with Angular JS
Building single page applications
Ad

Viewers also liked (8)

ODP
Leichtgewichtige Webwenwendungen mit dem MEAN-Stack
ODP
Bidirektionale Verbindungen für Webanwendungen
PDF
Tutorial: Develop Mobile Applications with AngularJS
PDF
JAX 2015 - Continuous Integration mit Java & Javascript
PDF
Legacy WebApps mit AngularJS pimpen
PDF
Webanwendungen mit Apache HBase entwickeln
PDF
Ajax, Comet & Co.
PDF
Concurrency Paradigmen
Leichtgewichtige Webwenwendungen mit dem MEAN-Stack
Bidirektionale Verbindungen für Webanwendungen
Tutorial: Develop Mobile Applications with AngularJS
JAX 2015 - Continuous Integration mit Java & Javascript
Legacy WebApps mit AngularJS pimpen
Webanwendungen mit Apache HBase entwickeln
Ajax, Comet & Co.
Concurrency Paradigmen
Ad

Similar to Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS (20)

PDF
AngularJS Basics
ODP
AngularJs Crash Course
PPTX
Practical AngularJS
ODP
Angular js-crash-course
PDF
"Angular.js Concepts in Depth" by Aleksandar Simović
PPTX
Angular patterns
PPTX
Angular js
PDF
AngularJS in Production (CTO Forum)
PDF
Introduction to AngularJS
PPTX
AngularJS Anatomy & Directives
PPTX
Intro to AngularJs
PDF
Creating Modular Test-Driven SPAs with Spring and AngularJS
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
PDF
Everything You Need To Know About AngularJS
PDF
AngularJS Workshop
PPTX
Angular js workshop
PPTX
Angular training - Day 3 - custom directives, $http, $resource, setup with ye...
PPTX
AngularJS.part1
AngularJS Basics
AngularJs Crash Course
Practical AngularJS
Angular js-crash-course
"Angular.js Concepts in Depth" by Aleksandar Simović
Angular patterns
Angular js
AngularJS in Production (CTO Forum)
Introduction to AngularJS
AngularJS Anatomy & Directives
Intro to AngularJs
Creating Modular Test-Driven SPAs with Spring and AngularJS
AngularJS with TypeScript and Windows Azure Mobile Services
Everything You Need To Know About AngularJS
AngularJS Workshop
Angular js workshop
Angular training - Day 3 - custom directives, $http, $resource, setup with ye...
AngularJS.part1

Recently uploaded (20)

PDF
cuic standard and advanced reporting.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Machine learning based COVID-19 study performance prediction
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Modernizing your data center with Dell and AMD
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Cloud computing and distributed systems.
cuic standard and advanced reporting.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Machine learning based COVID-19 study performance prediction
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Modernizing your data center with Dell and AMD
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
Digital-Transformation-Roadmap-for-Companies.pptx
Cloud computing and distributed systems.

Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS

  • 2. About Me Philipp Burgmer Senior Software Engineer / Consultant WeigleWilczek GmbH burgmer@w11k.com Focus: Frontend, Web Technologies
  • 3. About Us WeigleWilczek / W11k Software Design, Development & Maintenance Consulting and Coaching Web Applications Eclipse RCP Java / JVM
  • 4. Web Apps until now GWT UI in Java / XML hard to use JS libs / scatters ui logic "Java World" instead of "Web World" JSF UI on Server a lot HTTP requests just to update UI hard to use JS libs / scatters ui logic Flex based on Flash Adobe discontinues developement MXML and ActionScript instead of HTML and JavaScript
  • 5. Web Apps from now on Frontend runs completely in the browser Stateful UI, stateless server Server delivers static resources Server delivers dynamic data HTML, CSS and JavaScript as UI Toolkit
  • 6. What is AngularJS? HTML enhanced for web apps! angularjs.com client / browser JS framework rich browser applications brings core frontend concepts and features to the browser extends html instead of abstracting or wrapping it lets you extend html to fit your needs
  • 7. Core Concepts Model View Controller Pattern Two Way Data-Binding Dependency Injection Modules Services Directives Filter Separation of Concerns Testable Code
  • 8. Demo Two Way Data-Binding (http://jsbin.com/atufut/14/edit?live) Add Logic with a Controller (http://jsbin.com/igoxuj/15/edit?live) Format Values with Filters (http://jsbin.com/esavog/13/edit?live)
  • 9. Dependency Injection Java with Google Guice 1 // no dependency management 2 public class MyModule extends AbstractModule { 3 protected void configure() { 4 // bind with interface 5 bind(Service.class).to(ServiceImpl.class); 6 // bind with scope 7 bind(OtherService.class).in(Singleton.class); 8 // bind with alias 9 bindConstant().annotatedWith(Names.named("port")).to(8080); 10 11 } }
  • 10. Dependency Injection Java with Google Guice 1 @Singleton 2 public class ServiceImpl { 3 @Inject 4 public ServiceImpl(final OtherService otherService) { } 5 } 1 // manual or by configured framework 2 final Injector injector = Guice.createInjector(new MyModule()); 3 final Service service = injector.getInstance(Service.class);
  • 11. Dependency Injection JavaScript with AngularJS 1 // dependency management and di configuration 2 angular.module('myModule', ['moduleOfOtherLibrary']) 3 // no scopes, services are singletons by definition 4 .service('usefulService', function($window) { 5 function somethingPrivate() { } 6 7 return function() { 8 somethingPrivate(); 9 $window.close(); 10 11 }; }
  • 12. Dependency Injection JavaScript with AngularJS 1 // dependency management and di configuration 2 angular.module('myModule', ['moduleOfOtherLibrary']) 3 // no scopes, services are singletons by definition 4 .service('usefulService', function(a) { 5 function somethingPrivate() { } 6 7 return function() { 8 somethingPrivate(); 9 a.close(); 10 11 }; }
  • 13. Dependency Injection JavaScript with AngularJS 1 // dependency management and di configuration 2 angular.module('myModule', ['moduleOfOtherLibrary']) 3 // no scopes, services are singletons by definition 4 .service('usefulService', ['$window', function(a) { 5 function somethingPrivate() { } 6 7 return function() { 8 somethingPrivate(); 9 a.close(); 10 11 }; }]
  • 14. Dependency Injection JavaScript with AngularJS 1 var service = function(a) { 2 return function() { 3 4 a.close(); } 5 } 6 service.$inject = ['$window']; 7 8 angular.module('myModule', ['moduleOfOtherLibrary']) 9 .service('usefulService', service);
  • 15. Dependency Injection Additional parameters and overridden DI values 1 // get the injector via static call 2 var $injector = angular.injector(); 3 // or via injection 4 function($injector) { } 1 var functionA = function(serviceA) { }; 2 $inject.invoke(functionA); 3 4 var functionB = function(serviceA, nonDIValue) { }; 5 var locals = { nonDIValue: 1 }; 6 $inject.invoke(functionB, locals);
  • 16. Directives extend HTML Tags, Attributes, CSS classes encapsulate DOM manipulations proceeded by AngularJS compiler
  • 17. Demo Blink on Steroids Speed (http://jsbin.com/ekevip/41/edit?live) New Tags with Directives (http://jsbin.com/onacoh/11/edit?live)
  • 18. Views & Routes Deep linking Partial Views / Templating 1 angular.module('route.something').config(function ($routeProvider) { 2 $routeProvider.when('/something/:id/', { 3 templateUrl : "route/something.tpl.html", 4 controller : 'SomethingCtrl' 5 }) 6 }); 1 angular.module('myApp').config(function ($routeProvider) { 2 $routeProvider.otherwise({ 3 redirectTo: '/home' 4 }); 1 <div class="header">...<&div> 2 <div class="content"> 3 <div ng-view></div> 4 </div> 5 <div class="footer">...<&div>
  • 19. Demo Small crud app (http://jsbin.com/exevex/14/edit?live) -> with own URL bar: local This Presentation
  • 20. Animations new in Version 1.2 easy to use plain CSS Animations and Transitions CSS classes for 'enter', 'move' and 'leave' custom JS functions possible directives must support ng-animate ng-repeat ng-view ng-include ng-show ng-hide
  • 23. Built-in Features Directives ng-click ng-class ng-show / ng-hide ng-include ng-view ng-pluralize ng-repeat ng-submit ... Filter currency date filter json limitTo lowercase number orderBy uppercase Services http location log q resource route timeout window ...
  • 24. Eco System (http://www.gruntjs.com) Bower (http://www.bower.io) Bootstrap (http://www.git-scm.com) Task Runner / Build System Dependency Management for 3rd party libs Front-End Framework Styling & Layout (http://www.git-scm.com) (http://www.nodejs.org) (http://www.git-scm.com) CSS Extension Language Version Control System Runtime for Dev Tools / Backend Environment
  • 25. Conclusion Clean separation of Frontend and Backend Features like DI, MVC and DataBinding in the browser Seamless integration with other frameworks Lets you use all the cool new Web / JS tools Easy to learn Documentation with a lot of runnable examples Large community and fast growing eco system powered and used by Google Try it!