Тёмный
No video :(

Vue.js Modular Architecture 

Sanjar Mirakhmedov
Подписаться 631
Просмотров 49 тыс.
50% 1

In this video, I will go through the Modular Architecture in Vue.js applications as well as show a basic implementation, and explain why it is a better approach, than the traditional Folder By Type architecture in bigger applications, that should be scaled and maintained for a long time.
Project Source Code: github.com/Dar...
Premium Courses from Me:
Vue.js + Vuetify Custom Video Player: www.udemy.com/...
#vuejs #vue3 #javascript

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 52   
@MrShnaiderTV
@MrShnaiderTV 7 месяцев назад
As front-end developers, it is high time for us to think about the architecture of our projects and raise quality standards during development. This video brings up an important topic. If the architecture described in this video doesn't quite suit you, here's a tip. Architectures are based on two groups of principles: coupling and cohesion. I would describe the last group as follows: combine what "uses each other", "is used simultaneously" and "changes for the same reason". Based on these principles, you can change the architecture to suit yourself. Start by creating a directory when creating a new page and put into it all the files that appear during the development of this page: vue components, stores, composables, etc. If any of this will be used on other pages, put it in the project root directories (by type). Over time, you will find a directory structure that you like. The main thing is to follow these 3 principles and then you will get all the advantages of a "modular architecture" (which is actually just an architecture)
@xucongzhan9151
@xucongzhan9151 3 года назад
Haha, have to point out that this is what Angular has been promoting since Day 1, which I am a huge fan of. Glad to see it in a Vue form. I am actually in the middle of a similar refactoring and this tutorial helps. Thanks for sharing.
@cegrif01
@cegrif01 2 года назад
Really nice architecture! I like to use scoped slots to further decouple the gathering of the data (store) from the presentation of that data. Webpack knowledge is definitely a must so that js exports load properly. This is an excellent video Sanjar. Thank you!
@matheussunderhus9421
@matheussunderhus9421 2 года назад
folder structure is not architecture. Design patterns are. You can have a clean and easy to find folder architecture with a really mess up code with a lot of complexity and coupling
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Indeed, the topic of the video is not about the actual code architecture, but rather solely organizing folders/files, anyways thank you for adding extra information that other people can benefit from!
@kaibe5241
@kaibe5241 Год назад
@@sanjarmirakhmedov8311 Then your video title is wrong and/or misleading. As Matheus said, this isn't an architecture. It's a code organisation approach.
@yosvelquintero
@yosvelquintero 2 года назад
I have worked with Angular and React... But I can tell you that Vue with this modular architecture looks amazing!! Thank you Sanjar Mirakhmedov for sharing good content!!👌
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Glad you have enjoyed the video, by the way same architecture can be applied to React and Angular as well, the principles stay the same=)
@MeonisRP
@MeonisRP 2 года назад
Забавно, я думал об этом вчера даже нигде не слышав. И тут твой видос. Значит такой паттерн существует)
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 Год назад
Due to several people pointing out, I just wanted to make clear that the video is not full on about architecting/writing the actual code, but rather showing how to implement a modular/feature based folder structure with opinionated way of wiring up things. Important to note here, that it's not an absolute one way to go, you can come up with your own implementation of a modular folder structure.
@user-re8lt2gy3g
@user-re8lt2gy3g 9 месяцев назад
I recommend using shared folder as well coz sometimes u need to acces data between features and that's i think can become nasty
@codedjango
@codedjango 9 месяцев назад
Can you do this tutorial for Vue 3?
@yatagun
@yatagun 3 года назад
Круто! Давай еще! Можно даже на русском запилить такое же видео - на русском очень мало инфы об архитектуре вью да и вообще что то сложнее туду личта по вью
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 3 года назад
Большое спасибо, рад что тебе понравилось! Может быть в будущем будут видео на русском ;)
@baihakialbiruni2565
@baihakialbiruni2565 2 года назад
thanks sir, very very useful, im from indonesia
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Glad you enjoyed the video!
@user-cf5uf7vf2g
@user-cf5uf7vf2g Год назад
really similar like composer project, great tutorial.
@asim-gandu-phenchod
@asim-gandu-phenchod 3 года назад
You earned a like bro. Really appreciate your video. Thanks a lot
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 3 года назад
Thank you very much, I am glad that you’ve enjoyed the video ;)
@asim-gandu-phenchod
@asim-gandu-phenchod 3 года назад
@@sanjarmirakhmedov8311 Can you please make a small video/playlist of a very basic project like a todo list or a stopwatch and explain the whole modular architecture of Vue using the project?
@hangor3620
@hangor3620 Год назад
Great video, i've refactorred my codebase using this approach. Looks promising. One thing i couldn't solve is using keep-alive with nested router-views, so i just implemented all the stuff you've talked in the video but without using the Module.vue component and nested sub-routes. In addition, it looks a bit different with vue 3 and vue-router 4, but the general idea is the same:) Do you think it's fine to drop Module.vue and nested router-view?
@pablotaiocchi6691
@pablotaiocchi6691 Год назад
did you solved it? I have the same issue
@_parassolanki
@_parassolanki 2 года назад
Its good when you separate out files when its been used multiple times but for smaller app its not needed you can just define your logic in one file and its fine. Separate out things (logic) when needed
@SuperKnivesOut
@SuperKnivesOut 2 года назад
can someone help me do this with nuxt? it's more closed in terms of changing folder structure
@azizarifrizaldi1817
@azizarifrizaldi1817 8 месяцев назад
cool!
@karthikeyanpalanisamy8299
@karthikeyanpalanisamy8299 3 года назад
Nicee Architecture to implement
@lucahoffmann8695
@lucahoffmann8695 Год назад
i keep getting the error "router.addRoutes is not a function" inside the router.js of my module... i am using "vue": "^3.3.4", "vue-router": "^4.2.4" any idea why this function does not work / exist ?
@ShinigamiZone
@ShinigamiZone Год назад
It looks interesting and maybe worth trying. But how does this work with e.g. i18n and some VSCode extensions 🤔
@vlad6075
@vlad6075 2 года назад
There is also patterns like atomic wich i like to use c:
@danielcastllomarfull
@danielcastllomarfull 7 месяцев назад
Very nice. Thanks!
@ChiCity511
@ChiCity511 2 года назад
Does this have any performance advantages or is it purely organizational?
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
It's purely organization, because you basically handle only the way you split up the files and folders, but not how they run.
@mhDuke
@mhDuke 2 года назад
very good video Sanjar.
@luansinh0
@luansinh0 Год назад
There is a way to implement it with Nuxt?
@kaloyannikolov5806
@kaloyannikolov5806 Год назад
Ok but what happens if we need to have navigation ? And we don't want to rerender the navigation bar every time in new module since its loosing its animation states ?
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 Год назад
If you want to persist the navigation across all modules, then you define it in the Root component as it's shown in the video, so that the only thing re-renders is the .
@tutunmayan
@tutunmayan 2 года назад
Has benefits if you have a large team and a large project. Otherwise won't make a real difference
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Of course, if you are building a very simple application with few pages and components, then it would probably be an overkill, but if your app already features few modules, then its really beneficial even if the team is small. Mentally it's easier to focus on one feature at a time, and have everything under your hand nicely in one folder.
@alimodz6253
@alimodz6253 Год назад
does it make sense to also create a "components" folder inside a module to store components only used within that module views
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 Год назад
Sure thing, you can come up with your very own structure within the modules, the video explains only the very abstract/core concepts of splitting your app into several independent modules
@xjuampa7983
@xjuampa7983 2 года назад
This video is so good
@syakirrahman4747
@syakirrahman4747 2 года назад
Thank you bro
@SonNguyen-lw9nj
@SonNguyen-lw9nj 2 года назад
thanks you!
@rhejiearanez9951
@rhejiearanez9951 Год назад
Thanks for this content bro I appreciate it. by the way, I subscribe to your channel.
@namaefumei
@namaefumei 2 года назад
Does this really work in large scale projects? I have a project that has more than 100 pages and around 60 components. If I use this method I'll have to have more than 300+ files and folders.
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Yes, it is specifically good for large projects, the increase in folders/file size is a benefit rather than downside, it’s easier to manage folder for a feature, than one gigantic folder for all features.
@mowazzemhosen366
@mowazzemhosen366 3 года назад
wow man
@jcatstreams8550
@jcatstreams8550 Год назад
Тег вью 3, хотя используется вью 2😢
@ob6217
@ob6217 2 года назад
is dis counted as mvc architecture??
@sanjarmirakhmedov8311
@sanjarmirakhmedov8311 2 года назад
Not really, this is just a way to organize your frontend code so that its more manageable and scalable, its more of a folder/file architecture with some minor additional stuff. MVC is a bit different topic, related to code logic organization.
@tbloom5328
@tbloom5328 7 месяцев назад
This is ridiculous. This structure is out of the box in Vue. This is NOT a architecture, design patterns are as mentioned.
@AMFLearning
@AMFLearning 2 года назад
#amflearningbydoing #amflearning nice content
Далее
Can You Bend This Bar?
01:00
Просмотров 4,5 млн
What does larger scale software development look like?
24:15
The Difference Between Vue and React
10:27
Просмотров 35 тыс.
Build your own Custom Composables in Vue
12:13
Просмотров 41 тыс.
Vue Slots Simplified
7:25
Просмотров 55 тыс.
The Most Legendary Programmers Of All Time
11:49
Просмотров 552 тыс.
3 VUE DESIGN PATTERNS You Should Try In Your Code
2:16