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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:28:12+00:00 2026-06-15T17:28:12+00:00

We are writing some support applications (rather small) to our ERP system. Thus until

  • 0

We are writing some support applications (rather small) to our ERP system.

Thus until now I am feeling that I am using the Data Access Layer for 2 roles: the business layer AND the data access one.

I am having trouble deciding what I have to move to a separate layer and if I need to. I have read somewhere that knowing when to make layer separation is wisdom and knowing the patterns is just knowledge. I have neither in adequate amounts.

So I need some help to determine what is what.

My current DAL deals with fetching the data and applying basic logic on them. For example there are methods like

GetProductAvailabilitybyItem

GetProductAvailabilitybyLot

etc.

If I needed to separate them what I would have to do?

One other matter that is in my head is that in order to normalize my DAL and make it return different entities every time (through one general get method) I would have to use DataTable as return type. Currently I am using things like List<PalletRecord> as return types.

I feel that my apps are so small that its hard (and maybe useless) to discriminate these 2 layers.

My basic need is to build something that can be consumed by multiple front-ends (web pages, WinForms, WPF, and so on).

Additional Example:

Lets talk some barcode. I need to check if a fetched lot record is valid or not. I am fetching the record in DAL and produce a method returning bool in business layer?

Then i can call the bool method from whatever presentation in order to check if a textbox contains a valid lot?

Is this the logic extremely simplified?

  • 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-15T17:28:12+00:00Added an answer on June 15, 2026 at 5:28 pm

    Based on your description, you should definitely separate both layers right now, when the application is still small. You might feel a BL is useless when you’re just accessing and displaying data, but with time you’ll find the need to modify, transform, or manipulate the data, like coordinate object creation from different tables, or update different tables in a single action from the user.

    The example you provided helps to support this idea, although is quite simplified.

    Pablo’s answer does offer some good design ideas too: you should definitely use an ORM to simplify your DAL and keep it very thin. I’ve found NHibernate and Fluent make a very good job on this. You can use the BL to coordinate access using Data Access Objects.

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

Sidebar

Related Questions

Brief history: I'm writing a stored procedure to support a legacy reporting system (using
So I was writing some queries today and was using top 10 on a
I'm writing some code that will take a screenshot of another application, given its'
I'm writing an app that needs some JNI code. This code involves floating point
I've got a Java application that I'm writing an installer for. We're using the
I am writing a REST service that is to be accessed by web applications,
I'm running OS X 10.6.7, Python 2.6, and writing a small wxPython application that
While writing some C code, I decided to compile it to assembly and read
Im writing some helper functions for a project im working on. I've always wanted
While writing some views to respond to ajax requests i find it somewhat strange

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.