SC5 / gulp-bobrsass-boilerplate

Gulp BoBrSASS Boilerplate
7 stars 13 forks source link

Angular.js structure for services, filters, data models etc #30

Closed kennu closed 9 years ago

kennu commented 9 years ago

It seems to be unclear how Angular.js application files should be structured under src. I would recommend the structure used by Angular-Fullstack, which groups all "article" related files under client/app/article:

article.controller.js
article.controller.spec.js
article.html
article.js
article.scss

Additionally it groups data models (services) and filters under client/components/article:

article.service.js
articleurl.filter.js

Following a given structure like this, it's very easy to build a coherently structured web app, and to automatically inject all the controllers, routes, services and filters into index.html.

juhamust commented 9 years ago

Agreed. The boilerplate should give some guidance what is the suggested structure for Angular projects - something often asked by developers / not guided by framework.

laurisvan commented 9 years ago

Yep, we would want to do that (and it's on the list), but we do want to do it so that it won't result in merge conflicts when pulling changes from upstream. So the hypothetic structure is something the forker may safely delete once he has his own artefacts in place.

I favour the idea of having an opinionated sample in place, but I prefer the implementor to have choice of going his/her way. While an experienced developer might not find find value on having a pre-set structure in place (they're opinions, after all, and developers favour their opinion), it indeed adds value for the ones that are still learning their way.

laurisvan commented 9 years ago

Pull request #36 should fix this. I wonder why it wasn't autoreferenced here, regardless of the fixes label and the issue number...