0

I have inherited an n-tier application and I would like some explanation of its way of grouping files.

I guess BAL is the BUSINESS ACCESS LAYER DAL is the DATA ACCESS LAYER

Any guesses for EAL? Anyone have any idea what EAL is?

Also, why would the file name content in the BAL be the same as the DAL? enter image description here

Shiva
  • 20,575
  • 14
  • 82
  • 112
xarzu
  • 8,657
  • 40
  • 108
  • 160
  • L might stand for Logic. – stark Feb 23 '14 at 19:50
  • 1
    Yeah. While the standard would be layer, stark thinks it is logic. EAL is Entity Access Layer, an anitpattern seen often where people think that they need 2 entity layers, one provided by some ORM and a useless one on top (in the DAL). – TomTom Feb 23 '14 at 19:53

1 Answers1

1

EAL - Probably Entity Access Layer - Although I wouldn't name it like that. It's simply the Entity Framework Model and a related SQL file in your situation. Rather than name that folder EAL, I would just call it Model or Database or Data

As for why there is a BAL and DAL with same filenames, I bet if you compare each file 1 by 1, you will see some differences, in terms of properties, fields etc etc.

The DAL maps 1 to 1 to the database table / entity field names, while the BAL might contain extra fields and methods that are used either in the UI, or for intermediate processing (ex: to do calculations based on certain other values) in addition to the fields required in the DAL.

Example: Contract.cs in DAL might simply have all the required database fields, like BidStartDate, BidEndingDate etc, while you might have an additional field called DaysRemainingForBids in the BAL that you display in the UI, and that is calculated as the difference between current day and the BidEndingDate.

In other words, properties and methods that are not needed in the database, but are required for business logic and UI display, entry will be in the BAL and not in DAL for the same entity.

Shiva
  • 20,575
  • 14
  • 82
  • 112