File Structure (Part 1)
There are few ways for people who arrange their folder structures and which i do not wish to invent it.
My approach is to arranging my folder structures based on Features not by types
What is Type?
Angular have alot of types. for example, we have Controller, Services, Directives which are the commonly used.
We do not wish to arrange our file structure like this:
This file approach is suitable only for SMALL application, for enterprise application, we have tons of Modules and alot of programmers are working on different modules.
So before we jump to multiple modules, we should first arrange our file structures by modules.
Let say build an intranet application which consists with Employees modules, eTimelog modules and eLeave modules. I would like also to create main folder to stores all my framework (layout, sidebar, navigationbar, footer-bar etc on my site. here is my simple file structure:
- common: putting all my modal, services\repositories\utilities class to be use through out the entire module.
-eLeave\eProject\eTimelog : basically is my eleave module
-main: putting in my app.js, config.router.js in there
This is the simple highlevel of my humble file structure, Each developers can focus on the individual folder. in the Individual folder, i will also create sub-folder
e.g eTimelog \ create
eTimelog \ admin
That is pretty much on my file folder. Next post will focus on Module how we can use module and inherit the module from child(e.g eTimelog) all the way to the (App)
My approach is to arranging my folder structures based on Features not by types
What is Type?
Angular have alot of types. for example, we have Controller, Services, Directives which are the commonly used.
We do not wish to arrange our file structure like this:
This file approach is suitable only for SMALL application, for enterprise application, we have tons of Modules and alot of programmers are working on different modules.
So before we jump to multiple modules, we should first arrange our file structures by modules.
Let say build an intranet application which consists with Employees modules, eTimelog modules and eLeave modules. I would like also to create main folder to stores all my framework (layout, sidebar, navigationbar, footer-bar etc on my site. here is my simple file structure:
- common: putting all my modal, services\repositories\utilities class to be use through out the entire module.
-eLeave\eProject\eTimelog : basically is my eleave module
-main: putting in my app.js, config.router.js in there
This is the simple highlevel of my humble file structure, Each developers can focus on the individual folder. in the Individual folder, i will also create sub-folder
e.g eTimelog \ create
eTimelog \ admin
That is pretty much on my file folder. Next post will focus on Module how we can use module and inherit the module from child(e.g eTimelog) all the way to the (App)
Comments