- 93
- 263 832
The Pragmatic Programmer
United Kingdom
เข้าร่วมเมื่อ 6 พ.ค. 2021
I am an IT architect by trade but still a passionate developer. With over 30 years in the IT industry, I have been there and coded in it. From 'back in the day' COBOL, assembly language and C/C++ to modern C#, Java. JavaScript, HTML, CSS and all the frameworks, source control systems, fads, trends in between.
Can you imagine writing and debugging a program by punching holes in cards and feeding them into a reader. Look how far we've come and be grateful you'll never know :D.
On this channel we'll discuss all things IT related. Frontend, backend, tutorials, advice. Anything that I consider will help a fellow developer in the trenches out.
So, if you're a developer in your day job, aspire to be one or just interested in technology, subscribe and come with me and explore weekly short tutorials on any IT related topics to fully functional real world IT solutions that might just help you in your IT understanding.
Can you imagine writing and debugging a program by punching holes in cards and feeding them into a reader. Look how far we've come and be grateful you'll never know :D.
On this channel we'll discuss all things IT related. Frontend, backend, tutorials, advice. Anything that I consider will help a fellow developer in the trenches out.
So, if you're a developer in your day job, aspire to be one or just interested in technology, subscribe and come with me and explore weekly short tutorials on any IT related topics to fully functional real world IT solutions that might just help you in your IT understanding.
API Refresh Tokens / Re-Authentication the easy way!
Simple, clean change to handle API refresh tokens from your JavaScript SPA.
⌚ Timestamps
00:00:00 Introduction
00:04:34 The Code
00:07:53 Result
Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html
To support the channel goto ko-fi.com/smartmelonsystems:
for your name in lights become a channel sponsor
for source code access and your name in lights become a channel member
#nuxt #dotnetcore #jamstack
⌚ Timestamps
00:00:00 Introduction
00:04:34 The Code
00:07:53 Result
Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html
To support the channel goto ko-fi.com/smartmelonsystems:
for your name in lights become a channel sponsor
for source code access and your name in lights become a channel member
#nuxt #dotnetcore #jamstack
มุมมอง: 178
วีดีโอ
A Better AspNetCore Background Service Approach
มุมมอง 9708 หลายเดือนก่อน
How can we push data from AspNetCore Http requests to a background service and process them efficiently. ⌚ Timestamps 00:00:00 Introduction 00:01:06 The Theory 00:05:08 The Code 00:14:35 Demo Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code access and your name in ...
Add Passkey Authentication - Change 1 line of code!
มุมมอง 1208 หลายเดือนก่อน
Add Passkey authentication to your website ⌚ Timestamps 00:00:00 Introduction 00:00:39 Approach 00:02:14 Real world user experience 00:03:55 Identity Enxperience Framework - flow 00:06:42 Solution Aspects 00:07:59 HTML Templates 00:10:33 Passkey API 00:11:15 B2C Custom Policy 00:21:09 Testing.... 00:22:11 1 Line App Change Links: learn.microsoft.com/en-us/azure/active-directory-b2c/customize-ui...
Not all Material UI frameworks are equal!
มุมมอง 11911 หลายเดือนก่อน
Highlights issues with Material UI between ecosystems Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code access and your name in lights become a channel member #materialui #blazor
Passkeys - A Passkey Playground
มุมมอง 109ปีที่แล้ว
What do we need to implement passkey authentication? ⌚ Timestamps 00:00:00 Introduction 00:00:47 Setup 00:02:20 Passkey Creation - Flow 00:06:30 Passkey Enrolment 00:25:37 Passkey Assertion 00:32:13 Without CORS Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code acce...
C# Azure Function - Breakpoints that don't work
มุมมอง 233ปีที่แล้ว
Ever tried to debug your startup code in Program.cs? Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code access and your name in lights become a channel member #azurefunctions #csharp #aspnet
Passkeys? - A Practical Guide
มุมมอง 863ปีที่แล้ว
What are they? How do we use them?. Best practice. ⌚ Timestamps 00:00:00 Introduction 00:00:57 Windows - No Security Key or Connectivity 00:02:33 Mobile Phone - Passkey Creation 00:03:56 Windows - using Bluetooth 00:07:37 Real World Example - GitHub with Passkeys Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in ...
.Net SOAP Service - Authorisation
มุมมอง 338ปีที่แล้ว
We have authenticated users, but how do we ensure they are allowed to call the SOAP operation? ⌚ Timestamps 00:00:00 Introduction 00:00:53 DataStore Additions 00:04:57 Operation Authorisation 00:12:58 Multiple AuthZ Attributes 00:14:33 MVC Gotcha! 00:16:28 Bells and Whistles Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for y...
Net SOAP Service - Authentication (WS-UsernameToken)
มุมมอง 1.5Kปีที่แล้ว
How do we secure our SOAP service? Here we look at implementing the ws-usernametoken specification using aspnetcore security design patterns ⌚ Timestamps 00:00:00 Introduction 00:01:12 SOAP XML Model Changes 00:02:22 Authentication Data Store 00:06:56 Authentication Handler 00:11:10 Add Authentication to MVC 00:11:50 Does it Work? - Invalid Authentication 00:14:57 Valid Authentication 00:18:08 ...
Net SOAP Service - ModelState Errors
มุมมอง 177ปีที่แล้ว
Here we handle ModelState Errors that happen outside our controller method ⌚ Timestamps 00:00:00 Introduction 00:01:07 Custom InvalidModelStateResponseFactory 00:04:16 REST Still Works as well Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code access and your name in...
Net SOAP Service Advanced Parameter Binding
มุมมอง 329ปีที่แล้ว
Dealing with problematic requests - missing body, missing content-type etc ⌚ Timestamps 00:00:00 Introduction 00:02:28 Request Envelope Binder 00:11:31 Request Body Binder Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor for source code access and your name in lights become a chan...
Net SOAP Service - Input Validation
มุมมอง 387ปีที่แล้ว
Dealing with problematic requests - missing body, missing content-type etc ⌚ Timestamps 00:00:00 Introduction 00:00:53 Enhanced Error Response 00:05:33 SOAP Operation Not Found 00:07:18 Missing Payload 00:11:12 Missing Content Type Subscribe: th-cam.com/channels/CIbWUeYUJjJmvE-QNungtQ.html To support the channel goto ko-fi.com/smartmelonsystems: for your name in lights become a channel sponsor ...
Net SOAP Service - Error Handling (SOAP Faults)
มุมมอง 731ปีที่แล้ว
Net SOAP Service - Error Handling (SOAP Faults)
Net SOAP Service - Fun with XML Namespaces
มุมมอง 878ปีที่แล้ว
Net SOAP Service - Fun with XML Namespaces
.Net(5+) SOAP Service with only ASPNet Core
มุมมอง 11Kปีที่แล้ว
.Net(5 ) SOAP Service with only ASPNet Core
Nuxt3 Unit Testing - Components that use Pinia
มุมมอง 4.1Kปีที่แล้ว
Nuxt3 Unit Testing - Components that use Pinia
Nuxt3 Unit Testing - Setup and first Unit Test
มุมมอง 10Kปีที่แล้ว
Nuxt3 Unit Testing - Setup and first Unit Test
Nuxt3 Container: Complex Runtime Configuration
มุมมอง 196ปีที่แล้ว
Nuxt3 Container: Complex Runtime Configuration
Nuxt3 Container: Simple Runtime Configuration
มุมมอง 320ปีที่แล้ว
Nuxt3 Container: Simple Runtime Configuration
Create Your Dev Container the Right Way!
มุมมอง 195ปีที่แล้ว
Create Your Dev Container the Right Way!
Your Single Page Application needs a Backend for Frontend!
มุมมอง 495ปีที่แล้ว
Your Single Page Application needs a Backend for Frontend!
Jamstack application on Azure Container Apps
มุมมอง 106ปีที่แล้ว
Jamstack application on Azure Container Apps
Put your Nuxt3 application into a docker container
มุมมอง 4Kปีที่แล้ว
Put your Nuxt3 application into a docker container
Thank you, but in linux? What should i do?
Yes it works on hyper-v. A very long search was ended by this Short clip. I appreciate your help.
Thank you recently got a project with the SOAP services and I am finding your videos amazing, thank you so much and all the best
Any way to remove the dependency of having to create both matching Page and Content files?
Why are you using `mount` instead of `mountSuspended` for nuxt 3 unit-tests?
how to make this in python?
Thank you!!
As far as I know, there is a possibility to include a user who has been authenticated by entra id by adding the entra id provider to Azure B2c, but I am not sure the roles that entra id gave to the user comes with that user. So, do you know it is feasible?
awesome
My mouse only shows up in the list sometimes and does not work even when it does.
This is really great tutorial! Thanks!
Thanks so much for making such a valuable series about SOAP. Is it possible to share the relevant GitHub repo?
Thank you so much for these valuable information!
I am using Net8 and have carefully checked the basic setup. Maybe I am missing something, but when I run and execute the Yak script, it returns 404. Any assistance is greatly appreciated.
Please email me and share a repo and I will take a look.
@@thepragmaticprogrammer Hang on ... I think it is me. Cheers
Ok, the default project for .net 8 does not include the Controllers directory and also does not contain WeatherForecast.CS (model.) All the code is run in the program.cs. I created the Controllers directory and added it to the Service1Controller. Also, when I copied the WeatherForecast from another site, I had to edit the datetime to dateonly type. One last note, I deleted all the WeatherForecast code from the program.cs. Works like a charm.
Also add back in MapControllers
Finally, I enjoy your teaching and presentation style...
Thank you very much for this. Easy step-by-step instructions. Up and running in no time.
thanks for the video. I'm using vps with local container registry with docker, cost me 260$ for two years but I got 200GB storage and 16TB bandwidth so cost comes down to 0.36$ /day. However I have to manage security backups and authorization for which I'm looking into now.
fuq
Interesting take. I'm concerned if too many requests come in, and I have all these queues/threads (creation/disposal). I did something similar, but to avoid exhausting threads, I used a BlockingCollection... on startup, the BG service created as many worker threads from the available cores (16 in my server). In each thread, I attached to the blocking collection through its enumerator, and it managed dequeuing safely for, So at the end, I had 16 threads safely handling any request that came in. I tested it with K6 sending about 5000 requests at its peak. While the collection had to queue up, 16 requests were being processed in parallel. It beat the hell out of the server, but then I could easily scale it out to have more threads available -- haven't done this yet, but so far, the server in production has not caused me any issues.
Please make available your code source, not everything is clear and full in the video, and in my country I don't have access to your website!!
Thanks You <3
THIS is the video you need if you need to run Linux containers on WSL. Setup Docker on Windows using the docker binaries, and setup docker inside of the default distro running on WSL. setup the json file on windows and place in c:\programdata\docker\config, and then point the IP address within it to the hostIP 127.0.0.X of the WSL-Ubuntu hostIP address... and then BAM you got yourself a Windows Docker daemon service pointing to a Linux Docker backend. My goal is to have a headless Windows 10 machine running my containers, automated so they start as soon as the computer turns back on from a restart without doing things like logging into a user account, or installing NSSM, or auto locking a user account after it logs in. THANK YOU for this video!! I'm about half way thru the video and I'll say this, this is as far as I've gotten on non-Windows server installing and running Docker on Windows without Docker Desktop.
Thank you for making this so clear and to the point.
Hi! I am not able to test the layout for the page. I have the exactly same setup but pageMeta is never called. Is this code still working with the latest vitest updates? Do you know what it could be?
Can you make available your source code?
I can't continue the course because I can't see the full wsdl.xml file.. please provide the file in order to continue the course!
I'd like to see/know if one can use this setup to do container-based sw dev with vscode (i.e. vscode client running in Windows and vscode server running in container), given the necessary vscode extensions are installed?
Which VS Code extensin did you use to run your tests?
What is the actual architectural difference? Whatever you have shown it's present in Microsoft documentation also. But I am not getting what's the actual difference, what was the problem in in-process model which is going to be solved here ?
This solved a problem for Microsoft to allow the azure function management runtime to run on a different framework version than your azure function that you have written. In reality It means you can adopt the latest framework version earlier.
Instead of using a composable for the GTM, couldn't I just make a global plugin? Seems a bit wasteful that for example on something like a ProductCard I need to do a useGTM
Is it some kind of joke? "change 1 line of code" in tile, but in actual video "add hundreds of lines of cryptic XML spec". These custom policies are not documented and even Microsoft's support agents do not have resources to provide except some old GitHub repos full of 4-year old examples.
Once you'll try to customize look of the login page you will start to regret choosing Azure B2C. And you will make application admins miserable with Azure AD slowest possible loading times when there is a need to inspect user login audit logs just to see how these logs are incorrect and essentially useless. On top of "no SLA". I regret every day spent on fighting against Azure B2C, especially after learning how many good alternatives there are.
Thanks for this series... dealing with some new equipment that the vendor doesn't want to bother modernizing the software for so this was very useful.
You can also just add `environment: 'nuxt'` to your vitest config.
Nice tutorial. Do you have github repo for this Azure function?
can you share the video how to set it in nuxt 2
One of the best videos on custom claims. However, this does not work when the user is self-registering. This is because the first time the user registers, their data is not yet in the DB and so the Azure Function won't return any roles yet. To overcome the problem the user will have to log out and back in to refresh the claims which is not ideal. I could not find any solutions for this problem.
I'm not 100% understanding you scenario. First problem - What permissions will you give a new user? You can only give them some defaults unless in your signup you allow them to tell you what role/permissions they want. if you look here learn.microsoft.com/en-us/azure/active-directory-b2c/add-api-connector?pivots=b2c-user-flow You can see there are different types of API connector that get called at different points in the sign-up/in flow. So for signup could you use the 'before creating the user' connector to create the user. For signup and / or signin the 'before sending the token' will be called. So could you not use this connector to create the user with the default permissions if they dont exist in your db?
@@thepragmaticprogrammer Thanks for your reply, really appreciate it. I had a feeling I was not being clear. Here is my issue in details: 1. User visits the app and opens the login page (they're not the in the DB yet and so they have roles). 2. User is redirected to B2C page to log in/sign up. 3. User completes sign up in B2C. 4. Behind the scene: B2C calls Azure Function to grab the roles (they don't exist yet) 5. Behind the scene: B2C generates a token, it does not have any roles. 6. User is redirected back to my app (with the token) to fill out their profile information. 7. User is redirected to the Dashboard page. This page requires a role that is not present in the token. 8. User sees a NotAllowed page. The only way around this is to log the user out and ask them to log back in. When they do this the Azure Function will be able to load the roles. I'm going to see if I can resolve this by using your suggestions. Thanks
Found out that the suggestions above won't fix my issue. :(
But this is for Remote desktop connection, not hyper-v
why the f hyper V normal local vm doesnt have aurdio from vm to host
I developed a .NET MAUI application to consume a SOAP service. Testing this application on emulators on the same machine, connected to the SOAP provider via VPN, I am successful in the request when using the Windows Machine emulator and not successful when using the Android emulator. What am I doing wrong?
Thank you for making the series
Its an interesting approach. That each request gets its own queue of items that are completed sequentially might be useful or convenient. On the other hand this may not be desirable or necessary. What happens in this approach if 300 requests each queue up a items? Do we really want the number of background tasks to also be 300? Might be ok, might not be it would depend on the type of workload, I/O bound load might be ok but CPU bound stuff would be a problem. Perhaps some further control is needed. The deal breaker, though, is the WaitAll. In a set of concurrent requests where one of them has created a queue workload significantly larger than others. The WaitAll will cause the item pump to stall whilst the large load is completed. Meanwhile new requests are busy adding items to their new queue buffers but nothing is being done while the code sits at WaitAll. The premise posed around 55secs into this video is that queue items from multiple requests are just getting queued behind each other and processed sequentially. A better design I think would be to drop the assumption that queue items are processed this way. Instead assume that a set of items can all be processed concurrently even items generated by the same request. Use a single channel (that never completes) and all items are written to that channel. Use `await foreach` to consume the channel `Reader.ReadAllAync` in the BackgoundService ExecuteAsync. IOW this is the infinite loop (because the channel never completes) and 500ms sleep not needed. inside the foreach dispatch a task but do not await it. Before executing the queue item this new task will first Wait on a Semaphore (use `SemaphoreSlim` as an instance field in the BackroundService) and ensure in a finally block that the semaphore is released. The Semaphore will control how many concurrent tasks can be dispatched. In this approach a queue item will immediately begin execution if we haven't saturated the Semaphore and if we have the next item will start immediately any currently running item completes. No Sleeps, no WaitAll. Multiple queues could be created, say one for CPU intensive tasks that has a small Semaphore and I/O bound queue which could have a large Semaphore.
This is exactly what i was hoping for, a good dialogue on the subject to highlight that background processing is not trivial matter. You have made some excellent points and described a very good alternative. Personally, I had a constraint that meant I could not concurrently process items in the same request. I needed the processed in the order that they were reached in the http request. This just highlights that you really need to understand your requirements and constraints when you design a solution. Many thanks for taking the time to respond.
OMG TY. 1000 Stars
Thanks for watching. You are most welcome.
I don't think it's safe to modify the WorkBufferItems list from multiple threads. It's just a List<T> after all. Or am I missing something?
The only place where this might be a problem is when the background service removes a WorkItemBuffer whilst the background service is still iterating over the WorkItemBuffers list. We want to keep WorkItemBuffer elements to a minimum, process and remove them as quickly as we can. This would minimise this scenario. I agree that a more robust implementation would be to have a lock on both the list iterator and the remove(WorkItemBuffer) - see: theburningmonk.com/2010/03/thread-safe-enumeration-in-csharp/
What is it intended for? What about masstransit for ex?
Masstransit is for distributed applications i.e. separate process. This is all in-process. This presents how to implement a fan-in fan-out pattern for background processing without tying up your http request.
@@thepragmaticprogrammer i think simple in memory queue do the job. But if you want proces tasks sequentially, right worker approach is ok. But queue could be configured in the way that it will behave as sync procesu.
Why can't we just use a service with ConcurrenttQueue as a singleton?
Thanks for watching. Depends upon your use case and is perfectly valid. But using a queue as the conduit between your http requests and your background service only gives you a fan-in pattern i.e. all your workitems are pushed into a single queue. A List of queues allows for a fan-out to multiple threads in your background service.
Does SoapCore nuget package make all this easier?
It may do, depends upon your requirements and how much control you want over things vs using a framework. Just giving you another option here.
How does this goes with flask python?
You saved my day. Thanks for sharing this precious information.
You are welcome!
Any Idea about Application Insight logging? I have found it is not working anymore after moving to "ConfigureFunctionsWebApplication"
Hi Thank you for the great video. I have joined your ko-fi page as a member and added my github username, but I don't see where I can access the source code.
Thanks for joining. This should now be resolved.