Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.Net 2.0 Application without Business Logic Layer?

Is it "acceptable" to have an ASP.Net 2.0 application without the BLL (Business Logic Layer) as the following?

  1. SQL Server Data Storage & Stored Procedures
  2. Data Link Layer (Strongly Typed Table Adapters) connecting to Stored Procs
  3. Presentation Layer ASPX Pages with Code behind and ObjectDataSource for connection straight to the DLL

Is a BLL always preferable, even if business logic is entirely validatable in the presentation's code behind? What are the potential drawbacks for not using a BLL?

like image 811
Ciro Villa Avatar asked Aug 07 '08 02:08

Ciro Villa


2 Answers

It's acceptable as long as you understand the consequences. The main reason you'd have a BLL is to re-use that logic elsewhere throughout your application.

If you have all that validation logic in the presentation code, you're really making it difficult to re-use elsewhere within your application.

like image 147
lomaxx Avatar answered Oct 20 '22 13:10

lomaxx


Like everything else it is environmental and depends on the use of the system. The question you need to ask your self is:

  1. Will this be actively developed
  2. Is this going to be used over the course of many years and expanded on
  3. Is the expansion of the application unknown and thus infinite

Really it comes down to laziness. How much time to do you want to spend reworking the system from the UI? Because having no business layer means duplication of rules in your UI across possibility many many pages.

Then again if this is a proof of concept or short demo or class project. Take the easy way out.

like image 22
Nick Berardi Avatar answered Oct 20 '22 15:10

Nick Berardi