DevQuestions with Tim Corey
I am Tim Corey. I teach coding online and my inbox is full of questions from current and future developers. I wish I could sit down with each of you and share the answers I know will help you go further, faster in the world of development. This podcast is the next best thing. On this podcast, I will answer the biggest questions people are asking! Send us to your suggestion for a future Dev Questions at https://suggestions.iamtimcorey.com/ To keep the podcast coming, like, subscribe, rate, and share it with your friends and colleagues. See why thousands of students have chosen to learn to think and code like a professional developer at www.DevForge.com.
DevQuestions with Tim Corey
127 How Do I Choose the Right Web Framework?
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
How do I choose the right web framework for my project? Do I use ASP.NET Core? Do I use Angular? React? Vue? What criteria should I use when deciding what is right for my project? These are the questions we will answer in today's episode of Dev Questions.
Website: https://www.DevForge.com/
Ask Your Question: https://suggestions.iamtimcorey.com/
Sign Up to Get More Great Developer Content in Your Inbox: https://signup.iamtimcorey.com/
Welcome to the Dev Questions Podcast with Tim Corey. Join us each episode as we tackle the questions you are asking about a career in software development, understanding the industry, and new technology. If you're 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.
SPEAKER_02How do I choose the right web framework? There are a lot of web frameworks out there, and which one is the right one for me? This is a question was asked on a suggestion site, and I thought it'd be a great one to tackle in today's episode of DevQuestions. Now, if you have a question, go to suggestions.iamtimcorey.com, leave that suggestion there, and hopefully you'll see your suggestion answered in a future episode of DevQuestions. So, what's the right web framework out there? For example, you can even inside of C Sharp, there's a lot inside ASP.NET Core. There's Razor Pages, MVC, Blazor Server, Blazor WebAssembly, even API if you just want an API framework. So even inside of C Sharp is a lot, but there's also Angular, Reactor, View, there's PHP, there's a whole bunch of others outside that. So what's the right choice for you? Well, that depends. So let's talk about how to choose which one is right for you. And the first thing I want to talk about is the fact that there is more than one web framework for a reason. It's not that we have one winner and a whole bunch of second places that got replaced by that winner. Think of web frameworks, think of anything in programming like tools for your toolbox. When I buy a new tool, I don't dump the toolbox out and put that one tool in the toolbox. We need to use the right tool for the right job. And that's the same thing that comes to programming. Whenever you find a new technique, a new tool, a new framework, whatever it is, don't dump out your old tools and say, well, those are old. This one's new, therefore, this one is the one I use for everything. There is no silver bullet. There is no one right answer for all questions. So when you think about web frameworks, don't come into it with, well, this is the one we'll use, or this is the best one. Because there isn't a best one out there. It really does depend on a lot of different criteria. So what are those criteria? Well, the first question I would ask of any team, I used to be a consultant. I spend a number of years working with teams, helping them evaluate what choices to make in their organization. And the first question I'd ask is, what are your goals? What do you want to accomplish with this website? Because oftentimes people come in and say, okay, we need a website, so we're going to use X technology. That's the wrong order. That is definitely the cart before the horse. You need to know what your goals are because you can't hit your goals if you don't know what you're shooting at. So you want to make sure that you establish what are the goals for the site? What should it do? What are the most important things when it comes to evaluating success for the site? What does success look like? Answering that question will really help hone in on which tools are right for your situation. Okay, so know your goals. Now, number two, what are your existing projects in? So are you using any type of web development language somewhere else? Or are you using a language somewhere else in your organization? Do you already have existing code in a specific language? So for instance, let's say that you already had a huge code base in C sharp. Well, where should you probably lean when it comes to your web application? Probably C sharp because you can reuse a lot of existing assets. Now, I said lean, I did not say choose. Because there may be a circumstance where you say, yes, we have all these, but I think we need to do this because of our goals. All right. So again, it's not a decision, it's a way to help you refine down what your best choices are, what the first choices to look at are. All right. So what's your existing projects in? Do you already have some existing uh resources that you can reuse for this site? Number three, what are your team's skills in? If you have a team that is super uh skilled in, let's say PHP, it's probably not a great idea to then say, okay, let's do a Blazor server site. Because you're really throwing out a lot of their skills. Now, it may be that that's the right choice going forward, but maybe not, because again, you're not reusing your existing uh libraries because you priority have some PHP stuff, and you're not using your team's skills to their fullest. So is that the right choice? Sometimes it is for moving forward as an organization, but a lot of times you'd be better off sticking with what you already have and have skill in. Your team will be much better in the area where they're already skilled and have a lot of experience. So that's number three. And again, remember, these are things to help you evaluate. These are not decision makers. Be very clear there because I can already hear a comment or two saying, well, yeah, but they are help you make a decision, not the only thing to consider. Okay? So that's number three. Number four is what is going to set you up for future success? And this comes back to that idea of let's just say, you know, you were basing everything off of PHP, and you thought, you know, that this is what we've been doing, but maybe it's not the right way to go forward. Or another way of looking at it, maybe your team's skills are all in.NET framework. And they've got a lot of experience with ASP.NET web forms. Okay. Is that the way forward? Probably not for future success. So you have to think that through and say, okay, well, yes, my team is very skilled in this. Yes, we have a lot of existing projects in this, but it's probably not gonna set us up for future success. So that means that while up until now, probably.NET Framework and web forms was near the top of your evaluation list, all of a sudden it starts to move. And it starts to move down that list, and you start to say, well, that doesn't really set us up for future success. So then you start evaluating, well, what's the closest analogy to that? Maybe it's Razor pages in.NET Core. Well, that can reuse a lot of your team skills, not all of them, but a lot of them. It can reuse a lot of your code base, not all of it, but a lot of it, and it will help set you up for future success. Or maybe you say Blazor Server is the closest analogy that works for your situation. But you see how you're starting to look at your goals, your project's existing code, your team skills, and your future success, and saying, how does this all shape my end result? And I come up with whatever technology you come up with. So use these four criteria to help you figure out what's right for you. If someone comes in, if a consultant comes in and says this is the right way to go, ask them why. And if it's just, well, this is the best technology, not the right answer. If this is, you know, what everybody else is doing, not the right answer. If it's because they've evaluated your goals, your existing projects and resources, your teams, and your future success, that's the right answer. Okay. So you need to think those things through when it comes to evaluating what's right for you. All right. Now, basically, the what you want to evaluate is what is the simplest way to accomplish your goals. All right, the simplest way to accomplish your goals. So if you have to learn a whole new code base, that's not simple. If you have to rebuild all the same assets you already have, that's not simple. If you have to hire a whole new team, that's not simple. Okay. So in sometimes those things will have to happen. But if you can, try for the simplest way possible, not the only way, but which one is going to be the simplest for you to hit those four goals? So here's some examples. If you have a no if you have Node.js in the server, and then if you want to look for a front-end framework, you should probably look at a JavaScript framework, maybe Angular, React, or View, because you already have a lot of existing skills in JavaScript. So you can reuse a lot of assets and they work well together. So it makes sense to look at a front-end JavaScript framework if you have JavaScript on the back end. Now, if you have a C Sharp API and you want an offline web app, you probably want to look at Blazor WebAssembly because that's the closest use of your existing skills. It works well with C sharp and you can reuse some of the same libraries and same code patterns and same skill sets from your team. Now, again, that's the place to start. Maybe you look at that and go, yes, but it doesn't do these things that I need it to do. Okay, that makes sense. But again, you're making a decision for your specific situation. If you currently have a desktop app that's in C Sharp, and you're looking to add a web front end, you should probably consider one of the ASP.NET core prototypes, MVC, Razer Pages, Blazor Server, Blazor WebAssembly. Because again, you're reusing the skills that you already have, you're reusing the code base you already have, and you're gonna move forward faster and simpler. All right. And finally, if you have a simple site with very little data entry from the user, you should probably look at HTML and CSS first, kind of like I did. And that was one of the things that blew people's mind. People thought that I was, you know, giving up on all C sharp. If you don't use it, then why would I ever consider it? I chose what was best for my specific situation. And that did differ from just saying C sharp is the best. It's the only way. So choose what's best for your situation, not just what everybody else says you should do. Okay? So I hope that answers the question. Thanks for listening. And if you have a question, again go to that suggestion site and answer or ask that there. All right. Thanks for watching. As always, I am Tim Corey.
SPEAKER_01Thank you for joining us for this episode of Def Questions. Tim is committed to making it easier for you to become a developer. If you would like to help make more content like this possible, please like, subscribe, rate, and share Dev Questions. You can also send your questions to questions at IamTimcorey.com. Until next time, remember, you are too smart and your time too valuable to waste it making all the mistakes Tim did. When you're ready to learn to think and code like a professional developer, head over to imtimcore.com and enroll in a course.