5.4. Creating a Project
The Following topics will show how to use the Visual Studio wizards to create the framework of an MVC.NET application.
Open File New Project in Visual Studio 2015 and create a new project named FBMVCExample
.
Figure 30. Create the FBMVCExample project
Figure 31. Change authentication setting
For now, we will create a web application with no authentication, so click the Change Authentication button to disable authentication. We will get back to this issue a bit later.
Figure 32. Disable authentication for now
5.4.1. Structure of the Project
The project that you create will have virtually no functionality, but it already has its basic structure, described briefly in the following table:
Folder or File | Purpose |
---|---|
| Where private web application data, such as XML files or database files, are located. |
| Contains some main configuration settings for the project, including the definitions of routes and filters. |
| Static content goes in here, such as CSS files and images. It is an optional convention. You can store CSS files anywhere you want. |
| Controller classes are saved here. It is an optional convention. You can store controller classes anywhere. |
| View model and business model classes are saved here although it is better for all applications (except for the simplest ones) to define a business model in a separate project. It is an optional convention. You can store model classes anywhere you like. |
| Stores the JavaScript libraries being used in the application. By default, Visual Studio adds jQuery libraries and several other popular JavaScript libraries. It is an optional convention. |
| Stores the views and partial views. They are commonly grouped together in sub-folders name for the controllers they are connected with. |
| Stores layouts and views not specific to one controller. |
| Contains the configuration information that ensures that views are processed within ASP.NET and not by the IIS web server. Also contains the namespaces imported into views by default. |
| The global class of an ASP.NET application. A configuration for a route is registered in the file with its code ( |
| The configuration file for the application. |
5.4.2. Adding the Missing Packages
We will use the NuGet package manager to add the missing packages:
FirebirdSql.Data.FirebirdClient
EntityFramework (automatically added by the wizard)
EntityFramework.Firebird
Bootstrap (automatically added by the wizard)
jQuery (automatically added by the wizard)
jQuery.UI.Combined
Respond (automatically added by the wizard)
Newtonsoft.Json
Moderninzr (automatically added by the wizard)
Trirand.jqGrid
Not all packages provided by NuGet are the latest version of the libraries. It is especially true for JavaScript libraries. You can install the latest versions of JavaScript libraries using a content delivery network (CDN) or by just downloading them and replacing the libraries provided by NuGet. |
Right-click the project name in Solution Explorer and select the Manage NuGet Packages item in the drop-down menu.
Figure 33. Select Manage NuGet Packages
Find and install the necessary packages in the package manager.
Figure 34. Select packages for installing