Posts
subscribe via RSS
View Data Custom Tag Helper for Partial in ASP.NET
I often find the need to set values in
ViewData
when calling partials that are reused across the website. It might not make sense always to make that value part of the Model.Make use of Fluent Assertions extensibility
I’ve been writing some chef cookbooks recently. And you often see tests in chef that looks something like
Kamal deploy ASP.NET Core website
Kamal previously known as MRSK, is a deployment tool that makes it easy to build your website as docker image and deploy them on to a bare metal or a virtual machine. It takes care of making sure there are no down time while a new release is created.
Stimulus JS with ASP.NET Core
Stimulus JS is a JavaScript front end framework library thats popular in th Rails community. Whats different about Stimulus compared to other libraries such as React and Vue JS is its simplicity in the features it comes with. If all you require is sprinkle of javascript interactivity on your website, Stimulus is all you need. Which makes it perfect for use with your mainly full stack web application. Another alternative that I’ve briefly tried is alpinejs. But, I was turned away by cross contaminating my HTML code with JavaScript.I am sure there is a way to avoid this. But, I did not get that far.
Ill-founded fear of long lived branches
Most people seems to have a fear of long lived branches and recently this cost our team almost a week of release freeze as we had to roll back changes in production.
Migrate PostgresSQL databases with dockerized pg_dump
Credit goes to Use Docker to Backup and Restore PostgreSQL Databases blog post. However, some of the instructions on that post is either out of date or doesn’t work.
Unit testing stripe webhook
I am trying to avoid using any auto mocking library. And instead trying to rely on Fakes when writing unit tests. There is an alternative approach to writing unit test using mock available elsewhere.
Developing for .NET Framework on Mac with Vagrant
This blog post is only applicable if you have Mac development machine and wants to develop against .NET framework. The solution involves spinning up a windows 11 virtual machine on virtual box. But will require minimal manual steps. Only revert to this approach after you’ve tried other approaches such as .NET Framework web development on Mac with Mono or something else.
Resilient testing approaches for Blazor components
I’ve been a fan of testing library when I was working with react about 2 years ago. Since then, I’ve started working on a project that’s using Blazor Web Assembly for front end. However, haven’t come across a similar framework for testing Blazor component that’s similar to testing library.
.NET Framework web development on Mac with Mono
When it comes to developing an ASP.NET MVC application for .NET Framework on your non Windows dev machine, you can make use of Mono Framework. A word of caution that Mono is no longer developed since .NET 5 was released. However, if your application targets .NET Framework version 4.8, you can still develop and run your application on Mac or Linux using Mono.