Abstract
Converting the ODS/API to net core 3.1 requires a paradigm shift on how we migrate. The application started when MVC was in its infancy, and as the framework matured, the ODS/API has not and has implementations from different versions of the MVC framework. For example, our controllers are at different versions of the MVC framework. With the introduction of MVC 6 (net core) some of the legacy implementations has been discontinued. For example, authentication is implemented differently than how we have it in the current ODS/API. With our current implementation, we use an attribute, inheriting from IAuthenticationFilter. This interface is been removed, and in net core we need to implement middle ware to move forward.
Audience
This document is intended for the development team, and it describes what changes are needed, and what decisions has been made through the migration. The changes are located at:
- Ed-Fi-ODS (main branch)
- Ed-Fi-ODS-Implementation (main branch)
Process
During the migration, a decision was made to split out the common elements from net framework 4.8 into a common assembly so that items that can be shared between both stacks are isolated. A new net core framework 3.1 assembly is created to implement the net core specific items. Along with a new entry point that is net core specific that utilizes Kestrel, and can be run under IIS or as a console application. This allows for a simpler approach while maintaining the legacy implementation. The unit tests where not addressed during this initial migration, and will need to be in the future.
A heavy reliance on preprocessor directives is use in class where assemblies could not be split. When everything is migrated then these separate assemblies will be consolidated using the preprocessor directives. The standard adopted is:
Constant | Usage |
---|---|
NETFRAMEWORK | All standard net implementations (e.g. net 4.8) |
NETSTANDARD | All net standard implementations (e.g. netstandard2.1) |
NETCOREAPP | All net core implementations (e.g. netcoreapp3.1) |
All C# specific files (.cs) that are NETFRAMEWORK are renamed to (.net.cs) so that they can be identified easily.
Assumptions
- The net core application will be run in parallel with the existing application to have a base line for testing.
- The net core branch will be brought up to date with the current stable development branch after each sprint.
- Ideally code base should be able to be merged into the main development branch at the end of the each sprint (dark shipping).
- Features are migrated into one assembly.
- Tests will be converted to net core 3.1.
- The tests will be removed from the existing net projects.
Resource Requirements
A small team of developers are needed that have the following skill sets:
- A strong understanding of object-oriented programming (OOP) principles
- A strong understanding of SOLID principles
- A strong understanding of Web API principles.
- An understanding of .NET framework (net core 2.x and/or 3.x is plus)
- A strong understanding of an object-oriented programming language (C# or java is a plus)
- A strong understanding of Domain Driven Design
- A strong understanding of testing
- A willingness to learn, and work with a virtual team.
- A strong understanding of agile methods and principles.
- Proficiency with git commands and github workflows
Stories
The following list is the likely stores required so the application can be migrated to net core in parallel with the current application.
Stories | Priority | T-Shirt Size | Changes Required | Status | Notes |
---|---|---|---|---|---|
Decision on IOC container | MUST HAVE | SMALL |
| DONE | |
Migrate Codegen to 3.1 | MUST HAVE | MEDIUM |
| DONE | |
Package Migration | MUST HAVE | MEDIUM |
| DONE | |
Migrate Common | MUST HAVE | SMALL |
| DONE | |
Api Project for Net Core | MUST HAVE | LARGE |
| DONE | |
Entry Point for Net Core | MUST HAVE | SMALL |
| DONE | |
Convert Controllers | MUST HAVE | LARGE |
| DONE | |
Refactor into common items | MUST HAVE | LARGE |
| DONE | |
Implement container registration | MUST HAVE | LARGE |
| DONE | |
Update projects to net core and/or net standard | MUST HAVE | LARGE |
| DONE | |
Routing Approach | MUST HAVE | MEDIUM |
| DONE | |
Add nHibernate support (Data management) | MUST HAVE | MEDIUM |
| DONE | |
Add Entity Framework support | MUST HAVE | MEDIUM |
| DONE | |
Extensions feature | MUST HAVE | SMALL |
| DONE | |
Authentication and OAuth | MUST HAVE | MEDIUM |
| DONE | |
Open Api Metadata Feature | MUST HAVE | XTRA LARGE |
| DONE | |
Aggregate Dependencies Feature | MUST HAVE | XTRA SMALL |
| DONE | |
Plugins | MUST HAVE | SMALL |
| DONE | Requires more testing with a plugin assembly. |
Composites Feature | MUST HAVE | SMALL |
| DONE | |
Change Queries | MUST HAVE | SMALL |
| DONE | |
Profiles Feature | MUST HAVE | LARGE |
| NOT STARTED | |
Identity Management Feature | MUST HAVE | SMALL |
| NOT STARTED | |
Unique Id Integration Feature | MUST HAVE | SMALL |
| DONE | |
Record Ownership Feature | MUST HAVE | SMALL |
| DONE | |
Convert Swagger UI project to net core 3.1 | MUST HAVE | MEDIUM |
| IN PROGRESS | |
Convert Sandbox Admin Web | MUST HAVE | LARGE |
| IN PROGRESS | |
Convert Test projects | MUST HAVE | LARGE |
| IN PROGRESS | |
Convert Test Harness to net core 3.1 | MUST HAVE | SMALL |
| IN PROGRESS | |
Regression Testing | MUST HAVE | MEDIUM to XTRA LARGE |
| NOT STARTED | |
Deprecation of the net 48 application | MUST HAVE | MEDIUM |
| NOT STARTED | |
Docker Developer Environment | NICE TO HAVE |
| NOT STARTED | ||
Docker Deployment Environment | MUST HAVE |
| NOT STARTED | ||
TeamCity Build | MUST HAVE | IN PROGRESS | We have a functional build but fails on tests due to WebApi related assemblies. These assemblies fail with an error with nunit.console. | ||
JSON config transformation in powershell | MUST HAVE | IN PROGRESS | |||
Web config setup for IIS hosting | MUST HAVE | NOT STARTED |