r/angularjs • • Oct 19 '15

Refactoring Angular Apps to Component Style

http://teropa.info/blog/2015/10/18/refactoring-angular-apps-to-components.html
81 Upvotes

9 comments sorted by

View all comments

10

u/vinnl Oct 19 '15

I'm stuck at step 0, convincing my co-works to switch to component style :P

1

u/dhca78 Oct 22 '15

What got you into refactoring the Angular codebase? Are your coworkers really into programming or is it just a job to them? If they really like programming, then I think just showing them how clean the codebase will be after componentizing them should rile them up. If not, you can just refactor just a directive or two and reuse them, and show how much time you've saved. The biggest motivation for me, is the upcoming web components standard and how far behind our codebase will be in the future if we don't refactor.

1

u/vinnl Oct 23 '15

I actually ran into this for a new project that I had set up using the component style. The main comment was "this is different from how we're used to doing it, so it will take the rest of the team more time to comprehend the code base". There's some merit to that argument, and in this case the advantage was non-obvious: the component wasn't actually re-used, the main advantage being encapsulation and future-readiness. Unfortunately, they're either the type for whom programming is just a job, or consider front-end work just a necessary evil part of the job, so yeah...