NestJS vs NodeJS with Express | When to Use What?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
if project is very simple just go ahead install Express in your node.js project and use it however you want to use it but if project is little bit bigger in size or there might be chance that you might have to add maybe 10 to 15 feature once the project is built and it's on production then it's preferred that you might have to use Nest yes because otherwise your project is going to get lots of meshed up and you might not have idea why is it working or why is it not working what do I mean by like a adding feature adding feature means you might have to implement different models and Implement lots of routing maybe give permission to different users or maybe even add functionalities like payment Gateway or some kind of other things maybe web sockets maybe graphql all these things if you want to add then obvious using nest.js is preferred because it gives ability to manage even bigger project with proper discipline by discipline I mean there will be proper structure to your application and you have to follow controllers providers and module syntax with schemas as well as dto also should be present on your project all these things will make sure that you can add new features without worrying much about existing feature breaking or thinking that whether it is going to work or not but if you want to give 100 of the customization that how does your work data comes how does it goes out of your application and where and all what and all needs to happen exactly then obviously using express.js is wise in terms of that because express.js gives you full freedom to use whatever the thing you want to use in your project and there is benefit to it that it is going to let you do that and there is disadvantages to it also because it's going to make make sure you might go wrong at any point in time because there is no such syntax that which you have to follow in order to build Expressions you can do whatever you want to do you can create route wherever you want to create you can create files wherever you want to create and it's going to work and importing is also another mess like you can import files this that everything you can do in it that's actually benefit for pro developers but at same time if you are not that much experienced there might be chance that you might do lots of mistake so next JS is preferred in that case but as always if you follow discipline it's easier to implement feature in next year so most of the time you can Implement any kind of feature but you are restricted to making sure that how do you make it work in messages principle messages principle is not like rigidly enforced you might not follow it but if you follow it then it's actually better that to be followed as how they are meant to follow but there might be a chance that you might not follow it but if you know the consequences that how does one Feature work that means you should have experienced that how does that particular feature works because making any kind of plugin which is meant for X work in Nest yes is 100 possible but you need to think and understand how to make it actually work on nest.js it's possible but there might be some pieces which you might have to add up in order to make sure it will work in your project as you expect it to work but in as precious it is easily implementable if you just follow syntax it's going to work as you expected it to work now to the main question which is actually the best to use the answer to that particular question is always complicated but let me make it easy for you if you are working on a project which is going to be changed rapidly in future maybe adding additional features to it stick with nest.js it's going to help you but if you are working on some project which is small and it might be one time project maybe you are giving it to one client or something like that it's preferred that you use express shares as the name suggests you code it once and it's done there won't be any kind of multiple iteration or updates to it so it's better if that's the case to use express.js directly but if you are planning to build bigger projector which means there are hundreds of feature which you are waiting to add to it then using necesses best choice that's it for this video guys and if you want to know more about nest jsr and what exactly it is here is one video and you can watch it that's all for this video see you in the next video bye
Info
Channel: Manjunath Shenoy
Views: 6,726
Rating: undefined out of 5
Keywords:
Id: b0KyYYChAg0
Channel Id: undefined
Length: 4min 35sec (275 seconds)
Published: Sat Apr 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.