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.
210. When JavaScript Becomes Important for C# Developers
•Tim Corey•Season 5•Episode 210
Use Left/Right to seek, Home/End to jump to start or end. Hold shift to jump forward or backward.
0:00
|
10:59
Do I need to know JavaScript as a C# developer? Do I need to know JavaScript if I know Blazor? Do I need to know JavaScript if I already know Angular or React? These are the questions we will answer in today's episode of Dev Questions.
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_02
Do C Sharp developers need to know JavaScript? And at what point is learning JavaScript a benefit to a C developer? These are the questions we're going to tackle in today's episode of Dev Questions. Now, let's start off with the obvious. It depends. Okay? So it depends when you learn JavaScript or even if you learn JavaScript. But let's start by dispelling some myths. Myth number one: if you know Blazor, you'll never need to know JavaScript. That's not really true, because yes, you can use Blazor and not use JavaScript, although Blazor WebAssembly still uses JavaScript. And even Blazor, the web app, the overall Blazor, uses a JavaScript library to run the front end. So it uses JavaScript. So you're kind of still using it. But yes, to write JavaScript, you don't absolutely need to know JavaScript when you're using Blazor, but there's a whole ecosystem full of JavaScript tools and JavaScript systems that you can plug into Blazor. So while you may not absolutely need to know JavaScript, you're going to need to know JavaScript at some point in order to make your life easier. It's going to broaden your skills and ability if you're working with Blazor. Myth number two, if you're a back-end developer, you won't need to know JavaScript. Now, maybe you won't, but that's a big maybe. Because as a backend developer, at some point you'll probably end up working with front ends, even if it's to debug things or figure out why things aren't working correctly, or even to know how to relate to the people who are building the front end and know how to talk their language and know how to tell them what you're going to do and know what they're going to need from you. So at some point, if you want to keep growing your career, even as a back end developer, you probably should at least start to get experienced with JavaScript so that you know what it can and can't do. And so you know how to do even the basics in case you're called on to do some front-end work even for a small project. Myth number three web user interfaces are always JavaScript. This is kind of the other side, right? So far we talked about how if you're a C sharp developer, there's times when you'll need to know JavaScript. But some people are under the impression that if you are going to do a front end for a web application, it will be in JavaScript. Meaning maybe it's JavaScript itself, like you know, vanilla JavaScript, or maybe it's a framework like Angular, React, or View. That's the only way of doing things. That's a myth. We have Blazor, we have other options like MVC, or we even have things like PHP or other systems that aren't even C sharp as front-end options. So a web user interface doesn't always have to be JavaScript. Now, yes, working with web user interfaces often entails JavaScript, but that's a there's a difference between often and always. And number four, the the fourth myth I've seen a lot is knowing Angular, React, or View, or TypeScript means you don't need to know JavaScript. Okay? So there's the other setup again where, hey, I know this framework, which by the way, it's a JavaScript framework, uh, but as framework, and so therefore I don't need to know JavaScript itself, that's also a myth. That's the wrong direction. So you should know JavaScript if you're going to use one of those things, even TypeScript, because TypeScript really isn't a language under itself, compiles down into JavaScript. So knowing JavaScript is important, even if you are working with TypeScript. So those are four myths I see around JavaScript in general. But let's talk now about when do C developers need to know JavaScript. So the first time is when you've learned how to work with web applications. Meaning, I'm a big proponent of learning one language deeply before you start spreading out into other languages. And if you're learning C sharp, I would encourage you to learn C sharp really well. And in fact, ASPNet Core, which is a part of C sharp, it's actually a framework, kind of like Angular Reactor View. It's a framework for web development in C sharp, meaning you should learn C sharp first before you use the framework for web development. And from that framework, we get MVC and RazorPages and Blazor. So those things are based upon a framework which is based upon a language. So I encourage you to learn the language first, then learn the framework, then learn the actual projects that go with that framework. But at some point, when you start to build web applications using probably Blazor, but MVC or Razor Pages, then at that point you should start to learn JavaScript. Again, like I said earlier, it kind of opens up this world to you that is much, much larger of an ecosystem. You have many more options. And options for a developer are great. Having the ability to say, you know what, I've got 10 things to pick from is so much better than saying, I have no options, or I have one not great option. Okay. So having multiple options to pick from allows you to make a better choice for your specific situation. Because not every situation is the same. And so not every situation will get the same answer based upon, you know, you have to base it upon what works best for you. So learning JavaScript after you started to work with web applications, after you started to build production web applications, is a really good thing. Number two, I would learn JavaScript before you consider using a JavaScript framework like Angular Reactor View. It's a very common thing for people to say, hey, I want to have my back end in C sharp, my API in C sharp, but then I want to have my front end be Angular Reactor View. And while there are some downsides to that, there are also some upsides as well. And so if that's the choice you make, one of the things I see some people do is say, well, then I'm going to learn, let's say, React. I'll learn React. But do you know JavaScript first? Because again, that's the language that React is built upon. So understanding the foundation is really important to then understanding how to work well with the framework you use. Number three is when you want to round out your skills as a developer. As a C developer, what you want to do is again, go deep into that language. Learn the language really well. Don't skip over it, don't do it lightly. Learn it deeply. Learn it well. But when you do, you're going to find that in order to round out your skills, you add additional languages or additional systems or features. For example, knowing how the cloud works, you know, Azure, knowing how Azure works is a great option. Knowing databases such as SQL or MongoDB or CosmosDB, knowing them is a really valuable tool. And so when it comes to the web, knowing HTML, and yes, more than probably just how to do divs, but knowing HTML5 and in some depth. CSS, including CSS3 and all the latest changes in layout. And then JavaScript. Okay, knowing these things will round out your skills, will broaden your footprint, and give you more opportunity to get the job that you want, to work with the systems you want, and to be better compensated for your work. Okay. So those are the three times I really think that as a C developer, you should look at JavaScript and say, yes, I think that's next on my list. Okay. JavaScript is the language of the web. And it's one of the most popular languages on the planet. You should probably not just avoid it forever. Just be sure to pick it up at the right time so that you don't disrupt your current training and growth. And so you don't kind of stunt your growth or make your resume worse, not better. Okay. When I look at a developer's resume and I see a depth of experience in one language, the language I'm looking for, especially, but then also some skill in other languages, that's valuable. If I see a whole bunch of bouncing around with languages, that's not as valuable. So make sure you pick it up at the right time. But I would encourage you at some point in your career to pick up JavaScript as well. Okay? So that's the answer to today's question. Thanks for listening. If you have a question, you can go to suggestions.iamtimcorey.com, leave your question there, and hopefully you'll see it answered in a future episode of DevQuestions. Thanks for listening, and as always, I am Tim Corey.
SPEAKER_01
Thank you for joining us for this episode of Dev 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.