AsyncTask

Asynchronous Task Extension Library


Description
CREATED BY: [Latency McLaughlin]
UPDATED: 9/23/2024
FRAMEWORK: net452, netstandard2.0, netstandard2.1, net9.0
LANGUAGE: [C#] preview
OUTPUT TYPE: Library [API]
SUPPORTS: [Visual Studio]
GFX SUBSYS: [None]
TAGS: [API], [TAP], [TPL], [.NET], [Core], [ORM], [IoC], [DI], [Generics], [Delegates], [EventHandlers], [Parametric-Polymorphism]
STATUS:
LICENSE:
VERSION:

Model-View-Controller / Adapter Dynamically Linked Library (MVC/MVA)

Task-based Asynchronous Pattern (TAP)


Screenshots

WinForms

AsyncTask

WPF

AsyncTask



Background

There have been many instances throughout my career where incompetent developers try to release code to the company and its stakeholders which deadlock underlying dependency OSI layers which hinder project performance and scheduling. Those tasked to sustain code as dependency will be frustrated debugging these efforts when trying to qualify responsibility of failure.

The goal was to develop an API that would be universal and simple to use in helping eliminate any ‘concerns’ a.k.a cohesive areas of functionality, by wrapping amateur developers efforts with ease and addressing cross-cutting/horizontal concerns as well. The goal was to reduce time & development costs in validating efforts for risk mitigation serving as a universal multi-functional paradigm. Any developer can therefore use it to construct new code with the same underlying mechanics and reduce boilerplate code.

Some nice things about the C# language is that it is far superior to Java and can detect within a certain tolerance what the type might be so that the type parameter can be omitted from its calling convention. Note that both languages have Reflection built-in, which technically makes it is possible to drill down many OSI layers and pull out information used for dynamic / RT calling conventions.

Java has limitations and has nothing to offer of greater value which is described here for Comparison. In fact, our methodology for this article is to use ‘generic programming’; a feature set of Java not properly supported since reflection in Java cannot be used to construct new generic realizations nor allows generics directly for primitive types.

Introduction

This article introduces an API which wraps processes asynchronously; supporting deadlock protection, timeout, cancellation requests, checkpointing, and a parametric polymorphic MVC design by convention.

AsyncTask

Callback support for the following delegates:

AsyncTask is compiled as a library packaged for the NuGet marketplace. The project itself, supplies an application driver, test suite, and the library’s source code.

Model-View-Controller (MVC) is an architectural pattern that separates application’s data model and user interface views into separate components. This is what the definition says. However, to fully understand the MVC we have to introduce required terms and point benefits of MVC.

AsyncTask

The view is a user interface element (typically a window) that presents the data to the user and allows the user to change the data. It is a typical situation to have several views active at the same time (for example in the Multiple-Document Interface).

The controller is a connection point between the model and views: views register in the controller and reports changes in the model to them.

Forget about the data model and focus on replacing this with an adapter. Model–view–adapter MVA or mediating-controller MVC is a software architectural pattern and multitier architecture. The model–view–adapter solves this rather differently from the model–view–controller by arranging model, adapter or mediating controller and view linearly without any connections whatsoever directly between model and view.

What do you call something that has connections directly related? Dependancies! If a dependancy breaks down, so does the rest of the system. Think about it! In an alternative scenario, you can use DI to replace additional constraints that may be binded as well. This is where aspect oriented programming (AOP) will reduce the amount of boilerplate code which in effect also reduces the maintence efforts and cost along with the project size and complexity.


This API has several benefits, such as:

AsyncTask helps you to know exactly what your code does.

Flexible delegate injection for any situation.

Overview

Installation

This library can be installed from NuGet.

Output

AsyncTask

Other Features

References

TPL, .NET, ORM, IoC, DI, Generics, Delegates, EventHandlers, Parametric Polymorphism

Report An Issue

If you have a patch to contribute, a feature to request, or a bug to report, please post to the Issue Tracker.

Donation

If you want to donate to my efforts on this project, please use the following link,

Donate via Paypal

License

The source code for the site is licensed under the MIT license, which you can find in the [MIT-LICENSE].txt file.

All graphical assets are licensed under the Creative Commons Attribution 3.0 Unported License.