Skip to content

Instantly share code, notes, and snippets.

@andrzj
andrzj / CQRS.md
Created October 16, 2024 23:15 — forked from meigwilym/CQRS.md
CQRS, Task Based UIs, Event Sourcing agh!

CQRS, Task Based UIs, Event Sourcing agh!

Posted by gregyoung on February 16, 2010

Many people have been getting confused over what CQRS is. They look at CQRS as being an architecture; it is not. CQRS is a very simple pattern that enables many opportunities for architecture that may otherwise not exist. CQRS is not eventual consistency, it is not eventing, it is not messaging, it is not having separated models for reading and writing, nor is it using event sourcing. I want to take a few paragraphs to describe first exactly what CQRS is and then how it relates to other patterns.

CQRS Command and Query Responsibility Segregation

Starting with CQRS, CQRS is simply the creation of two objects where there was previously only one. The separation occurs based upon whether the methods are a command or a query (the same definition that is used by Meyer in Command and Query Separation, a command is any method that mutates state and a query is any method that returns a value).

@andrzj
andrzj / docker-compose.yml
Last active March 1, 2020 01:47 — forked from pantsel/docker-compose.yml
example docker-compose.yml for kong, postgres and konga
version: "2.1"
networks:
kong-net:
driver: bridge
services:
#######################################
# Postgres: The database used by Kong
@andrzj
andrzj / API.md
Created November 27, 2018 15:34 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@andrzj
andrzj / gist:7e0e2c99384b2c034894c2af1a549aa1
Created July 3, 2017 14:34 — forked from jaydson/gist:1780598
How to detect a click event on a cross domain iframe
var myConfObj = {
iframeMouseOver : false
}
window.addEventListener('blur',function(){
if(myConfObj.iframeMouseOver){
console.log('Wow! Iframe Click!');
}
});
document.getElementById('YOUR_CONTAINER_ID').addEventListener('mouseover',function(){