business-logic-layer

Business Logic Layer

我的未来我决定 提交于 2019-12-10 09:52:00
问题 I am programming data driven applications using asp.net with telerik controls (v2009 q2). I have a class named BLL which contains (almost only) static classes that return different objects taking some id as parameter. The generally return group of objects as Lists. My question is that are there any architrectural flaws to this, always using static. I know people make their Busines Layer and DataAccess layer as different projects. What is the advantage of it being a project ? So I can add more

Business Logic Layer

社会主义新天地 提交于 2019-12-05 21:19:10
I am programming data driven applications using asp.net with telerik controls (v2009 q2). I have a class named BLL which contains (almost only) static classes that return different objects taking some id as parameter. The generally return group of objects as Lists. My question is that are there any architrectural flaws to this, always using static. I know people make their Busines Layer and DataAccess layer as different projects. What is the advantage of it being a project ? So I can add more functionality or just it is tidier that way. Thanks in advance Using static methods as your method of

LINQ to Entities through Interface Property

坚强是说给别人听的谎言 提交于 2019-12-05 05:02:27
I have a situation where I would like to use a single business logic class to perform similar operations on a variety of entity framework classes. I have defined an interface which these classes implement in a partial class file. However when I try to write a LINQ to entities query against these interface methods I get a NotSupportedException since the query is not using the class's properties directly but through an interface. I would like to keep the heavy lifting to the database tier so is there a way to achieve this without resorting to LINQ to objects? Here is some code which demonstrates

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

半世苍凉 提交于 2019-12-03 18:35:51
问题 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? Is there some simple test to determine what is business logic and what is not? 回答1: Simply define what you are doing in plain English. When you are saying

call service vs dao from another service

霸气de小男生 提交于 2019-12-03 07:55:19
I have User And Role entities and Service, DAO layers for them. I need Role list from UserService. Which layer should I use from UserService? Call list method of RoleService vs RoleDAO ? Which one is common use and why? Normally DAO layer is close to database, Service layer is encapsulating your business logic, performing any transactions or other things rather than just calling DAO. Service calling another service is more common because Your RoleService can have some business code evaluated, you can benefit from transactions or passing messages via JMS or you can have some security on service

django models = business logic + data access? Or data access layer should be separated out from django model?

你。 提交于 2019-12-03 07:14:11
问题 In Django, the suggested software architecture is to put all business logic and data access in models. But, some colleagues have suggested that the data access layer should be separate from the business logic (business service layer). Their justification is that the data access layer can isolate changes if a different data source is used. They also say that there is business logic that can be in more than one model. But, when I start coding using the separate data access and business logic

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

馋奶兔 提交于 2019-12-03 06:04:54
问题 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 layers (or great business objects) or let me know how they judge a business layer and what makes one great? Thanks 回答1: Good business layers have been designed

django models = business logic + data access? Or data access layer should be separated out from django model?

非 Y 不嫁゛ 提交于 2019-12-02 20:47:10
In Django, the suggested software architecture is to put all business logic and data access in models. But, some colleagues have suggested that the data access layer should be separate from the business logic (business service layer). Their justification is that the data access layer can isolate changes if a different data source is used. They also say that there is business logic that can be in more than one model. But, when I start coding using the separate data access and business logic layers, the data access layer is simple (basically the model code that defines the db schema) and it does

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

感情迁移 提交于 2019-12-02 04:50:55
问题 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 listed below: Employee (Master Table), Employee_Contact_Detail, Employee_Education, Employee_Skill, Employee_Experience At DAL level, I have a generic data repository providing common functionality like GetAll, GetSingle, Add, Edit, Delete for each

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

馋奶兔 提交于 2019-12-01 22:50:55
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 listed below: Employee (Master Table), Employee_Contact_Detail, Employee_Education, Employee_Skill, Employee_Experience At DAL level, I have a generic data repository providing common functionality like GetAll, GetSingle, Add, Edit, Delete for each table. Now, should I design my “Employee Data Repository” derived from my “Generic Data Repository”