SlideShare a Scribd company logo
Web Applications with
About Me
Philipp Burgmer
Senior Software Engineer / Consultant
WeigleWilczek GmbH
burgmer@w11k.com
Focus: Frontend, Web Technologies
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
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
...
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)
WJAX 2012 - Web Apps With AngularJS

More Related Content

PDF
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
PPTX
Angular js for beginners
PPTX
Angular js tutorial slides
PPT
CTTDNUG ASP.NET MVC
PPTX
Angular js presentation at Datacom
PPTX
Introduction to single page application with angular js
PPTX
AngularJS intro
PDF
AngularJS 101 - Everything you need to know to get started
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Angular js for beginners
Angular js tutorial slides
CTTDNUG ASP.NET MVC
Angular js presentation at Datacom
Introduction to single page application with angular js
AngularJS intro
AngularJS 101 - Everything you need to know to get started

What's hot (20)

PPTX
Valentine with AngularJS
PPTX
Angular js
PPTX
Single Page Applications in SharePoint with Angular
PPTX
Introduction to Angular JS
PPTX
Angular js 1.3 basic tutorial
PDF
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
PDF
AngularJS Best Practices
PPTX
Angular js
PPTX
Step by Step - AngularJS
PPTX
AngularJS - The Next Big Thing?
PDF
AngularJS introduction
PPTX
AngularJS Beginners Workshop
ODP
Design Patterns in ZK: Java MVVM as Model-View-Binder
PPTX
The AngularJS way
PPTX
AngularJS in 60ish Minutes
PPT
ASP .net MVC
PPTX
Introduction to Angular js 2.0
PDF
Angular js best practice
PPTX
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Valentine with AngularJS
Angular js
Single Page Applications in SharePoint with Angular
Introduction to Angular JS
Angular js 1.3 basic tutorial
Sencha TouchのMVCについて 〜スケールするアプリケーションを求めて〜
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS Best Practices
Angular js
Step by Step - AngularJS
AngularJS - The Next Big Thing?
AngularJS introduction
AngularJS Beginners Workshop
Design Patterns in ZK: Java MVVM as Model-View-Binder
The AngularJS way
AngularJS in 60ish Minutes
ASP .net MVC
Introduction to Angular js 2.0
Angular js best practice
Will your code blend? : Toronto Code Camp 2010 : Barry Gervin
Ad

Viewers also liked (9)

ODP
Leichtgewichtige Webwenwendungen mit dem MEAN-Stack
PDF
Web Applications with AngularJS
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
Web Applications with AngularJS
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 WJAX 2012 - Web Apps With AngularJS (20)

PPTX
Training On Angular Js
PPTX
Mean stack Magics
PDF
Ionic framework one day training
PPTX
AngularJs Workshop SDP December 28th 2014
PPTX
Jsf presentation
PPTX
angularJs Workshop
PPTX
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
PPTX
The Basics Angular JS
PPTX
Intoduction to Angularjs
PPTX
AngularJS = Browser applications on steroids
PDF
AngularJS: Overview & Key Features
PPTX
AngularJS with TypeScript and Windows Azure Mobile Services
PDF
A gently introduction to AngularJS
PPT
introduction to Angularjs basics
PPTX
Improve your Web Development using Visual Studio 2010
PDF
AngularJS Basics
PDF
Introduction to AngularJS
PPT
Building Single Page Application (SPA) with Symfony2 and AngularJS
PPTX
MVC & backbone.js
Training On Angular Js
Mean stack Magics
Ionic framework one day training
AngularJs Workshop SDP December 28th 2014
Jsf presentation
angularJs Workshop
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
The Basics Angular JS
Intoduction to Angularjs
AngularJS = Browser applications on steroids
AngularJS: Overview & Key Features
AngularJS with TypeScript and Windows Azure Mobile Services
A gently introduction to AngularJS
introduction to Angularjs basics
Improve your Web Development using Visual Studio 2010
AngularJS Basics
Introduction to AngularJS
Building Single Page Application (SPA) with Symfony2 and AngularJS
MVC & backbone.js

Recently uploaded (20)

PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Understanding_Digital_Forensics_Presentation.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
20250228 LYD VKU AI Blended-Learning.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Network Security Unit 5.pdf for BCA BBA.
Empathic Computing: Creating Shared Understanding
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

WJAX 2012 - Web Apps With AngularJS

  • 2. About Me Philipp Burgmer Senior Software Engineer / Consultant WeigleWilczek GmbH burgmer@w11k.com Focus: Frontend, Web Technologies
  • 3. 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
  • 4. 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
  • 5. 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
  • 6. Core Concepts Model View Controller Pattern Two Way Data-Binding Dependency Injection Modules Services Directives Filter Separation of Concerns Testable Code
  • 7. 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)
  • 8. 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 } }
  • 9. 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);
  • 10. 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 }; }
  • 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 }; }
  • 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', ['$window', function(a) { 5 function somethingPrivate() { } 6 7 return function() { 8 somethingPrivate(); 9 a.close(); 10 11 }; }]
  • 13. 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);
  • 14. 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);
  • 15. Directives extend HTML Tags, Attributes, CSS classes encapsulate DOM manipulations proceeded by AngularJS compiler
  • 16. Demo Blink on Steroids Speed (http://jsbin.com/ekevip/41/edit?live) New Tags with Directives (http://jsbin.com/onacoh/11/edit?live)
  • 17. 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>
  • 18. Demo Small crud app (http://jsbin.com/exevex/14/edit?live) -> with own URL bar: local This Presentation
  • 20. 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 ...
  • 21. 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!