Posts

Showing posts from November, 2020

Blazor Hang 'Um

Image
 I found a cute hangman game sample project using javascript so I thought it would a be cool little Blazor application.  The UI was good, but there was a lot of interactivity with the application that would need to be rewritten in C#. The flow of the application is the normal flow of a hangman.  You guess a letter of the word until you either run out of guess and hand the guy or you get the word. In this post, I wanted to highlight the unique parts that I had to do to make if a Blazor application. Steps of the project 1. Create a project 2. Port over the HTML/CSS 3. Get a list of words to use 4. Show the hangman frame 5. Show how many letters in the word 6. Allow the user to guess 7. Show the letter if correct 8. Show a piece of the hangman and show the wrong letter if incorrect 9. Check to see if out of guess, if so end game 10. Did they get the word, if so end game Create a Project You just need to create a normal Blazor project with no authentication.  I choose the server-side Blazo

.Net Conf 2020 Day 3

Image
 Summary I learned my lesson from trying to attend too many sessions yesterday.  Today I am focusing on the Blazor sessions. 1. Application State in Blazor Blazor Train on YouTube - Carl Franklin It was nice to hear Carl again Been a fan since early .Net Rocks App State Instances of objects stored in memory SPAs are stateful Scoped  Create "State Bag" - User Scoped 1 instance per user Class for object reference Use scope service For application instance use Singleton Web Assembly - not needed because there is 1 user Class level Transient Multiple copies of the same data across pages Implement a state bag Cascading Component Scoped Service Hybrid Approach Cascading Component with scope service Add the Hybrid solution at the router level It is like making an observable at the app level In AppState service, he is handling events as opposed to just holding state Saving Application-level state Local Storage 5 Meg limit AppState Persistence Pattern Do it in 1 location On Server use

.Net Conf 2020 Day 2

Image
 Summary Here are my notes on the sessions I attended for day 2.  There were many more I did not attend since the conference ran for 24 hours. My goal for attending these sessions is to get get a high-level overview of the topic and see which ones I want/need to do a deeper drive on. Day 2 Sessions 1. What's new in Visual Studio 2019 Customization Themes CRTL Q Manage Extensions Install Themes After download, Close VS To install Ctrl Q Themes Select the one you want Project Templates Create an existing Project as a Template Export Template Wizard Access New Template File new project Should show in the filter, but not always Exclusive Filters Allows you to filter out projects from your solution based only on the projects you want Check the box on the bottom of the dialog Right-click on only load the projects you want File Nesting Configure your own nesting rules Right-click on section and select file nesting at that level You define a rules file Productivity Tools IntelliCode Team C

.Net Conf 2020 Day 1 Summary

Image
 Here is my summary of the session for day 1 of the .Net Conf 2020 day 1.  This is my notes from each of the session that attended.   Full discloser, I am mainly focused on the Blazor Sessions. Summary: Overall the sessions were good.  Some were a little salesy for me, and some included things that will be in .Net 6.0 which seems out of place in the .Net 5.0 release conference.  I know most of the Blazor changes, posted here , but there were a few that are new.  The sessions on C# 9.0 and Open API were really good.  I will have a deeper post on just those changes.   It is easy to see from my notes which session I really liked. 1. Key Note The big announcement that .Net 5.0 was launching today! Blazor now uses the .Net core CLR They provided a nice list of Open Source Blazor packages Bit Blazor web assembly performance change gRPC has gotten a lot faster Desktop - Added a Chrome-based browser control Desktop - Click once is back C# 9 - Records Win forms now support 4k DPIs The video of