Click here to Skip to main content
15,892,059 members
Articles / Database Development / SQL Server

VCMBox, an MVC - FuseBox Hybrid Framework

Rate me:
Please Sign up or sign in to vote.
4.54/5 (8 votes)
8 Jul 2004CPOL14 min read 65.2K   1.7K   58  
An MVC meets FuseBox Hybrid pattern for .NET, implmented in C# with the the Northwind database.
<?xml version="1.0"?>
<doc>
    <assembly>
        <name>NorthWindController</name>
    </assembly>
    <members>
        <member name="T:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller">
            <summary>
            Controller Class acts as a messaging point
            for Viewports to communicate with the Model.
            </summary>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.EmployeeModel">
            <summary>
            A instance of the Model.
            </summary>
            <remarks>
            Action requests are made by calling
            the appropriate method of the Model.
            </remarks>
        </member>
        <member name="M:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.#ctor(Mvc.DerivedPattern.NorthWind.Tutorial.Models.Model)">
            <summary>
            Creates a new instance of the Controller.
            </summary>
            <param name="employeeModel">The Model object for the MDI Child Form that uses this Controller.</param>
            <remarks>
            Initialises the Controllers reference variable to Model.
            <code>
            public Controller(Model employeeModel)
            {
            	this.EmployeeModel = employeeModel;
            }
            </code>
            </remarks>
        </member>
        <member name="M:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.ControlHub(Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages)">
            <summary>
            The Control Hub is the single point of access for the Viewports to send
            an Action request to be evaluated.
            </summary>
            <remarks>
            The ControlHub evaluates the msg parameter and based on it's case
            selects the correct Method in the Model to enlist.
            <code>
            public void ControlHub(NorthWindControlMessages msg)
            {
            	switch(msg)
            	{
            		case NorthWindControlMessages.LoadTreeData :
            			this.EmployeeModel.LoadTreeData();
            			break;
            		case NorthWindControlMessages.LoadEmployeeDetails :
            			this.EmployeeModel.LoadEmployeeDetails();
            			break;
            		case NorthWindControlMessages.LoadOrderDetails :
            			this.EmployeeModel.LoadOrderDetails();
            			break;
            		case NorthWindControlMessages.UpdateEmployeeDetails :
            			this.EmployeeModel.UpdateEmployeeDetails();
            			break;
            		case NorthWindControlMessages.UpdateOrder :
            			this.EmployeeModel.UpdateOrder();
            			break;
            	}
            }		
            </code>
            </remarks>
            <param name="msg">An NorthWindControlMessages enumerated type. The message to be evaluated by the ControlHub.</param>
        </member>
        <member name="T:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages">
            <summary>
            The Control Messages Enumerated Type.
            </summary>
            <remarks>
            The ControlHub accepts only arguments of this
            enumerated type for evaluation.
            <code>
            public enum NorthWindControlMessages : int
            {
            	LoadTreeData = 0,
            	LoadEmployeeDetails = 1,
            	LoadOrderDetails = 2,
            	UpdateEmployeeDetails = 3,
            	UpdateOrder = 4
            }
            </code>
            </remarks>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages.LoadTreeData">
            <summary>
            Message to Load all data required to full populate the TreeView.
            </summary>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages.LoadEmployeeDetails">
            <summary>
            Message to Load a specific Employees Details as per a request via the Viewport.
            </summary>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages.LoadOrderDetails">
            <summary>
            Message to Load Order and Order Details data as per a request via the Viewport.
            </summary>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages.UpdateEmployeeDetails">
            <summary>
            Message to Update the current Viewport selected Employees Details.
            </summary>
        </member>
        <member name="F:Mvc.DerivedPattern.NorthWind.Tutorial.Controllers.Controller.NorthWindControlMessages.UpdateOrder">
            <summary>
            Message to Update the current Viewport selected Order Details.
            </summary>
        </member>
    </members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Chief Technology Officer
Australia Australia
Simon Segal resides in Melbourne Australia, is a certified MCAD, MCSD, MCDBA, MCSE, MCST BizTalk Specialist and has been working in the Software Development industry for some 10 years now. His key area of interest are distributed systems / SOA built with Microsoft technologies.

Comments and Discussions