ASP.Net 2.0 Application without Business Logic Layer?
Asked Answered
S

5

7

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?

Serbocroatian answered 7/8, 2008 at 2:41 Comment(0)
B
4

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.

Ballard answered 7/8, 2008 at 2:48 Comment(0)
S
1

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.

Slotter answered 7/8, 2008 at 2:46 Comment(0)
C
1

Acceptable? Depends who you ask and what your requirements are. Is this app an internal one-off used by you and a few other people? Maybe this is good enough. If it's meant to be a production ready enterprise application that will grow and be maintained over the years, then you probably want to invest more effort up-front to build a maintainable app.

Separation of Concerns is a key design technique for building maintainable apps. By mixing presentation, business, and data access logic all together, you can end up with a very fragile difficult to change application architecture.

Cuirass answered 7/8, 2008 at 2:49 Comment(0)
L
1

It depends. If your business logic is in your click events and page loads, it is NOT acceptable.

It appears that your business logic is somewhere within the DAL (e.g., stored procedures and such), just as long as you are consistent, it's fine. As long as you are very, very sure that your clients will always be using SQL Server then this approach is not a problem.

I know a colleague who has all his business logic in stored procedures that his views are mostly thin clients to database backends: he has been immensely successful with the product that he sells. But that's only because he's very consistent with it.

Lathan answered 31/8, 2008 at 7:28 Comment(0)
H
0

If the application is a general one, then the business logic layer can be used in complete other applications too. Like, I normally use my CMS related BLL classes in other applications.

Hittel answered 23/10, 2009 at 7:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.