The portal application is two pieces.
Dotnet Core back end: specifics about versions are found in the cpu-app/cpu-app.csproj
file.
Angular front end: specifics are found in the cpu-app/ClientApp/package.json
file.
The front end is built for use by a social service agency or general public. All government facing parts of the interaction with the data are handled in Dynamics. Therefore this front-end acts as a data collection area outside of Dynamics. All functionality that gets data from Dynamics should be located behind a protected siteminder route.
The front end contains forms which are built from subcomponents. Each form has its own page component, service, transmogrifier object, and convert-to-dynamics function. The template syntax never interacts with Dynamics data or values directly and relies on a conversion layer to convert the data into viewmodels that bind to forms and components. On a submission, a function pulls relevant information into something that can be sent back to the back end and easily cleaned for Dynamics.
Since a user can save and continue, form validation is done at a field level and the user can save the forms in an invalid state. Clicking "submit" should determine if all of the information makes sense together and that mandatory parts are included.
The back end runs in openshift and takes HTTP requests from the front end. It cleans those HTTP requests into json that can be used with Dynamics. It then gets appropriate credentials and negotiates a connection with Dynamics then performs the interaction and returns the results from Dynamics back to the front end where the user can interact.
cpu-app/cpu-app.csproj
file and install it.bash
or zsh
. cpu-app/ClientApp
folder in the project.npm install
to build the node_modules
folder from the dependencies listed in package.json
. (You may or may not need to npm install -g @angular/cli
to install the Angular CLI tools.)Windows location:
C:\Users\<user account short name>\AppData\Roaming\Microsoft\UserSecrets\<guid that Dotnet generated for the project>
Mac/Linux location:
~/.microsoft/usersecrets/<user_secrets_id>/secrets.json
There are several ways to run this project. The simplest is from the command line because Visual Studio does a lot of additional behind-the-scenes configuration which can complicate running the development code.
bash
or zsh
. cpu-app/ClientApp
folder in the project.dotnet run
or dotnet watch run
. Adding watch
will automatically reload the project when a .cs
or .ts
files changes on disk. This is very handy for development.Any plaintext editor or IDE can be used to make file changes on disk. The important part is things like syntax highlighting and other useful tools that help you identify mistakes early.
VS Code is a good editor and comes with a built-in terminal that we can use for running the project. Helpful plugins: