business-logic

Business logic layer, multiple tables, relationship

In the business logic we map, Tables to Objects and fields of this table to properties. What to do in one-to many relationship? Just an example: I have Table, Products and Categories. I need to drag all products and instead of Category_ID (Products table) need to display actual Category name wich is stored in Category table. What is pr...

looking for advise on importing excel into mysql with php

Alright, see if I can pick your brains from you all. I'm currently working on a project where all the information comes from different clients, the only thing in common is that the received data is done with excel. The excel spread sheet that they present is just a bunch of references and codes, and the problem than I'm facing is that...

Configuring business logic tier from WCF Service Application

I have a business logic tier I work with that requires configuration based on a custom configuration file. When using this tier within a web or windows application, I initialize the business logic tier within application startup, passing in the path to the configuration file which is configured in app.config or web.config. I'm now tryin...

Link between BO and GUI is broken. What to do?

I have some points (car stops) to represent on a time graph. These points are linked between them by lines. Points + Lines represent a Graph (that is a car schedule). The Graph can be modified by moving CarStops in time with the mouse. I decided to implement Points and Lines as controls (thought that will be easier to move them on the p...

How should one deal with invalid business objects in code?

Lets say that you have a business object whose current state implies that there is some kind of a bug in your code. Or basically any scenario where you are working with your own data but it is in a state that should never occur violating some rules. I like to typically check for such conditions and assumptions because it allows me to c...

Building a very custom application upon google applications and enterprise - CAN it be done?

Hi guys - I think I haven't been able to define my question properly. I've been doing a bit of reading on google applications and the idea of integrating their applications such to form a complete product. Especially after reading case studies of small companies shifting to google and 'customising' google applications. Basically I have ...

In BusinessLogic layer in C#

Now,I wrote businessLogic layer.In this project, Table's column name are Product, UM, ProductGroup, ProductCode, ProductName, BuyingPrice, SellingPrice, IsActive, IsDeleted and then i wrote storde proceducre, they are 1. Product_SelectList 2. Product_SelectByProduct 3. Product_SelectByUM 4. Product_SelectByProductType 5. Product...

How do I deal with a bidirectional dependency between my business and data access layers?

I have an application with three layers (Presentation, Business Logic, and Data Access). In the data access layer, I have an object called Unit, and I have another object called Unit in the business layer. When Insert() is called on the Unit object in the business layer, it calls the Insert() method on the corresponding object in the d...

Business Logic Layer Pattern on Rails? MVCL

That is a broad question, and I appreciate no short/dumb asnwers like: "Oh that is the model job, this quest is retarded (period)" PROBLEM Where I work at people created a system over 2 years for managing the manufacture process over demand in the most simplified still broad as possible, involving selling, buying, assemble, The system i...

What sort of graph to represent this business logic decision tree?

How would I usually represent this business logic in a graph? A is true if B is true or C is true C is true if D is true and E is true and F is true X is true if Y is true and C is not true Is it a directed acyclic graph? How do I represent the 'and'/'or' logic in the graph, in graph terminology? (I am looking for the corr...

Does business logic belong in the service layer?

I've got a set of classes, namely, a data transfer object, a service implementation object, and a data access object. I currently have business logic in the service implementation object; it uses the dao to get data to populate the dto that is shipped back to the client/gui code. The issue is that I can't create a lightweight junit test...

CLR Stored Procedures

In an ASP.NET application, I have a small number of fairly complex, frequently used operations to execute against a database. In these operations, one or more of several tables needs updates or inserts based a logical evaluation of both input parameters and values of certain tables. I've maintained a separation of logic and data access, ...

How to handle BL cache for multiple web applications?

I recently received a project that contains multiple web applications with no MVC structure. For starters I've created a library (DLL) that will contain the main Business Logic. The problem is with Caching - If I use the current web context cache object than I might end up with duplicate caching (as the web context will be different for ...

Logic to skip repeating values in a variable

i have a loop where a variable value will change in each loop and display those values in each loop. i need to skip the display of the value if the same value repeats from second time ...

FluentNHibernate Unit Of Work / Repository Design Pattern Questions

Hi all, I think I am at a impasse here. I have an application I built from scratch using FluentNHibernate (ORM) / SQLite (file db). I have decided to implement the Unit of Work and Repository Design pattern. I am at a point where I need to think about the end game, which will start as a WPF windows app (using MVVM) and eventually implem...

Where should I exclude and select information BL or DL?

Hi guys; I have another conceptual question. Suppose I have a Data Layer and a Bussines Layer. I have on my data base for example Customers and those customers has an assigned Vendor: Customers(customerID, customerName, customerAddress, vendorID) Vendors(vendorID, vendorName, vendorAddress) Now suppose my Vendor logs into my web appl...

Modelling Business Logic with NON-Techies

The setup: Winform/ASP.NET MVC projects. Learning NHibernate SQL-Server driven apps I work with clients that have no idea how to model an application. That's what I'm for. However, we have lots of conflicts with validation, mis-understandings, etc. For example, the client will ask for an order entry screen. The screen should require...

Back Orders for ERP: data model references ?

My question is: do you know of any real good reference (book, web) for ERP database design ? I have built an ERP using Sql Server as a back-end. There are different types of Client documents (there are also Supplier Docs): Order -- impact: Back-Orders (BO) Delivery Note (also used for returns, with negative quantity) --impact: B...

Managing important runtime business logic with regard to a codebase

I'm working on a project which will end up have a lot of application information stored in the form of records in a database. In this case, it's the configuration of data views: which grid columns to show/hide default filters to apply to each grid view column titles sorting subtotaling ... This information is a big part of the value...

Invoice Discount: Negative line items vs Internal properties

Should discount on invoice items and entire invoices be negative line items or separate properties of an invoice? In a similar question, Should I incorporate list of fees/discounts into an order class or have them be itemlines, the asker focuses more on orders than invoices (which is a slightly different business entity). Discount is pr...