MVC on .NET

P

-pb-

We are developing a Windows client using .NET 2.0 and C#. We have
decided to use MVC based architechture due to its obvious advantages.
This application shows data from database in a Grid. We want to add a
functionality of Printing grid and export grid to XL sheet. I would
like to know where will I have to code above functionalities? Should
it be in view or controller?

Any suggestion is well come.
 
G

Guest

For the MVC pattern, you should put all your logic into the controller.
The view is basically the visual presentation of the data, whilst the
controller, as it name suggests, controls.

There are other thoughts on this. Some say the view can contain small bits
of logic, but I prefer to separate it out as much as possible.
Check out http://martinfowler.com/eaaDev/PassiveScreen.html,
http://martinfowler.com/eaaDev/PresentationModel.html and
http://martinfowler.com/eaaDev/SupervisingPresenter.html for the
alternatives.

We are developing our consoles using the MVC pattern. We've made the views
as simple and plain as possible.
All event handling, business logic, import/export, printing etc is done from
the controller.
This should improve the ability to test the controller logic with the view
implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top