SlideShare a Scribd company logo
Architecture decisions
in a large project
Who's speaking ?
• Elad Hirsch – Team Leader @ IDI
(Java , JavaScript , DevOps , Architecture)
• Guest lecture at TheEdge & Jenkins
Conferences
• A Programming Geek 
Technology stack
Project Bootstrap
Project Bootstrap
Project Bootstrap
Project Bootstrap
Its all about the people
+ =
divide et impera
Architecture Principles
How do we handle large scale JavaScript Application ?
Bower frontend artifacts
Library
• Share API
• Bower
Dependencies
Bootstrap
• Dev Bootstrap
• Karma Tests
• Watch &
Recompile
Deployable
• Application
Archive
• UI/E2E Tests
Project structure
Snapshot
Deployment
• For rapidly moving code where bug fixes and
enhancements are coming fast
• Reduce the amount of framework based
checkout and builds
• Less framework variation to maintain
Always Moving forward
Full Build
Private Bower
NPM Registry
Artifactory
Artifactory & NPM
• Code reuse –Separate concerns :
– UI Widget – framework team
– MD logic – applicative teams
• DOM representation :
– link / compile overhead
– Complex DOM structure /Huge DOM nesting
• Distinction between directive instances :
– Via controllers -> more $scopes
– Event-bus || $rootScopes -> complex / hard to track
Angular directives
ES6 Classes
Enable cleaner and more readable code.
Wizard
Engine
MD
Infra
if both the compile and link functions
are used, link should be the
return value of compile
Directives are Singletons
Get state via $scope
$scope
$scope
$scope
$scope
$scope
$scope
AngularJS - Architecture decisionsin a large project 
if both the compile and link functions
are used, link should be the
return value of compile
ES6 Register.js
Michael bromley
Enforce the use of a compile function
isn’t necessary in some cases
Decorate the compile
method
Easier Reusability
of Components
Separation of Concerns
Testing as a baseline
Easy mocking
Goals to achieve
AngularJS DI ?
Applications x Modules => Scalable enough ?
RequireJS and AMD
• Asynchronous Module loading
• Script tags -> Real module dependencies
• Modularizing / Protect module internals
• Compile code into single minified file
RequireJS plans for AngularJS
Inject static files
Angular $Injection
Angular Directive
Lifecycle
Angular Directive
configuration
Require angular module
Minification safe $inject
using the inline, construction way – messy !!
$inject annotation technique – still not good
Use ng-annotateRequireJS plugin
Require-inject.js
require $inject plugin
Register Class
Require angular module
ng-annotate plugin
Putting It All Together
• Define your Angular components as
ES6 Classes
• Configure RequireJS DI
• Use traceur-compiler to convert to
JavaScript-of-today compiler
• Register your class to module
Register -> type (module ,name ,class)
dependency
information
Usage by another
module
What is TypeScript ?
• Open Source
• Compiles to plain JavaScript on any browser
• Syntactic sugar for JavaScript.
• Syntax is a superset of (ES5) syntax
• Primary goal is to add strict typing to
the language (while aligning with ES6)
TypeScript & Angular 2
Error handling
AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisionsin a large project 
Expressions are forgiving
Type Attribute
Evaluation
Forgiving Control Flow
Statements
JavaScript evaluated
against the
global window
Throw
ReferenceError
TypeError
Supported
AngularJS Properties
Evaluated
against $scope
Encapsulate
the error
null/undefined
No support
add a Decorating $interpolate
AngularJS - Architecture decisionsin a large project 
Angular rendering
• Page Rendering is slower since browser
needs to do the extra work of DOM
• Compatibility with older browsers is hard
to accomplish
• Search Engines Optimization (SEO)
the biggest challenge
Angular rendering
• Page Rendering is slower since browser
needs to do the extra work of DOM
• Compatibility with older browsers is hard
to accomplish
• Search Engines Optimization (SEO)
the biggest challenge
Server rendering
Angular SEO
How crawler retrieve the page - http://localhost:5000/http://localhost:8081
AngularJS - Architecture decisionsin a large project 
A Hybrid Approach
change the business logic on the
fly without need to compile or
change java code
Java 8 Nashorn (JSR-223)
Import via webjar
Registers
dropbox zxcvbn globally
as it would in the browser
Run a password through
the globally zxcvbn function
Turn the return value
into a Java POJO
NodeJS on the JVM
Rule engine
Client
Rule Engine
Server
Rule Engine
UI Decisions
Kendo UI Mobiscroll
AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisionsin a large project 
Israeli accessibility policy
• Slow — Anything faster than 50 ms is
imperceptible to humans and thus can
be considered as "instant"
• Limited — You can't really show more
than about 2000 pieces of information to
a human on a single page
dirty-checking is inefficient ?
Humans are
Lazy loading experiment
Browser performance basic fact:
• User events / layout / rendering / painting
all happen in turns in a single thread
• When your code runs for too long,
user's interaction is blocked.
dirty checking
User event
• For Every scope.$$watchers->function return value check
against previous value
• This is called dirty checking and can be quite slow if there are
lots of objects to compare
AngularJS - Architecture decisionsin a large project 
The browser UI is frozen
Challenge : moving the digest cycle and
dirty checking into separate thread.
Web Workers
Use Cases
• Prefetching and/or caching data for later use
• Code syntax highlighting
• Real-time text formatting (Spell checker)
• Analyzing video or audio data
• Background I/O or polling of web-services
• Process large arrays or humungous
JSON responses
Spring & AngularJS
Spring Boot
Spring Security
AngularJS
Bootstrap
Bower
Metrics
Java 7 or Java 8
Maven or Gradle
Authentication Type:
- Cookie-based or OAuth2
Type of Database: SQL / NoSQL
Caching: EhCache or Hazelcast
Grunt or Gulp.js
Frameworks Project Options
Technology stack
Resources
• Angular design documents
• Serious angular SEO
• Improving Angular web app performance
example
• Inside AngularJS directives
Stay sharp - follow on twitter
Questions ?

More Related Content

PPTX
Step by Step - AngularJS
Infragistics
 
PDF
Frontend Application Architecture, Patterns, and Workflows
Treasure Data, Inc.
 
PDF
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
PDF
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
PPTX
Angular js tutorial slides
samhelman
 
PDF
Angularjs architecture
Michael He
 
PDF
AngularJS introduction
Tania Gonzales
 
PPTX
AngularJS Best Practices
Narek Mamikonyan
 
Step by Step - AngularJS
Infragistics
 
Frontend Application Architecture, Patterns, and Workflows
Treasure Data, Inc.
 
AngularJS 101 - Everything you need to know to get started
Stéphane Bégaudeau
 
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
Angular js tutorial slides
samhelman
 
Angularjs architecture
Michael He
 
AngularJS introduction
Tania Gonzales
 
AngularJS Best Practices
Narek Mamikonyan
 

What's hot (20)

PDF
AngularJS application architecture
Gabriele Falace
 
PPTX
Angular js
Manav Prasad
 
PDF
AngularJS with RequireJS
Johannes Weber
 
PDF
Introduction to AngularJS
Jussi Pohjolainen
 
PPTX
Angular JS - Introduction
Sagar Acharya
 
PPTX
Introduction to Angular js 2.0
Nagaraju Sangam
 
PPTX
AngularJS intro
dizabl
 
PPTX
AngularJS Beginners Workshop
Sathish VJ
 
PPTX
AngularJS One Day Workshop
Shyam Seshadri
 
PDF
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
PPTX
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
PPTX
Single Page Applications in SharePoint with Angular
Sparkhound Inc.
 
PPTX
Angular js for beginners
Munir Hoque
 
PDF
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
PPTX
Front end development with Angular JS
Bipin
 
PDF
Angular 2 overview
Jesse Warden
 
PPTX
The AngularJS way
Boyan Mihaylov
 
PDF
AngularJS best-practices
Henry Tao
 
PPTX
Introduction to Angularjs
Manish Shekhawat
 
PPTX
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
AngularJS application architecture
Gabriele Falace
 
Angular js
Manav Prasad
 
AngularJS with RequireJS
Johannes Weber
 
Introduction to AngularJS
Jussi Pohjolainen
 
Angular JS - Introduction
Sagar Acharya
 
Introduction to Angular js 2.0
Nagaraju Sangam
 
AngularJS intro
dizabl
 
AngularJS Beginners Workshop
Sathish VJ
 
AngularJS One Day Workshop
Shyam Seshadri
 
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
Single Page Applications with AngularJS 2.0
Sumanth Chinthagunta
 
Single Page Applications in SharePoint with Angular
Sparkhound Inc.
 
Angular js for beginners
Munir Hoque
 
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Front end development with Angular JS
Bipin
 
Angular 2 overview
Jesse Warden
 
The AngularJS way
Boyan Mihaylov
 
AngularJS best-practices
Henry Tao
 
Introduction to Angularjs
Manish Shekhawat
 
Angular js 1.3 basic tutorial
Al-Mutaz Bellah Salahat
 
Ad

Viewers also liked (20)

PPTX
AngularJS Architecture
Eyal Vardi
 
PDF
Securing your AngularJS Application
Philippe De Ryck
 
PPTX
Windows storemindcrcaker23rdmarch
Dhananjay Kumar
 
PDF
Basic powershell scripts
MOHD TAHIR
 
PDF
Backup and Restore SQL Server Databases in Microsoft Azure
Datavail
 
PDF
Front-End Architecture for Large Scale Apps - Gabriel Zigolis
Gabriel Gottgtroy Zigolis
 
PPTX
RESTEasy
Khushbu Joshi
 
DOCX
Salmon
ebanreb07
 
PDF
III - Better angularjs
WebF
 
PPTX
Building Cross Platform Mobile Apps
Shailendra Chauhan
 
PPTX
Building an End-to-End AngularJS Application
Dan Wahlin
 
PDF
Scalable Angular 2 Application Architecture
FDConf
 
PPTX
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
reneechemel
 
PPTX
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
PDF
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
Shailendra Chauhan
 
PDF
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
PDF
Voorhoede - Front-end architecture
Jasper Moelker
 
PPTX
Single Page Application (SPA) using AngularJS
M R Rony
 
PPTX
Angular 2 Architecture
Eyal Vardi
 
AngularJS Architecture
Eyal Vardi
 
Securing your AngularJS Application
Philippe De Ryck
 
Windows storemindcrcaker23rdmarch
Dhananjay Kumar
 
Basic powershell scripts
MOHD TAHIR
 
Backup and Restore SQL Server Databases in Microsoft Azure
Datavail
 
Front-End Architecture for Large Scale Apps - Gabriel Zigolis
Gabriel Gottgtroy Zigolis
 
RESTEasy
Khushbu Joshi
 
Salmon
ebanreb07
 
III - Better angularjs
WebF
 
Building Cross Platform Mobile Apps
Shailendra Chauhan
 
Building an End-to-End AngularJS Application
Dan Wahlin
 
Scalable Angular 2 Application Architecture
FDConf
 
REST Easy with AngularJS - ng-grid CRUD EXAMPLE
reneechemel
 
Web Applications Development with MEAN Stack
Shailendra Chauhan
 
ASP.NET MVC Interview Questions and Answers by Shailendra Chauhan
Shailendra Chauhan
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
Voorhoede - Front-end architecture
Jasper Moelker
 
Single Page Application (SPA) using AngularJS
M R Rony
 
Angular 2 Architecture
Eyal Vardi
 
Ad

Similar to AngularJS - Architecture decisions in a large project  (20)

PDF
Starting from scratch in 2017
Stefano Bonetta
 
KEY
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
PPTX
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
PDF
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
PPTX
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Jeremy Likness
 
KEY
20120306 dublin js
Richard Rodger
 
PDF
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Phil Leggetter
 
PPTX
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
PPTX
Internship softwaretraining@ijse
Jinadi Rashmika
 
PDF
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
PDF
Architecting for Hyper Growth and Great Engineering Culture
ifnu bima
 
PDF
Architecting for Huper Growth and Great Engineering Culture
SARCCOM
 
DOC
Bala Sr Java Developer
Java Dev
 
PPTX
NodeJS - Server Side JS
Ganesh Kondal
 
PDF
Creating Modular Test-Driven SPAs with Spring and AngularJS
Gunnar Hillert
 
PPTX
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
PDF
Play Framework: Intro & High-Level Overview
Josh Padnick
 
DOC
Resume_Venugopal
Venugopal Devarapalli
 
PPTX
What is Mean Stack Development ?
Balajihope
 
PDF
An introduction to Node.js
Kasey McCurdy
 
Starting from scratch in 2017
Stefano Bonetta
 
Single Page Applications - Desert Code Camp 2012
Adam Mokan
 
Tech io spa_angularjs_20130814_v0.9.5
Ganesh Kondal
 
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Jeremy Likness
 
20120306 dublin js
Richard Rodger
 
Using BladeRunnerJS to Build Front-End Apps that Scale - Fluent 2014
Phil Leggetter
 
mearn-stackjdksjdsfjdkofkdokodkojdj.pptx
aravym456
 
Internship softwaretraining@ijse
Jinadi Rashmika
 
Shift Remote: JS - Javascript Build Tools: Past & Beyond - Shedrack Akintayo
Shift Conference
 
Architecting for Hyper Growth and Great Engineering Culture
ifnu bima
 
Architecting for Huper Growth and Great Engineering Culture
SARCCOM
 
Bala Sr Java Developer
Java Dev
 
NodeJS - Server Side JS
Ganesh Kondal
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Gunnar Hillert
 
Node.js meetup at Palo Alto Networks Tel Aviv
Ron Perlmuter
 
Play Framework: Intro & High-Level Overview
Josh Padnick
 
Resume_Venugopal
Venugopal Devarapalli
 
What is Mean Stack Development ?
Balajihope
 
An introduction to Node.js
Kasey McCurdy
 

More from Elad Hirsch (11)

PDF
Data in the wild west with some DevOps to the rescue
Elad Hirsch
 
PPTX
Intro to kubernetes
Elad Hirsch
 
PDF
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
Elad Hirsch
 
PPTX
JaVers (Open Source) - Object auditing and diff framework
Elad Hirsch
 
PDF
So you want to write a cloud function
Elad Hirsch
 
PDF
Migrate AngularJS to Angular (v5)
Elad Hirsch
 
PDF
Refactoring to GO modules
Elad Hirsch
 
PDF
Cloud native - CI/CD
Elad Hirsch
 
PPTX
devjam2018 - angular 5 performance
Elad Hirsch
 
PPT
Jenkins 17 IL - JavaScript CI/CD
Elad Hirsch
 
PPTX
Jenkins 1
Elad Hirsch
 
Data in the wild west with some DevOps to the rescue
Elad Hirsch
 
Intro to kubernetes
Elad Hirsch
 
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
Elad Hirsch
 
JaVers (Open Source) - Object auditing and diff framework
Elad Hirsch
 
So you want to write a cloud function
Elad Hirsch
 
Migrate AngularJS to Angular (v5)
Elad Hirsch
 
Refactoring to GO modules
Elad Hirsch
 
Cloud native - CI/CD
Elad Hirsch
 
devjam2018 - angular 5 performance
Elad Hirsch
 
Jenkins 17 IL - JavaScript CI/CD
Elad Hirsch
 
Jenkins 1
Elad Hirsch
 

Recently uploaded (20)

PPTX
Explanation about Structures in C language.pptx
Veeral Rathod
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
DOCX
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PDF
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PDF
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
PDF
Become an Agentblazer Champion Challenge
Dele Amefo
 
PPTX
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
PPTX
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PDF
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Explanation about Structures in C language.pptx
Veeral Rathod
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Activate_Methodology_Summary presentatio
annapureddyn
 
The Future of Smart Factories Why Embedded Analytics Leads the Way
Varsha Nayak
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Multi-factor Authentication (MFA) requirement for Microsoft 365 Admin Center_...
Q-Advise
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Exploring AI Agents in Process Industries
amoreira6
 
The Role of Automation and AI in EHS Management for Data Centers.pdf
TECH EHS Solution
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Jenkins: An open-source automation server powering CI/CD Automation
SaikatBasu37
 
Become an Agentblazer Champion Challenge
Dele Amefo
 
Presentation of Computer CLASS 2 .pptx
darshilchaudhary558
 
Services offered by Dynamic Solutions in Pakistan
DaniyaalAdeemShibli1
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Wondershare Filmora 14.5.20.12999 Crack Full New Version 2025
gsgssg2211
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 

AngularJS - Architecture decisions in a large project