Releases: hassanhabib/The-Standard
v2.11.1
This release promotes the Last Day principle. Which says:
"Everyday can be the last day on any given project. Therefore, every effort, whether it be a design, development, documentation or testing automation must be brought to a good stopping point at the end of every engineering day. Engineers adhering to The Standard must ensure that their work is in a state that can be picked up by another engineer on the very next engineering day. This practice ensures the continuity of the project, but more importantly the accomodation of any potential unforeseen circumstances."
v2.11.0
What's Changed
- DOCUMENTATION: Update v2.10.3 FromTask by @glhays in #293
- DOCUMENTATION: Adds
async
SelectAll Broker Sample by @glhays in #298 - DOCUMENTATION: Support Brokers Abstraction v2.10.3 by @glhays in #300
- DOCUMENTATION: v2.10.3 Abstraction Refinement by @glhays in #302
- DOCUMENTATIONS: Add The Standard in Russian by @ZafarUrakov in #306
- CODE RUB: Reverts Validation Private Method Asynchronous Abstraction by @glhays in #311
- STANDARD: Controllers v2.11.0 by @glhays in #308
- Revert "STANDARD: Controllers v2.11.0" by @hassanhabib in #312
New Contributors
- @ZafarUrakov made their first contribution in #306
Full Changelog: v2.10.3...v2.11.0
v2.10.3
V2.10.3
What's New
This release contains the asynchronization abstraction at the operation level, and a new principle regarding readability over optimization
In this release you will learn about:
- Find more information regarding
Asynchronization Abstraction
: Here - Find more information regarding
Readability over Optimization
: Here
Contributions
- DOCUMENTATION: Update Version Badge Latest by @glhays in #280
- CODE RUB: Spelling Error Correction by @richardaubin in #282
- CODE RUB: Foundation Correction by @glhays in #283
- DOCUMENTATION: Foundations Enhancement by @glhays in #285
- DOCUMENTATION: Proccessings Proofing by @glhays in #287
- DOCUMENTATION: Upgrade V2.10.3 by @glhays in #291
New Contributors
- @richardaubin made their first contribution in #282
Release Closes: #289
Full Changelog: v2.10.2...v2.10.3
v2.10.2
What's New
This release contains the rules for Exposure Layers APIs naming conventions and http verbs.
In this release you will learn about:
- Using custom http verbs/methods to support your API capabilities here
- Routes naming conventions for all cases, such as many-to-one, many-to-many and one-to-one here
- Introduction to x-form-urlencoded parameters here
Contributions
- CODE RUB: typo in 2.0.2.5.0 by @jayserdny in #277
- DOCUMENTATIONS: Introduce Custom Http Verbs & UrlEncoded Forms by @hassanhabib in #279
New Contributors
- @jayserdny made their first contribution in #277
Full Changelog: v2.10.1...v2.10.2
V2.10.1
What's Changed
*The major feat of this release is in the Exception models adhering to Anemic Data Models
, and the exception messaging will now exist in the Service
layer.
The Standard Community would like to give a special thanks to Abdulsamad Osunlana (@aosunlana) for his major contribution to this release. As well as all the community members for contributing time to the success of The-Standard
With the new version v2.10.1
, we adhere to a full anemic exception model and move the string messaging to the Services layer as will be shown later. This new upgrade to the Standard will still enforce a strong binding to the exception messages and the testing messages. This will also put all string messages in the appropriate service layer logic.
V2.10.0 Exception Model Sample:
public class FailedFileServiceException : Xeption
{
public FailedFileServiceException(Exception innerException)
: base(message: "Failed file service error occurred, contact support.",
innerException: innerException)
{ }
public FailedFileServiceException(string message, Exception innerException)
: base(message, innerException)
{ }
}
V2.10.1 Exception (anemic) Model:
public class FailedFileServiceException : Xeption
{
public FailedFileServiceException(string message, Exception innerException)
: base(message, innerException)
{ }
}
V2.10.0...2.10.1 Test logic remains the same
[Fact]
private void ShoudThrowServiceExceptionOnWriteIfServiceErrorOccurs()
{
// given
string somePath = GetRandomString();
string someContent = GetRandomString();
var serviceException = new Exception();
var failedFileServiceException =
new FailedFileServiceException(
message: "Failed file service error occurred, contact support.",
innerException: serviceException);
var fileServiceException =
new FileServiceException(
message: "File service error occurred, contact support.",
innerException: failedFileServiceException);
this.filesBrokerMock.Setup(broker =>
broker.WriteToFile(It.IsAny<string>(), It.IsAny<string>()))
.Throws(serviceException);
// when
Action writeToFileAction = () =>
this.fileService.WriteToFile(somePath, someContent);
// then
FileServiceException actualFileServiceException =
Assert.Throws<FileServiceException>(writeToFileAction);
actualFileServiceException.Should().BeEquivalentTo(
fileServiceException);
this.filesBrokerMock.Verify(broker =>
broker.WriteToFile(It.IsAny<string>(), It.IsAny<string>()),
Times.Once);
this.filesBrokerMock.VerifyNoOtherCalls();
}
V2.10.1 Services layer message handling examples:
Messages will now be within the service layer exception sub class like so.
Services/Foundations/Files/FileService.Exceptions.cs
public partial class FileService
{
private delegate void ReturningNothingFunction();
private static void TryCatch(ReturningNothingFunction returningNothingFunction)
{
try
{
returningNothingFunction();
}
catch (InvalidFilePathException invalidFilePathException)
{
throw CreateFileValidationException(invalidFilePathException);
}
catch (InvalidFileContentException invalidFileContentException)
{
throw CreateFileValidationException(invalidFileContentException);
}
catch (ArgumentNullException argumentNullException)
{
var invalidFileException =
new InvalidFileException(
message: "Invalid file error occurred.",
innerException: argumentNullException);
throw CreateFileDependencyValidationException(invalidFileException);
}
catch (ArgumentException argumentException)
{
var invalidFileException =
new InvalidFileException(
message: "Invalid file error occurred.",
innerException: argumentException);
throw CreateFileDependencyValidationException(invalidFileException);
}
catch (SerializationException serializationException)
{
var failedFileSerializationException =
new FailedFileSerializationException(
message: "Failed file serialization error occurred, contact support.",
innerException: serializationException);
throw CreateFileDependencyException(failedFileSerializationException);
}
catch (Exception exception)
{
var failedFileServiceException =
new FailedFileServiceException(
message: "Failed file service error occurred, contact support.",
innerException: exception);
throw CreateFileServiceException(failedFileServiceException);
}
}
private static FileValidationException CreateFileValidationException(
Xeption innerException)
{
return new FileValidationException(
message: "File validation error occurred, fix the errors and try again.",
innerException: innerException);
}
private static FileDependencyValidationException CreateFileDependencyValidationException(
Exception innerException)
{
return new FileDependencyValidationException(
message: "File dependency validation error occurred, fix the errors and try again.",
innerException: innerException);
}
private static FileDependencyException CreateFileDependencyException(
Xeption innerException)
{
return new FileDependencyException(
message: "File dependency error occurred, contact support.",
innerException);
}
private static FileServiceException CreateFileServiceException(
Xeption innerException)
{
return new FileServiceException(
message: "File service error occurred, contact support.",
innerException: innerException);
}
Closes: #272
Commit changes new in this Release
- CODE RUB: Minor Typo Fix by @TehWardy in #264
- CODE RUB: Update 2.3 Orchestrations.md by @rekarpc98 in #263
- CODE RUB: Fixed Typo In Sample Code by @kandarpgautam in #267
- CODE RUB: Switch Statement Is No Longer Used by @kandarpgautam in #268
- DOCUMENTATION: Grammar Updates v2.10.1 by @glhays in #273
- CODE RUB: Standard Version
v2.10.1
Upgrade by @aosunlana in #275
New Contributors
- @TehWardy made their first contribution in #264
- @rekarpc98 made their first contribution in #263
- @aosunlana made their first contribution in #275
Full Changelog: v2.10.0...v2.10.1
v2.10.0
What's Changed
- We used to test for exception handling without verifying the exception message.
This is how we used to handle exceptions:
[Fact]
public async Task ShouldThrowDependencyValidationExceptionOnRetrieveIfValidationExceptionOccursAsync()
{
// given
string someNaturalQuery = GetRandomString();
var innerValidationException = new Xeption();
var completionClientValidationException =
new CompletionClientValidationException(
innerValidationException);
var invalidAIException =
new InvalidAIQueryException(
innerValidationException);
var expectedAIDependencyValidationException =
new AIDependencyValidationException(
invalidAIException);
this.aiBrokerMock.Setup(broker =>
broker.PromptCompletionAsync(It.IsAny<Completion>()))
.ThrowsAsync(completionClientValidationException);
// when
ValueTask<string> retrieveSqlQueryTask =
this.aiService.PromptQueryAsync(someNaturalQuery);
AIDependencyValidationException actualAIDependencyValidationException =
await Assert.ThrowsAsync<AIDependencyValidationException>(
retrieveSqlQueryTask.AsTask);
// then
actualAIDependencyValidationException.Should().BeEquivalentTo(
expectedAIDependencyValidationException);
this.aiBrokerMock.Verify(broker =>
broker.PromptCompletionAsync(It.IsAny<Completion>()),
Times.Once);
this.aiBrokerMock.VerifyNoOtherCalls();
}
The issue here is that if the exception model message changed - no tests will fail. This is a vulnerability in our tests since it can't detect changes in messages that are going to be broadcasted to end-users/consumers.
This release brings the following upgrade:
Starting with the exception models themselves, we will add a new constructor overload as follows:
internal class InvalidAIQueryException : Xeption
{
...
...
public InvalidAIQueryException(string message, Exception innerException)
: base (message, innerException) {}
}
This new overload will enable our tests to verify exact messages as follows:
[Fact]
public async Task ShouldThrowDependencyValidationExceptionOnRetrieveIfValidationExceptionOccursAsync()
{
// given
string someNaturalQuery = GetRandomString();
var innerValidationException = new Xeption();
var completionClientValidationException =
new CompletionClientValidationException(
innerValidationException);
var invalidAIException =
new InvalidAIQueryException(
message: "Invalid AI Query error occurred, fix the errors and try again.",
innerException: innerValidationException);
var expectedAIDependencyValidationException =
new AIDependencyValidationException(
message: "AI validation error occurred, fix the errors and try again.",
innerException: invalidAIException);
this.aiBrokerMock.Setup(broker =>
broker.PromptCompletionAsync(It.IsAny<Completion>()))
.ThrowsAsync(completionClientValidationException);
// when
ValueTask<string> retrieveSqlQueryTask =
this.aiService.PromptQueryAsync(someNaturalQuery);
AIDependencyValidationException actualAIDependencyValidationException =
await Assert.ThrowsAsync<AIDependencyValidationException>(
retrieveSqlQueryTask.AsTask);
// then
actualAIDependencyValidationException.Should().BeEquivalentTo(
expectedAIDependencyValidationException);
this.aiBrokerMock.Verify(broker =>
broker.PromptCompletionAsync(It.IsAny<Completion>()),
Times.Once);
this.aiBrokerMock.VerifyNoOtherCalls();
}
Full Changelog: v2.9.0...v2.10.0
v2.9.0
This release is a non breaking change release to The-Standard v1444.09.08.
The goal of this release is to establish a baseline for project to standard versioning going forward of this release date.
All current running projects will be set to this version, and all past projects will be set based on a dating scenario.
It is not a perfect scenario but it has been said "A line has to be drawn somewhere".
What's Changed
- Update 2.1 Foundations.md by @kandarpgautam in #252
New Contributors
- @kandarpgautam made their first contribution in #252
Full Changelog: 1444.09.08...v2.9.0
1444.09.08
What's Changed
- DOCUMENTATION: Changed the Rest verb of example by @Gustavo-Marques19 in #231
- DOCUMENTATION: Added links to external resources by @cjdutoit in #232
- CODERUB: Corrected namespace. by @artisansol in #237
- CODERUB: Sentence correction by @artisansol in #240
- CODERUB: Typo fix by @artisansol in #239
- CODE RUB: Resolved namespace for IStorageBroker.Students.cs by @artisansol in #238
- CODE RUB: Typo fix by @artisansol in #241
- CODE RUB: Typo fix by @artisansol in #242
- CODE RUB: Corrected sample test code and typo fix by @artisansol in #243
- CODE RUB: Typo Fix, Library Name correction by @artisansol in #244
- CODE RUB: Typo fix, Method name correction by @artisansol in #247
- Updated Other Resources by @Boorda in #250
New Contributors
- @Gustavo-Marques19 made their first contribution in #231
- @artisansol made their first contribution in #237
- @Boorda made their first contribution in #250
Full Changelog: 1444.06.14...1444.09.08
1444.06.14
This release contains Standardized Provider Abstraction Libraires chapter amongst many other smaller modifications and corrections.
Special thanks to @ElbekDeveloper, @cjdutoit and @ShriHumrudha for their contributions to this release.
What's Changed
- CODE RUB: Hanging sentence: intermediary model by @sd-tang in #206
- CODE RUB: Should be studentLibraryCardProcessingService by @sd-tang in #209
- DOCUMENTATION: Fix Foundation Services index links and subchapters by @LBoullosa in #208
- DOCUMENTATION: Adding Examples in Other Languages by @hassanhabib in #210
- CODE RUB: Grammar Fix on Up & Sideways by @sd-tang in #212
- DOCUMNETATION: Add Reasoning for Randomization in Testing by @hassanhabib in #213
- CODE RUB: Update 2.1 Foundations.md by @ccampora in #214
- DOCUMENTATION: Removed duplicate 404 entry by @ShriHumrudha in #215
New Contributors
- @LBoullosa made their first contribution in #208
- @ccampora made their first contribution in #214
Full Changelog: 2.0.3...1444.06.14
2.0.3
This release includes a new upgrade to StorageBrokers
as referenced in the Brokers
section.
Thanks to @danielle-io for the insights.
What's Changed
- CODE RUB: Update 2.2 Processings.md by @alexscott64 in #190
- DOCUMENTATION: Testimonials by @hassanhabib in #191
- CONFIGS: Update Table of Contents by @hassanhabib in #192
- CODE RUB: edit communication.protocols.md by @dlandi in #182
- CODE RUB: edit user-interfaces.md by @dlandi in #184
- CODE RUB: edit web exposers web applications by @dlandi in #183
- DOCUMENTATION: Add More Testimonials by @hassanhabib in #194
- DOCUMNETATION: Add More Testimonials by @hassanhabib in #195
- DOCUMNETATION: Update Testimonials by @hassanhabib in #196
- DOCUMNETATION: Add Testimonials by @hassanhabib in #197
- DOCUMENTATION: Add More Testimonials by @hassanhabib in #198
- DOCUMNETATION: Add Testimonials by @hassanhabib in #199
- DOCUMENTATION: Add Testimonials by @hassanhabib in #200
- DOCUMENTATION: Update Testimonials by @hassanhabib in #202
- DOCUMENTATIONS: Add More Testimonials by @hassanhabib in #203
- DOCUMENTATIONS: Upgrade Adaptation of EF by @hassanhabib in #204
- Update README.md by @hassanhabib in #205
New Contributors
- @alexscott64 made their first contribution in #190
Full Changelog: 2.0.2...2.0.3