Questions tagged [business-logic-layer]

The business logic layer (BLL) is the layer in a multi-layer software architecture which separates the business logic from other layers such as the data access layer (DAL) and user interface (UI or presentation layer).

A business logic layer (BLL) is a software engineering practice of compartmentalizing business rules in a multitier architecture. It separates the business logic from other modules, such as the data access layer (DAL) and user interface (UI). By doing this, the business logic of an application can often withstand modifications or replacements of other tiers.

http://en.wikipedia.org/wiki/Business_logic_layer

207 questions
3
votes
2 answers

One Data Access Layer serving multiple Business Layers? or not?

I have (or will have) one DAL containing my data access methods of our ERP system. Business-wise there are contexts that will use this DAL. Examples are: Barcode applications, custom sales picking applications,purchase order applications. I am…
e4rthdog
  • 5,103
  • 4
  • 40
  • 89
3
votes
3 answers

Entity Framework DAL, BLL with Repository Pattern

I am trying to build a three tier architecture with UI, BLL, and DAL. I am using the Entity Framework with the repository pattern. My question is: Are the Entities generated by the Entity Framework supposed to act as a part of my BLL or are these…
2
votes
2 answers

Is Django bad for conveying business-logic?

I am almost 100% locked in to Django for the projects I have been planning. The final "myth" I'd like to "dispel" is that Django is "mediocre" at conveying business-logic. Direct quote by Peter Shangov: Whatever your choice of framework your…
A T
  • 13,008
  • 21
  • 97
  • 158
2
votes
2 answers

Guidelines for implementing service layer methods

We are developing an 3-tier application where presentation layer communicates with service layer, which in turn communicates with the business layer. The business layer has access to database. Currently we have implemented business layer to hold…
intoTHEwild
  • 448
  • 7
  • 24
2
votes
1 answer

NHIbernate and Security / Business Layer

I'm just starting to play around with / learn NHibernate for a personal project, and feel like I'm not "getting" something. I'm used to having apps work like this: Presentation layer --> Business Layer --> Persistence layer. So for example, my…
aquinas
  • 23,318
  • 5
  • 58
  • 81
2
votes
5 answers

Where to put business logic for two related objects?

Suppose I have two entities: User and UserGroup. They have a one-to-many relationship => each UserGroup virtually contains 0 to n number of users. If I want to retrieve the users for a UserGroup where in my business layer would be a better class…
Kamyar
  • 18,639
  • 9
  • 97
  • 171
2
votes
1 answer

MVC using existing data- and businesslayer

I have an existing application with a datalayer (primary EF4), a businesslayer (custom code) and a windows application - now I want to create a webapplication using ASP.NET MVC but I am not sure exactly what to do especially in my models. When my…
2
votes
3 answers

Using LINQ with different layers means I can't access a specific type

I have 3 layers in my solution: DAL (which is accessing my DB with LINQ) Business layer Winform In my DAL, I am returning a List with a specific type from my DB and I'm doing the same in my BLL. When I want to use my function in my UI I get the…
2
votes
2 answers

Business logic and rules - how to decouple them from the domain model

I'm having slight trouble figuring out how to make my design loosely coupled. Specifically how to implement business logic and rules into domain models, as well as where to place the different parts of the code - i.e. folder structure. To clarify…
2
votes
5 answers

How to implement "business rules" in Rails?

What is the way to implement "business rules" in Rails? Let us say I have a car and want to sell it: car = Cars.find(24) car.sell car.sell method will check a few things: does current_user own the car? check: car.user_id == current_user.id is…
Zabba
  • 64,285
  • 47
  • 179
  • 207
2
votes
1 answer

Separation between data and logic for sqlalchemy models

In the following example, should I keep the get_friend method inside my class or should I move it outside because I want to separate data structure from business logic ? What's the best practice ? Don't be biased by the class being small, it's just…
2
votes
4 answers

Should you return a BindingList from a business layer (or service layer, domain model, etc.)?

I need a BindingList in my UI to provide two-way databinding between my collection and a DataGridView. However, it doesn't seem correct to return a BindingList from your business layer (or domain layer, service layer, data layer, etc.). That is,…
User
  • 62,498
  • 72
  • 186
  • 247
2
votes
1 answer

Designing DAL and BLL - Single/Multiple Data Repository for the Related Tables

While designing a new multi-tier application, I am facing difficulty making a decision for my DAL and BLL layer design. Suppose I have Employee information spread in multiple tables having both 1-1 and 1-Many relationship with master table. Few are…
2
votes
1 answer

How do I reduce the number of constructor parameters in controllers and business layer services?

This is a re-wording of this SO post. I found that using the mediator pattern is effective at reducing the number of parameters in my controllers. I then began to wonder if this would be affective domain services. But wouldn't that hide the…
drizzie
  • 3,351
  • 2
  • 27
  • 32
2
votes
4 answers

How can I improve my business layer objects mapping into a database? Is it time for a O/R mapper?

As I began writing web applications with ASP.NET I started with small projects that used a Linq-To-SQL mapper for database access to a MSSQL Server. After gaining some experience, I switched into a classic three-tiered approach with a graphic Layer,…
citronas
  • 19,035
  • 27
  • 96
  • 164