Node.js Project Structure and Architecture Best Practices

  Рет қаралды 46,594

Software Developer Diaries

Software Developer Diaries

Күн бұрын

Пікірлер: 66
@rjwhite4424
@rjwhite4424 11 ай бұрын
Video was super helpful! I'd love to see a tutorial where you make a simple api from start to finish showing how to correctly use the 3-layer approach
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 11 ай бұрын
Thanks! I’ll try to follow that pattern in future videos 😉
@gosnooky
@gosnooky 11 ай бұрын
NestJS provides a seamless implementation of the 3-layer architecture. I recommend using it for anyone not wanting to re-invent the wheel.
@SayfSentinel
@SayfSentinel Жыл бұрын
i use almost an identical approach, it would be great to have this folder structure and a bit of code to understand the logic behind it in a github repo! very nice analyze, you got a subscriber with a ringbell activated :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
I couldn’t really go into code due to time constraints but thank you for the feedback 😉 And happy to have you here!
@Matter743
@Matter743 7 ай бұрын
Can you attach the github repo?
@code_react
@code_react Жыл бұрын
For this reason i really love to use Nestjs. Which is using 3 layer approach. And also you can have modules for each different tasks.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Good point!
@BarakAlmog
@BarakAlmog 11 ай бұрын
Great video. Thanks so much! Second or third time that I'm watching it. Appreciate it!
@aurobindobhuyan2107
@aurobindobhuyan2107 8 ай бұрын
For Logging and Debugging, I use Morgan and Winston. The best part is you can combine it together to have the best o/p.
@madhavanand756
@madhavanand756 Жыл бұрын
Make a video upon how to do testing, unit testing etc. And also best practice to implement logs. Superbbbb content dude. I was looking for this from sooo long. Up for any support if needed.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Will do, buddy. Thanks for the nice words! 😊
@nicolasmayorga8288
@nicolasmayorga8288 7 ай бұрын
Amazing explanation, I'm here trying to learn more about architectures in backend due to I'm a Frontend trying to understand more about backend logic.
@alandmcleod5988
@alandmcleod5988 7 ай бұрын
Excellent! Nice layout and simple to read code. Unusual on KZbin vids 🙂
@isuckatthisgame
@isuckatthisgame Жыл бұрын
I typically implement a DAL (Data Access Layer) to mediate between a service and a database in my architecture. Within the model layer, I maintain class definitions that represent database entities, which I refer to as entity models. My approach can be seen as a sort of 3.5-layer architecture, as the model layer doesn't have direct communication with the database. 🙂 Anyhow, thanks for explanation.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Interesting, thanks for sharing :)
@wahebbenzaid543
@wahebbenzaid543 28 күн бұрын
I think you're implementing something like Respository patten, in that case, the ORM you use should'nt apear in the service layer. Instead, you use the ORM in the repositories, then you call its functions in the services right ?
@Jarjarniks
@Jarjarniks 8 ай бұрын
Would have loved to be able to see this repository and investigate the routes, services, controllers etc in more detail. Thank you for the great video nonetheless!
@yunyang6267
@yunyang6267 Жыл бұрын
Could you show us how to properly deploy a microservices architecture like this with several services and monitoring service to AWS or some other cloud proviiders? I think it'd be a great video
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Great suggestion!
@stillmattwest
@stillmattwest 7 ай бұрын
This video should really be a playlist. It would be great if you slowed down and gave some specific examples for each of the major points. It seems like your target audience is new Node developers, but you move way too fast for them to keep up with you.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 7 ай бұрын
Great suggestion, will keep it in mind!
@maximus4510
@maximus4510 Жыл бұрын
That was informative for sure
@dailypromos6477
@dailypromos6477 Жыл бұрын
Thank you for sharing!!
@codewithyaji
@codewithyaji Жыл бұрын
Very helpful vidoe of node developers.
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Glad to hear that!
@samueltheophilus1779
@samueltheophilus1779 Жыл бұрын
Love your videos man. What tool do you use to make these boards
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
It’s Excalidraw :)
@achrefnabil2463
@achrefnabil2463 Жыл бұрын
Can you share microservices/serverless/SOA/monolith folder structure
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
I’ll consider those in future videos 🙂
@paperC_CSGO
@paperC_CSGO 9 ай бұрын
Please do a video on monorepos!
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 9 ай бұрын
Already have one! 🙂
@PJ-od9ev
@PJ-od9ev 5 күн бұрын
Hi I wish I could access that project example in github.
@jawwadrizvi4291
@jawwadrizvi4291 3 ай бұрын
Do you really need a separate model layer when you are using an ORM like sequelize?
@aurobindobhuyan2107
@aurobindobhuyan2107 8 ай бұрын
Glad I'm following the same folder structure. 3layer structure 😅😅
@yutsacarm8021
@yutsacarm8021 10 ай бұрын
really good content
@srikantagrawal6118
@srikantagrawal6118 3 ай бұрын
Hey! Thanks for the video😍. Can you please share the folder?
@bautistavicens7870
@bautistavicens7870 10 ай бұрын
Could you apply Design Patterns, like Strategy, in node projects like the one in the video, with router, controllers and services? I´ve seen it and applied it in Java projects, but with POO paradigm. So, i´m in doubt if it is a good practice or not, to use it in node projects with this kind of paradigm.
@prajwalmandlik3517
@prajwalmandlik3517 7 ай бұрын
If anyone has a good source for learning this, please share it in the comments.
@onstn4129
@onstn4129 11 ай бұрын
Thank u ❤
@ajmaln73
@ajmaln73 9 ай бұрын
can u share the codebase link in the description?
@mrlectus
@mrlectus 3 ай бұрын
Why you separate controllers and router? Can't they be the same thing?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 3 ай бұрын
They could, but it’s easier to work with separate files, once the number of endpoints gets too large
@mrlectus
@mrlectus 3 ай бұрын
@@SoftwareDeveloperDiaries ok understood
@MoaathAlattas
@MoaathAlattas Жыл бұрын
it would be great to complete this with `Analytics`, `Continuous Integration (CI)` and `Deployments (staging/production)`
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Good point!
@niju7489
@niju7489 11 ай бұрын
I have class based routers and controllers and models are seperate...I generated them using sequelize cli
@ramdoni3935
@ramdoni3935 Жыл бұрын
good explaine next content please Go-lang :)
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Ohh I'd first need to learn Go :D
@shreshthverma1535
@shreshthverma1535 Жыл бұрын
can you share the repo of this project
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Unfortunately there's no code for this one :/
@shreshthverma1535
@shreshthverma1535 11 ай бұрын
any example repo??@@SoftwareDeveloperDiaries
@lnard0
@lnard0 10 ай бұрын
Hello, Do you still got the repo for this?
@wahebbenzaid543
@wahebbenzaid543 28 күн бұрын
what about the repository pattern ? the repository can contains only the db interactions using the ORM (ODM) like mongoose. in this case, you should NEVER use mongoose in the service layer, because it's only for writing the buisness logic!
@lardosian
@lardosian Жыл бұрын
FYI...sounds like you might have some kind of automated video or audio editing, seems to cut off some words in parts of your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
Exactly, it’s a feature in Filmora that removes silent parts of the video :)
@lardosian
@lardosian Жыл бұрын
@@SoftwareDeveloperDiaries Sounds like it needs tweaking because its removing parts of words, possibly a gate setting.
@ericsiddiq7634
@ericsiddiq7634 10 ай бұрын
is it possible to get this project source code?
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries 10 ай бұрын
Unfortunately not for this one, sorry 🥲
@whysohypocritical
@whysohypocritical Жыл бұрын
I wish you could share the code for your videos
@SoftwareDeveloperDiaries
@SoftwareDeveloperDiaries Жыл бұрын
I will do my best to do that in the future videos!
@torque_onair
@torque_onair 6 ай бұрын
Did you mean that the best structure is a nest? I agree :)
@khaledsanny4817
@khaledsanny4817 Жыл бұрын
We want to read your code 😊
@maksymshyshkov2787
@maksymshyshkov2787 9 ай бұрын
good video. sorry for changing 666 thumbs up to +1 )) but I can't just pass by
@frankr919
@frankr919 Жыл бұрын
😒 'promosm'
@guntacaytar
@guntacaytar 10 ай бұрын
huseyin baskan r harflarini cok vurgulu soyluyorsun dinlemek yorucu oluyor. haberin olsun. basarilarinin devamini dilerim
When to use Node.js "cluster" vs "worker thread"? #Shorts
0:41
Software Developer Diaries
Рет қаралды 44 М.
Леон киллер и Оля Полякова 😹
00:42
Канал Смеха
Рет қаралды 4,7 МЛН
Deep Dive into REST API Design and Implementation Best Practices
12:02
Software Developer Diaries
Рет қаралды 71 М.
This Folder Structure Makes Me 100% More Productive
24:36
Web Dev Simplified
Рет қаралды 124 М.
5 deadly Rust anti-patterns to avoid
13:25
Let's Get Rusty
Рет қаралды 40 М.
Node.js Security Best Practices: JWT blacklisting, rate limiting, schema validation
12:02
Node.js is a serious thing now… (2023)
8:18
Code With Ryan
Рет қаралды 667 М.
The Complete Guide to Folder Structures in React
25:23
Cosden Solutions
Рет қаралды 15 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 235 М.
Scaling your Node.js app using the "cluster" module
13:44
Software Developer Diaries
Рет қаралды 52 М.
How To Design Amazing REST APIs
18:57
Amichai Mantinband
Рет қаралды 21 М.