The initial goal is to build an ASP.NET Core project that accesses the AdventureWorks database. Within the solution there will be multiple sub-projects separating the front-end technologies from back-end support requirements including data access and business logic. Domain Driven Design (DDD) will also drive separation of business needs and usage.
Ideally we will be able to demonstrate multiple techniques for performing the same task so we can compare and contrast differing solutions. For example we would like to see how Razor and Angular would implement the same UI using the same backend data and classes. Additionally, we would also like to explore basic web API design compared to an OData 4 API.
Unit testing and Test Driven Development (TDD) will be a key aspect of development. At times technologies will be explored with minimal testing but will be added once the technology is better udnerstood. Properly implemented and tested classes and modules will help enforce the 'S' and 'O' in SOLID design.
We expect the initial completed solution to require the following tools, technologies and libraries. This list will expand as functionality is added to the solution.
- Backend Tools and Libraries
- Visual Studio 2017
- Visual Studio Code
- nuget package manager - for backend libraries and tooling only.
- .NET Libraries
- .NET Standard 2.0
- .NET Framework 4.7.1
- .NET Core 2.1.4
- Entity Framework Core 2.0
- Automapper - mapping database entities to web API classes
- Frontend Tools and Libraries
- MVC/Razor - .NET style web experience and host for Angular
- Node and NPM - cmd line dev tools
- Angular CLI 1.4.10 - Angular cli addon to npm (version generates 4.4.6 code)
- Angular 4.4.6 - LTS version
- Bootstrap 3.3.4 - latest 3.3 version
Angular 5.0+ requires Bootstrap v4.
Create the initial solution as a "Blank Solution" so that additional projects can be easily added with correct namespaces. Choose "Other Project Types/Visual Studio Solutions" on the left and then the "Blank Solution" template. Give the solution a good "BaseSolutionName" that new dotted project names can then be added to.
- Create project and commit at interesting steps.
- Create a new repository (github for example) with no starter files.
- From command line in folder where .git is (or a subdirectory) enter the following commands:
> git remote add origin git@github.com:user/repo.git
> git push -u origin master
Where the user
is your github userid and the repo
is the name of your new repo.
- Right click the solution node and select Add/New Project... inside the solution
- Visual C#/.NET Core on the left filter menu.
- .NET Framework 4.7.1 from the SDK version drop down menu at the top.
- Select ASP.NET Core Web Application template.
- Enter a name and location of the new project at the bottom of the dialog. For example "BaseName.Web".
- Select the project template for this type of application.
- At the top choose .NET Core and ASP.NET Core 2.0
- Select the Empty template. This will create a blank project that we will add to.
- Enable Docker Support should be unchecked.
Run Build/Build Solution to verify the project builds cleanly.
Running the initial project has some options to note. It can be run via IIS Express or via various browsers. If you choose to debug via a browser then it can be beneficial to use a browser that you do not use day to day. This eliminates cookies, bookmarks and other extraneous data your normal browser would bring with it.
See AdWorksCore.Web Readme for more information.
- Right click the solution node and select Add/New Project... inside the solution
- Visual C#/.NET Core on the left filter menu.
- .NET Framework 4.7.1 from the SDK version drop down menu at the top.
- Select Class Library (.NET Standard) application template.
- Enter a name and location of the new project at the bottom of the dialog. For example "BaseName.Data".