business-logic-layer

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? SQL Server Data Storage & Stored Procedures Data Link Layer (Strongly Typed Table Adapters) connecting to Stored Procs Presentation Layer ASPX Pages with Code behind and ObjectDataSource for connection straight to the DLL Is...

What exactly consists of 'Business Logic' in an application?

I have heard umpteen times that we 'should not mix business logic with other code' or statements like that. I think every single code I write (processing steps I mean) consists of logic that is related to the business requirements.. Can anyone tell me what exactly consists of business logic? How can it be distinguished from other code? ...

Static layers in a java web application

I am building a small website for fun/learning using a fairly standard Web/Service/Data Access layered design. To save me from constantly having to create instances of my service layer/data access layer classes, I have made the methods in them all static. I shouldn't get concurrency issues as they use local variables etc and do not shar...

Logic: Database or Application/2 (constraints check)

This is a specific version of this question. I want to check if I am inserting a duplicate row. Should I check it programmatically in my application layer: if (exists(obj)) { throw new DuplicateObjectException(); } HibernateSessionFactory.getSession().save(obj); or should I catch the exception thrown by the database layer and trig...

I've never encountered a well written business layer. Any advice?

I look around and see some great snippets of code for defining rules, validation, business objects (entities) and the like, but I have to admit to having never seen a great and well-written business layer in its entirety. I'm left knowing what I don't like, but not knowing what a great one is. Can anyone point out some good OO business...

Need advice regarding layered solution, separation of concerns, etc.

We have a layered application, or at least is in the process of transitioning to one, broken down as follows: Interface (user-interface or application-interface, ie. webservice, etc.) Business logic Data access To make the rest of this question more concrete, I'll describe a specific instance. We have a user interface, which has a c...

Best way to separate Business from Presentation Logic?

I want to create a game that will work both locally and online. My first thought was to create an interface that would have all the methods that will be needed by the GUI for the business logic and then have a network implementation and a local implementation. This works fine for request-response messages. But what about messages that ...

How to Design Data Transfer Objects in Business Logic Layer

DTO I'm building a Web application I would like to scale to many users. Also, I need to expose functionality to trusted third parties via Web Services. I'm using LLBLGen to generate the data access layer (using SQL Server 2008). The goal is to build a business logic layer that shields the Web App from the details of DAL and, of course,...

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 presentation layer would call BusinessLayer.GetCustomer(id). In that method I would check that...

Simple Elegant pattern to separate Data Access, Business logic and presentation

I need a simple pattern to do the above. Few things to note: 1) I have a class that I am obliged to use that does the actual data retrieving and it return DataTable 2) I am not concerned with the generic interfaces that support all possible database types, we are sticking with one database type. 3) How do I elegantly trap the error a...

3-Tier .NET applications resources

Hi, A friend of mine doesn't have much experience on 3-Tier applications design and development and he would like to broaden his knowledge on this subject. Can you point me to good online resources or books on it? It would be great if they started from the principles. I was thinking of this tutorial as a good starting point. What resou...

Any suggestions for separating data access, business logic and GUI in Delphi

I want to separate data layer from business logic and business logic from GUI. Diving into web I stumbled upon a few resources but still unable to make my mind clear. Some people talk about patterns some others point various frameworks. My requirements are : manipulate data from rdbms (mysql mainly) CRUD operations dealing with id gen...

business classes for multilanguage database design

I have posted a question about multilanguage database design here,[]http://stackoverflow.com/questions/929410/what-is-best-practices-for-multilanguage-database-designI like Martin's suggestion,but now I have a question what will be the best way to create business objects? If I will create product which will contains ProductTranslation ob...

Trying to return rows between a given id and the same id + offset, where should most logic go to determine how to retrieve the data?: BLL or DAL

Hi, In my database I have a table called ThingsInACircle. Every time a Thing is added to the ThingsInACircle, it gets added with a ThingId that is auto incremented. Imagine the Things in this table as being in a circle. SELECT Thing FROM ThingsInACircle WHERE ThingId = 10 is next to SELECT Thing FROM ThingsInACircle WHERE ThingId = 11....

Books for Business Apps design and patterns

Hi, I have recognized the fact that i do not have a clear understanding of how forms and business logic layers should be distinctly separated. Especially in business apps this is hard to accomplish at some times as to keep the UI clean from business logic and to be able to minimize repetition among different forms that share some common...

Windows Form Controls and LINQ; What should I return?

When working with Windows Form controls and LINQ is there a "Best Option" for how your Buisiness Layer returns the Data? Right now I am returning DataTables so that I can then set the DataSource to the returned DataTable. Is there a better option? Why? public class BLLMatrix { public static DataTable GetMaintItems(int iCat) {...

Separating Business Rules from Business Processes

Hi, how do I externalize the business rules from the business processes so that I can add rules without touching the business process logic? For example, I have two business processes, say "Add Product" and "Update Product", there are a few common rules that these 2 processes share, and rules can keep getting added later. I intend to w...

UI, Business Logic Layer, Data Layer and where to put web services

We are developing a web application. We want to possibly reuse the work we do here for a different application that will use the same database, and use the same business rules for reading and writing to said database. Which design would be more correct Having the UI call web services, which would use business objects containing the b...

Can we use Extension Methods for building business rule engines?

I am looking to do something like this public class ProductBiz: BizBase<Product> { public List<String> BrokenRules {get;set;} // Some kind of data + biz operation implementation } public static class ProductBizExtensions{ public ProductBiz Rule1(this ProductBiz prodBiz) {} public ProductBiz Rule2(this ProductBiz prodBiz) {} public...

Multiple class libraries in business layer, or one?

My ASP.NET application uses only 1 SQL Server 2000 database and no more than 50 tables in it. And I copied an instance of the database to run on my develop PC, so I need to switch the connections between dev and release. The problem is, I had created multiple class libraries in my business layer, and each class library has a LINQ to SQL...