SlideShare a Scribd company logo
1 of 25
AngularJS for Enteprise Application
Vũ Văn Quyết @StoxPlus Corporation
QuyetVV@gmail.com
27-10 .Net Open Group
Contents
• I. AngularJS Overview
• II. AngularJS for Enterprise Application
Story in client side
• Simple story with todo –app
• Show active tasks
• Mark completed/undo
• Show remain tasks
• Filter active/completed
• How to do with ajax and jQuery?
• $(‘.list-todo .list’).append(htmlTodoList)
• $(‘.list-todo .remainCount’).text(count)
• $(‘.list-todo .task’).css(‘completed’);
• What happend if you need show todo-list for two
people on same screen?
• What happened if design said that they want have a
class named as list-item because they already have that
class
Philosophy
• “AngularJS lets you extend HTML vocabulary for your application”
• ”AngularJS is built around the philosophy that declarative code is better
than imperative code while building UIs and wiring different
components of web application together.”
Key Features
• Templates
• Data-binding : Synchronize data between view and model
• $apply and $digest
• Scope: a glue between controller and view.
• Controller: bound to a particular scope.
• Directives:
• AngularJS has built-in directives (ngBind, ngModel...)
• Component
Key Features
• Routing − It is concept of switching views.
• Deep Linking
• Dependency Injection
• Services
• Built-in services for example $http to make a XMLHttpRequests.
• Custom service or factory
• Filters
MVC in AngularJS Application
• MVC in MVC
• Form include user
controls in Window
Component detail
• Bindings
• Controller
• Template
Component-based Applications
Write app with your vocabulary!
Angular cons
• Page rendering heavily in browser
• not a great fit for use cases with more than 2,000 bindings
• One-time bindings with ::fieldname
• SEO
• Google crawlers support JS from 2014
• Prerender.io
• Difficulty in learning: New concepts such as scope, binding,
factory, provider…
II. Enterprise Angular Application
• Angular 1 or Angular 2
• Style Guide
• Application Structure
• UI Components
• Component communication
• Router
• Localization
• Validation
• Cache, Storage
• Unit test and E2E testing
• Versioning
• Minification & Bundle
Angular 1.x or Angular 2
• Third party
• TypeScript
• Typing
• Your team
• Your project
- Performance
- Mobile support
- Component based required
- MVC
- Less concepts: Scope,
controller,…
Style Guide
• Google: https://google.github.io/styleguide/angularjs-google-
style.html
• John Papa: https://github.com/johnpapa/angular-
styleguide/blob/master/a1/README.md
• Minko Gechev: https://mgechev.github.io/angularjs-style-guide/
• …
• Chose one and keep your team follow
Application Structure
 Folders-by-Module
 Folders-by-Feature Structure
UI Component
• AngularUI
• Bootstrap UI
• Angular Material
• Commercial component
• Telerik, Infragistic…
• Open source libs
• Ng-modules, github
• Stable, rate, commit date
Component communication
• Binding properties
 Oneway or two-way
 Static value
 Watch property
• Broadcast/Emit Event
 On scope or rootScope
 Destroy event
• Shared Service/Data
 Via get/set pattern
 Control shared data via methods
Router
• Default
o Simple
o Light weight
• ui-router
• Multi level
• Multi partial layout
• Resolve
• Parameter
Localization
• Translate by directive
• <ANY translate="TRANSLATION_ID"></ANY>
• Translate service
• Use filter
• <ANY>{{'TRANSLATION_ID' | translate}}</ANY>
• Loader
• Config translation
• staticFilesLoader
• urlLoader
• Partial loader
• Custom Loader
$translate('HEADLINE').then(function (headline) {
vm.headline = headline;
})
Validation
• Built-in validation
• Custom validation
• Modify build-in validation
Cache & Storage
• Cache
• Expire Policy: By time, callback
• Mode: Memory, Session or Storage
• Put it in http request
• Storage
• Local Storage
• IndexDB
• Cookie
Testing
 Karma (Unit tests)
 Jasmine
 Mocha, Chai, and Sinon
 Spec files, config karma files
 Inject, mockup
• Protractor (E2E tests)
Minification, versioning and bundle
• Minification
• Dependence Injection
• Global JS var
• Bundle
• Gulp-watch
• Gulp-concat
• Gulp-order
• Gulp-print
• Handle debug/production test/release mode
• Config in each mode for your
• Versioning
• Gulp-rev, gulp-rev-replace
• Write your own version service manager
Demo code
• component
• Filter list
• Authentication
• Router
• Validation
• Storage
Angular js for enteprise application
Angular js for enteprise application

More Related Content

What's hot

OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSJonathan Meiss
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVCSirwan Afifi
 
Developing ASP.NET MVC Applications Quicker With Kendo UI
Developing ASP.NET MVC Applications Quicker With Kendo UIDeveloping ASP.NET MVC Applications Quicker With Kendo UI
Developing ASP.NET MVC Applications Quicker With Kendo UILohith Goudagere Nagaraj
 
Introduction to AngularJS with the Microsoft Graph
Introduction to AngularJS with the Microsoft GraphIntroduction to AngularJS with the Microsoft Graph
Introduction to AngularJS with the Microsoft GraphSPC Adriatics
 
Learn Developing REST API in Node.js using LoopBack Framework
Learn Developing REST API  in Node.js using LoopBack FrameworkLearn Developing REST API  in Node.js using LoopBack Framework
Learn Developing REST API in Node.js using LoopBack FrameworkMarudi Subakti
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS FrameworkRaveendra R
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Max Klymyshyn
 
Angular JS, steal the idea
Angular JS, steal the ideaAngular JS, steal the idea
Angular JS, steal the ideaScott Lee
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at DatacomDavid Xi Peng Yang
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSM R Rony
 
Modules in AngularJs
Modules in AngularJsModules in AngularJs
Modules in AngularJsK Arunkumar
 
I Love API's 2015 Conference Overview
I Love API's 2015 Conference OverviewI Love API's 2015 Conference Overview
I Love API's 2015 Conference OverviewDennis Khan
 
Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizLohith Goudagere Nagaraj
 

What's hot (20)

Angularjs
AngularjsAngularjs
Angularjs
 
OCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJSOCTO BOF - How to build Netvibes with AngularJS
OCTO BOF - How to build Netvibes with AngularJS
 
MVVM & Validation with Kendo UI
MVVM & Validation with Kendo UIMVVM & Validation with Kendo UI
MVVM & Validation with Kendo UI
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
RIA / SPA with ASP.NET
RIA / SPA with ASP.NETRIA / SPA with ASP.NET
RIA / SPA with ASP.NET
 
The RAW stack
The RAW stackThe RAW stack
The RAW stack
 
Developing ASP.NET MVC Applications Quicker With Kendo UI
Developing ASP.NET MVC Applications Quicker With Kendo UIDeveloping ASP.NET MVC Applications Quicker With Kendo UI
Developing ASP.NET MVC Applications Quicker With Kendo UI
 
Angularjs PPT
Angularjs PPTAngularjs PPT
Angularjs PPT
 
Introduction to AngularJS with the Microsoft Graph
Introduction to AngularJS with the Microsoft GraphIntroduction to AngularJS with the Microsoft Graph
Introduction to AngularJS with the Microsoft Graph
 
Learn Developing REST API in Node.js using LoopBack Framework
Learn Developing REST API  in Node.js using LoopBack FrameworkLearn Developing REST API  in Node.js using LoopBack Framework
Learn Developing REST API in Node.js using LoopBack Framework
 
Introduction to AngularJS Framework
Introduction to AngularJS FrameworkIntroduction to AngularJS Framework
Introduction to AngularJS Framework
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013Angular.js - JS Camp UKraine 2013
Angular.js - JS Camp UKraine 2013
 
Angular JS, steal the idea
Angular JS, steal the ideaAngular JS, steal the idea
Angular JS, steal the idea
 
Angular js presentation at Datacom
Angular js presentation at DatacomAngular js presentation at Datacom
Angular js presentation at Datacom
 
Single Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJSSingle Page Application (SPA) using AngularJS
Single Page Application (SPA) using AngularJS
 
Modules in AngularJs
Modules in AngularJsModules in AngularJs
Modules in AngularJs
 
AngularJS
AngularJSAngularJS
AngularJS
 
I Love API's 2015 Conference Overview
I Love API's 2015 Conference OverviewI Love API's 2015 Conference Overview
I Love API's 2015 Conference Overview
 
Easy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataVizEasy HTML5 Data Visualization with Kendo UI DataViz
Easy HTML5 Data Visualization with Kendo UI DataViz
 

Similar to Angular js for enteprise application

Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to conceptsAbhishek Sur
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - IntroductionSagar Acharya
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Ganesh Kondal
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and conceptsSuresh Patidar
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupGoutam Dey
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleAlexandre Marreiros
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - IntroductionSenthil Kumar
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29Nitin Bhojwani
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) PresentationRaghubir Singh
 
Integrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSIntegrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSTom Borger
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)Alex Ross
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day WorkshopShyam Seshadri
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Jeremy Likness
 
AngularJs Basic Concept
AngularJs Basic ConceptAngularJs Basic Concept
AngularJs Basic ConceptHari Haran
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryAlek Davis
 

Similar to Angular js for enteprise application (20)

Angular JS, A dive to concepts
Angular JS, A dive to conceptsAngular JS, A dive to concepts
Angular JS, A dive to concepts
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5Tech io spa_angularjs_20130814_v0.9.5
Tech io spa_angularjs_20130814_v0.9.5
 
Learning AngularJS - Complete coverage of AngularJS features and concepts
Learning AngularJS  - Complete coverage of AngularJS features and conceptsLearning AngularJS  - Complete coverage of AngularJS features and concepts
Learning AngularJS - Complete coverage of AngularJS features and concepts
 
Angularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetupAngularjs for kolkata drupal meetup
Angularjs for kolkata drupal meetup
 
ASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a coupleASP.NEt MVC and Angular What a couple
ASP.NEt MVC and Angular What a couple
 
Valentine with Angular js - Introduction
Valentine with Angular js - IntroductionValentine with Angular js - Introduction
Valentine with Angular js - Introduction
 
What's new in Angular 2?
What's new in Angular 2?What's new in Angular 2?
What's new in Angular 2?
 
Angular meetup 2 2019-08-29
Angular meetup 2   2019-08-29Angular meetup 2   2019-08-29
Angular meetup 2 2019-08-29
 
Angular js firebase-preso
Angular js firebase-presoAngular js firebase-preso
Angular js firebase-preso
 
AngularJs (1.x) Presentation
AngularJs (1.x) PresentationAngularJs (1.x) Presentation
AngularJs (1.x) Presentation
 
Integrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMSIntegrating AngularJS into the Campus CMS
Integrating AngularJS into the Campus CMS
 
AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)AngularJS in Production (CTO Forum)
AngularJS in Production (CTO Forum)
 
AngularJS One Day Workshop
AngularJS One Day WorkshopAngularJS One Day Workshop
AngularJS One Day Workshop
 
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
Wintellect - Devscovery - Enterprise JavaScript Development 2 of 2
 
AngularJs Basic Concept
AngularJs Basic ConceptAngularJs Basic Concept
AngularJs Basic Concept
 
Angularjs basic part01
Angularjs basic part01Angularjs basic part01
Angularjs basic part01
 
Angular js for Beginnners
Angular js for BeginnnersAngular js for Beginnners
Angular js for Beginnners
 
Building intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQueryBuilding intranet applications with ASP.NET AJAX and jQuery
Building intranet applications with ASP.NET AJAX and jQuery
 

Recently uploaded

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Recently uploaded (20)

Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Angular js for enteprise application

  • 1. AngularJS for Enteprise Application Vũ Văn Quyết @StoxPlus Corporation QuyetVV@gmail.com 27-10 .Net Open Group
  • 2. Contents • I. AngularJS Overview • II. AngularJS for Enterprise Application
  • 3. Story in client side • Simple story with todo –app • Show active tasks • Mark completed/undo • Show remain tasks • Filter active/completed • How to do with ajax and jQuery? • $(‘.list-todo .list’).append(htmlTodoList) • $(‘.list-todo .remainCount’).text(count) • $(‘.list-todo .task’).css(‘completed’); • What happend if you need show todo-list for two people on same screen? • What happened if design said that they want have a class named as list-item because they already have that class
  • 4. Philosophy • “AngularJS lets you extend HTML vocabulary for your application” • ”AngularJS is built around the philosophy that declarative code is better than imperative code while building UIs and wiring different components of web application together.”
  • 5. Key Features • Templates • Data-binding : Synchronize data between view and model • $apply and $digest • Scope: a glue between controller and view. • Controller: bound to a particular scope. • Directives: • AngularJS has built-in directives (ngBind, ngModel...) • Component
  • 6. Key Features • Routing − It is concept of switching views. • Deep Linking • Dependency Injection • Services • Built-in services for example $http to make a XMLHttpRequests. • Custom service or factory • Filters
  • 7. MVC in AngularJS Application • MVC in MVC • Form include user controls in Window
  • 8. Component detail • Bindings • Controller • Template
  • 10. Angular cons • Page rendering heavily in browser • not a great fit for use cases with more than 2,000 bindings • One-time bindings with ::fieldname • SEO • Google crawlers support JS from 2014 • Prerender.io • Difficulty in learning: New concepts such as scope, binding, factory, provider…
  • 11. II. Enterprise Angular Application • Angular 1 or Angular 2 • Style Guide • Application Structure • UI Components • Component communication • Router • Localization • Validation • Cache, Storage • Unit test and E2E testing • Versioning • Minification & Bundle
  • 12. Angular 1.x or Angular 2 • Third party • TypeScript • Typing • Your team • Your project - Performance - Mobile support - Component based required - MVC - Less concepts: Scope, controller,…
  • 13. Style Guide • Google: https://google.github.io/styleguide/angularjs-google- style.html • John Papa: https://github.com/johnpapa/angular- styleguide/blob/master/a1/README.md • Minko Gechev: https://mgechev.github.io/angularjs-style-guide/ • … • Chose one and keep your team follow
  • 14. Application Structure  Folders-by-Module  Folders-by-Feature Structure
  • 15. UI Component • AngularUI • Bootstrap UI • Angular Material • Commercial component • Telerik, Infragistic… • Open source libs • Ng-modules, github • Stable, rate, commit date
  • 16. Component communication • Binding properties  Oneway or two-way  Static value  Watch property • Broadcast/Emit Event  On scope or rootScope  Destroy event • Shared Service/Data  Via get/set pattern  Control shared data via methods
  • 17. Router • Default o Simple o Light weight • ui-router • Multi level • Multi partial layout • Resolve • Parameter
  • 18. Localization • Translate by directive • <ANY translate="TRANSLATION_ID"></ANY> • Translate service • Use filter • <ANY>{{'TRANSLATION_ID' | translate}}</ANY> • Loader • Config translation • staticFilesLoader • urlLoader • Partial loader • Custom Loader $translate('HEADLINE').then(function (headline) { vm.headline = headline; })
  • 19. Validation • Built-in validation • Custom validation • Modify build-in validation
  • 20. Cache & Storage • Cache • Expire Policy: By time, callback • Mode: Memory, Session or Storage • Put it in http request • Storage • Local Storage • IndexDB • Cookie
  • 21. Testing  Karma (Unit tests)  Jasmine  Mocha, Chai, and Sinon  Spec files, config karma files  Inject, mockup • Protractor (E2E tests)
  • 22. Minification, versioning and bundle • Minification • Dependence Injection • Global JS var • Bundle • Gulp-watch • Gulp-concat • Gulp-order • Gulp-print • Handle debug/production test/release mode • Config in each mode for your • Versioning • Gulp-rev, gulp-rev-replace • Write your own version service manager
  • 23. Demo code • component • Filter list • Authentication • Router • Validation • Storage

Editor's Notes

  1. What happend if you need show todo-list for two people on same screen? What happened if design said that they want have a class named as list-item because they already have that class
  2. Imperative programming A programming language that requires programming discipline such as C/C++, Java, COBOL, FORTRAN, Perl and JavaScript. Programmers writing in such languages must develop a proper order of actions in order to solve the problem, based on a knowledge of data processing and programming. Declarative programming A computer language that does not require writing traditional programming logic; Users concentrate on defining the input and output rather than the program steps required in a procedural programming language such as C++ or Java. Declarative programming examples are CSS, HTML, XML, XSLT, RegX.
  3. Directive: markers on DOM elements (such as elements, attributes, css, and more). Component: a special kind of directive that uses a simpler configuration which is suitable for a component-based application structure.
  4. Deep Linking − Deep linking allows you to encode the state of application in the URL so that it can be bookmarked. The application can then be restored from the URL to the same state. Model View Whatever − MVC is a design pattern for dividing an application into different parts (called Model, View and Controller), each with distinct responsibilities. AngularJS does not implement MVC in the traditional sense, but rather something closer to MVVM (Model-View-ViewModel). The Angular JS team refers it humorously as Model View Whatever. Dependency Injection: AngularJS has a built-in dependency injection subsystem that helps the developer by making the application easier to develop, understand, and test.
  5. Model is where the application’s data objects are stored Controller is the decision maker and the glue between the model and view. View: what's presented to the users and how users interact with the app.
  6. Advantages of Components: simpler configuration than plain directives promote sane defaults and best practices optimized for component-based architecture writing component directives will make it easier to upgrade to Angular 2 When not to use Components: for directives that need to perform actions in compile and pre-link functions, because they aren't available when you need advanced directive definition options like priority, terminal, multi-element when you want a directive that is triggered by an attribute or CSS class, rather than an element https://docs.angularjs.org/guide/component
  7. Angular provides basic implementation for most common HTML5 input types: (text, number, url, email, date, radio, checkbox), as well as some directives for validation (required, pattern, minlength, maxlength, min, max). https://plnkr.co/edit/zNF3ZopeZHiel1TOpHpY?p=info
  8. file:///D:/Code/angular-slide-example/todoapp/index.html http://localhost:6070/#/login Compilation, $Q, interceptor