Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8019561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:25:25+00:00 2026-06-04T21:25:25+00:00

I’m writing a relatively simple web application made of three tiers: Frontend: Very thin

  • 0

I’m writing a relatively simple web application made of three tiers:

  1. Frontend: Very thin Controllers
  2. Business Logic: Domain specific Services
  3. Storage: Thin repository Classes

As suggested above, most of the business logic is in the Services tier 2.

As I write these classes, I find myself treating READ methods very differently to WRITE methods.

READ Methods in the Service classes

For example, there aren’t overly strict argument checks in the READ methods. A lot of the time, for simple reads, the Service methods are simply implementing the Repository methods almost with just one line.

WRITE Methods in the Service classes

With the WRITE methods however I find myself doing way more argument checking, and business logic implementing. In fact in my service classes I have a dependency on a Rules class which only really gets used by my WRITE methods. There is biz logic in READS too, but logic is more strict on WRITES.

Other arguments for possibly separating READS and WRITES

I also feel like when implementing a service class and looking for a method in a class, in my mind first have an idea of whether I want to READ or WRITE, and then I look for the method.

I also feel like when looking for a method in a class, it seem messy to have to separate READS and WRITES by arbitrary method names that start with “Create”, “Update”, “Get”, “Retrieve” etc. etc.

Possible problems and, is it a good idea to separate?

I guess I’m looking for a tried and tested pattern. I could try implementing it myself, but I already feel like there could be problems, like over complicating design, or circular references, repetition of logic, eg. the READ class may depend on the WRITE class and vice versa.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T21:25:26+00:00Added an answer on June 4, 2026 at 9:25 pm

    Sounds like you are referring to Command Query Responsibility Segregation, CQRS

    Udi Dahan has a good article to start you off here.

    And MS Patterns and practices have a open source project http://cqrsjourney.github.com/ which is a pretty good example.

    The drawbacks of this pattern is it can be over engineering, especially if you’re writing a “relatively simple web application”.

    Udi writes another article on When to avoid CQRS and then again Why you should be using CQRS almost everywhere Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I am writing an app with both english and french support. The app requests
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I'm making a simple page using Google Maps API 3. My first. One marker

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.