473,840 Members | 1,577 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MVC Architure on .Net

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.

Nov 9 '07 #1
3 1373
One option is the Smart Client Factory (watch page wrap here):
http://www.microsoft.com/downloads/d...DisplayLang=en

You will have to also download a few other things (mentioned on the page) to
get it working. This is actually MVP, I believe, which is a variation of MVC
(Presenter rather than Controller). The factory will guide you on adding new
forms, hooking them together, etc. There is a bit of a learning curve, but
it is fairly easy to add new views.

As for your question, most of the actual code is in underlying libraries and
not in the view or the controller/presenter. You do this so you can slap a
web front end on the application in the future, if management desires. There
are certain pieces of functionality that cannot be encapsulated, but they
are rare.

The general rule for MVC or MVP is this.

1. A view represents a specific form that is shown to a user (page in web
apps)
2. A presenter/controller shows this view at the appropriate time and links
actions back to the libraries that encapsulate functionality of the
application

I think darron schall has a nice explanation, when he states:
http://www.darronschall.com/weblog/archives/000113.cfm

"In MVC, the model stores the data, the view is a representation of that
data, and the controller allows the user to change the data. When the data
is changed, all views are notified of the change and they can update
themselves as necessary (think EventDispatcher )."

It is also has a decent explanation of the difference between MVP and MVC
and why MVP is now the golden child. :-)

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************** *************** *************** ****
| Think outside the box!
|
*************** *************** *************** ****
"-pb-" <pr*********@gm ail.comwrote in message
news:11******** **************@ 50g2000hsm.goog legroups.com...
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.

Nov 9 '07 #2

"-pb-" <pr*********@gm ail.comwrote in message
news:11******** **************@ 50g2000hsm.goog legroups.com...
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.
That would be in the Bussiness making a call to the Service layer.

The new boy on the block is MVP.

MODEL-VIEW-PRESENTER

http://www.polymorphicpodcast.com/

click 'Shows'

click 'Design Patterns Bootcamp: Model View * Patterns*

view parts 1-5
Nov 9 '07 #3
You can try this url as well:
http://weblogs.asp.net/scottgu/archi...rk-part-1.aspx


"-pb-" <pr*********@gm ail.comwrote in message
news:11******** **************@ 50g2000hsm.goog legroups.com...
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.

Nov 13 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4663
by: pjdouillard | last post by:
Hello all, Here is the context of my problem: We have an ASP.NET 1.1 application that has its own application pool setup and that runs under the identity of a NT Domain service account (this is for security reason when accessing databases). We use the Integrated Windows authentication to authenticate users, and we have setup the Web.config file to authenticate those users against 3 NT Domain Global Groups. Everything is working fine...
3
1506
by: saxenavaibhav17 | last post by:
Actually at some place I am creating object of outcome class. its taking five argument. i don't want to give 3 and 4 th argument. i want to give 1,2 and 5 th argument. Outcome ot(0,MW_MESSAGE, , ,this);\
0
9860
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10603
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10301
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9440
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7838
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7023
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5874
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.