business-logic

MVC, Entity Framework, Business Logic

Although I believe I have a good grasp on MVC (from Rails), I'm learning the "MS Way" with ASP.NET MVC. Also, I am learning Entity Framework as well. I've created an Entity called User in my Models folder. Using LINQ to EF I can retrieve records and all is good. Now, I want to put some business (or what I call, domain) logic in. But...

Where should the business logic be placed when using Doctrine 2 and Zend Framework

Hi all, I've a question related to Doctrine 2 and Zend Framework. If you use Zend Framework without Doctrine by default you place business logic in the models. But as Doctrine 2 does have Entities where should the business logic be placed? I first had created models where the entity manager did calls to the Entities. But when I wanted...

C# Allow user to enter conditional rules

Hello. I write code in isolation, that is I work for myself. I need some advice on how you might implement the following functionality or if there are some tools that already exist to help make this task easier to accomplish. I have a scenario (C# application) in which I would like the user to be able to enter conditional rules which wi...

Service layer and controller: who takes care of what?

In class we're now learning how to build up a Spring application, even though spring isn't directly involved, we learned how to make the interfaces for DAO and service layer objects. Please correct me if I'm wrong: DAO layer is pretty abstract: it just contains the CRUD operations and is further used to read data.(ie: get all objects, ...

ACL's Permissions and Business Logic

I would like to know where people draw the boundary between assigning permissions to a user in a muliti user appliction and the business logic. For example if a user can have permission to access a number of cars do you assign these permissions directly through the user class by adding them to a collection of car objects on the user o...

Business Logic Security in Web Applications

Some weeks ago I've asked a question regarding best practice on how to secure a Business Layer. In the meantime I have something based on PrincipalPermission and some custom code for specifics checks. But I'm still not really happy about that solution and struggling how to make it better. What I'm still trying to achieve: Ensure that...

Returning strongly typed stored procedure results

Currently, if we want to get a list of records from the database, our DAL returns a DataTable to our business layer, which then returns the same DataTable to our calling interface (in this case an asp.vb page). However I don't believe we should be returning a DataTable from the BLL, I always thought it would be better to return a strong...

how to transfer business rules to new data base in 3-tire Architecture ?

hi , as we know that 3-tire Architecture consist of Presentation tier , business logic and data base tier the business rules (like : stored procedures , triggers ...) are stored in data base tier , so when we want to replace the data base engine (like ms sqlserver) with new db engine (like oracle) these rules must be transfer to new db...

hibernate spring: PrePersist the place for business-logic?

Hi, I am using Spring + Hibernate to create and store a record in a MySQL database. Just before persisting a record I want my system to generate a random-string which will be stored in a field in the entity that is being stored. This random-string of characters will be used later as an access-key to retreive the record and confirm the ...

Moving from ASP, business logic trapped inside stored procedures...

How would you structure a large project with most of the business logic already inside stored procedures? Here is a little bit of background : We are moving from classic ASP to ASP.NET (VB) and pretty much all the business logic is inside stored procedures. Getting the logic out of there is pretty much impossible since my boss doesn't ...