Skip to main content

General

For a general guide on ASP.NET MVC, click on the following imageimage-1602129428352.png

  • Each functional domain being implemented must be added to its own Area e.g Administration
  • The folder structure to use when creating a new MVC area is

image-1601320574138.png

  • Each area must have the folders Controllers, Models and Views, the other folders are optional.
  • The function of each folder is:
    • Controller: An interface between Model and View components to process all the business logic and incoming requests, manipulate data using the Model component and interact with the Views to render the final output.
    • Views:  The View component is used for all the UI logic of the application.
    • Models: The Model component corresponds to all the data-related logic that the user works with. This can represent either the data that is being transferred between the View and Controller components or any other business logic-related data.
    • Filters: The action filters that are attributes that can apply to a controller action or an entire controller that modifies the way in which the action is executed.
    • Utilities: The classes that receives a object and must do certain data modification or calculation custom to your domain are added here. These classes do not have access to the data domain and must be able to complete its action with the data provided e.g. Calculating the strength of a password 
    • Helpers: Similar to utilities, helpers perform certain actions form or on data received. Helpers do have access to the data domain and can fetch additional data or perform data modification depending on the results of its calculation
    • Enums: Any enums only  used in this domain are added here. It can be used for drop down population etc.  
  • Each area must have a web.config
    • It must define the namespace to include in the areas views
    • It must define the handlers and other configuration specific to that area

TODO : what happens in web.config? Add Example zip folder to General page

https://signature.signifyhr.co.za/books/tools/page/v8---mvc-development