HN Theater @HNTheaterMonth

The best talks and videos of Hacker News.

Hacker News Comments on
Domain-Driven Design with Clojure

Amit Rathore · InfoQ · 51 HN points · 1 HN comments
HN Theater has aggregated all Hacker News stories and comments that mention Amit Rathore's video "Domain-Driven Design with Clojure".
Watch on InfoQ [↗]
InfoQ Summary
Amit Rathore shares advice in building large scale applications in Clojure, making sure the code is readable and maintainable.
HN Theater Rankings

Hacker News Stories and Comments

All the comments and stories posted to Hacker News that reference this video.
Here is an example that I'm quite partial to:

Presentation - https://www.infoq.com/presentations/DDD-Clojure/

Code - https://github.com/zololabs/zolodeck

Its a Domain-Driven/Hexagonal Architecture codebase written in Clojure. Its not uncommon to see this sort of approach in Java/C# so it makes comparisons of the code relatively easy.

While the overall code layout is the same as what you'd see in Java/C#, a big distinction is that the "entities" that make up the core functionality of the domain in the Clojure version are simple data structures (rather than classes), and the logic that operates on them are pure functions (rather than methods on the classes themselves).

With this approach, a lot of the hoops you'd usually jump through with dependency injection to enable testability go away, since its easy to test pure functions that operate on simple data structures, no mocking required.

This sort of approach isn't limited to Clojure [0], but Clojure makes it idiomatic.

[0] - https://www.destroyallsoftware.com/talks/boundaries

Jul 17, 2013 · 51 points, 5 comments · submitted by conorwade
nickik
Clojure/Datomic/Storm seams like a very powerful combo. Im exploring pedastel right now, that would be another 'next level'-tool.

It seams to me that both Datomic and Storm are kind of leaf behind the standard way of doing the same things. So does pedastel (I dont really know much about Storm but it seams that way).

sgrove
Curious what you mean by "kind of leaf behind the standard way"? We've been pretty impressed with storm, and are cautiously eyeing Datomic (the closed-source community makes us pretty cautious to rely on it too heavily).

Similarly, the ideas behind pedestal are intriguing, and while we won't likely switch into it wholesale without a much better understanding, we would love to curb some of their techniques.

nickik
What I mean is that there are these standard ways that actually held fast for quite some time. The big change between old school perl/php and new and cool ruby/python was mostly the ORM.

It was standard that you had some scripting language behind that some mysql. I used to do ASP classic, and from there to Django the diffrence is there but its not as radicle.

With datomic and pedastal the hole way I tought about web programming changes. Im not arguing that all these things are better then what we used to have, but just that the threw over my hole thinking.

Im trying to develop a simple boardgame that you can play online against each other. Normally I would just go in standard dev mode and it would be pretty clear what to do. Now that Im doing it wiht Datomic and Pedastal im constantly thrown off. How would you do this? Is that idiomatic?

> Datomic (the closed-source community makes us pretty cautious to rely on it too heavily)

Yeah I can see that. I kind of think that as people learn more about Datomic somebody will start a opensource implmentation of it.

rdudekul
The talk is very interesting, since it shows how functional languages can be used for creating traditional enterprise apps. There is a gap in OO developers minds in terms of adopting functional programming (FP) and how to organize larger projects. Amit Rathore, author of the book The Joy of Clojure, does a great job in presenting a simple way of applying DDD principles to FP and thinking about organizing FP code that scales team productivity.
fb1
He is the author of Clojure in Action
HN Theater is an independent project and is not operated by Y Combinator or any of the video hosting platforms linked to on this site.
~ yaj@
;laksdfhjdhksalkfj more things
yahnd.com ~ Privacy Policy ~
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.