Модель компонентов существует уже несколько лет, однако только за последний год она действительно обрела силу, пожалуй, благодаря React.
Компоненты играют ключевую роль в Angular 2.0, однако использовать их уже можно и нужно сейчас в существующем коде.
В этой лекции мы разберем по косточкам все супер-силы, которые есть у Angular Components и возможности, которые открываются с их использованием на основе реального приложения. После этого, Вам вряд ли захочется возвращаться в обычный мир Angular.
5. Quick exercise
Category #1
Who is writing in Angular
1.x?
Category #2
Who is writing in Angular 2? Who is writing in React?
Category #3
5
6. You will learn today
Category #1
Who is writing in Angular
1.x?
Category #2
Who is writing in Angular 2? Who is writing in React?
Category #3
6
● Current problems
● Components architecture
● Components are essentials
for Angular 2
● Components architecture
● Missing components test
kit
● Current problems
● Components architecture
● Cleaner code
● Components in Angular 1.x
● Components test kit
● You know that components
are great
● Learn to test components
● Missing components test
kit
8. A bit about myself
What are the problems?
How can we solve them with components?
Can they make our code better?
How Angular Components solve them?
You Are Here
Agenda
8
10. - Pearl Buck
“ “
10
If you want to
understand today,
You have to
search yesterday.
11. It’s all history
Jan, 2016Aug, 2013May,
2013
Oct, 2011Feb, 2011Oct, 2010
Components
Model
Web
Components
Presentation
Angular
Directives
React
Angular
Components
Ember
Components
11
45. Tests’ types
Test Type Speed Amount Check Coupling
Unit
(Karma)
Fast Many Logic Isolated
Fast Many Logic + UI Some
Integration
(Protractor)
Slow Few UI
Very
Coupled
45
46. Tests’ types
Test Type Speed Amount Check Coupling
Unit
(Karma)
Fast Many Logic Isolated
Component
(Karma)
Fast Many Logic + UI Some
Integration
(Protractor)
Slow Few UI
Very
Coupled
46
53. This is where you are going to present your final words.
This slide is not meant to have a lot of text.
Problems / Solutions
53
Maintenance
Scaling
Testing
Clear Input/Output
Components tree
Component Test Kit
54. This is where you are going to present your final words.
This slide is not meant to have a lot of text.Exciting news!
We are hiring in Kiev!
http://bolshchikov.net
Sergey Bolshchikov
github.com/bolshchikov@bolshchikovsergeyb@wix.com
54
55. This is where you are going to present your final words.
This slide is not meant to have a lot of text.Thank You!
Any Questions?
http://bolshchikov.net
Sergey Bolshchikov
github.com/bolshchikov@bolshchikovsergeyb@wix.com
55