The Aspect Series is an outcome of a numbers of years of research into diffrent Aspects of an Enterprise Class Web Applications. We perfromed targetted research on each of the aspect and combined it in one Real World Enterprise Grade Web Application. This application demonstrates the use of best practices and design patterns using most modern tools and technologies.
Aspects are divided into four categories. Client Side, Server Side, Cloud and DevOps. Below is the list of these Aspects against each of the category.
One a Client Side we have developed a state of the art modular enterprise grade Single Page Application in Angular.
On the server side we have REST APIs developed in ASP.NET CORE 3, that follows Best practices of Service Oriented Arhcitecture and Separation of Concern.
On Cloud front we are leveraging Microsoft's Azure for Authentication, Storage, Geo Retendancy, Encryption, Security and so much more.
Entire project is developed using Agile Methodologies following proper Processes and Tools for Deployment, Continious Integration, Project Tracking and Collaboration.
We used Angular CLI's scaffolding and project structuring features to lay down the structure of this appliction.
This application is highly modular that loads its components on demand basis.
Most of the UI components used in this application are from Angular Materials. Controls are masked to ensure sanity during data entry.
Data Grid demonstrates Searching, Sorting, Filtering and Server Side Pagination using oData Endpoints.
All the forms in the application uses Angular control status classes like ng-valid,ng-dirty,ng-touched and ng-pristine with RegEX to validate forms.
This application demonstrates the best use of NgRx and RxJs. A reactive state management concept inspired by Redux which creates a single source of truth application wide.
Dependency Injected Angular Services are used with NGRX Effects to call Back End APIs to Transform REST responses into Client Side Observable Models and that gets persisted in Store.
Dashboard of this application is a deck of beautifull looking sleek graph controls developed using ChartJS and populated by backend APIs in realtime fashion.
Changes on the Server are pushed to Client in real time using Microsoft's Signal R technology. This results in very responsive live graphs on the Dashboard.
Application gets authenticated from Azure Active Directory to receive JWT token which is then injected in header during api calls using HTTP Interceptors.
Lazy Loaded Routes and Child Routes are suported by Resolvers to fetch the data specific to a page before navigating to that page. With inclusion of caching stratagies this gives the very fast navigation experience.
Following Angular's MVVM nature, Data formating logic is abstracted using Built-In or Custom PIPEs.
Isolated Tests for services, components, directives and pipes are written using mocks and spies taking Dependcy Injection in consideration.
We are using Protractor for Automated Testing because it allows to test Angular-specific elements. It uses native events and browser-specific drivers to interact with application as a real user would.
TypeScript code for readability, maintainability, and functionality errors are checked using ESLint. Code that fails the quality check is not allowed to be checked in.
REST APIs demonstrates true Separation of Concern where the business logic is encapsulated in Services that performs specific job and Dependency Injects other Services or Data Access layer for functionality beyond their scope.
Services access data using Entity Framework Code First Models that are wrapped around Generic Repository Design Pattern which inturn is wrapped around Unit of Work Pattern.
ASP.net Core Custom Middlewares are written to isolate validation logic using built in and third party Data Annotations.
Best Practices of Global Exception Management are incorporated to handle exceptions globally and return a Uniform JSON Response to the client with useful status codes and error messages.
Logging is performed at the levels of Information, Warning and Error. Log Levels are configurable and logging is mostly performed globally in Asp.net core Middleware Pipeline.
Attribute routes are decorated with Authorization attributes that let only authorized users pass in based on their roles that is fetched from incoming request's JWT token.
Performance Intensive and blocking calls like API Controllers, Services and Data Access are written using C#'s Asynchronous Programming models.
For any changes in the API the connected clients are notified using Microsoft Signal R technology.
Custom Middleware are used to configure Certificates that are required by client to perform HTTPS Communication. Moreover Cross Site Request Fogey is blocked using Asp.Net Core's default Antiforgery capability.
Using MSTest Services are unit tested in Isolated fashion and all the Dependency Injected services are mocked out. Integration Tests are also performed by using In Memory Test Server.
APIs also support Versioning and api documentation is configured using Swagger.
To ensure highest code quality, rules are setup in Resharper and and enforced on the deployment level.
Azure Active Directory is setup with Users and Roles that receives Credentials from Client and returns JWT Token with Embedded User Info back to the Client.
Application is hosted using Azure App Service which provides easiest deployments, high availability, security, deployment slots, monitoring and global reach.
Logs and Exceptions are sent to Azure App Insights where they can be Monitored in Real Time and Failures are diagnosed and alerts are generated.
We are using Azure functions to send SMS using SMPT and Email Notifications using Send Grid API.
Using Azure API Management the API Endpoints have an added layer of Security in the Cloud. Polices like IP Filter, Limit Call Rate and Response Caching are applied to reduce latency and Enhance Security.
All the Keys, Certificates and Secrets throughout the application are kept in Azure Key Vault.
This application has it's configuration in Azure App Configuration Service. Configurations are managed effectively and reliably, in real time, without affecting production by avoiding time-consuming redeployments.
Application uses Azure SQL Database that is an intelligent, scalable, relational database service built for the cloud.
All the check-ins on Client Side or Server Side code goes through Azure Pipelines. Pipeline performs Code sanity checks and run unit tests before the code is deployed in production.
Git Repositories and Code Commits are managed using Azure Repos. Other team members perform Code Reviews using Pull Requests feature.
Entire project is maintained using Azure Devops. User Stories and Tasks are initiated in Backlog and Moved into Current Sprint where they live through New, In-progress to Done State. Bugs are reported and tracked in similar fashion.
Entire application is containerized using Dockers. Containers are deployed on Dockers on Azure.
Through the application development process we followed Scrum as our Agile Methodology and performed ceremonies like StandUps, Retrospective, Sprint Planning and Demos that were maintained using Azure Boards.