SlideShare a Scribd company logo
HIGH TECH
HIGH CODE QUALITY
HIGH PERFORMANCE
HIGH SCALABILITY
HIGH MAINTAINABILITY
Single
Page
App
SE XY A N G U L A R STA CK
C U R I O U S C A S E S
by @ c u o n g t r u o n g
Hello!
I am Cuong Truong
FEArchitect/Scrum Master at #ITCGroup
I am here because I love to share knowledge
You can contact me via
cuongtruong.info@gmail.com
#Frontend 2018
Angular
State Container
ES6+
TypeScript
Linter
UI kit
Unit Test
Webpack
VS Code
Takeaway + Demo
Agenda
#Framework for building SPA
Uni-directional data flow
Across all platforms
Server-side rendering
Modern, Smaller & Faster
#Cheat Sheet
ANGULAR
Do events
Repaint the
DOMDo layout
Recalculate
the CSS
Every time DOM changes, browser needs to
TAKESTIME
TRADITIONAL WAY
Modifies DOM when MODEL changed
ANGULAR WAY
1
USE “1-WAY”
Unidirectional Data
Flow
BATCH
Update bindings,
execute all changes
COMPUTE
minimal set of changes
cause DOM to be updated
RUN
change detection on
the Model
2
34
BETTER PERFORMANCE
No controllers
No models
No directives
No global eventlisteners
Everything is <Component/>
#Thinking in Angular
component
template
</>
metadata
property
binding
event
binding
component component
module
component component
directive
metadata
- component
- structural
- attribute
injector
service
#Anguar vsReact#Benchmarks
THINKING IN
ANGULAR
- App
- HomePage
- Header
- SearchBar
- EmployeeList
- EmployeeListItem
- EmployeePage
- Header
- EmployeeDetails
A solution for concurrent
data modification by
multiple actors
A client containerfor
temporary UI state.e.g.
A client cache for
avoiding excessive HTTP
requests
If you need
HOW TOMANAGE
FRONTEND
LOGIC or
wizard, shopping cart, … APPLICATION
STATE EFFECTIVELY?
@ngrx/store
application state manager
for Angular applications
UNIDIRECTIONAL DATAFLOW
IMMUTABLE
Redux + Observable
Component
StoreReducers
Actions
Effects
NEW
STATE
SELECTOR
S
ACTIONS
AP
I
Services
DISPATCH
@ngrx/store
vs
services
=> {}
Let + Const
const myObject = {propA, propB}
Arrow function, Default
const myFunction = (arg = ‘value’)
Class
export class MyClass {constructor(){}}
Module
import {MyClass} from ‘my/path’
Template String
const tps = `Template string with ${…}`
#ES6 #Mozilla #ES-Next
ECMAScript 6+
Destructuring
= myObjectconst {propA, propB}
Rest, Spread …
Promise
myPromise.then().then().catch()
Async/Await
const myFunction = async () => {await…}
Decorator
@myDecorator
class MyClass {…}
Static type checker for JS
strong/statically typed advantages
Strong tool for LARGE app
covers 100% of code
catches incorrect assumptions
e.g. numbers represented as strings
Provides advanced
autocompletion / intellisense
navigation
safe refactoring
TypeScript
#WhyTypeScript
My Recommendation
project does not live for long
project is really simple
people enter or leave your team frequently
there is a chance you will need to refactor the thing
system is very important or even crucial for the success
of company
discovers problems
with TypeScript code
without executing it
Coding conventions
Readability
Maintainability
Functionality errors
TSLint/ESLint
#TSLint #ESLint
FAKER
Some other mocking/
#faking data/api calls
ISTANBUL
JS #code coverage tool
SINON
Test #spies, stubs &
mocks for JavaScript
Front-end Unit Test
KARMA
Spectacular #test
runner for JavaScript
MOCHA
Feature-rich JavaScript
#test framework
CHAI
BBD/TDD
#assertion library
#Protractor
Ng Bootstrap Material UI
Build yourself ?!
#BEM #SMACSS #MVCSS
Bundles your
Scripts
Styles
Assets
Images
WEBPACK
Configuration object
Resolves dependencies
Hot reloading
Tree-shaking
Cache busting/hashing system
WEBPACK
ENTRY POINTS
single entry
multiple page
app
separate app & vendor
MORE INFORMATION
WEBPACK
LOADERS
style | css | sass| scss| …
babel | typescript | flow |
… html | template | pug |
… url | file | raw | …
module | bundle-loader
MORE INFORMATION
WEBPACK
PLUGINS
CopyWebpackPlugin
CompressionWebpackPlugin
HtmlWebpackPlugin
CircularDependencyPlugin
CommonsChunk
MORE INFORMATION
folder structure?
FOLDER
STRUCTURE
take away
Pros
One framework to rule them all
Full control/easy to manage coding flow
Building reusable code/components
Testable
Readable
Maintainable
Performance
Developer experience/community
Server-side rendering => SEO
Size is smaller after each release
Cons
Learning curve
Need to keepconventions/boilerplate
Need to care aboutperformance
All in One framework for small app
My Recommendation
People are a part of solution
Keep conventions / commitments
Strategies for managing dependencies
Take care about architecture and configurations
Write small & pure functions as much as possible
Write meaningful unit test as much as possible
Don’t USE if you don’t NEED or UNDERSTAND it
References
#DemoSourceCode
#JSCodingStandards
#AngularStyleguide
#Nx - MicroArchitecture
#Redux
#ReduxDevTools
#Entities
#TypeScript #Cheatsheet
#SASS
#BEM & SMACSS #MVCSS
#Babel
#ESLint #TSLint
#Karma #Mocha #Chai #Sinon
#Webpack
#javascripting
Q&A
0.99365 = 0.02552
0.999365 = 0.69407
1365 =
1.001365 = 1.44025
1.002365 = 2.07357
1.01365 = 37.7834
1.02365 = 1377.40
@CuongTruong
cuongtruong.official@gmail.com

More Related Content

PPTX
Windows 8
PPTX
What’s new in Visual Studio 2012 & .NET 4.5
PPTX
Windows Store Apps: Tips & Tricks
PPTX
Visual Studio: The best tool for web developers.
PPT
MSDN Live: Windows Presentation Foundations Line of Business Apps
PPTX
Modern JavaScript Talk
PPTX
Visual Studio Productivity Tools
PPTX
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp
Windows 8
What’s new in Visual Studio 2012 & .NET 4.5
Windows Store Apps: Tips & Tricks
Visual Studio: The best tool for web developers.
MSDN Live: Windows Presentation Foundations Line of Business Apps
Modern JavaScript Talk
Visual Studio Productivity Tools
Doing Modern Web, aka JavaScript and HTML5 in the Enterprise NYC Code Camp

What's hot (20)

PDF
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
PPTX
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
PPTX
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
PDF
Xamarin: The Future of App Development
PPTX
Build 2017 - B8110 - Modernize WinForms and WPF apps with maximum code reuse,...
PPTX
Migration from AngularJS to Angular
PDF
.NET Everywhere and for Everyone
PPTX
Ivy renderer
PPTX
A Developer Day 2014 - Durban
PDF
End to-end native iOS, Android and Windows apps wtih Xamarin
PDF
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
PDF
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
PDF
PyCon PL 2014 executable api
PPTX
SONY BBS - React Native
PDF
Cross Platform Mobile Development
PPTX
PDF
How To be a Backend developer
PDF
Tutorial: Develop Mobile Applications with AngularJS
PPTX
Cross platform mobile development with xamarin and office 365
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
SoftServe - "ASP.NET MVC як наступний крок у розвитку технології розробки Web...
Dev evening - MonoTouch, MonoDroid, Mvvm MvvmCross and databinding
Xamarin: The Future of App Development
Build 2017 - B8110 - Modernize WinForms and WPF apps with maximum code reuse,...
Migration from AngularJS to Angular
.NET Everywhere and for Everyone
Ivy renderer
A Developer Day 2014 - Durban
End to-end native iOS, Android and Windows apps wtih Xamarin
Anton Sakharov: The risks you take when develop cross-platform apps using HT...
Xamarin Dev Days - Introduction to Xamarin.Forms, Insights, Test Cloud
PyCon PL 2014 executable api
SONY BBS - React Native
Cross Platform Mobile Development
How To be a Backend developer
Tutorial: Develop Mobile Applications with AngularJS
Cross platform mobile development with xamarin and office 365
Ad

Similar to B4UConference_Sexy Angular Stack (20)

PDF
Sexy React Stack
PDF
Dot NET Solution Architect Roadmap By Scholarhat PDF
PDF
resume
PPTX
Serverless Single Page Apps with React and Redux at ItCamp 2017
PDF
Javaland 2014 / GWT architectures and lessons learned
PDF
Tales of modernizing trello's web stack
PPTX
ChakraCore - JSConf Last Call
PPTX
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
PDF
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
PPTX
Old code doesn't stink - Detroit
PPTX
Single Page Applications – Know The Ecosystem system
PDF
The building blocks of the next web
PDF
The building blocks of the next web, from Customer Journey to UI Components. ...
PPTX
An Introduction to Web Components
PPTX
Signal R 2015
PPTX
Domain Modeling & Full-Stack Web Development F#
PDF
Modern Web Applications
PDF
Vue3: nuove funzionalità, differenze e come migrare
PPTX
Normalizing x pages web development
PDF
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
Sexy React Stack
Dot NET Solution Architect Roadmap By Scholarhat PDF
resume
Serverless Single Page Apps with React and Redux at ItCamp 2017
Javaland 2014 / GWT architectures and lessons learned
Tales of modernizing trello's web stack
ChakraCore - JSConf Last Call
Challenges of angular in production (Tasos Bekos) - GreeceJS #17
Azure tales: a real world CQRS and ES Deep Dive - Andrea Saltarello
Old code doesn't stink - Detroit
Single Page Applications – Know The Ecosystem system
The building blocks of the next web
The building blocks of the next web, from Customer Journey to UI Components. ...
An Introduction to Web Components
Signal R 2015
Domain Modeling & Full-Stack Web Development F#
Modern Web Applications
Vue3: nuove funzionalità, differenze e come migrare
Normalizing x pages web development
Spring Boot & Spring Cloud on PAS- Nate Schutta (1/2)
Ad

More from Hoa Le (20)

PDF
Chương 9_Bộ phần mềm EC
PDF
Chương 8_Bảo mật và an ninh mạng
PDF
Chương 7_Thanh toán trực tuyến_Phần 2
PDF
Chương 7_Thanh toán trực tuyến_Phần 1
PDF
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
PDF
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
PDF
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
PDF
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
PDF
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
PDF
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
PDF
Chương 8 Phân tích CSDL kinh doanh với SQL
PDF
Chương 6 CSDL Marketing
PDF
Chương 5 Chiến lược trong kinh doanh
PDF
Chương 4. Chuẩn hóa cơ sở dữ liệu
PDF
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
PDF
Chương 2. Các khái niệm trong CSDL
PPTX
B4UConference_machine learning_deeplearning
PPTX
B4uConference_ethereum
PPTX
B4UConference_Design Big Data System
PPTX
B4UCconference_Building a CI/CD pipeline with effortless steps
Chương 9_Bộ phần mềm EC
Chương 8_Bảo mật và an ninh mạng
Chương 7_Thanh toán trực tuyến_Phần 2
Chương 7_Thanh toán trực tuyến_Phần 1
Chương 6_Mô hình tiếp thị trực tuyến_Phần 1_ThS Lê Thị Bích Hoà
Chương 5_Nội dung mô hình kinh doanh C2C và hệ thống đấu giá C2C_ThS Lê Thị B...
Chương 4_Nội dung mô hình kinh doanh B2C(Business To Customer)_ThS Lê Thị Bíc...
Chương 3_Nội dung mô hình kinh doanh B2B (Business To Business )_ThS Lê Thị B...
ChChương 2_Thiết kế website thương mại điện tử_ThS Lê Thị Bích Hoà
Chương 1_Tổng quan về thương mại điện tử và Website thương mại điện tử_ThS Lê...
Chương 8 Phân tích CSDL kinh doanh với SQL
Chương 6 CSDL Marketing
Chương 5 Chiến lược trong kinh doanh
Chương 4. Chuẩn hóa cơ sở dữ liệu
Chương 3 Ngôn ngữ truy vấn có cấu trúc (SQL)
Chương 2. Các khái niệm trong CSDL
B4UConference_machine learning_deeplearning
B4uConference_ethereum
B4UConference_Design Big Data System
B4UCconference_Building a CI/CD pipeline with effortless steps

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
1. Introduction to Computer Programming.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Teaching material agriculture food technology
SOPHOS-XG Firewall Administrator PPT.pptx
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
Encapsulation_ Review paper, used for researhc scholars
Accuracy of neural networks in brain wave diagnosis of schizophrenia
20250228 LYD VKU AI Blended-Learning.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
1. Introduction to Computer Programming.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
MYSQL Presentation for SQL database connectivity
Building Integrated photovoltaic BIPV_UPV.pdf
Network Security Unit 5.pdf for BCA BBA.
Assigned Numbers - 2025 - Bluetooth® Document
Diabetes mellitus diagnosis method based random forest with bat algorithm
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

B4UConference_Sexy Angular Stack