Тёмный
No video :(

LambdaConf 2015 - Clojure vs Design Patterns Ron Toland 

Confreaks
Подписаться 42 тыс.
Просмотров 5 тыс.
50% 1

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

 

29 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 6   
@shaydenmartin4848
@shaydenmartin4848 8 лет назад
3:55 Would it be more idiomatic to use a multimethod here?
@shreyas.kulkarni
@shreyas.kulkarni 7 лет назад
A clojure enthusiast here, with quite a bit of OO experience so far. I find the section about template method to make no sense at all. Having parallel implementations of all intended operations (get-account, save-account) for all possible backends (db, datomic, http-server), and scattering them around creates the very problem of unmaintenable spaghetti code that the OO mechanisms try to address in the first place. What if someone supplies mismatching methods e.g. get-account-from-db and then save-account-to-http-server? what if they need some internal state to determine how to call the underlying backends? Worse, what if they have data mapping for the backend, or create/add different metadata in the process of doing get and then save/update it during save phase? OO allows you to organize everything in the context. Specifically in this case, I see value in creating three different AccountBackends for managing each of db, datomic and http-server - each subcribing to an interface that says you need to define how you 'get' and how your 'save'. When it comes to enterprise scale software, it's not about "that's it; strategy-pattern/template-method-pattern in 20 odd lines!". It's more about organizing code, components, domain/business logic in a structure that's easier to reload into a mental model - may that be when someone new joins the team, or when you have to root-cause a pressing issue in the code that someone else wrote. Fighting the ecosystem is the last thing you want in such situations. I wish and hope clojure has other, better semantics that allow better organization of related code/methods, than this.
@mateusvahl5072
@mateusvahl5072 7 лет назад
I think the idea is just show how easy some GoF patterns are when you have first class functions, in this case, in clojure. If you ask me, you can write good software in both FF or OO programming; I think both paradigms trying to resolve different things.
@_JocelioLima
@_JocelioLima 8 лет назад
Awesome! A great aproachment
@11STANE11
@11STANE11 8 лет назад
amazing talk! Tnx
@DrewIsFail
@DrewIsFail 7 лет назад
I cover my interpretation of the GOF design patterns in clojure on my blog. drewverlee.github.io/tags-output/Design%20Pattern/. I haven't gotten to the visitor pattern yet but you i'm guessing we should perfer runtime polymorphism over a conditional.
Далее
Clojure Enemy of the State
1:06:32
Просмотров 13 тыс.
🛑самое грустное видео
00:10
Просмотров 169 тыс.
SIGMA ENVY IS UNTOUCHABLE 🔥 #insideout2
00:10
Просмотров 4,1 млн
Solving Problems Declaratively - Mark Engelberg
34:24
The Value of Values with Rich Hickey
31:44
Просмотров 133 тыс.
Functional Design Patterns - Scott Wlaschin
1:05:50
Просмотров 295 тыс.
Zach Tellman - Always Be Composing
35:12
Просмотров 21 тыс.
Functional Design Patterns - Stuart Sierra
42:16
Просмотров 1,3 тыс.
"Transducers" by Rich Hickey
45:00
Просмотров 108 тыс.
ClojureScript for Skeptics - Derek Slager
41:09
Просмотров 70 тыс.
🛑самое грустное видео
00:10
Просмотров 169 тыс.