MVC 5 skeleton This project template provides a skeleton MVC 5 application that can serve as a starting point for almost any MVC 5 application. Features & Benefits - Aims to speed up the initial setup of an MVC 5 website
- Provides the basic framework of an MVC 5 website ready to be built upon
- Conforms to and encourages MVC 5 conventions
- Provides powerful industry standard 3rd party packages ranging from jQuery and Bootstrap to aid building webpages to Ninject to provide easy to use powerful .NET Dependency Injection
- Makes use of bundling to ensure fast and efficient delivery of content such as CSS files (Bootstrap) and javascript files (jQuery)
- Now includes JQuery UI
Nuget All third party libraries are provdes via Nuget. This is advantageous as it simplifies 3rd party library incorporation. the libraries are kept in a solution level folder once downloaded and are kept track of via a config file (packages.config). With this config file you don't need to keep any libraries downloaded via Nuget in you source control allowing for a smaller and more managable solution. Key Third Party Libraries Bootstrap Bootstrap is included in the and using preconfigured bundles are attached in _viewstart. This means that Bootstrap is available in all views you create that uses the _viewstart. jQuery
jQuery is included in the and using preconfigured bundles are attached in _viewstart. This means that jQuery is available in all views you create that uses the _viewstart. From version 1.5 JQuery UI has been included. Ninject
Ninject is a powerful .NET dependency injector. This allows for clean and easily maintainable dependency injection within the application. A dependency resolver has already been created and registered with the MVC application to be used. In order to add an interface to be resolved you simply add it to the AddBindings method in the NinjectDependencyResolver object within the Infrastructure folder. Ninject is very well documented and highly regarded. With it you can set up an interface to be resolved into a specific concrete class via the dependency reslver when it is used in specific situations. This means that you can add dependencies to a controller via an interface in its constructor and Ninject will create the required concrete class and feed it in for you to use. Predefined Pages Error & Http404 Error handling is provided by a preconfigured and basic Http404 page that is set up and working and a shared error view that is set up and working to catch exceptions thrown in controllers and their actions. When compiled in debug mode this shared error view will display exception information along with a stack trace. When deploying to an Azure Website you'll need to add this to your web.config. XML Edit|Remove xml <system.webServer> <httpErrors existingResponse="PassThrough" /> </system.webServer> <system.webServer> <httpErrors existingResponse="PassThrough" /> </system.webServer>
Home An empty home page is provided (controller and view) and empty _viewstart and shared _layout that it uses. Change Log 1.6 - Updated Ninject dependancy injector so that Web APi controllers can be injected into seamlessly too with no extra work.
- Editted bundle config as it was including a validation.css file that is no longer a part of the template project.
1.5 - Added JQuery UI nuget package and amended some bundling config that was not optimal.
1.4 - Fixed bundling issue when published to Azure Website or IIS.
1.3 1.2 - Added debug error handling. Stack trace and exception description are displayed on error page when in debug mode
1.1 |