Тёмный

Stuart Sierra - Components Just Enough Structure 

ClojureTV
Подписаться 29 тыс.
Просмотров 33 тыс.
50% 1

Functional programming with immutable values is wonderful, but sooner or later every program has to deal with mutable, stateful, imperative tasks. A large program may need to manage dozens of stateful services: database connections, thread pools, network services, scheduled tasks, and caches. How do we do this in a functional programming model? All too often we fall back, almost by accident, into global mutable state, promiscuous sharing, and imperative spaghetti code.
To escape this quagmire, we need to recall some basic principles of both functional and object-oriented programming: referential transparency, immutable values, message-passing, encapsulation, and interface contracts. The Component pattern and its library implementation offer a minimal way to structure the stateful dependencies of a functional program.
This talk will cover the motivation for the Component pattern, its benefits and downsides, comparisons with other approaches, and how to use it in Clojure programs. This talk builds on the concepts in last year's "Clojure in the Large" but does not assume viewers have seen that talk first.

Наука

Опубликовано:

 

16 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@danschmidt5189
@danschmidt5189 8 лет назад
Interesting that this mirrors the evolution of DI in a typical OO program: start with globals; advance to the Service Locator (5:40 ish); end up at "real" dependency injection.
@Kah0ona
@Kah0ona 10 лет назад
Great talk about software architecture in Clojure. Very nice component pattern, very well presented. Cool.
@bhougland18
@bhougland18 4 года назад
Stuart is such a lucid speaker
@rmschindler144
@rmschindler144 2 года назад
Very cool!
@leontalbot
@leontalbot 10 лет назад
Great! Here are simple examples using the Component library : github.com/stuartsierra/component/blob/master/dev/examples.clj Are there any app/projet that uses this so far? I'd love to see more code to look at!
@aJanuary
@aJanuary 10 лет назад
Constructor/property injection and what he calls associative injection are talking about different things. Constructor and property injection are about how the dependencies are set on each object/component. 'Associative injection' is just talking about how you build up the container/injector. To get the dependencies onto the components, it's using constructor injection.
@akshatshah3224
@akshatshah3224 2 года назад
Stuart mentioned at ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-13cmHf_kt-Q.html that you cannot just start/stop part of a system. This is one of the applications for having systems inside systems? You can stop an internal system and parent system would still be in start state?
@_FFFFFF_
@_FFFFFF_ Месяц назад
Aka erlang supervisors... I think that thsi is correct.
Далее
John Hughes - Testing the Hard Stuff and Staying Sane
47:17
Zach Tellman - Always Be Composing
35:12
Просмотров 21 тыс.
NCT DOJAEJUNG 엔시티 도재정 'Perfume' MV
3:07
10 CHALLENGE ⚽️ CELINE vs MICHIEL vs BRAM
0:59
Просмотров 2,9 млн
Solving Problems the Clojure Way - Rafal Dittwald
1:02:26
Tim Ewald - Clojure: Programming with Hand Tools
58:39
Clojure in the Large  - Stuart Sierra
1:06:26
Просмотров 1,6 тыс.
Timothy Baldridge - Core.Async
39:46
Просмотров 29 тыс.
Wylsa Pro: опять блокировка YouTube?
17:49