Flat front-end application structure
来源:互联网 发布:冷笑话 知乎 编辑:程序博客网 时间:2024/06/02 00:49
As there are plenty of tools and libraries for front-end appliation development, the application has become complicated and structured. A neatly structured application could help you locate your code in a short time, which improve the readability of your project as well as saving your searching time in development.
Nowadays flat structure is appreciated in front-end applications. We abandon the way to managing files by file types, which obviously is a bad idea. Instead, functionality structure is preferred and universally adopted by different development teams. So as web applications. Basically the root of your project contains the following files and folders:
./distnode_modules/src assets /images /global_styles /fonts components/ common/ home/ login/ me/ products/ config/ i18n/ index.html main.jspackage.json.gitignore
We always seperate our source code from project configurations and tool configurations. It’s absolutely a good practice because tools and project settings might change as new tech develop fast. That’s why we place our code under src
and other config and tools are in the same as src
.
Inside src
folder, we try to manage the files inline with app functionality, instead of seperating them in to script
style
, service
, template
etc in the past, which takes longer time to search files and content. We take everything as modules, including html, js and css, since they work together originally.
Inside component
folder, we also make modules (files) ‘flat’ (parallel). Nesting module should be avoided whenever possible because when the app grows over-nesting will become a nightmare for code maintainance. Parallel structure decoples the dependencies between modules, which is the target your should go for in development. More important, for components that could be resued, you should try to abstract them to common
folder. Think about refactor whenever a module you finish.
- Flat front-end application structure
- front-end
- front end
- gcc front end
- C/C++ Front End
- C / C ++ front end
- front-end development 总结
- Front-end Developer Handbook
- #Udacity#Front-end#Study_Note
- kotlin-cn front end
- code skills(front end)
- 南京希达公司急聘Sr. Web Application Front End Programmer and QA
- [Front-end] What makes a good front end engineer
- C/C++ Front End Compiler
- Queues in Customer Front End
- [Front-end] CSS3 Patterns, Explained
- [Front-end] Handy CSS Tricks
- Front End Accessibility Development Guide
- li 样式 不显示 overflow:hidden 导致Li前面样式不见的解决办法
- (系统)基于I/O文件处理的猜拳系统
- HYSBZ
- Chapter 5
- 在mfc中使用cef实现webkit的浏览器(一)-准备工作
- Flat front-end application structure
- Hadoop学习笔记 4
- AndroidStudio中使用代码管理软件添加忽略文件
- 插入排序 Java
- FastDFS分布式文件系统
- SpringBoot-单元测试
- VTK学习(四)
- 洛谷P2006--赵神牛的游戏_题解
- Sass创建简单的项目