business-logic

.Net 4.0 Is There a Business Layer "Technology" ?

Hi, I have a theoretical question about the .net framework. As I see it Microsoft gave us bunch of technologies for different layers. We have the ADO.NET and with the more improved Entity Framework for Data Access. And ASP.NET for WEB UI. And even WCF for Facade and SOA. But what in the middle, what do we have for the Business Laye...

Business layer: Looking for a complete reference ?

hi I'm studying business layer and need a complete reference which covers issues about "how to manage dependency between business layer and other layers", "how many ways are there to send data between layers" and most important for me "how to group business logic and make business component and talk about possible ways....". do you kn...

Creating many new instances vs reusing them?

I have multiple business entities in VB.NET Windows Forms application. Right now they are instanced on application startup and used when needed. They hold descriptions of business entities and methods for storing and retrieving data. To cut the long story short, they are somewhat heavy objects to construct (they have some internal dictio...

Enforcing an "end" call whenever there is a corresponding "start" call

Let's say I want to enforce a rule: Everytime you call "StartJumping()" in your function, you must call "EndJumping()" before you return. When a developer is writing their code, they may simply forget to call EndSomething - so I want to make it easy to remember. I can think of only one way to do this: and it abuses the "using" key...

Protecting business logic in webservices

Is there a way that a hacker or someone who wants to copy my software logic, can reverse engineer the business logic that I have in a webservice? Is there a way to protect such information? My development platform in .net asp.net and C# ...

Can Windows Mobile Synch Services use a business layer

We're building a Win Mobile 6 warehouse app which needs to update our server based corporate DB. We've got a C# business layer that sits on our app server and we'd really like our warehouse app to go through this. We also like MS Synch Services. Is there a way to combine the two ie can we use sync services but get them to go through o...

dll custom business logic

I've a project where some business logic is separated to an DLL project, this DLL contains the business logic for this software for a specific customer. Now I've a problem after another client with different rules want to implement the software, I need someway that the application load the appropriate dll according to the client using...

In separate data access & business logic layer, can I use Entity framework classes in business layer?

In separate data access & business logic layer, can I use Entity framework classes in business layer? EDIT: I don't think I will need to swap out the data access layer from my business logic in the future (i.e. will be SQL Server), however I will for the UI layer. Therefore the question is more meant to be are there any major issues wi...

Implement the business logic in an app server with spring

Is posible implement the business logic in an App Server remote using pojos instead of either EJB or Servlets???. The main idea is apply a model of 3 layers where the clients may be both web browsers and desktop applications, and they share the business logic in an App Server. this would be the architecture browser----- >Web Server --...

Passing HttpFileCollectionBase to the Business Layer - Bad?

hopefully there's an easy solution to this one. I have my MVC2 project which allows uploads of files on certain forms. I'm trying to keep my controllers lean, and handle the processing within the business layer of this sort of thing. That said, HttpFileCollectionBase is obviously in the System.Web assembly. Ideally I want to call to ...

Documenting logic in javadoc

I have a question about where to document logic in javadocs. For example, I have the following method signature in an interface: public int getTotalAssociationsAsParent(Long id, Long type); The method returns associations where the given ID is the parent and the association is of type 'type'. ID is required, but if type passed in is...

Should i use partial classes as business layer when using entity framework?

I am working on a project using entity framework. Is it okay to use partial classes of the EF generated classes as the business layer. I am begining to think that this is how EF is intended to be used. I have attempted to use a DTO pattern and soon realized that i am just creating a bunch of mapping classes that is duplicating my effort...

Patterns / Solutions to complicated Feature Management

Hi all, My company develops CDN / Web-Hosting solution. We have a middleware that's served as a business logic layer and exposes web service for the front-end. I would like to seek for a clean solution to feature management - there're uncertainties and ugly workarounds/solutions in the software that the dev would say "when it happens o...

Repository, Service or Domain object - where does logic belong?

Take this simple, contrived example: UserRepository.GetAllUsers(); UserRepository.GetUserById(); Inevitably, I will have more complex "queries", such as: //returns users where active=true, deleted=false, and confirmed = true GetActiveUsers(); I'm having trouble determining where the responsibility of the repository ends. GetActiveU...

What classes should I map against with NHibernate?

Currently, we use NHibernate to map business objects to database tables. Said business objects enforce business rules: The set accessors will throw an exception on the spot if the contract for that property is violated. Also, the properties enforce relationships with other objects (sometimes bidirectional!). Well, whenever NHibernate ...

Separation of logic from presentation: HTTP variable names?

Hello all, This could probably be considered an academic question, rather than a real world one - but throwing it out to see if anyone has any great ideas! We all know that keeping the business logic of an application separate from the presentation is a good idea (I'm looking at web-apps atm), but there needs to be an understanding betw...

Recieve Events from the BOs

How to keep receiving events even with changed references? In a project I have the following relation between BO and GUI By e.g. G could represent a graphic with time lines, C a TimeLine curve, P - points of that curve and T the time that represents each point. Each GUI object is associated with the BO corresponding object. When T ch...

Business Logics on the client side

Why do people say that business logics should be implemented on the server side code (e.g. EJB) and not on the client application code? The example that I have in mind is a business object validation on a EJB based architecture. Does it really have to be delegated to the EJB or is it ok to run it on the client before the object is sent...

Using unity to decouple business logic layer from data access layer

I have implemented Unity within my Asp.Net MVC2 project. I am currently registering my BLL types on Application Start. Then I created a class called UnityControllerFactory that is in charge of resolving my dependencies within my controllers. I am simply using Property injection to accomplish this by using the dependency attribute. ...

How to update UI from business layer?

I have a three layer application in C#. In business layer i have many threads that do same job . I want to show the progress of each thread on UI , but i don't have the reference of presentation layer . How can i do this ? What's the best way for this ? Thanks . ...