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 8550089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T13:52:17+00:00 2026-06-11T13:52:17+00:00

Hey guys I’ve been programming OOP for a semester now in C++ and I

  • 0

Hey guys I’ve been programming OOP for a semester now in C++ and I am just starting C#. I still don’t full understand how to separate the layers from each other and what does what where. From what I understand there are these layers:

Storage -> Data Access -> Business Logic -> Command Processor -> User Interface

Now I can’t seem to understand EXACTLY what each layers responsibility is..

I understand the Data Access only contains methods like Add, Update, Delete, Query, and that the Data Access does not care what it is inserting it just receive the object as a parameter and does whatever with it. Does the Business Logic create the object from data being sent from the Command Processor where the Command Processor got it from the User Interface and did input validation on it?

Also how would I sent and recieve different commands, such as how a Query command would be much different than an insert command since it would need to send data back..

As you can probably tell I’m quite lost, and I have been having a hard time finding good tutorials on this subject.

Thanks!

Edit.

Im trying to start off with the Data Access layer query methods. I have three child objects I store in a generic list of the parent type.

I have different query options, one of them is type. So I need to search through the parent list and return the data of each object if its the type specified.
My parent object has a overwritten ToString() as well as my childs which call the parents ToString() to get all the data of the object into one string. Am I doing Business Logic duties here? Also when i get the list of objects that matched my type and try to iterate threw that with a foreach calling ToString() it only would call the parent ToString() Im guessing?

public string Lookup(Types type)
{
List<Parents> search = new List<Parent>();


switch (type)
{
case Types.TypeOne:
{
search = ParentDataBase.FindAll( delegate(Child1 findChild) { 
return findChild is ChildOne; } );

}
break;
case Types.TypeTwo:
{
search = ParentDataBase.FindAll( delegate(Parents findChild) { 
return findChild is ChildTwo; } );
}
break;
case Types.TypeThree:
{
search = ParentDataBase.FindAll( delegate(Parent findChild) { 
return findChild is ChildThree; } );
}
break;
}
string results = "";

foreach (Parent x in search)
{
results += t.ToString();
}
return results;
}
  • 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-11T13:52:18+00:00Added an answer on June 11, 2026 at 1:52 pm

    The arrows presented in the question are confusing so during the discussion I will change them.

    SO only let me put two links so try searching CRUD and MVC Architecture when they are mentioned.

    Let us take this one step at a time:

    Storage -> DataAccess

    This is usually handeled by an ORM. An ORM will handle database access.

    The ORM plus Custom (Model) Objects that you create allow for abstracted data access. This will look something like:

    The ORM translates data to and from the database in order to make it usable. The ORM can handle the CRUD operations for you so that querying, updating, and inserting are not present in other parts of your code.

    Business Logic

    The business logic works with data by accessing, modifying, and saving it.

    The business logic can access your models in order to fulfill the accessing and saving of data.

    The modifying part is implemented in the business logic.

    Business logic can be small, large, or a combination of other pieces of business runner.

    Our graph now look like:

    Database <- ORM -> Models <- Business Logic

    Command Processor

    The command processor runs pieces of business logic and patches pieces of the overall system together and is sometimes called the controller in MVC

    Database <- ORM -> Models <- Business Logic <- Command Processor

    User Interface

    The user interface (UI) can be broken into two parts, data representation and user input.

    Data representation is called views in MCV and are responsible for taking data and making it readable by the user.

    User input triggers pieces of the command processor.

    Overall:

                                                                    ,-> View
    Database <- ORM -> Models <- Business Logic <- Command Processor
                                                                    `<- User Input
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, I'm just starting out with GWT and am getting the following error
Hey guys, sorry I'm kind of new to programming, but I had a small
Hey Guys I've been struggling with this for the last hour and pouring over
Hey guys I just noticed that my join statement here SELECT * FROM reports
Hey guys I can't seem to get the syntax here right, I'm just trying
Hey guys I'm using python and I was just wondering how we can make
Hey guys I'm getting three things right now that I'm trying to take care
Hey guys I'm just learning javascript, I have some html and css background though.
Hey guys can you help me figure this one out!? I'm still researching for
Hey guys I'm implementing a page that has about 9 separate divs on it

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.