I'm developing ASP.net application which use web services. There are no data base connections directly from my application -- all the activities are handled using web services.
In the UI layer I can do the data customizations and validations using a few lines of Linq code. What are the drawbacks if I don't have a business layer for my application?
In programming, the Business Logic Layer (BLL) serves as an intermediary for data exchange between the presentation layer and the Data Access Layer (DAL). The Business Logic Layer handles the business rules, calculations, and logic within an application which dictate how it behaves.
The Business Logic layer handles all of the business rules, calculations and actual logic within your application that makes it actually "do" things and it may often use some of the objects retrieved from your data-access layer.
It acts as an interface between the user and the application. Business Logic Layer: It acts as an intermediate between the Presentation and the Data Access Layer. Data Access Layer: The layer at which the data is managed.
Business logic is supposed to be the part of the application where you deal with customer or user facing decisions and computations. It is often argued that this part should be well separated from the rest of the technical infrastructure of your code.
Putting all your validation and business logic into its own tier is good for many reasons.
It keeps all of your business logic localized, and in one place. Future changes will be much easier as a result.
It allows you to more easily unit test your business logic. This is a big one. It's very difficult to write automated unit tests against your business logic if this code is tightly coupled to your web page, or windows form.
It keeps your UI much slimmer.
See also: single responsibility principle (in a nutshell, your UI classes should do UI things, not business-logic things).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With