Command-Query segregation framework