Should I Focus on Blazor or ASP.NET Core?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to this episode of dev questions with tim corey join us as we tackle the questions you are asking about a career in software development understanding the industry and new technology if you are just starting out or you want to grow stronger as a developer this is the place to get your questions answered now here's your host expert developer and online educator tim corey should i focus on learning blazer in more depth first or asp.net core which one's the right one to go deeper in first when i'm learning these web technologies this is the question was asked on the suggestion site and it's one that i think is a very important one to cover in today's episode of dev questions now if you have a question go over to suggestions.iamtimcory.com enter your suggestion and hopefully you'll see answered here in a future episode of dev questions now this question is important because it's a pretty common one but it's also one that shows some confusion about the web frameworks in net so let's talk this through i'm going to ask a question that is kind of a good example of why it's not exactly the right question to ask but the same time it's an important one to answer so the question is should i learn to drive a car first or learn to drive a toyota corolla first do you see the difference there you're saying well tim if you learn to drive a toyota corolla you're learning to drive a car and if you learn to drive a car then you pretty much know how to drive a toilet corolla that's kind of the analogy to this question you see asp.net core is the underlying power for all web frameworks in.net so when we're looking at blazer it runs off of asp.net core if we're looking at mvc it runs off of asp.net core if we're looking at razer pages or api they run off of asp.net core so that's kind of the underlying framework for all web frameworks now that's not a stupid question it's a good question because it shows that you're like i just don't understand what the difference is between these and that's perfectly understandable but now that we've kind of covered that basis it makes sense to learn asp.net core first because that's the underlying power for all the different web project types so let's talk about asp.net core and how we can learn it well you see asp.net core is again the power behind all these different types so there's one central framework that has things like dependency injection the dependency injection is the same for all of them because of the same system underlying it so knowing how a dependency injection works it's important to know in fact i have a whole course that can adjust to the built-in dependency injection because it can be that powerful not just that simple it is really simple to use number two logging knowing how logging works in all web frameworks number three app settings this is one that people just don't understand or see how deep they really are do you know that out of the box you're four of the five web product types so blazer server api razor pages and mvc they all have appsettings.json you may think well that's the place where you put all of your application settings but out of the box there are five different places we can put our project settings not just appsettings.json which is one there's four other places out of the box that you get and then when you deploy it you have even more locations so knowing how to use that really important because there's a reason we have five different locations learning that will really improve the power of what you can do again i have a full course dedicated just to app settings because of how much depth you can go into when using this really powerful part of asp.net core there's also routing how do you get the the url that you're given how you take that and understand where to send the user which page to load how it loads what if there's more than one system involved how do you get that to work understand the routing really important then there's authorization and authentication so first authentication just knowing are who you are you who you say you are so if i say i'm tim i have to verify that with a password usually so username and password that authenticates me says yes i am tim but then there's the authorization okay you're tim but do you have access to go to this page so there's both parts of that baked into asp.net core how do you use that system and then how do you integrate it with things like active directory active directory bsc and other you know identity systems that can integrate so that you don't have to try to build your own authentication system which you shouldn't do use a third-party system so there's that and then there's deployment how do you take an asp.net core application and deploy it these are all things that apply to every project type now i did say for app settings there's four of five because web assembly is a bit different because of the fact it lives entirely on the client but for the most part asp.net core is the same for all five web project types and really actually six now because of blazer hybrid so that came with net maui but with these types learning asp.net core gives you a great foundation to work from because then let's say you want to learn blazer that's a great one to learn well if you already know about how dependency injection works and app settings and how authentication authorization work and how the routing works then you're left with just the actual razer syntax and how to create blazer pages and how they interact that's you really reduce the amount of work you have to do for that project type and i recommend that you learn actually all five actually all six project types like right away don't try to go deep in one before you learn all six kind of at a higher level so you know how do you build each of them but then i know what differences but then you can go deeper into the one that you think is going to benefit you the most right away and then the next and the next and so on so learn to use all six at a high level and then go deeper in the ones that make sense for you they may ask well tim which is the right one to go next go deeper in next so i've learned asp.net core i've gone through all the different pieces i need to know which one should i go into depth next on well that does depend on your circumstances in if you are an environment where you have to build mvc apps then mvc is the right next choice it would seem like but in general i will answer this question because i think it's if you don't know then this can give you some guidance to help give you some best guidance possible for your situation so number one i would learn api and you may say well tim i've never used an api well time to learn because this is a really important project type it's incredibly important to modern applications and know how to build a fully functioning secure powerful efficient api that communicates well so knowing how to build an api really important if you even want to think about microservices api if you want to think about mobile development api if you want to think about blazer web assembly and a progressive web app that's offline capable api if you want a blazer web assembly it's fully online not a progressive web application still api there's a lot of reasons why you need to build an api if you want to secure your sql server and you're building desktop apps api so there's just tons of reasons why api is the number one choice to go deeper into after that probably blazer server because it's a pretty powerful tool that sits both in the server side and client side it's in my mind the easiest way to build powerful applications on the web that are both secure and protected on the server side while still giving that single page application that that nice interaction on the client side that people have come to expect from web applications but then the next one blazer web assembly and the reason why is because if you've learned blazer server you've pretty much learned blazer web assembly and maybe even blazer hybrid but i'd probably put that a little later just because it's a bit more complicated so after that razor pages and then mvc i put mbc last because nbc usually the most important web framework microsoft created because it was the only real efficient one the one that was actually web standard and had you know followed best practices and all the rest now it's not the best usually i don't think in my opinion and there's better ones out there for new development for existing development you're probably using mvc because that's what we had now we have better and more options and i have a whole course on this and i also have and a vid a podcast episode on dev questions about which web framework to choose go watch that go listen to that so there's a lot to talk about here but going back to the original question should i know asp.net core first or blazer first i think that asp.net core is the first one to learn just because it's the foundation on which all these others are built and you can also mix and match so that if you know asp.net core and know how it works and you're building let's just say you're building a blader server application but you need an api endpoint as well no problem you can add that to your blazer server application you don't have to create a separate project you can mix and match these things as you need them maybe your blazer server project needs a razor page no problem you can add a razor page so you can combine these because they really are just built on the same foundation so understand that foundation is really important and then knowing what things you can add on top to build on top of it is also important and learning a high level first and then going deeper in the ones that are the most important but don't stop at one go deep and learn one really well and move on to the next one as well that way you broaden your knowledge and make yourself as valuable as possible as an employee all right i hope that answers your question if you again if you have a question go to suggestions.iamtimcory.com ask your question there and hopefully you will see it in a future episode of dev questions thanks for listening as always i am tim cory [Music] you
Info
Channel: IAmTimCorey
Views: 57,621
Rating: undefined out of 5
Keywords: c#, c# developer questions, dev questions, dev questions series, developer questions, how do i, iamtimcorey, learn c#, tim corey
Id: YbH2n4FZAP4
Channel Id: undefined
Length: 12min 39sec (759 seconds)
Published: Wed Jun 15 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.