This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-03-29
Channels
- # announcements (4)
- # architecture (25)
- # babashka (23)
- # beginners (56)
- # boot (4)
- # calva (1)
- # cider (1)
- # cljs-dev (15)
- # clojure (135)
- # clojure-europe (4)
- # clojure-nl (21)
- # clojure-uk (61)
- # clojurescript (47)
- # community-development (4)
- # cryogen (11)
- # cursive (11)
- # data-science (11)
- # fulcro (25)
- # funcool (5)
- # graalvm (1)
- # graphql (4)
- # kaocha (4)
- # lambdaisland (20)
- # lumo (7)
- # meander (14)
- # off-topic (9)
- # pathom (2)
- # portkey (1)
- # re-frame (5)
- # reagent (53)
- # reitit (2)
- # ring (3)
- # shadow-cljs (32)
- # spacemacs (4)
- # sql (34)
- # testing (1)
- # tools-deps (3)
@potetm That "Command Query Response Segregation" would be immediately associated with "Event Sourcing" is super concerning to me
I don't think it fits the characterization of "semantic police"-ing to say that the first thing has nothing to do with the second
I can see how "event sourcing" as an architectural pattern could include in its definition "keep track of old events with the ability to replay/rewind"
It’s probably me, but it feels like every time I talk online w/ someone about CQRS I start to feel like I’m taking crazy pills.
> That “Command Query Response Segregation” would be immediately associated with “Event Sourcing” is super concerning to me
I said what I said in order to communicate something to somebody. Not to make it universally parsable in the most technical sense.
But, back to what I was saying about talking about CQRS online: I feel like every conversation immediately devolves in to someone explaining what I don’t understand about CQRS. It’s like monads.
Now, perhaps I’m really missing something. But I don’t think so. I think I’m generally talking about concepts and CQRS folks are myopic in their focus on implementation. So I’ll say, e.g. “Aggregates are a form of caching,” and then we’ll go round and round about how aggregates are an important conceptual pattern etc etc etc.
and on the corners, there is moss and mold from academics, mathematicians, or (i guess) architecture astronauts
That would be true if it weren’t for the fact that these concepts are not somehow fundamentally different from more general programming concepts.
I think there has to be some form of splitting reads and writes. I dunno if it requires the whole cqrs architecture.
But I think your comment highlights my frustration: It’s like monads. Everyone articulates their understanding differently. (In this case, I suspect it’s because everyone has a slightly different understanding.)
btw - apologies to @emccue. You just happened to be the one that made a comment after I figured out the source of my frustration 😄 Please don’t think this is directed at you, in particular.
Sounds like one of those programmer honey traps. It's too nebulous to be worth discussing, but we just can't leave it alone.
If 10 people can give a different definition for the same thing it may be...... complected 😎 CSI Miami theme plays
So, it's not that there isn't Interplay, obviously there is, that's why it's confusing
But to me, it is a confusion of taking an abstract concept and mixing it with one of its concrete realization
I guess there's nothing wrong with it per say. It's just that it is confusing to me as well. Especially when we debate pros/cons and the merits of a solution. It's like the ideas of OOP versus say a Class and Inheritance system of OOP used in Java. That's another one I see that happens a lot. OOP is just the idea of encapsulation. Hey isn't this just some form of encapsulation, guess you're doing OOP.
Or people discuss that OOP is just about message passing, oh so I guess OOP and Actors are actually the same thing
Yeah that all makes sense. Thing is, that’s exactly what I was trying to do! I was trying to lift the convo from implementation into “these are the useful abstractions.” So, for example, in our convo, I tried to say, “CQRS is useful, actually. As proof, you can see many of the relevant abstractions in Datomic.”
I mean, I literally said “But datomic is basically CQRS embodied (depending on your definition).” So. There’s that.
So maybe the takeaway is to be explicit in trying to lift the conversation to abstraction.
To be fair, all this software craftsmanahip mumbo jumbo with Martin Fowler and co. It threads a very dangerous line. I don't know how to define that line, but it's similar to the whole Agile/Scrum and methodologies line
Like, it's easy to devolve in a place which only exists in the clouds, and no one is ever able to really connect back to reality. Where it starts having its own vocabulary of things defined using other made up vocabulary, etc.
I feel I always have to spend so much time deciphering what things mean concretely, and sometimes when you see that part it's like, why does this even have a name
I'm not doing a good job of explaining. But it's like, when people lose sight of the original goals or even problem.
One person was asking, I dunno, something like, “When do you make an aggregate vs allow a read from the write domain object?”
I mean the entire question reveals a certain level of navel-gazing. But it’s easy to ask the question: What do you get from an “aggregate?” Well you get faster reads if they’re materialized (i.e. caching). Other than that, it doesn’t really matter!
IMO - this is the status quo conversation in software today. Most folks never stop to ask, “What exactly does this get us vs some other option?”
Not to say software people don’t matter. But we spend so much time on ourselves that everyone else gets totally neglected.
And honestly, I think we can often be off the mark too. Like we get lost in too much abstraction
I read both DDD books, and spent a crazy long time trying to understand, what are you saying, how would I build a system following your descriptions and ideas.
And it's not until I found some other book that I finally understood some parts of it, not all :p
I’ve felt the same every time I have a convo w/ a DDD zealot. I feel like they’re speaking some weird derivative of a language that I know natively. Like Scottish for an English speaker.
Except if you ever try to pin them down, they’re incapable of using normal words, so you never learn anything at all.
The thing is, the model degenerates in practice and that's the part that is never covered
I get how it’s overly-complex out of the box. But not sure what you mean by “degenerate.”
Like figuring out the bounded context is left as an exercise to the reader. And, it's all just intuition
Same with your domain entities, if you mess up your aggregates, the whole thing falls apart
Now we're in DDD land. Because it's how we model the data inside our app for modifications inside our app
Normally you might do getUser(Id), which gives you the current user data, and then go User.setName(user.getName().capitalize())
We did both, because an update requires first reading in the latest data, changing it, and putting it back
So when you fetch data from the DB and create domain entities out of it, it should be only for the purpose of making modifications to them
Instead, when you don't intend to change them, use a different set of entities, which are no longer called your domain entities. Those don't need to be modeled as carefully, just have entities in whatever shape and form your presentation layer cares for
I actually had the sneaking suspicion that most folks were lost in some OOP mumbo jumbo.
Anyways, I'm not sure where I'm going with all this anymore :rolling_on_the_floor_laughing:
Specifically, I like the idea of spending a lot of time to model your data, with regards to how you're going to modify it over time. I like how it encourages breaking out your application in components which map back to the problem space. And I like how it recommends you build a vocabulary that is as close to what the business people use within your code as well, so that communication is improved
I think a lot of the details in the book beyond that are very OOP specific, and you start to fall in that whole complexity nightmare of design pattern and all that
Hi guys, I have a question regarding bidi, but there isn't a bidi channel, so I'll ask here: I am sending an index-handler on "/this-route":
(defn index-handler [req]
(assoc (resource-response "index.html" {:root "public"})
:headers {"Content-Type" "text/html; charset=UTF-8"}))
(def routes ["" {"/this-route" {:get index-handler}}]) ;; works
Which works fine.
But when I append anything to this-route, I'm unable to send index-handler even though I can still send a basic res/response:
(def routes ["" {"/this-route" {"" {:get index-handler} ;; doesn't work
"/something" {:get index-handler} ;; doesn't work
"/something-else" (res/response "some response") ;; works
}}])
I get the errors in the client side console showing an error in the index.html line, where I start my app:
<script type="text/javascript">myapp.system.go();</script>
and the error is "myapp is undefined."
Why might this be, and what am I doing wrong?You can try the #yada channel
<html lang="en">
<head>
<title>My App</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="shortcut icon" type="image/png" href="favicon1.png"/>
</head>
<body>
<div id="app"></div>
<script src="js/compiled/myapp.js" type="text/javascript"></script>
<script type="text/javascript">myapp.system.go();</script>
</body>
</html>
Those routes work for me, are you sure they don't work:
user=> (require '[bidi.bidi :as bidi])
nil
user=> (def routes ["" {"/this-route" {"" :index ;; doesn't work
#_=> "/something" :index-handler ;; doesn't work
#_=> "/something-else" :some-response }}])
#'user/routes
user=> (bidi/match-route routes "/this-route")
{:handler :index}
user=> (bidi/match-route routes "/this-route/something")
{:handler :index-handler}
user=> (bidi/match-route routes "/this-route/something-else")
{:handler :some-response}
user=>
@pshar10, the src attribute in <script src=js/.." points to a relative path. Try
/js/` with a leading slash so that pages relative to the root refer to the same absolute script resource.
The leading slash didn't work. In fact js/myapp.js doesn't exist. The myapp.js that I shared was in myapp-root/dev-target/js and not in myapp-root/resources/js. How do I make a js/myapp.js exist?
@pshar10, the src attribute in <script src=js/.." points to a relative path. Try
/js/` with a leading slash so that pages relative to the root refer to the same absolute script resource.