practice to write directives and services/controllers