• TILT- Tests- part 12

    First,it is a decision between NUnit and XUnit. I took this time NUnit. Also,I take LightBDD to show data. Let’s say I want to verify the rule that the user cannot make more than 1 TILT per day. In order to do 1 TILT per day User must be authenticated and have have an URL…

  • TILT–Telemetry–part 11

    I want to see what is happening in my application – i.e. having the Stack Trace for any kind of errors. I have add with [AutoMethods(CustomTemplateFileName = “../AutoMethod.txt”,MethodPrefix = “auto”,template = TemplateMethod.CustomTemplateFile)] [AutoGenerateInterface] public partial class AuthUrl : IAuthUrl { [AOPMarkerMethod] private async Task<string?> privateLogin(string url,string secret) { //code And inside the method var act=Activity.Current;…

  • TILT- BlocklyScenario–part 10

    Scenario for adding and retrieving the own TILTs I needed a way to show to the front-end programmer how he should call the API. One is to retrieve all the TILTS urls and the other is to add a new TILT,once authenticated I have used NetCore2Blockly nuget package and configured with demoBlocks ( wwwroot\BlocklyAutomation\assets\showUsage\demoBlocks )…

  • TILT–Authentication and Authorization–part 9

    This is the difficult part. I decide that,for the moment,I do not need in the application any fancy authorization – just a simple url + secret ( a.k.a password). I decided also to use JWT – it is a simple way to add authentication + authorization to the application. Let’s see the login code var…

  • Friday links 487

    Hakim El Hattab A Perspective on Laws of Software Development | Steve Fenton The Post-Incident Review – IT Revolution ShortURL/ShortURL.cs at master · delight-im/ShortURL pieroxy/lz-string: LZ-based compression algorithm for JavaScript mihaifm/linq: linq.js – LINQ for JavaScript API Versioning Do’s and Don’ts. It’s never too soon to get started… | by Fernando Doglio | Oct,2021 |…

  • TILT–HealthCheck–part 8

    Read about https://docs.microsoft.com/en-us/azure/architecture/patterns/health-endpoint-monitoring In ASP.NET Core it is easy to add health checks to your web application. I have added for Sqlite in the release and for SqlServer in the Azure. This is the code bool IsBuildFromCI = new XAboutMySoftware_78102118871091131225395110108769286().IsInCI; //more code builder.Services .AddHealthChecksUI(setup => { var health = “/healthz”; if (IsBuildFromCI) { health =…

  • TILT- ConnectionSecrets in Azure–part 7

    There is relatively easy to use – just go to your web app in Azure,Configuration,ConnectionStrings and add your data. This tutorial is based on the following article: https://docs.microsoft.com/en-us/azure/app-service/tutorial-dotnetcore-sqldb-app The .NET Core code is simple: services.AddDbContext<MyDatabaseContext>(options =>         options.UseSqlServer(Configuration.GetConnectionString(“AZURE_SQL_CONNECTIONSTRING”))); Tools used: https://portal.azure.com/

  • TILT–CI and CD–part 6

    Because the Source Control is Github and has Actions when submitting the code,I use this. Also,when creating an Azure WebSite,you can integrate with Github and he will add the yaml for you and the secrets to deploy I have added also badge to see the result of the action in the readme file. For the…

  • TILT–CRUD API–part 5

    It is true that usually you should not create CRUD API. In this case I was thinking that is faster just to have those already created and making the application later. More,the CRUD was created automatically – sgtarting from database. Install the generator https://marketplace.visualstudio.com/items?itemName=ignatandrei.databasetocode in VS2022,create a new solution and then edit the connectionDetails.txt with…

  • Friday links 486

    Gateway How We Design Our APIs at Slack – Slack Engineering The Ultimate,Free Incident Retrospective Template | Blameless Latency based SLO | Last9 SRE Platform The Programming Interview from Hell 15 Developer Portfolios to Inspire You – DEV Community Open sourcing the .NET 5 C# Language Extension for SQL Server – Microsoft SQL Server Blog…

I am ok , you are ok