Posts

Blazor Bug Tracker With Scafolding

Image
  In Visual Studio, there is a feature under Add – New – Item called "Add Scaffolding Item". After viewing a couple of  YouTube videos on how to use it, it got me thinking, is this a realistic feature, or is it just a nice demoable feature?   It does demo nicely. I decided to try it and see for myself how much value this feature can add for me when creating new applications that need CRUD actions. The Test Application To validate the scaffolding, I will be building a basic defect-tracking application using the scaffolding feature.   We will have only three issue types and will be using Entity Framework with an SQLite database.  I will be focusing on the scaffolding, not the features of the application. Granted it will be a scaled-down system, but there is CRUD used.  These are the issue types I will be creating:                1.       Bug – issue report from the internal team         2.       Defect – Like a bug but it was reported from a customer.        3.       User S

Customizing Bootstrap, Sort of

Image
  Love it or hate it, Bootstrap is a mainstream CSS framework that is very popular and comes packaged with Blazor Templates.   I have gone on record that I prefer Tailwinds CSS https://codingwithdavid.blogspot.com/2022/08/jumped-feet-first-with-blazor-and.html over Bootstrap, but Bootstrap is so in use that you need to know it and use it at times. I did post about how to update to Bootstrap 5.3    and how to add a Bootstrap dark mode switcher  to your applications. One of the biggest complaints about Bootstrap is that all the web applications look the same.   There is some truth to that, but you can add themes, or use SAAS and fully customize Bootstrap.   But these solutions come with their own issues, like upgrading to new releases of Bootstrap. In addition, if you are building a suite of applications, say for a line of business, you have to ensure the same style and user experience is used in all the applications.   This just compounds the issues of a fully customized Bootstra

Dark Theme Switcher with Bootstrap 5.3

Image
  A few years ago I posted an article on how to make a CSS theme switcher using CSS and I had a post on how to switch modes when using TailWinds.   With Bootstrap 5.3 there is a quick and easy way to change the application theme from light to dark and vice versa. You can still use the CSS method and it does give you more flexibility, but you have to do all the CSS styling yourself. In the CSS model, you would dynamically change the overall style sheet.  While with the Tailwinds solution, you had to set a dark attribute on the elements to control the theme. In Bootstrap 5.3 and beyond, you just use a new data attribute on the body element in App.razor:                <body data-bs-theme:"dark"> With Bootstrap, you have to use JavaScript to do the actual switching of the data attribute. These are the parts you have to implement to have just switch the dark mode on and off:      1. Service to handle the state if dark mode is on or off and to call the Javascript      2. Yo

MLB Daily Game Notification Service

Image
  I wanted to get notified when my 2 favorite MLB teams, Diamondbacks and Braves, play each day.   I tried doing it through my AI assistance but the applications I found could only tell me about the games once I asked.   I wanted to be notified via email and/or text messages. I wanted to provide this service for friends and family as well. An additional requirement is that any service I use must be free.   I don’t want to have a monthly fee to use this service.   Process I created a data file that contains the user, phone number, and email address plus the team the user wants to be notified about. If they want email notifications, they provide an email address.   If they want a text message, they provide a phone number. File format: ID, User Name, email address, phone number, team abbreviation, time offset from est. Steps 1. Read in Users 2. Get the team information from the API 3. For each user’s team      a. Get the daily game for today      b. Build the data