MVC Architure on .Net
am 09.11.2007 12:14:26 von prateekbaxi
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.
Re: MVC Architure on .Net
am 09.11.2007 15:05:21 von NoSpamMgbworld
One option is the Smart Client Factory (watch page wrap here):
http://www.microsoft.com/downloads/details.aspx?FamilyID=2b6 a10f9-8410-4f13-ad53-05a202fbdb63&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-" wrote in message
news:1194606866.680626.255580@50g2000hsm.googlegroups.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.
>
Re: MVC Architure on .Net
am 09.11.2007 15:36:37 von MR. Arnold
"-pb-" wrote in message
news:1194606866.680626.255580@50g2000hsm.googlegroups.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
Re: MVC Architure on .Net
am 13.11.2007 15:12:35 von sloan
You can try this url as well:
http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mv c-framework-part-1.aspx
"-pb-" wrote in message
news:1194606866.680626.255580@50g2000hsm.googlegroups.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.
>