Super tutorial as always. I think that blazor is great. Would be good to see how to run blazor on linux server as most of the web servers are based on linux. Great tutorial Tim. Thanks
Great Video !!! Would you recommend a course or book that would give me more practice examples. Also, I am a little confused about how you would implement a datastore with these component, for example if the persons you used had an id in a database or some other storage. If I could describe components they would be like object reusability in OOP except in the case of components you also have a UI. Thanks !!!
Blazor Server needs more love. The tech is underestimated after I learn more and more about it. It's something between Angular and Vue components on the server side. Blazor WebAssembly isn't so effective at current version.
I'm not sure what exactly you are looking for from Blazor that isn't in place yet, but Microsoft has committed to significantly improving it with every new release of .NET.
@@IAmTimCorey I mean it's underestimated by developers. In NA more popular is React while worldwide is Vue and similar frameworks. I know that Blazor Server app can't be compared with the mentioned frameworks at least because it's full-stack. I see the tech has many strong and unique tools. I'm not competent enough to make some remarks about what isn't in place yet. I just can point that lately (in .NET 6) Microsoft made some huge improvements to the framework security and performance. Finally LINQ performance is increased. Also I'm not sure about the state of Blazor Cascading values and parameters for two-way binding. Is it in good condition? The problem of "Prop drilling" changed many front-end frameworks fundamentally. Back in the days React implemented new tools like State hook. Vue 2 Options API has Vuex, but beginning from Vue 3 they changed the entire framework to Composition API and recommend to use Pinia instead of Vuex. To solve this they made a "global Scope" for all components to handle events and properties. Blazor WebAssembly has near the same performance as frameworks with virtual DOM and this is a point.
Hi Tim, thanks as always for your time. I was wondering about where data should be load. For example, let's assume your task component, was going to read data from a database instead of in memory collections. Should the main page take care of it, read data and pass it to his Childs as parameter, or is better to have every child create a connection and load their own data from the source? This question always bothered me even when I worked once on WPF.
Why not inject a service that has uses only 1 DB connection? Invoke the service in the components, not the DB directly. Imagine an example service - IDataService. We inject the service by using the "@inject" directive on the component. For example: @inject IDataService The IDataService is an interface consisting of methods to interact with the database. This service maintains an active DB connection. The service is added via the Startup.cs of the Server. Tim has a video on this concept: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-8DNgdphLvag.html
Put your data access in a class library. Have a method that returns the data (so GetPeople returns a List). Call that method from your component directly.
@@adds-kz3oc Hi, thanks for your answer, that's exactly what I'm doing . My concern was if is a better practise to pass data already fetched by the main page to the child component, or let the component interact with the service himslef.
I'm assuming you mean that someone else updates the database and you want your screen to reflect that. If so, you would need to poll the database or create a service that watches for database changes and triggers an update on your computer. Usually this is done using SignalR to tell the UI that a change has been received. The database polling or listening for database events is up to you.
this is a great video Tim. I learned a lot from this video. but I'm always still a little confused when you say everything is done on the client side. even though you have also explained that everything is done using the signal r then the server sends the necessary changes. but still I always feel confused when you say everything is done on the client side.
All of the display "stuff" (adding items to the list visually, changing between screens, etc.) is done on the client (or appears so). There is not a full page refresh anywhere (like there would be in a server-side app like ASP.NET Core MVC). So from the user's perspective, everything happens on the client. In reality, the client sends data to the server via SignalR and then gets data back the same way but that all happens behind the scenes.
Hi Tim, thanks for this video! How can I do to pass data between two components does not have any relation? I mean those who do not have a parent-child bond.
I am developing a real product (launching soon) using Blazor server app. I have found an issue. I cannot open the app in more than 5 tabs at the same time. This app I am developing will be used by thousands of people. Am I going to run into an issue with concurrent connections?
Nope, you should be fine. It may be a limitation of IISExpress (or Kestrel). Depending on the size of your web host, you can have 20,000+ concurrent connections. If you need more than that (you almost certainly don't even if you had hundreds of thousands of users), you can offload the SignalR portion onto Azure's SignalR service for even more scale.
Thanks Tim. I'd be curious about a database update event triggering without having to refresh the page to see that update. Is that something that is possible?
It is tricky but possible. You can listen to the database changes via an event and then trigger the change or you can periodically check the database for changes and, if there are some, update the page.
Amazing as always thanks Tim, i have a small request if possible it will be nice if you show you face in the right corner of the screen. It makes the video more alive
Hi Tim. I truly enjoy watching your tutorials. I can especially appreciate your production-use approach highlighting the do's & don't. Thank you so much.
Oh Tim this is so freaking cool, I love it! Thanks so much for sharing this. You can guarantee when I graduate this summer and get a comfy software developer position, I'm signing up for your courses.
0:00 - Intro 1:20 - Creating demo Blazor Server App 4:01 - New Blazor Server App page: Razor Component 6:49 - Building Blazor page: Edit Form 17:17 - Building Blazor page: Styling 21:11 - Building Blazor page: C# in Blazor Page 24:54 - Building Blazor page: Progress bar 30:33 - Add Blazor Page as a Component 33:54 - Turn off page route 34:28 - Updating the Component 40:54 - Summary and concluding remarks
Wow! Tim Corey for President!!! I can't say enough good things about Tim and the content of these videos. I've watched dozens (and dozens)of Programming tutorials from sights like Pluralsite and lynda.com and they all pale in comparison to what Tim is doing! The audio and video are very professional. It's easy both see and hear. The pacing is also perfect... as well as Tims speaking cadence and pronunciation. What a breath of fresh air to not have to struggle trying to understand someone' who is not a native english speaker and has a thick accent. (nothing against foreigners, but it is a distraction when trying to learn something new). Personally, i would love to see more Blazor content and perhaps some stuff on Azure. (I wonder if you do any live streaming?)
Thanks very much .. If you could please make a video of 3 nested components navigate between each of them and pass parameters between them. eg. Mail component
Great tutorial. I've been on the fence about using Angular or ReactJS. Now with Blazor in the picture, it only makes sense that as a .net developer I use it. One thing I'm confused on is I don't see Observable with Blazor. Would love to see how you keep the objects in sync on the client with what you have on the database.
Dear Tim, I am looking for lessons related to asp.net core clean architecture including DDD and mediator pattern. I am sure you will make these complex topics easy. Thanks
I know you get this a lot but you are doing a great job helping junior developers just starting out or using dotnet/blazor/etc for the first time! I wish I could actually afford the entire course. Qn: How do I pass a blazor component the same way we passed "Name". Like what if I want to pass a button? Maybe I want to have a table where one of the columns has a button for deleting that row (or something like that)? Thanks!
Great job Tim! Thanks for sharing your gift of teaching. Your tutorials are a masterpiece, I will start building blazing pages :) Blazor is indeed very powerful. Thank you
i have been working on passing data between components for couple of days, tried all sorts of code available online.. kind of a bugger that all you have to do is call the Parameter variable like an html attribute and pass the data.. but it makes life easier.. Good content as always, helpful as always.. Keep it going....
Hi Tim, You have great skills in teaching and also you have a vast knowledge of the subject. I learnt a lot of things about .Net Core just by watching your tutorials. Keep up the good work mate. I would love to subscribe to your paid learning channels to support you, unfortunately, I am not in a good financial situation to make that commitment yet but one day I will. English is my second language so you may find awkwardness in this comment, so please ignore them :) I was watching one of your tutorials about Blazor Client-Side but couldn't complete it as I couldn't install the preview version of VS2019 so I wanted to wait for the official release. Since it's released now I wanted to continue your tutorial but I couldn't find it anymore in your channel. Have you removed it? Thank you for sharing your IT knowledge and help us learn for free Tim, I personally appreciate highly of your work and effort. Cheers!
I haven't done a Blazor Client video yet. I did do a video on Blazor Server when it was in preview, but I removed that once I added the production Blazor Server videos. I will be adding a Blazor WebAssembly (Client) video soon.
Very well thought-out lesson, talented teacher indeed. One tiny problem with a percentage sign punctuation in VS 2019 (ver. 16.11.10): it works only as @($"{percentDone}%") Usability hint: it would be nice to have a mouse cursor back on a text field after each task's addition.
Taking control of the mouse cursor location on the web isn't something that should be done (even if it can be, which I don't believe it can be). Remember that the web isn't supposed to be intrusive into your system.
Great video loved it! I would love to see more on components especially when there are several components with a lot of binding values and [value]Changed logic going on... e.g. Could a Class be used to manage the binding values between components and make things easier?
this is very easy to follow through! i have tried different learning videos in YT but i find yours to be truly beginner friendly. Tho i still get confused by blazor's naming convention such as attaching method on events
I'm about a third way through, a n d Loving It! (that's Get Smart, for younger readers). One thing though Tim, you're no doubt trying to keep this relatively brief and easy for beginners, but whenever you say things like "so the whole page doesn't need to be refreshed" my mind always says "but we've been using Ajax for ages within MVC pages etc, so don't often do whole page refreshes anyway". The ajax part is usually handled within Telerik components for me. Anyway, just saying - this is the third video of yours I've watched and I don't think I've heard you say the "Ajax" word. Just interesting. Finished the video now ... Wow! I looked briefly at Blazor a few weeks back and it just didn't grab me - I thought "Nah - too early, I'll stick with MVC for another year at least". But now, this video has shown so clearly the elegance and simplicity of the code required to make a sophisticated UI - it's a beautiful thing - my next app will be made with Blazor for sure. And it was great to see the use of Bootstrap styles demonstrated - I'll be using those more too.
“Poor Mary’s typecast” LOL. Nice informative video. I’d still like to see something on authentication/authorization in server side Blazor, since my default go to (ASP.NET Core Identity) fails because of the HTTP headers already being sent due to the SignalR connection.
I cover that in the Blazor Server In Depth course. You can definitely use ASP.NET Core Identity with Blazor. We set it up during template creation as well as adding it in to an existing project. We also walk through how to use the authorization (including role-based authorization) on pages and in code.
Hello Tim, i started learning C# and found your videos very good and well made, i would like to know if you are planning any Blazor Server Side gloalization tutorial to make globalized Blazor apps, good job anyway
Is this technology still alive? I'm trying it with .NET 6 and .NET 7 and components are not rendered, I'm getting "raw html", instead of the content of this component.
Cool, you seem to have a total lack of Blazor Server content - any chance of making more? IMHO it's the best combination of client/server and fast to develop for smaller sites.
I'm wondering if you used the wrong search terms or something. I have tons of Blazor Server content. Here is a search for that on this channel: www.youtube.com/@IAmTimCorey/search?query=blazor Also, I have a full course free here on RU-vid that uses Blazor Server: ru-vid.com/group/PLLWMQd6PeGY0cZFMqx5ijmdaD87sJKCsU I also have the Blazor Server From Start to Finish course on my site: www.iamtimcorey.com/salespage.html?course=in-bzs-01
I took a udemy course on Vue.js a few years back and I find this framework to be very similar, except, you know, with a type-safe language. I also find it to be a bit simpler. I love it! This is a lot more understandable to me than a javascript based component framework. Additionally, I love your teaching style and I have been watching your tutorials like I'm netflix binging and building these apps along with you. Thank you!
Thanks Tim, your channel is great. You have a very interesting videos. I have been using aspx(winforms with c#), but now I'm testing this framework for my future projects or migrations.
Thank you so much for this video! Could you please do a more advanced section too with two way data binding with parent-child components and more features we can do with components
This is outstanding :) I've been building some apps in asp.net core with some simple CRUD actions. Do you think it's a better decision to learn blazor instead?
Excellent! Other blogs make these subjects seem very hard to grasp. Your presentation is easy to digest and leaves us confident that we have learned things new, exciting and valuable. Thanks.
Passing items from one page to another is the best option, even if it is an object with lots of items inside it. If you really need to pass things another way, you can look into Singletons or Scoped classes that both pages access (not ideal, nor clean).
Thanks for this Tim. I'm starting to use Blazor for my internship and the Pluralsight courses about Blazor was too advanced for me to start off. This helped to ease in better and made me more motivated to learn. Please make more of these videos!
Tim, a quick aside here: I usually see and hear you talk about using Kestrel, but to the best of my knowledge, I have never seen you explain how to setup it for debugging. If you have not before, then I think you should seriously consider it. If you have already, then please point me to it. Thanks in advance.
Well, I go into depth about it in my Blazor Server In Depth course. I have touched on it in other videos but not fully. I can add that to the suggestion list.
Hi Tim, Great content! I wanted to ask if is it possible to create components dynamically?. For example in a "for loop" create N "TodoList" components. Also, I want to know where "EditForm" and "InputTex" components come from, is there a list of already existing components?
Yes, you can create components dynamically. EditForm and InputText are part of the Blazor framework. They are components that Microsoft created. You can go to docs.microsoft.com to get more information on what is available.
In markup have; @DynamicComp in @code; RenderFragment DynamicComp { get; set; } and some method to set DynamicComp - here I set it to FetchData; DynamicComp = builder => {Type moduleType = Type.GetType("BlazorApp1.Pages.FetchData"); if (moduleType != null) { builder.OpenComponent(0, moduleType); builder.AddComponentReferenceCapture(1, inst => {Convert.ChangeType(inst, moduleType); }); builder.CloseComponent();}};
Can't wait to check out your new Blazor course when I get some free time. Thanks for all the great content, Tim, and I hope you and your family are staying safe.
This was taught very well! Thank you for going in-depth on why, and how the components interact. It's those kinds of explanations that make the good teachers really stand-out.
They look easy to use. You showed us how to get data into the component but it would be nice to know how to get info back out to the parent page/component.
Outstanding video! Wish I watched it before I learned some of the things you showed in this video by trial and error. Also learned many new things on how one can implement OnClick property in unclickable things like unordered list. Progress bar is also cool and opportunity to nest component one in another is just a blast! Thank you so much Tim for your great lessons!
When trying to create a new Blazor app i'm not getting the ASP.NET Core 3.1 option in the dropdown, just the .NET Core 3.1 and .NETcore 3.0!... what i´m missing here?
@@IAmTimCorey Well.. it worked... actually i asked because i got a VERY different web site, it was all in white color, nothing even close to what you where showing here, i was even missing some folders, like data and shared.
I am one of those can’t afford yours courses but takes huge advantage of your free RU-vid videos. Can you please do Setup.exe so that my application can be installed on other pc’s and also maybe how to get a domain for a website. I would be very glad if you could make this happen. 10^3 times grateful for your free sources 🙏🙏
Check out my videos on MSIX and Squirrel. Both will show you how to do installers. I do plan on covering other installers. As for getting a domain and a website, stay tuned. I'll have more info about that very shortly.
For the section on the dashboard being dynamic for a meeting, I understand if this was to be on one browser page that everyone was looking at together. But in the case of multiple people accessing it at the same time, would the functionality to have them auto update everyone's local when an edit is made be simple as well? I suppose this is more of a signalR question... What comes to my mind is that you would have to implement something in the onclick that tells signalR to do a push of the update to all linked users in a hub. But maybe I am mistaken in the process and what exactly you were trying to express as the ability of the dynamic dashboard.
How do you change the blue-purple color of the nav menu on the left, and the top bar color, and the top left section (I have an image in navbar-left)? I assume its in bootstrap.min.css but I can't find the override commands to put into the NavMenu.razor file
Find the CSS classes that apply to the navigation (that are changing it to purple) and override them in the styles.css file. You don't need to open up boostrap.min.css. Run the application, use the developer tools in the browser (F12) and use the select element indicator (in the top left if using Chrome dev tools) to select the navigation. See which classes change the color and override those.
Great intro and very interesting implementation. I can imagine very many static and dynamic components that could be built this way. Having the code and markup in the same place seems really retro, back to orignial active server pages.... wait long enough and everything comes back into fashion.
Going back to something you have preached over and over Tim, like in your Blazor WebAssembly course about learing to read code, well from another course I have taken in the past on Spring, well in there they reference the Spring Pet Clinic. I got to thinking it might be fun to do that in Blazor.
Hello Tim, I was looking for course which on building an APP using C# .Net framework with MVC and uses API endpoints from another app as data source rather an SQL DB, do you have any course based on that or could you suggest resources??
The TimCo Retail Manager does a lot of this (it uses WPF instead of MVC for the front-end but it uses an API for the back-end and the front-end could be MVC if you wanted): ru-vid.com/group/PLLWMQd6PeGY0bEMxObA6dtYXuJOGfxSPx
As a .Net developer who has been dealing with Angular for a while, I might give this a try for some (smaller) projects. Seems like a faster way to get things done. Blazor WebAssembly seems promising too, but I worry a bit about the initial load times.
hey tim, I just got into your blazor course! and i´m very excited with it,because I´ve always struggled on learning javascript.... reading in the net i´ve seen something about using blazor to write mobile apps and got curiurs about xamarins future.... that´s because i´m also learning xaml... do you think xaml will loose it´s worth with blazor growing? thanks again
I don't think so. I don't see Blazor as competition to Xamarin or WPF/UWP. Instead, I see it as a complementary option. We now have more of a spectrum of options. That's a good thing. There is no one perfect option for every scenario so having multiple means we cover more scenarios better.
When I discovered Interdev I was blown away , through the years I've been impressed, but with Blazor, again, I'm blown away. Tim amazing delivery. Thank you.
Hi Tim, great tutorial! Quick question, what approach should I use to go about generating word/excel documents from a template using blazor? I want to gather input from the user, and use those inputs to fill out a forum which the user can then download. The closest thing I've found has been using syncfusion however it appears a license for them is quite expensive. Do you have any suggestions? Again thanks for the tutorial!
You will probably have to use a third-party system. You might try EPPlus for Excel (but they don't do Word). They still cost, though. Syncfusion does have a free version for personal and limited commercial use, so that can get you started. If you are using this for a business, though, you are probably going to need to pay for it.