Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Naming conventions + style guide and best practices #185

Closed
manavsehgal opened this issue Dec 28, 2015 · 10 comments
Closed

Naming conventions + style guide and best practices #185

manavsehgal opened this issue Dec 28, 2015 · 10 comments

Comments

@manavsehgal
Copy link

In the spirit of following best practices for this starter. Any thoughts on naming conventions and style guide for Angular2, that this starter can follow?

Kind of like Angular2 version of the famous johnpapa angular 1 style guide. I am sure many of the recommendations can be reused for Angular 2 with few changes.

Currently I notice following issue with component naming:

Angular 2 official docs seem to suggest using app.component.ts and AppComponent naming convention. More verbose.

PS: I have not looked up the design docs of Angular2 if there are "official" docs that can kickstart such a style guide.

@PatrickJS
Copy link
Owner

yeah good idea I can start one

@manavsehgal
Copy link
Author

Great! I will be happy to contribute.

NathanWalker added a commit to NathanWalker/angular2-webpack-starter that referenced this issue Jan 4, 2016
@dsebastien
Copy link

At work we've just started investing in AngularJS (time pressure), but since Angular 2 is just around the corner, we're trying hard to make things easier when we decide to upgrade/migrate.

As far as I can see for now, I think that AngularJS 1.5 apps written in TypeScript can share a (partly) common style guide (e.g., folder structure, folder-per-feature idea, focus on componentization, usage of classes, ...

If you're interested, I'll document here the things that we come up with along our project.

@PatrickJS
Copy link
Owner

@dsebastien I'm interested if you can that would help everyone in the Angular community

@manavsehgal
Copy link
Author

@dsebastien @gdi2290 Let us start a wiki page for documenting the naming conventions. We can use this thread to report issues or debate alternatives.

Agree with @dsebastien that we can reference existing conventions so it is easy for folks migrating over from Angular1.

Where missing, we can also lookup other best practices - like API naming conventions from Apigee could possibly help navigation / router related naming conventions.

@PatrickJS
Copy link
Owner

I created a wiki page here https://github.com/AngularClass/angular2-webpack-starter/wiki/Best-Practices I'll update next week so if you guys can update it before then it would be awesome to see everyone opinion first

@jek-bao-choo
Copy link

I added my opinion to the wiki page you created @gdi2290

@manavsehgal
Copy link
Author

Updated best practices.

@MrLehiste
Copy link

There is angular 2 style guide based on johnpapa guide: mgechev's Angular 2 Style Guide

@joshwiens
Copy link
Contributor

All of which have been rolled into a single Angular architecture & style guide. This is covered in the wiki as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
6 participants