This document discusses scalable application architecture. It covers topics like dynamic requirements, using a scalable communication layer with various package formats, handling multiple state mutation sources, building scalable teams, and lazy loading. It provides examples of component architecture using Angular, services, state management with ngrx/redux, immutability with ImmutableJS, and asynchronous logic with RxJS. The goal is to build modular, extensible applications that can handle complex requirements through separation of concerns and well-designed architecture.
21. abstraction |əbˈstrakʃ(ə)n|
noun [ mass noun ]
…
4 the process of considering something
independently of its associations or attributes: the
question cannot be considered in abstraction from
the historical context in which it was raised.
97. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
signup(data)
signup(data)
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
98. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
signup(data)
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
99. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
100. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
101. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
102. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
103. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
104. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
105. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
signup(data)
106. Async services
Business facade
Business logicCommunication logic
Immutable app state
Component tree
root cmp
sign-up form
user
UserModel
User Action
Creator
signup(data)
RESTful Async
Service
process(action)
userReducer
register()
RESTful
CommandBuilder
build(action)
Restful
Command
Restful Gateway
invoke()
send()
creates()
uses
as user$
uses user$
Stream
Dependency
Action (manipulation/method call)
User registration
user.email = email
user.name = name
signup(data)
107. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
108. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
109. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
110. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
111. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
112. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events
113. Properties…
• Predictable state management
• Testable (easy to mock services thanks to DI)
• Not coupled to any remote service
• Not coupled to any message format
• Model can use different services based on context
• Easy management of async events