Architecture of a Modern Javascript Web Application (Node.js & React)

preview_player
Показать описание


In the next videos, we'll dive deeper into each of these topics so you can learn how to build your own web app.

Рекомендации по теме
Комментарии
Автор

Amazing, I just wished you didn't stop doing these vids.

chirilaandrei
Автор

Great! Thanks for taking the time to make this series of tutorials!

ChristopheHartwig
Автор

Man, I have been learning react for the last month. I come from an express vanilla background.
I was trying to code a modular blog website... kinda wordpress without the graphical admin interface and only with one percent of the functionality :D
My codebase is so cluttered, I am super impressed just skimming through your code in this video! It's just so clean!!

I mean my code is so messy that my mom just started throwing slippers at me!

johannsebastianbach
Автор

Really liked your video. The tools you use are almost exactly the same as mine. Also the architecture is very similar to my past projects. However I think I've found a better way.

For example the physical file hierarchy. 'controller, models, api''.. etc. Is very abstract. It does not tell the reader the intent of the system. When I was using that structure, I found my self jumping around the system quite a bit just to develop a single single feature. I'd have to update the controller, then switch to an entirely different folder hierarchy to update a model, then and update the server api, etc. Over time it slowed my speed, It make it difficult to add or remove features as systems greew because they were so spread out in the system.

So I tried a different approach. I started grouping code by use case, rather than by the category of the code tool. For example instead of grouping all the controllers together in the same folder, I created use-case folders where each use-case has its own controller.

For example there is one folder called 'user_login' which contains all the code for a typical user logging in. It still has a controller, a model and an api for routing etc. But from a coding point of view, it is much more efficient. Everything that changes together stays together.

One might argue that you lose the code-reuse opportunities with this method. For example you would have duplicate code for two different types of user-login. admin_user_login and normal_user_login might have the same user model. But that's why we have abstract classes. just pull what is common between the two user models into a file called abstract-user-login.js and have both use case models extend it.

chriskerley
Автор

This was useful, thanks a lot for posting

justinsmith
Автор

Make more tutorials about NodeJS, Thanks for these videos. Can you make how to structure files in NodeJS and MongoDB(Database)

vincesanchez
Автор

Is that API folder, for the back-end?
I mean is it needed for the front-end part of the project?

alirezaataei
Автор

can you share your this whole application code with us? that way we can better understand the structure. that would be really helpful

DR-eewv
Автор

Very Usefull and very clean code! Do u have any courses?

sisansahu
Автор

Please provide a GitHub link of this repo for your viewers.

abhishekjaiswal