Thứ Năm, 13 tháng 2, 2014

An AngularJS Style Guide and Best Practice for App Structure

Want to know more about AngularJS Best Practices, as we use them at Google?


UPDATE 4/19/2015: The most current and detailed Angular Style Guide is the community-driven effort led by John Papa and Todd Motto, which you can find at https://github.com/johnpapa/angular-styleguide. Please use this instead of the one mentioned below.

You can now find a published copy of Google's AngularJS Style guide at https://google-styleguide.googlecode.com/svn/trunk/angularjs-google-style.html. While this documents how we use AngularJS in production code at Google, you'll notice that the style guide is heavily biased towards JSCompiler optimizations and the needs of large code bases. We don't think this makes sense for all projects that use AngularJS, and we'd love to see our community of developers come up with a more general Style that's applicable to AngularJS projects large and small. Interested in helping or leading this project? Sign up here, and choose "Style Guide for Angular" and we'll be in touch.

We've also published some new Best Practice Recommendations for Angular App Structure. One of our goals is to come up with a recommendation that meets the needs of both large and small app developers, so that we can start developing tooling that makes development easier. If you're not using this recommended structure yet, don't worry. It's fine to keep doing what you're doing. At some point, we hope the efficiency gain of having more developer tools will make it worth your time to convert over.

Không có nhận xét nào:

Đăng nhận xét