
рд╣реИрд▓реЛ, рдореЗрд░рд╛ рдирд╛рдо рджрд┐рдорд┐рддреНрд░реА рдХрд╛рд░реНрд▓реЛрд╡реНрд╕реНрдХреА рд╣реИ рдФрд░ рдореИрдВ ... рд╣рд╡рд╛ рдХреЗ рдЦрд┐рд▓рд╛рдл рдереВрдХрдирд╛ рдкрд╕рдВрдж рдХрд░рддрд╛ рд╣реВрдВред рдЕрдкрдиреЗ рдЖрдк рдХреЛ рдкреЛрдВрдЫреЗрдВ рдФрд░ рдлрд┐рд░ рд╕реЗ рдереВрдХреЗрдВред рдореБрдЭреЗ рдРрд╕рд╛ рд╢реМрдХ рд╣реИред рдФрд░ рдЬреЛ рдХреБрдЫ рднреА рдореИрдВ рдмрдирд╛рддрд╛ рд╣реВрдВ, рдореИрдВ рд░реБрдЭрд╛рдиреЛрдВ рдХреЛ рджреЗрдЦреЗ рдмрд┐рдирд╛, рд╕рдорд╕реНрдпрд╛рдУрдВ рдХреЛ рд╡реНрдпрд╡рд╕реНрдерд┐рдд рд░реВрдк рд╕реЗ рд╣рд▓ рдХрд░рдиреЗ рдХреА рдХреЛрд╢рд┐рд╢ рдХрд░рддрд╛ рд╣реВрдВ, рдФрд░ рд╣рдореЗрд╢рд╛ рдХреА рддрд░рд╣ рдирд╣реАрдВред рдЕрдХреНрд╕рд░ рдРрд╕рд╛ рд╣реЛрддрд╛ рд╣реИ рдХрд┐ рдореБрдЦреНрдп рдХрдард┐рдирд╛рдИ рд╕рдорд╛рдзрд╛рди рдХреЗ рд╕рд╛рде рдЖрдиреЗ рдХреЗ рд▓рд┐рдП рднреА рдирд╣реАрдВ рд╣реЛрддреА рд╣реИ, рд▓реЗрдХрд┐рди рджреВрд╕рд░реЛрдВ рдХреЛ рдпрд╣ рд╕рдордЭрд╛рдиреЗ рдХреЗ рд▓рд┐рдП рдХрд┐ рд╕рдорд╕реНрдпрд╛ рднреА рдореМрдЬреВрдж рд╣реИред
, , , 4 , , , . , , . . , , . .

2015
- AngularJS 1.4 тАФ , .
- Angular 2 alpha тАФ JS, - -.
- React 0.14 тАФ .
- Polymer 1.2.3 тАФ 1 .
- VueJS 1.0 тАФ .
. , 4 (iOS, Android, Windows, WEB). , () , тАФ , . , , .
:
- . , .
- . , , .
- . , .
- . .
? . 10 , , :

. , , . , . тАФ . , , . , , . , тАФ . , 13 24. , , , React.
, , SAPUI5. , , ExtJS.
, , , . . , . .

, , . . , . : , . тАФ .
тАФ , , ", - ". тАФ .
, , . тАФ , . тАФ , .
. . , , : , , , , , , . , . , , . .
" , ", . $mol. ( ), ( , ).
. - , . " ?". , , .

2016. MIT , . , "$mol: reactive micromodular ui-framework" , .
, , . - "", . - , .
. . , . , , , , . тАФ . 20 , , "". , , . , , . . , , , . view.tree , . , . , . - тАФ .
, $mol, . , . . . IT , . , , . . . . тАФ , , , , .

2017. . , , . 2 , . , , 2 , , . . . .
$mol . , , . $mol , . , :

, . . . ( 33 ? : ). - . : css-variables, - ( , ), mobx-angular Suspense API ( , 2 )тАж , open source, . , $mol . $mol , .
. , , , $mol , тАФ , , , , , , , . , NgRx ( redux ). , mobx , .
, , . , . $mol. , тАФ $mol_graph. $mol-, , .

, $mol :

, . , . . тАФ , , .
Vue. . , MobX, , . MobX , . , , .
$mol . , $mol, $mol_mem.

тАФ , .
Suspense API . Vue - . MobX, , .
$mol . promises, callbacks, async/await. , . , , , . , , :
@ $mol_mem
user_name() : string {
return $mol_fetch.json( '/profile' ).name
}

, 4 тАФ , TS . TS тАФ Angular 2 тАФ TS, JS. , JS Angular тАФ . Vue 3 TS. React JS, MicroSoft JSX TypeScript. , , , , . API JS , .
$mol TS, . . TS, . , . .
, , . , view.tree TS, , , .

. : , , , , - тАж . . , , , . , WebPack.
$mol , тАФ , . , . . , " , , , ". , "lerna" . MAM , $mol . MAM .
MAM , , , , .
, MAM , , . parcel, html . , . , . тАФ .
MAM . . . eject CLI . , . . , .

PHP JS . . тАФ , , , 10. , , , , , . . tree shaking, , , . Angular Vue , . React .
, - , , , . MAM , , . , . тАФ . , , $mol , . , , .
$mol , , - . тАФ Svelte, . , , .

, , . , . . . IoC Dependency Injection. DI , , .
$mol IoC Ambient Context тАФ , . , :
namespace $ {
export function $my_hello(
this : $mol_ambient_context
) {
this.console.log( this.$my_name )
}
export let $my_name = 'Anonymous'
}
namespace $ {
$mol_ambient({}).$my_hello() // logs 'Anonymous'
let custom_context = $mol_ambient({
$my_name : 'Jin' ,
})
custom_context.$my_hello() // logs 'Jin'
}

React 16 тАФ Error Boundaries. , , , . , . 15 . тАФ , .
. -. . : - - , . , $mol ? тАФ . .
, тАФ , . Promise. , - , . "" .

4 , $mol . . , , $mol .

, . . , . , , , html- .
, , : html- , html-. $mol html- тАФ , , . $mol React Native, html-, View, Text . html- -. TSX TS:
function MyApp(
{
leftColor = 'red',
rightColor = 'blue',
message = 'Hello World!',
} : {
leftColor? : string,
rightColor? : string,
message? : string,
}
) {
return (
<View>
<View style={{ backgroundColor: leftColor }} />
<View style={{ backgroundColor: rightColor }} />
<Text>{message}</Text>
</View>
)
}
function MyApp(
{
leftColor = 'red',
rightColor = 'blue',
message = 'Hello World!',
} : {
leftColor? : string,
rightColor? : string,
message? : string,
}
) {
return (
View({
kids: [
View({ style: { backgroundColor: leftColor } }),
View({ style: { backgroundColor: rightColor } }),
Text({ kids: [ message ] }),
]
})
)
}
: , , , HTML . HTML , TS, $mol тАФ , DSL, view.tree:
$my_app $mol_view
sub /
<= Left $mol_view
style *
backgroundColor <= left_color \blue
<= Right $mol_view
style *
backgroundColor <= right_color \red
<= Message $mol_view
sub /
<= message \Hello World!

. . . тАФ API. .
, тАФ , . , , , . , "", .
- , . . " " (, React), , . , . , - .
, - , . . , . "" (, Vue), .
$mol . , . , . , , . , view.tree
. , . , , :
$my_app2 $my_app
left_color \brown
right_color \green
sub /
<= Left
<= Right
<= Bid $mol_view
sub /
<= bid @ \Smile if you see it!
<= Message
. - тАФ , .

TimeSlicing тАФ , , . , "". .
Catberry, , . , тАФ . , , , , DOM , , , (16).
$mol - тАФ . API, . , $mol , 4 , .
, тАФ , . , .
: , . .

. , . , . , . тАФ (pull). , , . $mol.
, "". Vue, $mol_atom, . . : . " ". , , , .
$mol " ". , . . , , .
. , html- , , . , .
, $mol_list, , .
тАФ , , , DOM . . . , " " "overflow-anchor", , " ".
, . . , . - , . , .
CSS-in-TS

, CSS . css- - , . . . , - .
css-in-js, css . TS, CSS: , . - , TSX VDOM , .
$mol тАФ , . $mol_style , json . .
, :
$my_app $mol_view
sub /
<= Sidebar $my_page
$my_page $mol_view
sub /
<= Head $mol_view
<= Body $mol_view
, , :
$mol_style_define( $my_app , {
Sidebar: {
Body: {
$mol_button: {
color: $mol_theme.text,
},
},
},
} )
CSS:
[my_app_sidebar_body] [mol_button] {
display: none;
}
BEM-like my_app_sidebar_body
, . -, .
$mol CSS, $mol_style. .
тАФ . , .
. 2 : https://notes.hyoo.ru

.
, .
PWA .

.
50 .
.
.

: https://showcase.hyoo.ru/
!

? , . , :
- .
- .
- 2 .
- .
- .
- .
- .
- , , .
- .
- .
- .
- .
- .
- , .
- , .
- ( ).
- .
- .
2 . - , . , . , , , . - . .

ui-kit. , , , . . 2:
. , , тАФ , , .
. ui-kit 20 , ui-kit 15 , . тАФ .
. . , , .
-IT-. IT- тАФ тАФ . , . - , BEM-. , , , : . - . , - . FaceBook .
, . , . , , , .

, -: https://digital.alfabank.ru/
, , , . .
8 - 5 , . , 190 90 . : 300 , . "Slow 3G" 12 .

, HTML . SSR+hydrate, , , HTML state. , DOM. , , .
, 8 . , , , . - , тАФ .
, . , CSS, тАФ . 3 . CSS, 5 .
, - , , , , . , HTML - 2 , SSR html, , .
2 . тАФ SPA 600 , 16 .

, ? , 50 . тАФ mol.js.org 45 , 110 .
, . , . https://alfabank.ru/
400 . 17 . , , , 8 , 6 .
, . ? тАФ amount. , . , :
<div class="amount">
<h3 class="heading heading_size_m heading_margins_m heading_theme_alfa-on-white">
<span>
<span class="amount__major">1тАЙ233</span>
<div class="amount__minor-container">
<span class="amount__separator">,</span>
<span class="amount__minor">43</span>
</div>
<span class="amount__currency">тАЙтВ╜</span>
</span>
</h3>
</div>
8 . . . , . . , .
:
<h3 class="amount">
<span class="amount__major">1тАЙ233</span>
<span class="amount__minor">,43тАЙтВ╜</span>
</h3>
, , , ? , amount button:
const FeeButton = ( { id , submit , size = 'm' , theme = 'dark' , className = '' } ) => (
<Button
onClick={ submit }
className={ "fee-button__submit " + className }
data-test-id={ id }
size={ size }
theme={ theme }
>
<Label
className="fee-button__prefix"
size={ size }
theme={ theme }
>
{ l10n( 'fee-button__prefix' ) }
</Label>
<Amount
className="fee-button__fee"
data-test-id={ id + '/fee' }
amount={ fee }
size={ size }
theme={ theme }
/>
</Button>
)
, ? ? ? , :
<Button id="pay-submit" onClick={ submit }>
<Label id="pay-prefix">{ payPrefix }</Label>
<Amount id="pay-fee" amount={ fee }/>
</Button>
, , - :
<= Pay_submit $alfa_button
click?event <=> submit?event null
sub /
<= Pay_prefix $alfa_label
text <= pay_prefix @ \Pay
<= Fee $alfa_amount
amount <= fee $alfa_currency
, jQuery - . , , . . , .
" ", :
, , .

$mol . . , . , , . . .
, $mol . , (, , JSX тАФ push , pull, $mol).
, , . , $mol . . , .
тАФ - , , , . , . $mol. . . - . , , .
. $mol. - .
. , . , , , . . :
- // $mol. - . тАФ .
- - . . , . $mol .
- . , , , , .
- $mol .
- , $mol . . , $mol , . .

$mol тАФ $mol. тАФ $mol. тАФ $mol. , - .
. , , , . , . , , , , .
. . . . , . , . - , . , . , . .
, . , , , . , " ". . , $mol. - , , , , .
, , , . , , , , . тАФ $mol . . . . , .
, , тАФ . , , , 10% . , . тАФ .