Where should I include the code for a ProgressBar in a N-Layer application using Model View Presente

Hi. I’m working on a N-layer C# winforms application. I’m using a presentation layer, service layer, domain layer and a data source layer using Martin Fowler’s layering scheme names. On the presentation layer I’m using the Model View Presenter (MVP) pattern
which means that I’m keeping the presentation logic independent of the UI (now windows forms). In the service layer (thin layer) I have application logic and this layer is basically a bridge between the presenters and the domain model. Also, in the domain
layer I have a domain model.

I’m going to need to use a progress bar in several situations which involve operations that are triggered from the UI and that need to communicate with all the layers of the application to get data and to perform calculations. I’m using Visual C# 2008 Express

Where should I include my code for the progress bar while keeping separation of concerns in my N-Layer application?

For example, let’s say that the UI triggers an operation that needs to get some data from a database and that the domain model needs to process that information. I need to use the progress bar when the domain model is processing that data. Of course that
the code that is UI related should not be included in my domain model. I believe that the code for the progress bar should be somewhere between the UI, presentation logic and service layer but I’m not exactly sure where and how.

Thanks. Best, Miguel.

Hello there,Any enterprise application  , you needs to have N tier application, it always advisable to separate the application based on different layers. It is highly recommended , you separate layers  based on the UI , wcf service layer  , business logic  layer , dal

Hi PHIJO MP,As I mentioned, I’m developing an N-Layer application  in C#. The question is that I would like to know in which layer  I should include  the code  necessary to update the progress  bar.

Hello there ,The updating the progress  bar , mainly depends on the activity actions from data  access layer  which is interacting with database.The code  should be in the UI layer for updating the progress because it has cross reference to the data access layer which is triggered  by user action.The code in the progress bar  should syn with other other operations  . Regards,Phijo Mathew Philip.