SlideShare uma empresa Scribd logo
1 de 23
08.07.2014
The Next Big Thing?
JavaScript in Modern Web Architectures
Tom Hombergs
Common Web Architecture Styles
08.07.2014 The Next Big Thing?2
► Server-Side Web Frameworks
> JSF
> JSP
> Wicket
> GWT
> Struts
> …
► Portal Server
► CMS-Based Architecture
Server-Side Web Frameworks
08.07.2014 The Next Big Thing?3
Web Container
Servlet Container
Web Framework
EJB Container
…
http://...
Roundtrip for each
Change in the GUI!
Server Load!
Potentially Unresponsive
Portal Server
08.07.2014 The Next Big Thing?4
Portlet Container
http://...
Web Container
Portlet 1
Servlet Container
Web Framework
EJB Container
…
Portlet 2
Servlet Container
Web Framework
EJB Container
…
Portlet
Servlet Container
Web Framework
EJB Container
…
Yay! More Server Load!
CMS-Based Architecture
08.07.2014 The Next Big Thing?5
CMS-Server
Content
Application Server
Content
Web-Framework
Adapter
Editor
Export
End User
Do-It-Yourself-Framework!
Same Problems as with
Web-Frameworks
Revolution?
Abolish Server Side
Web Architectures
08.07.2014 The Next Big Thing?6
Alternative: JavaScript-Based Architecture
08.07.2014 The Next Big Thing?7
GUI logic where
it belongs
No JavaScript
abstraction
Which Styles are Practiced?
08.07.2014 The Next Big Thing?8
28%
2013
25 %
2011
20 %
2009
Portal-Based
CMS-Based
Server-Side Web
Framework
JavaScript-Based
18 %
2007
Diagrams show number of project descriptions in skill profiles at adesso AG containing one of the following keywords:
JSP, Spring MVC, Wicket, JSF, JavaScript, FirstSpirit, Portlet, Struts, GWT
Which Languages are en vogue?
08.07.2014 The Next Big Thing?9
0
50000
100000
150000
200000
250000
300000
JavaScript Ruby Java PHP Python
# of Github Repositories Created in 2013
http://adambard.com/blog/top-github-languages-for-2013-so-far/
Revolution?
08.07.2014 The Next Big Thing?10
► The era of Server-Side Web
Architectures is not quite over,
but we‘re getting there
► JavaScipt might rule some day
► How can we rule JavaScript?
How can we rule JavaScript?
08.07.2014 The Next Big Thing?11
AngularJS – Hello World
08.07.2014 The Next Big Thing?12
<!DOCTYPE html>
<html ng-app>
<head>
<meta charset="UTF-8"/>
<title>AngularJS Sandbox</title>
</head>
<body ng-init="name='AngularJS'">
<h1>Hello {{ name }}</h1>
<input type="text" ng-model="name"/>
<script src="lib/angular/angular.min.js"></script>
</body>
</html>
AngularJS – What it is about
08.07.2014 The Next Big Thing?13
An AngularJS Application
'use strict';
// Declare app level module which depends on filters, and services
angular.module('myApp', [
'ngRoute',
'myApp.filters',
'myApp.services',
'myApp.directives',
'myApp.controllers'
]).
config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/view1', {templateUrl:
'partials/partial1.html', controller: 'MyCtrl1'});
$routeProvider.when('/view2', {templateUrl:
'partials/partial2.html', controller: 'MyCtrl2'});
$routeProvider.otherwise({redirectTo: '/view1'});
}]);
08.07.2014 The Next Big Thing?14
Clean Code!
Declare an
Angular Module
Declare
Dependencies
Configure different
routes with a
Controller each
Inject the
RouteProvider
An AngularJS Layout Template
<!DOCTYPE html>
<html lang="en" ng-app="myApp">
<head>
…
</head>
<body>
…
<div ng-view></div>
…
<script src="bower_components/angular/angular.js"></script>
<script src="bower_components/angular-route/angular-
route.js"></script>
<script src="js/app.js"></script>
<script src="js/services.js"></script>
<script src="js/controllers.js"></script>
<script src="js/filters.js"></script>
<script src="js/directives.js"></script>
</body>
</html>
08.07.2014 The Next Big Thing?15
Bind the Angular
module to an
HTML element
Include Your
Angular modules
/ components
Display a
(Dynamically
Changing) View
An AngularJS Controller
var module = angular.module('myApp.controllers', []);
module.controller('MyCtrl1', ['$scope', function($scope) {
$scope.book = {
title : 'AngularJS',
subtitle : 'Eine praktische Einführung in das
Javascript-Framework'
};
}]);
08.07.2014 The Next Big Thing?16
Define the GUI
Model
Register the
Controller
An AngularJS View Template
<p>This is the partial for /view1.</p>
<h1>Book Details</h1>
<ul>
<li>Title: {{ book.title }}</li>
<li>Subtitle: {{ book.subtitle }}</li>
</ul>
08.07.2014 The Next Big Thing?17
Placeholder for
Scope Variable
An AngularJS Service
var module = angular.module('myApp.services', []);
module.service('version', function(){
// Public API
return {
getVersion: function(){
return '0.1';
}
};
});
module.constant('version', '0.1');
// other possible service declarations:
module.factory(...);
module.provider(...);
module.value(...);
08.07.2014 The Next Big Thing?18
Declare a Service
API
Declare a
Constant
Different Declaration Styles
for different use cases
An AngularJS Directive
angular.module('myApp.directives', []).
directive('appVersion', ['version',
function(version) {
return function(scope, element, attrs) {
element.text(version);
};
}]);
<div>
Current Version: v<span app-version></span>
</div>
08.07.2014 The Next Big Thing?19
Injection of
„version“ Service
Modify the content
of an HTML element
Apply directive to
<span> element
An AngularJS Display Filter
angular.module('myApp.filters', []).
filter('replaceVersion', ['version', function(version) {
return function(text) {
return String(text).replace(/%VERSION%/mg, version);
};
}]);
<p>
Result of 'interpolate' filter:
{{ 'Current version is v%VERSION%.' | replaceVersion }}
</p>
08.07.2014 The Next Big Thing?20
Register filter
named
„replaceVersion“
Inject „version“
Service
Apply filter
AngularJS – „End To End“ Testing
describe("Book details view test", function () {
beforeEach(function () {
browser().navigateTo("/");
});
it("should show the correct book details"), function(){
browser().navigateTo("#/books/123");
expect(element(".book-title").html()).toBe("AngularJS");
};
});
08.07.2014 The Next Big Thing?21
Precondition for all
test cases
Navigate to a View
Assert correct state
AngularJS – Conclusion
► Complex Eco-System
> Jasmine
> Protractor
> Bower
> NodeJS
> Karma
> …
► Hard to structure the building blocks within an Angular App for Beginners (see
http://jan.varwig.org/archive/angularjs-views-vs-directives)
► Easy to integrate with other frameworks (server-side and client-side)
08.07.2014 The Next Big Thing?22
AngularJS - Links
► Tutorial: https://docs.angularjs.org/tutorial/
► Project Template: https://github.com/angular/angular-seed
► API Documentation: https://docs.angularjs.org/api
08.07.2014 The Next Big Thing?23

Mais conteúdo relacionado

Mais procurados

Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework Sakthi Bro
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSAldo Pizzagalli
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSArmin Vieweg
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Nir Kaufman
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introductionTania Gonzales
 
Angular Best Practices v2
Angular Best Practices v2Angular Best Practices v2
Angular Best Practices v2Henry Tao
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introductionLuigi De Russis
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXJWORKS powered by Ordina
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS introdizabl
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedStéphane Bégaudeau
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Angular js best practice
Angular js best practiceAngular js best practice
Angular js best practiceMatteo Scandolo
 
Building a Startup Stack with AngularJS
Building a Startup Stack with AngularJSBuilding a Startup Stack with AngularJS
Building a Startup Stack with AngularJSFITC
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS BasicsRavi Mone
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014Matt Raible
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 

Mais procurados (20)

Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Angularjs - lazy loading techniques
Angularjs - lazy loading techniques Angularjs - lazy loading techniques
Angularjs - lazy loading techniques
 
AngularJS introduction
AngularJS introductionAngularJS introduction
AngularJS introduction
 
Angular Best Practices v2
Angular Best Practices v2Angular Best Practices v2
Angular Best Practices v2
 
AngularJS: an introduction
AngularJS: an introductionAngularJS: an introduction
AngularJS: an introduction
 
AngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UXAngularJS Basics and Best Practices - CC FE &UX
AngularJS Basics and Best Practices - CC FE &UX
 
AngularJS intro
AngularJS introAngularJS intro
AngularJS intro
 
AngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get startedAngularJS 101 - Everything you need to know to get started
AngularJS 101 - Everything you need to know to get started
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Angular js best practice
Angular js best practiceAngular js best practice
Angular js best practice
 
Building a Startup Stack with AngularJS
Building a Startup Stack with AngularJSBuilding a Startup Stack with AngularJS
Building a Startup Stack with AngularJS
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014The Art of AngularJS - DeRailed 2014
The Art of AngularJS - DeRailed 2014
 
AngularJS Best Practices
AngularJS Best PracticesAngularJS Best Practices
AngularJS Best Practices
 
The AngularJS way
The AngularJS wayThe AngularJS way
The AngularJS way
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 

Destaque

Destaque (6)

Accessible Web Forms
Accessible Web FormsAccessible Web Forms
Accessible Web Forms
 
AngularJS filters
AngularJS filtersAngularJS filters
AngularJS filters
 
AngularJS
AngularJS AngularJS
AngularJS
 
Getting Single Page Application Security Right
Getting Single Page Application Security RightGetting Single Page Application Security Right
Getting Single Page Application Security Right
 
Single page application
Single page applicationSingle page application
Single page application
 
React JS and why it's awesome
React JS and why it's awesomeReact JS and why it's awesome
React JS and why it's awesome
 

Semelhante a AngularJS - The Next Big Thing?

Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightPeter Gfader
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSPhilipp Burgmer
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSPhilipp Burgmer
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework Yakov Fain
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Matt Raible
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet backdoor
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docsAbhi166803
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyFabio Akita
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)Hatem Hamad
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)Steve Souders
 
JavaScript Perfomance
JavaScript PerfomanceJavaScript Perfomance
JavaScript PerfomanceAnatol Alizar
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Matt Raible
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsVinícius de Moraes
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTimothy Oxley
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSmurtazahaveliwala
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassSpike Brehm
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Matt Raible
 

Semelhante a AngularJS - The Next Big Thing? (20)

Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Introduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and SilverlightIntroduction to JQuery, ASP.NET MVC and Silverlight
Introduction to JQuery, ASP.NET MVC and Silverlight
 
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJSKarlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
Karlsruher Entwicklertag 2013 - Webanwendungen mit AngularJS
 
WJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJSWJAX 2012 - Web Apps With AngularJS
WJAX 2012 - Web Apps With AngularJS
 
Overview of the AngularJS framework
Overview of the AngularJS framework Overview of the AngularJS framework
Overview of the AngularJS framework
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
Programming Server side with Sevlet
 Programming Server side with Sevlet  Programming Server side with Sevlet
Programming Server side with Sevlet
 
243329387 angular-docs
243329387 angular-docs243329387 angular-docs
243329387 angular-docs
 
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com RubyConsegi 2010 - Dicas de Desenvolvimento Web com Ruby
Consegi 2010 - Dicas de Desenvolvimento Web com Ruby
 
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.net MVC Introduction Wikilogia (nov 2014)
 
JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)JavaScript Performance (at SFJS)
JavaScript Performance (at SFJS)
 
JavaScript Perfomance
JavaScript PerfomanceJavaScript Perfomance
JavaScript Perfomance
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
Course CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.jsCourse CodeSchool - Shaping up with Angular.js
Course CodeSchool - Shaping up with Angular.js
 
Testable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascriptTestable client side_mvc_apps_in_javascript
Testable client side_mvc_apps_in_javascript
 
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJSAngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
AngularJS training - Day 1 - Basics: Why, What and basic features of AngularJS
 
Backbone.js
Backbone.jsBackbone.js
Backbone.js
 
Isomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master ClassIsomorphic JavaScript: #DevBeat Master Class
Isomorphic JavaScript: #DevBeat Master Class
 
Jquery
JqueryJquery
Jquery
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 

Último

Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 

Último (20)

Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

AngularJS - The Next Big Thing?

  • 1. 08.07.2014 The Next Big Thing? JavaScript in Modern Web Architectures Tom Hombergs
  • 2. Common Web Architecture Styles 08.07.2014 The Next Big Thing?2 ► Server-Side Web Frameworks > JSF > JSP > Wicket > GWT > Struts > … ► Portal Server ► CMS-Based Architecture
  • 3. Server-Side Web Frameworks 08.07.2014 The Next Big Thing?3 Web Container Servlet Container Web Framework EJB Container … http://... Roundtrip for each Change in the GUI! Server Load! Potentially Unresponsive
  • 4. Portal Server 08.07.2014 The Next Big Thing?4 Portlet Container http://... Web Container Portlet 1 Servlet Container Web Framework EJB Container … Portlet 2 Servlet Container Web Framework EJB Container … Portlet Servlet Container Web Framework EJB Container … Yay! More Server Load!
  • 5. CMS-Based Architecture 08.07.2014 The Next Big Thing?5 CMS-Server Content Application Server Content Web-Framework Adapter Editor Export End User Do-It-Yourself-Framework! Same Problems as with Web-Frameworks
  • 6. Revolution? Abolish Server Side Web Architectures 08.07.2014 The Next Big Thing?6
  • 7. Alternative: JavaScript-Based Architecture 08.07.2014 The Next Big Thing?7 GUI logic where it belongs No JavaScript abstraction
  • 8. Which Styles are Practiced? 08.07.2014 The Next Big Thing?8 28% 2013 25 % 2011 20 % 2009 Portal-Based CMS-Based Server-Side Web Framework JavaScript-Based 18 % 2007 Diagrams show number of project descriptions in skill profiles at adesso AG containing one of the following keywords: JSP, Spring MVC, Wicket, JSF, JavaScript, FirstSpirit, Portlet, Struts, GWT
  • 9. Which Languages are en vogue? 08.07.2014 The Next Big Thing?9 0 50000 100000 150000 200000 250000 300000 JavaScript Ruby Java PHP Python # of Github Repositories Created in 2013 http://adambard.com/blog/top-github-languages-for-2013-so-far/
  • 10. Revolution? 08.07.2014 The Next Big Thing?10 ► The era of Server-Side Web Architectures is not quite over, but we‘re getting there ► JavaScipt might rule some day ► How can we rule JavaScript?
  • 11. How can we rule JavaScript? 08.07.2014 The Next Big Thing?11
  • 12. AngularJS – Hello World 08.07.2014 The Next Big Thing?12 <!DOCTYPE html> <html ng-app> <head> <meta charset="UTF-8"/> <title>AngularJS Sandbox</title> </head> <body ng-init="name='AngularJS'"> <h1>Hello {{ name }}</h1> <input type="text" ng-model="name"/> <script src="lib/angular/angular.min.js"></script> </body> </html>
  • 13. AngularJS – What it is about 08.07.2014 The Next Big Thing?13
  • 14. An AngularJS Application 'use strict'; // Declare app level module which depends on filters, and services angular.module('myApp', [ 'ngRoute', 'myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers' ]). config(['$routeProvider', function($routeProvider) { $routeProvider.when('/view1', {templateUrl: 'partials/partial1.html', controller: 'MyCtrl1'}); $routeProvider.when('/view2', {templateUrl: 'partials/partial2.html', controller: 'MyCtrl2'}); $routeProvider.otherwise({redirectTo: '/view1'}); }]); 08.07.2014 The Next Big Thing?14 Clean Code! Declare an Angular Module Declare Dependencies Configure different routes with a Controller each Inject the RouteProvider
  • 15. An AngularJS Layout Template <!DOCTYPE html> <html lang="en" ng-app="myApp"> <head> … </head> <body> … <div ng-view></div> … <script src="bower_components/angular/angular.js"></script> <script src="bower_components/angular-route/angular- route.js"></script> <script src="js/app.js"></script> <script src="js/services.js"></script> <script src="js/controllers.js"></script> <script src="js/filters.js"></script> <script src="js/directives.js"></script> </body> </html> 08.07.2014 The Next Big Thing?15 Bind the Angular module to an HTML element Include Your Angular modules / components Display a (Dynamically Changing) View
  • 16. An AngularJS Controller var module = angular.module('myApp.controllers', []); module.controller('MyCtrl1', ['$scope', function($scope) { $scope.book = { title : 'AngularJS', subtitle : 'Eine praktische Einführung in das Javascript-Framework' }; }]); 08.07.2014 The Next Big Thing?16 Define the GUI Model Register the Controller
  • 17. An AngularJS View Template <p>This is the partial for /view1.</p> <h1>Book Details</h1> <ul> <li>Title: {{ book.title }}</li> <li>Subtitle: {{ book.subtitle }}</li> </ul> 08.07.2014 The Next Big Thing?17 Placeholder for Scope Variable
  • 18. An AngularJS Service var module = angular.module('myApp.services', []); module.service('version', function(){ // Public API return { getVersion: function(){ return '0.1'; } }; }); module.constant('version', '0.1'); // other possible service declarations: module.factory(...); module.provider(...); module.value(...); 08.07.2014 The Next Big Thing?18 Declare a Service API Declare a Constant Different Declaration Styles for different use cases
  • 19. An AngularJS Directive angular.module('myApp.directives', []). directive('appVersion', ['version', function(version) { return function(scope, element, attrs) { element.text(version); }; }]); <div> Current Version: v<span app-version></span> </div> 08.07.2014 The Next Big Thing?19 Injection of „version“ Service Modify the content of an HTML element Apply directive to <span> element
  • 20. An AngularJS Display Filter angular.module('myApp.filters', []). filter('replaceVersion', ['version', function(version) { return function(text) { return String(text).replace(/%VERSION%/mg, version); }; }]); <p> Result of 'interpolate' filter: {{ 'Current version is v%VERSION%.' | replaceVersion }} </p> 08.07.2014 The Next Big Thing?20 Register filter named „replaceVersion“ Inject „version“ Service Apply filter
  • 21. AngularJS – „End To End“ Testing describe("Book details view test", function () { beforeEach(function () { browser().navigateTo("/"); }); it("should show the correct book details"), function(){ browser().navigateTo("#/books/123"); expect(element(".book-title").html()).toBe("AngularJS"); }; }); 08.07.2014 The Next Big Thing?21 Precondition for all test cases Navigate to a View Assert correct state
  • 22. AngularJS – Conclusion ► Complex Eco-System > Jasmine > Protractor > Bower > NodeJS > Karma > … ► Hard to structure the building blocks within an Angular App for Beginners (see http://jan.varwig.org/archive/angularjs-views-vs-directives) ► Easy to integrate with other frameworks (server-side and client-side) 08.07.2014 The Next Big Thing?22
  • 23. AngularJS - Links ► Tutorial: https://docs.angularjs.org/tutorial/ ► Project Template: https://github.com/angular/angular-seed ► API Documentation: https://docs.angularjs.org/api 08.07.2014 The Next Big Thing?23

Notas do Editor

  1. What is the alternative?
  2. A module can contain other Angular components like filters, services, directives and controllers A module can declare dependencies to other modules
  3. Multiple ng-views? No, but you can nest views with the UI-Router module But you should not nest views but use directives instead
  4. Controller should access services to get GUI Model values
  5. Service can access a backend
  6. You can do much more with directive Create your own GUI widgets as HTML-elements! Or use the many provided directives like form, input and the like
  7. You can do much more with directive Create your own GUI widgets as HTML-elements! Or use the many provided directives like form, input and the like
  8. Services etc. can be mocked for tests Also unit tests can be made for Angular components without HTML views Live Demo of angular-seed project template
  9. Easy integration: Angular can be attached to any part of the DOM and leave the rest of the DOM in peace Angular JS Training at adesso is on the way