logo

Standards

Never Nest more then 3 deep

Invert Happy path out of code

File Names

Best Practices

PROGRAMMING : Standards
File Names

File Names should like variables, should tell exactly what that file is for. This way you can use a quick file search to find exactly what that file is for and to keep it getting confused with other similar named files.

For example lets say you want to create a webpage for your sites members. Some of the files you might need are a member page, member component, member interface, member schema, member controls, member forms. Unless you carefully name these files you will have hunt down the file you are looking for in the directory tree.

In the above case if you were creating a React Component for Member, even though the file is named MemberComponent you could still name the component Member.

Please Login or Register to comment