4 ms·
I agree with this to a point. I just built an API over HTTP, ignored all the REST rules and separated everything into commands and queries. Commands are POST a
by batou 11y ago
I agree with this to a point.
I just built an API over HTTP, ignored all the REST rules and separated everything into commands and queries. Commands are POST and do something. Queries are GET and get something. I need to write this up.
Schema is hell with JSON etc. I don't get how you can enforce something like this cleanly in a language like JavaScript under node.js or something without piles of assertions or some weird meta-format. I'm barely managing with an informal
Also JSON is a crapfest for transferring data. Need something better than that over HTTP that is strongly typed with strong schema and has flexible binary formats other than whacking a base64 encoded string in an object or using multi-part mime.
And then you're back at RPC and protobufs or something similar. Perhaps that's the answer.
- robinhowlett 11y agoAre you describing CQRS? http://martinfowler.com/bliki/CQRS.html http://martinfowler.com/bliki/CQRS.html
- batou 11y agoNo, CQS. CQRS is slightly more complicated and decouples everything via a service bus model along with a massive software ghetto lead by Udi Dahan who I personally despise. An excellent marketer but a poor engineer. I've cleaned up two companies who bought into that idea (event sourcing, service bus etc). Simply a command is something mutative. A query is something not mutative that returns information. There is no further specification other than that. It doesn't mandate a bus or event queue or publishing model nor whether or not the commands are synchronous or asynchronous.
- gregyoung4321 11y agoCQRS does not involve a service bus (though people like to sell them). This sounds like some people were led down very bad paths. Using event sourcing and a service bus together is frankly retarded. Greg