3 ms·
Is there a good full example of Closure (or languages like Closure) that deals with a complete and real-world data-intensive problem (eg. order processing syste
by ak39 5y ago
Is there a good full example of Closure (or languages like Closure) that deals with a complete and real-world data-intensive problem (eg. order processing system) that I can go through to see how languages like Closure embody this simplicity philosophy against the backdrop of the existing Java/C# paradigm?
- dopidopHN 5y agoYour question make it sound like most order processing system are built on a Java / C# paradigm. To clarify, that my limited experience with those type of system. Same for financial transactions. But I also often assumed that serious people would use more narrow tools for that task. Or at least something more functional. Are Java / c# the norm in those space ?
- adamkl 5y agoHere is an example that I'm quite partial to: Presentation - https://www.infoq.com/presentations/DDD-Clojure/ https://www.infoq.com/presentations/DDD-Clojure/ Code - https://github.com/zololabs/zolodeck 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 https://www.destroyallsoftware.com/talks/boundaries